[algogeeks] Re: Graph theoretic problem

2008-02-06 Thread Rajiv Mathews
they aren't the most incongruous. To quote the fastest resource I can lay my hands on: :-) http://en.wikipedia.org/wiki/Dominating_set "Dominating sets are closely related to independent sets: a maximal independent set in a graph is necessarily a minimal domin

[algogeeks] Re: Graph theoretic problem

2008-02-06 Thread Rajiv Mathews
you refer to. (On a lazy search) I couldn't find anything useful. -- Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algog

[algogeeks] Re: diameter of a graph

2007-06-17 Thread Rajiv Mathews
"distance to farthest pendant vertex". -- Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To u

[algogeeks] Re: Why we need prime numbers?

2007-06-13 Thread Rajiv Mathews
rization makes it a suitable basis for modern cryptography." -- Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@

[algogeeks] Re: Please help me!!!!

2007-06-13 Thread Rajiv Mathews
; That's like saying you can't do binary search in O(lg n), you need O(n) to "read the array"? Something wrong don't you think. ;-) -- Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[algogeeks] Re: Graph Problem

2007-05-16 Thread Rajiv Mathews
gt; it's maximum degree is the best possible? > (2) What's the time complexity, is it bound tightly? > (3) Is there any better way? > > Thanks > > > > > -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this me

[algogeeks] Re: Find the type

2007-04-25 Thread Rajiv Mathews
On 4/25/07, Ravi <[EMAIL PROTECTED]> wrote: > > What is the type of following grammar: > S -> aXY > XY -> a Context-sensitive grammar. I'm not sure if context-sensitive grammars have been subclassed to cover something like this in particular. > X -> b > Y

[algogeeks] Re: Pumping lemma. Where I go wrong?

2007-04-05 Thread Rajiv Mathews
e link: "Note that the pumping lemma does not give a sufficient condition for a language to be regular. That is, the lemma holds for some non-regular languages. If the lemma does not hold for a language L, then L is not regular. If the lemma does hold for a language L, L migh

[algogeeks] Re: Pumping lemma. Where I go wrong?

2007-04-05 Thread Rajiv Mathews
=0^n-2, y=0^2, z=the rest. The basic flaw is that you've ignored the fact that the pumping lemma is used as an adversarial dialogue, between, you, the person trying to prove a language is not regular, and someone, who claims to have a finite state machine that ac

[algogeeks] Re: Pigeon Hole Principle

2007-03-24 Thread Rajiv Mathews
100 - R + 2*r" How do you justify this if the sections aren't contiguous? I think the proof elaborated by _stone_ is correct and apt. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[algogeeks] Re: Pigeon Hole Principle

2007-03-24 Thread Rajiv Mathews
y 100 white sections. The question doesn't state a particular ordering only states that there are 100 white and red sections each on the outer disk. Please clarify. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are s

[algogeeks] Re: Sorting o(n) time

2007-03-16 Thread Rajiv Mathews
ment to get the top k elements, O(n). -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com

[algogeeks] Re: help making regular expression

2007-03-15 Thread Rajiv Mathews
Languages refer to www.cct.lsu.edu/personal/estrabd/papers/paper333final.pdf PREs basically provide this additional "tool" of shuffling, which much like non-determinism (in finite state machines) turns out to NOT provide any additiona

[algogeeks] Re: Inplace sorting

2007-03-14 Thread Rajiv Mathews
nd why not give the complete solution? Cos the fun is in _solving_ not reading the solution. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post

[algogeeks] Re: To find a rectangle of max sum

2007-03-12 Thread Rajiv Mathews
' by Jon Bentley, where he had mentioned that the O(m^2 * n) bound was the best any one had done back then. I realize now that ``Programming Pearls'' are pretty outdated and was wondering if any one is aware of anything that has better

[algogeeks] Re: To find a rectangle of max sum

2007-03-12 Thread Rajiv Mathews
lculated dimension, perform a linear scan similar to the one dimensional version of the problem along the other dimension. The pairs enumerable will work out to O(m*m) and the sweep will be O(n). (Made possible with the help of the precalcuation in the previous step). -- Rega

[algogeeks] Re: Interesting Probability Question

2007-03-08 Thread Rajiv Mathews
yield what I guess should be called _limiting_ probabilities. ;-) > 2. It is true that there are a lot of points outside the triangle that you > cannot choose but they all lie in a finite set of lines Again, I think this is incorrect. Please refer to my argument in my previous post.

[algogeeks] Re: Interesting Probability Question

2007-03-08 Thread Rajiv Mathews
of these sweep angles that are unsuitable to form a quadriateral are 180 degrees (sum of internal angles of a triangle). Obviously since we can sweep only 360 degrees, we arrive at 1/2. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message bec

[algogeeks] Re: Interesting Probability Question

2007-03-08 Thread Rajiv Mathews
lds infinitely many positions _outside_ the triangle. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegr

[algogeeks] Re: Interesting Probability Question

2007-03-07 Thread Rajiv Mathews
infinity. As I've posted above this still doesn't mean that the probability of getting a quadrilateral hull tends to 1. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "A

[algogeeks] Re: Interesting Probability Question

2007-03-07 Thread Rajiv Mathews
m not saying that this expected area is tight, I just feel that expected area << (a^2)/7. -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to t

[algogeeks] Interesting Probability Question

2007-03-06 Thread Rajiv Mathews
I came across this interesting probability question recently. Consider an infinite two dimensional plane. 4 points are chosen at random on this plane. What is the probability that the convex hull of the 4 points will be a quadrilateral? -- Regards, Rajiv Mathews

[algogeeks] Re: Permutation with a twist ??

2007-02-02 Thread Rajiv Mathews
I'm sorry. My algo is terribly wrong! On 2/3/07, Rajiv Mathews <[EMAIL PROTECTED]> wrote: > > Combination(Array Elements, Array Answer) > { > if(Elements.size() == 0) print Answer, return; > for(i in Elements) >//Select the particu

[algogeeks] Re: Permutation with a twist ??

2007-02-02 Thread Rajiv Mathews
er.push_back(Elements[0]) //Don't select the element -- equiv to 0 say Combinations(Elements+1, Answer) } -- Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algor

[algogeeks] Re: Kurukshetra Online Programming Contest

2006-12-27 Thread Rajiv Mathews
ase feel free to fill in information about your organization if you're not a college/school student. Regards, Rajiv Mathews --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" gr

[algogeeks] Re: hi...can any one have the art of programming by knuth solutions for volume 3

2006-11-19 Thread Rajiv Mathews
On 11/20/06, subrahmanyam kambala <[EMAIL PROTECTED]> wrote: > hi...can any one have the art of programming by knuth solutions for volume 3 Don't Knuth books have solutions in them? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[algogeeks] Re: check string A and B isPermutation ?

2006-04-10 Thread Rajiv Mathews
I had written.. >>So, using a sort the complexity really is >>O(2n log 2), Isn't it? Oh yeah.. That's terribly bad logic! @Gene >>Use radix sort to make it O(N W) where W is the bit-width of the >>characters in the string, hence O(N). I don't really get how a radix pass is going to help here eith