Re: [algogeeks] Re: puzzle

2012-08-12 Thread Amitesh Singh
if you meant to calculate the E[x] for [HT,TH,TT]. It can be solvable but very lengthy/boring. I shall give you an example which should help you. Let E[X] = x be the expected no. of coin flips to get [HT] 1) if first flip is a tail, we have wasted one flip hence. E[X1] = 1/2*(1+x) 2) if first fl

Re: [algogeeks] Re: puzzle

2012-08-12 Thread Amitesh Singh
Does the pattern comes in this way? HT,TH,TT or HT(X)TH(X)TT ?? Let me know. -- Amitesh On Sat, Aug 11, 2012 at 11:24 PM, Piyush wrote: > How can I find the expected number of tosses , required to obtain a > {HT,TH,TT} , by using random variables?? > > On Friday, December 31, 2010 8:27:46

[algogeeks] Re: puzzle

2012-08-11 Thread Piyush
How can I find the expected number of tosses , required to obtain a {HT,TH,TT} , by using random variables?? On Friday, December 31, 2010 8:27:46 PM UTC+5:30, Dave wrote: > > @Anuj and Bittu: It is not necessary to know the bias. You can > simulate the flip of an unbiased coin with multiple flip

[algogeeks] Re: Puzzle

2012-03-02 Thread Gene
My crazy guess is that you need to add 1900 and then these are important years. Maybe years when a team won some sports championship? I'm getting this from the "no math or outside knowledge." You need inside knowledge. On Feb 27, 8:24 am, karthikeya s wrote: > 3, 39, 41, 43, 45, 49, 51, 53, 5

[algogeeks] Re: Puzzle

2012-02-29 Thread icy`
hm, very strange set of numbers. If the first number was 38 I *might* see the hints of a pattern, but since it is just 3, I have no idea. [if the first number was ] 38(now +1, or 1 squared) 39 , 41, 43, 45(+4, or 2 squared) 49, 51, 53, 55(+9, or 3 squared) 64, __ __ __ (I w

Re: [algogeeks] Re: puzzle

2011-10-06 Thread KARTHIKEYAN V.B.
let no of boys be x and no of girls be y. then, x=y+1 2(y-1)=x solving these we get x=4,y=3 so,x+y=7 there are 7 children. am I right -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@

Re: [algogeeks] Re: puzzle

2011-10-06 Thread vaibhav shukla
4 boys , 3 girls .. 7 children b: no. of boys g: no of girls b-1=g (1st condition) b=2(g-1) (2nd condition) gives the answer On Thu, Oct 6, 2011 at 3:42 PM, shady wrote: > 7, try thinking by yourself... > if anyone has some different answer only then post > > On Oct 6, 3:05 pm, 9ight cod

[algogeeks] Re: puzzle

2011-10-06 Thread shady
7, try thinking by yourself... if anyone has some different answer only then post On Oct 6, 3:05 pm, 9ight coder <9ightco...@gmail.com> wrote: > A family has several children. every boy has as many brothers as > sisters. Every gal has twice as many brothers as sisters. How many > childrens are

Re: [algogeeks] Re: puzzle

2011-09-24 Thread sukran dhawan
GP 2011/9/24 яαωαт Jee > ^^ ans will be n*30 mins > > On Sep 24, 8:40 am, яαωαт Jee wrote: > > sum of GP.. > > a=1 > > common ratio=4 > > > > sum is given=5.6 billion.. find n > > simple enough > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks

[algogeeks] Re: puzzle

2011-09-23 Thread яαωαт Jee
^^ ans will be n*30 mins On Sep 24, 8:40 am, яαωαт Jee wrote: > sum of GP.. > a=1 > common ratio=4 > > sum is given=5.6 billion.. find n > simple enough -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to al

[algogeeks] Re: puzzle

2011-09-23 Thread яαωαт Jee
sum of GP.. a=1 common ratio=4 sum is given=5.6 billion.. find n simple enough -- 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 unsubscribe from this group, send email to al

[algogeeks] Re: puzzle

2011-08-28 Thread vikas
Piyush, nice solution.. On Aug 27, 1:44 am, "icy`" wrote: > Other than making little loops and risking the fall on the first trip > down, I dont think the rope question has an answer.   NVIDIA just > wanted to see if you were suicidal  =D > > On Aug 26, 3:36 pm, Piyush Grover wrote: > > > >

[algogeeks] Re: puzzle

2011-08-28 Thread vikas
lol On Aug 27, 1:44 am, "icy`" wrote: > Other than making little loops and risking the fall on the first trip > down, I dont think the rope question has an answer.   NVIDIA just > wanted to see if you were suicidal  =D > > On Aug 26, 3:36 pm, Piyush Grover wrote: > > > > > > > > > Cut th

Re: [algogeeks] Re: puzzle

2011-08-26 Thread Anup Ghatage
Check this out: Tie it at the 200th meter mark. Throw the 150mt rope down. Climb down to the 100th meter pole. Tie the rope there from the middle, and not the end. So what you have is a 150 mt rope that is tied at 200 mt mark, 100 mt mark and 50 mts of the rope from 100 mt marks is hanging. Now

Re: [algogeeks] Re: puzzle

2011-08-26 Thread SuDhir mIsHra
i hope now it clear: [image: Screenshot.png] -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.

[algogeeks] Re: puzzle

2011-08-26 Thread icy`
Other than making little loops and risking the fall on the first trip down, I dont think the rope question has an answer. NVIDIA just wanted to see if you were suicidal =D On Aug 26, 3:36 pm, Piyush Grover wrote: > Cut the rope in 50mtrs and 100mtrs length. > > Make a small loop(of negligible

Re: [algogeeks] Re: puzzle

2011-08-26 Thread Piyush Grover
Cut the rope in 50mtrs and 100mtrs length. Make a small loop(of negligible length at one end of the 50 mtrs rope) Tie the other end of the rope at the top and from the loop end side pass the 100mtrs rope such that you have both the ends of 100mtrs rope in your end. now get down at 100mtrs peg po

[algogeeks] Re: puzzle

2011-08-26 Thread icy`
I hope you dont mind that I respond to the original question about the 6x6 matrix. As I understand it, all elements have to be either 1 or -1, and product of *every* row and *every* column is 1 => how many arrangements? Now a bunch of you seem to think(nxn) => 2^((n-1)^2) gives the answer

Re: [algogeeks] Re: puzzle

2011-08-26 Thread Naren s
varun: can u explain it little further.. On Wed, Aug 10, 2011 at 7:49 PM, varun pahwa wrote: > make two ropes 50m and 100 meter. make a loop kind of thing with that now > you have two 50 mtr ropes so get down to 100 mtr point and tie loop rope in > downward now cut the loop at 100 mtr you have 1

Re: [algogeeks] Re: puzzle

2011-08-26 Thread Himanshu Srivastava
lol :P On Wed, Aug 10, 2011 at 11:35 PM, $hr! k@nth wrote: > Tie the rope at the top of the tower > Climb down with the help of the rope up to 100 mt peg possItion > Tie the rope to that peg, Climb up to the top of the tower with that rope. > Now release the rope at the top and hold it. It ll t

[algogeeks] Re: Puzzle

2011-08-21 Thread DK
@Phoenix_feathers: My final solution is M-married, L-married, N-not married. Therefore, the third if condition isn't satisfied and the consequent is irrelevant. @Dave: If they're not if--then conditions but rather factual assertions, then there is a contradiction between statements (1) and (2)

Re: [algogeeks] Re: Puzzle

2011-08-21 Thread rahul aravind
consider the last two cases N married L not married L not married M married so now tak M and N compare it with first case M married N not married therfore,only m married On Sun, Aug 21, 2011 at 1:06 PM, Tushar Bindal wrote: > @arun > > if L is not married, then M must be married > but if L i

Re: [algogeeks] Re: Puzzle

2011-08-21 Thread Tushar Bindal
@arun if L is not married, then M must be married but if L is married then M can be married or not married, so if we say L is married to M, there is no problem in that On Sun, Aug 21, 2011 at 12:53 PM, Ravindra Singh Poonia < ravindrasinghpoo...@gmail.com> wrote: > only M is married > > > On Sat

Re: [algogeeks] Re: Puzzle

2011-08-21 Thread Ravindra Singh Poonia
only M is married On Sat, Aug 20, 2011 at 11:24 PM, Puneet Chawla wrote: > only M is married. > > > On Sat, Aug 20, 2011 at 7:53 PM, Arun Vishwanathan > wrote: > >> @DK:if L is married to M according to you finally , then what does the >> third if then statement according to you mean when it is

Re: [algogeeks] Re: Puzzle

2011-08-20 Thread Puneet Chawla
only M is married. On Sat, Aug 20, 2011 at 7:53 PM, Arun Vishwanathan wrote: > @DK:if L is married to M according to you finally , then what does the > third if then statement according to you mean when it is given that if L is > not married then M is married? > > > On Fri, Aug 19, 2011 at 10:35

[algogeeks] Re: Puzzle

2011-08-20 Thread Dave
@Nikhil: The sum of the internal angles of an n-gon is (n - 2) * 180 degrees. The given polygon must satisfy 25 * 90 + (n - 25) * 270 = (n - 2) * 180. This simplifies to 25 + 3*n - 75 = 2*n - 4, giving the solution n = 46. Since 25 angles are convex, 46 - 25 = 21 are concave. Dave On Aug 20, 6:4

Re: [algogeeks] Re: Puzzle

2011-08-20 Thread Arun Vishwanathan
@DK:if L is married to M according to you finally , then what does the third if then statement according to you mean when it is given that if L is not married then M is married? On Fri, Aug 19, 2011 at 10:35 PM, Dave wrote: > @DK: What in the statement of the problem led you to believe that > th

[algogeeks] Re: Puzzle

2011-08-19 Thread Dave
@DK: What in the statement of the problem led you to believe that these were if-then statements? Dave On Aug 19, 3:15 pm, DK wrote: > Note that in the answer above, the table given is of the form: > > If condition is true    then what predicate is true > --    ---

Re: [algogeeks] Re: puzzle

2011-08-10 Thread $hr! k@nth
Tie the rope at the top of the tower Climb down with the help of the rope up to 100 mt peg possItion Tie the rope to that peg, Climb up to the top of the tower with that rope. Now release the rope at the top and hold it. It ll take you down.:P On Wed, Aug 10, 2011 at 7:49 PM, varun pahwa wrot

Re: [algogeeks] Re: puzzle

2011-08-10 Thread varun pahwa
make two ropes 50m and 100 meter. make a loop kind of thing with that now you have two 50 mtr ropes so get down to 100 mtr point and tie loop rope in downward now cut the loop at 100 mtr you have 100 mtr rope then move down with the help of that. i hope i am clear. On Mon, Aug 8, 2011 at 1:52 PM,

Re: [algogeeks] Re: puzzle

2011-08-08 Thread Shachindra A C
tie the rope to the peg and hold the rope at a little less than 100m point. Then jump. On Mon, Aug 8, 2011 at 1:19 PM, Himanshu Srivastava < himanshusri...@gmail.com> wrote: > @Dave oh i thought some logical concept willl be applied in that > case...it is ok!!! > thanks:) > > > On Fri, Aug 5,

Re: [algogeeks] Re: puzzle

2011-08-08 Thread Himanshu Srivastava
@Dave oh i thought some logical concept willl be applied in that case...it is ok!!! thanks:) On Fri, Aug 5, 2011 at 1:47 AM, Dave wrote: > @Himanshu: That is easy for any boy scout. :-) Tie the rope at the top > of the tower. Then tie a sheepshank knot of a comfortable length in > the rope a

Re: [algogeeks] Re: Puzzle

2011-08-05 Thread Tushar Bindal
"of this double, half is kept inside the well, and the other half is used as input to the 2nd well" half mean 1/2 or 50% how can we assume it to be 100??? if we take it to be 1/2, the question goes wrong, so ur concept is valid but then question should have been framed correctly On Fri, Aug 5, 20

[algogeeks] Re: Puzzle

2011-08-05 Thread Lakshmi Prasad
I didn't understand it fully plese explain On Aug 4, 2:48 pm, sagar pareek wrote: > double 87.5 gives you 175 > 100 will be used by 1st well and 75 will be used by second > now second well will double the 75 and will give you 150 > 100 will be used by second and remainder 50 will forwarded to thi

Re: [algogeeks] Re: Puzzle

2011-08-05 Thread Arun Vishwanathan
I guess anubhav soln seems ok On Thu, Aug 4, 2011 at 8:50 PM, ankit sambyal wrote: > @aditi:Thats a non uniform rope. The 1st half may burn faster than 2nd > half. > btw Priyanka's solution is correct. > > -- > You received this message because you are subscribed to the Google Groups > "Algo

[algogeeks] Re: puzzle

2011-08-04 Thread Dave
@Himanshu: That is easy for any boy scout. :-) Tie the rope at the top of the tower. Then tie a sheepshank knot of a comfortable length in the rope and cut the middle strand inside the knot. Climb down the rope to the peg and tie the other end of the rope onto the peg. Then, while standing on or ha

Re: [algogeeks] Re: Puzzle

2011-08-04 Thread ankit sambyal
@aditi:Thats a non uniform rope. The 1st half may burn faster than 2nd half. btw Priyanka's solution is correct. -- 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 unsubscribe f

Re: [algogeeks] Re: Puzzle

2011-08-04 Thread aditi garg
@dave...im not burning half of the rope or anything...my idea is jst to increase the rate of burning..by folding it in the middle and then lighting it from both ends...im burning the entire rope wid 4 times the rate of burning...shud take 15 mins On Thu, Aug 4, 2011 at 9:52 PM, Dave wrote: > @Ad

[algogeeks] Re: Puzzle

2011-08-04 Thread Dave
@Aditi: The ropes burn at non-uniform rates. So for your solution, you would have to fold it in half according to time, not according to length. But you don't know where the half-hour point is unless you light one end of the second rope at the same time you light both ends of the first rope. When t

[algogeeks] Re: puzzle

2011-07-28 Thread Don
If you fill the upper 5x5 submatrix in any way, the two conditions can be met by setting the last element of each row to the product of the first five elements of that row, and likewise with the columns. The lower right element can be formed using either the product of the last column or last row.

[algogeeks] Re: puzzle

2011-07-28 Thread abhijit sahoo
if a matrix of order nxn is given for every elements of a given row or column we could arrange it in 2 way (i,e either 1 or -1),but as the product across rows and column is 1,so we cannot arrange at least one element,which will be depending on the product of rest n-1 elements..so finally we can

Re: [algogeeks] Re: Puzzle and solution

2011-07-22 Thread sagar pareek
thanks its almost same :) i was hoping for a diff answer (if exists) On Fri, Jul 22, 2011 at 4:25 PM, Rajeev Kumar wrote: > Please check this : http://www.techinterview.org/post/526313890/bad-king > > On Tue, Jul 19, 2011 at 8:43 PM, sagar pareek wrote: > >> hey guys pls tell any other better so

Re: [algogeeks] Re: Puzzle and solution

2011-07-22 Thread Rajeev Kumar
Please check this : http://www.techinterview.org/post/526313890/bad-king On Tue, Jul 19, 2011 at 8:43 PM, sagar pareek wrote: > hey guys pls tell any other better solution ... > > > On Tue, Jul 19, 2011 at 6:41 PM, sagar pareek wrote: > >> Question :- >> >> >> >> Once upon a time in ancient time

[algogeeks] Re: Puzzle and solution

2011-07-19 Thread sagar pareek
hey guys pls tell any other better solution ... On Tue, Jul 19, 2011 at 6:41 PM, sagar pareek wrote: > Question :- > > > > Once upon a time in ancient times there was a king who was very fond of > wines. He had a huge cellar, which had 1000 different varieties of wine > all in different caskets

Re: [algogeeks] Re: Puzzle

2011-07-17 Thread Tushar Bindal
thankyou :) -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this g

Re: [algogeeks] Re: Puzzle

2011-07-17 Thread sagar pareek
Well you can find it in WILLIAM STALLINGS's book of cryptography. or foundation of cryptography by wenbo mao :) :) On Sun, Jul 17, 2011 at 9:02 PM, Tushar Bindal wrote: > thanks sagar for this wonderful shortcut > > but can you please explain it better. in what cases can we use this > appro

Re: [algogeeks] Re: Puzzle

2011-07-17 Thread Tushar Bindal
thanks sagar for this wonderful shortcut but can you please explain it better. in what cases can we use this approach? -- 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 unsubs

Re: [algogeeks] Re: Puzzle

2011-07-12 Thread sagar pareek
@Tushar Bindal No need of long calculations :) here is a shortcut, actually in O(1) time :) for calculating chances of any two entities to collide in given different species is just take underoot of it. here underoot of 365 is approx 19.he he enjoy the solution. For more details just go through

Re: [algogeeks] Re: puzzle

2011-07-09 Thread Decipher
This question was asked by ST micro for hiring intern in my college . Here's the solution : Let the bottles of alcohol named 0 to 5 then - No.Binary Value 00 0 0 10 0 1 20 1 0 30 1 1 41 0 0 51 0 1 Mice - a b c Now make the mice drink alcohol

[algogeeks] Re: puzzle

2011-07-08 Thread ranjith
Max of 14 drops required Consider the floor from which egg needs to be dropped as F F = 0, x =14 do { F = F + x drop first egg from floor F x-- }while(first egg doesnt break); F = F - x-1; do { F++ drop second egg from floor F }while(second egg doesnt break); return F On Jul 6, 10:05 pm, sh

Re: [algogeeks] Re: puzzle

2011-07-07 Thread Sumit chauhan
Ans :- 3 let bottles be1,2,3,4,5,6 and mice be a,b,c. separate bottle 6 make pairs P(1,2,3) ; Q(2,4) ; R(3,4,5) and given to mice a,b,c resp. if poison is inbottle mice who dies 1 a 2 a,b 3

Re: [algogeeks] Re: Puzzle

2011-07-07 Thread Tushar Bindal
Sory once again for that incomplete answer. The complete one is here. probability that i win standing at second position: 1/365 probability that i win standing at third position : 364/365*2/365 = 1/365)*(628/365) probability that i win standing at fourth position : 364/365*363/365*3/365 probability

Re: [algogeeks] Re: Puzzle

2011-07-07 Thread Tushar Bindal
probability that i win standing at second position: 1/365 probability that i win standing at third position : 364/365*2/365 = 1/365)*(628/365) probability that i win standing at fourth position : 364/365*363/365*3/365 probability that i win standing at 4th position : 364/365*363/365*362/365*4/365

Re: [algogeeks] Re: Puzzle

2011-07-07 Thread Tushar Bindal
Sorry for the previous post the last line was incorrect it should have been (n+1)th position I was just writing roughly and pressed send instead of save. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to al

Re: [algogeeks] Re: Puzzle

2011-07-07 Thread Tushar Bindal
probability that i win standing at second position: 1/365 third position : 364/365*2/365 = 1/365)*(628/365) fourth position : 364/365*363/365*3/365 4th : 364/365*363/365*362/365*4/365 nth position: (365-1)*(365-2)*(365-3)*(365-4)*(365-5).*(365-(n-2))*(365-(n-1))*(n)*(1/365)^n -- You received

[algogeeks] Re: Puzzle

2011-07-07 Thread Gaurav Tyagi
The greatest chance i.e. 100% chance would be at position number 366. (By Pigeonhole principle). On Jul 7, 2:34 pm, swetha rahul wrote: > At a movie theater, the manager announces that they will give a free ticket > to the first person in line whose birthday is the same as someone who has > alrea

Re: [algogeeks] Re: Puzzle

2011-07-07 Thread swetha rahul
Got it...Thanks.. On Wed, Jul 6, 2011 at 11:31 PM, shiv narayan wrote: > speed of river=(distance traveled by object in it) / total time it > took to travel > > here hat has traveled a distance of 1 KM > and it has taken =5mn+5 min=10 min=10min/60=1/6 hrs; > so speed = 1/(1/6)=6km/hr > > On Jul 6

Re: [algogeeks] Re: puzzle

2011-07-06 Thread Aakash Johari
How AP(ans=14) solution is satisfying the constraints? -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@googl

Re: [algogeeks] Re: puzzle

2011-07-06 Thread saurabh singh
We have two eggs,so have only two chances of missing.SO its about a combination of binary and linear search. On Thu, Jul 7, 2011 at 9:09 AM, Aakash Johari wrote: > And what about binary search? > > On Wed, Jul 6, 2011 at 12:26 PM, 991 wrote: > >> Sorry abt the previous post ( and this one ) if

Re: [algogeeks] Re: puzzle

2011-07-06 Thread Aakash Johari
And what about binary search? On Wed, Jul 6, 2011 at 12:26 PM, 991 wrote: > Sorry abt the previous post ( and this one ) if it ended up as a spam. > I just saw the question and left the place. When I finished posting, > ppl hav already given replies... > > On Jul 7, 12:12 am, 991 wrote: > > App

[algogeeks] Re: puzzle

2011-07-06 Thread 991
Sorry abt the previous post ( and this one ) if it ended up as a spam. I just saw the question and left the place. When I finished posting, ppl hav already given replies... On Jul 7, 12:12 am, 991 wrote: > Approach 1: > > Start from storey 1 and go up. keep dropping one of the eggs. As soon > at

[algogeeks] Re: puzzle

2011-07-06 Thread 991
Approach 1: Start from storey 1 and go up. keep dropping one of the eggs. As soon at it breaks, return the storey you are in now. No. of drops in the worst case: 99 Approach 2: Split the building into 10 '10 storeyed' parts. Start Dropping eggs at 10,20,30,...th storey. If it breaks at say 40th

Re: [algogeeks] Re: puzzle

2011-07-06 Thread Tushar Bindal
the solution is given here but can anyone lease explain it better please give a original solution and stop making rude comments about answers posted genuinely. If you have an original solution, please post it. -- You received

[algogeeks] Re: Puzzle

2011-07-06 Thread shiv narayan
speed of river=(distance traveled by object in it) / total time it took to travel here hat has traveled a distance of 1 KM and it has taken =5mn+5 min=10 min=10min/60=1/6 hrs; so speed = 1/(1/6)=6km/hr On Jul 6, 9:28 pm, Tushar Bindal wrote: > Let speed of boat be x miles/hr > Let speed of river

[algogeeks] Re: puzzle

2011-07-06 Thread shiv narayan
whr s(S+1)/2 must be nearly equal to 100 can uexplain.. On Jul 6, 10:48 pm, TIRU REDDY wrote: > s(s+1)/2 must be close to 100. > The best possible number is 14. > > try from 14th floor. > next from 14+13th floor. > next from 14+13+12th floor. > > > Worest case number of attempts = 14. > Best

[algogeeks] Re: PUZZLE

2011-06-27 Thread Dave
Replying to myself, I should have printed i*i instead of i near the end of the code: printf("%i\n",i*i); Dave On Jun 27, 11:47 pm, Dave wrote: > @Bhavesh: Check the squares of the integers from > ceiling(sqrt(123456789)) to floor(sqrt(987654321)) to see which ones > contain all nine nonzero digi

[algogeeks] Re: PUZZLE

2011-06-27 Thread Dave
@Bhavesh: Check the squares of the integers from ceiling(sqrt(123456789)) to floor(sqrt(987654321)) to see which ones contain all nine nonzero digits. Since the sum of the nine nonzero digits is 45, a satisfactory square will be a multiple of 9, and therefore, we only need consider the squares of i

Re: [algogeeks] Re: puzzle

2011-06-27 Thread Bhavesh agrawal
ok , yeah 3 is the correct answer .. -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For m

Re: [algogeeks] Re: puzzle

2011-06-27 Thread sunny agrawal
@Bhavesh NO there is No stupity just a mistake in reading the question mice die within 14 hrs.Not exactly 14 hours :) 3 is correct answer. On Mon, Jun 27, 2011 at 10:51 PM, Bhavesh agrawal wrote: > only ONE mouse ...consume each sample of bottles of bear with a difference > of one hour

Re: [algogeeks] Re: puzzle

2011-06-27 Thread Bhavesh agrawal
only ONE mouse ...consume each sample of bottles of bear with a difference of one hour and calculate time.. sry if is thr any stupidity in this answer..but i think it may be right -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post

Re: [algogeeks] Re: puzzle

2011-06-26 Thread amit kumar
hey harry.what r u upto? guys have already shown that answer is three On Mon, Jun 27, 2011 at 4:45 AM, hary rathor wrote: > 5 mice: > result time complete > bottle to mice1: 14 hour > after 2.5 hour to mice2

Re: [algogeeks] Re: puzzle

2011-06-26 Thread hary rathor
5 mice: result time complete bottle to mice1: 14 hour after 2.5 hour to mice2 : 16.5 hour after 2.5 hour to mice3 : 19 hour after 2.5 hour to mice4 : 21.5 hour after 2.5 hour to mice5 : 24 hour one of

[algogeeks] Re: puzzle

2011-06-26 Thread Dumanshu
These type of solutions require to think in binary. First of all leave the last one because if we don't find a poisoned bottle in first 5 then it means the last one is poisoned. So 5 can be expressed using 3 bits. these 3 bits will correspond to mice... 1 indicates the mice drinks and 0 indicates

Re: [algogeeks] Re: puzzle

2011-06-26 Thread harshit pahuja
i got it :) nice @dev!! -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options,

Re: [algogeeks] Re: puzzle

2011-06-26 Thread udit sharma
@Harshit: Check dave's solution... U'll get ur ans :) -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@go

Re: [algogeeks] Re: puzzle

2011-06-26 Thread harshit pahuja
hw u r gettin 3 i m gettin 4 mine is make 4 grups 1,2,6 no 1 2,3,5 no 2 1,3,4 no 3 4,5,6no 4 nw out of 4 2 mice will die,and in their corresponding groups common bottle will give you the answer. correct me if i am wrong -- You received this message bec

[algogeeks] Re: puzzle

2011-06-26 Thread Dave
@D.N.: The problem with your solution is that it can take up to 28 hours, but you must determine the poisoned beer in at most 24 hours. Dave On Jun 26, 2:30 pm, "D.N.Vishwakarma@IITR " wrote: > first make two group of 3 bottle each > one mice for each group > make mixture of 3 bottle and put for

Re: [algogeeks] Re: puzzle

2011-06-26 Thread Arpit Sood
thanks dave. On Mon, Jun 27, 2011 at 1:07 AM, Dave wrote: > 3 Mice: Call them mouse #1, mouse #2, and mouse #4 (think binary > code). > Give mouse #1 a mixture of bottles 1, 3, and 5. > Give mouse #2 a mixture of bottles 2, 3, and 6. > Give mouse #4 a mixture of bottles 4, 5, and 6. > Add up the

Re: [algogeeks] Re: puzzle

2011-06-26 Thread Arpit Sood
you cant use the old mouse again because time he has mentioned is 14 hours... so you will have to wait for another 14 hours which exceeds the given time limit of 24 hours... so it is 4. On Mon, Jun 27, 2011 at 1:00 AM, D.N.Vishwakarma@IITR wrote: > first make two group of 3 bottle each >

[algogeeks] Re: puzzle

2011-06-26 Thread Dave
3 Mice: Call them mouse #1, mouse #2, and mouse #4 (think binary code). Give mouse #1 a mixture of bottles 1, 3, and 5. Give mouse #2 a mixture of bottles 2, 3, and 6. Give mouse #4 a mixture of bottles 4, 5, and 6. Add up the numbers of the mice that die to get the number of the poisoned beer bott

Re: [algogeeks] Re: puzzle

2011-06-26 Thread D.N.Vishwakarma@IITR
first make two group of 3 bottle each one mice for each group make mixture of 3 bottle and put for mice . do same for other group only one mice will die . then select group of dead mice . beak it into three group one bottle each now we can use old mice which is not dead and one more for two bottle

Re: [algogeeks] Re: puzzle

2011-06-26 Thread Ankit Agarwal
3 think in binary.. :) On Mon, Jun 27, 2011 at 12:56 AM, Arpit Sood wrote: > 4 > @amit what's the answer ? > > > On Mon, Jun 27, 2011 at 12:40 AM, shiv narayan > wrote: > >> can u please explain how is it 3? >> >> On Jun 26, 11:18 pm, "D.N.Vishwakarma@IITR " >> wrote: >> > 3 mice . >> > >> >

Re: [algogeeks] Re: puzzle

2011-06-26 Thread Arpit Sood
4 @amit what's the answer ? On Mon, Jun 27, 2011 at 12:40 AM, shiv narayan wrote: > can u please explain how is it 3? > > On Jun 26, 11:18 pm, "D.N.Vishwakarma@IITR " > wrote: > > 3 mice . > > > > On Sun, Jun 26, 2011 at 6:13 PM, ArPiT BhAtNaGaR < > > > > > > > > > > > > > > > > > > > > arpitbha

[algogeeks] Re: puzzle

2011-06-26 Thread shiv narayan
can u please explain how is it 3? On Jun 26, 11:18 pm, "D.N.Vishwakarma@IITR " wrote: > 3 mice . > > On Sun, Jun 26, 2011 at 6:13 PM, ArPiT BhAtNaGaR < > > > > > > > > > > arpitbhatnagarm...@gmail.com> wrote: > > 3 > > > On Mon, Jun 27, 2011 at 2:10 AM, amit the cool > > wrote: > > >> There are

Re: [algogeeks] Re: Puzzle

2011-06-10 Thread Kunal Patil
@ross: seems logically correct..nice solution.. -- 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 unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups

[algogeeks] Re: Puzzle

2011-06-09 Thread ross
@lalit: The idea here would be for Train T, make it cross its own parachute first. Then move both the train fwd until the trailing train reaches a parachute. When the trailing train reaches the parachute of the leading train, make it move faster than the leading train . Naturally the leading train

[algogeeks] Re: Puzzle

2011-05-27 Thread Don
To solve this, look at an 8x8 grid representing the games played. The diagonal is not used, because teams do not play themselves. Below the diagonal is the first game between each team and above the diagonal is the second game. Assume that teams 1-4 are the ones who will go to the semi-finals. This

[algogeeks] Re: Puzzle

2011-05-27 Thread L
Ah! sorry. This combination is not possible. It will be 10,10,10,10,10,4,2,0. So, the answer is 11. On May 27, 10:10 pm, L wrote: > The worst case will occur when 5 teams have the same number of wins. > As only 4 can qualify, one team with the same number of points will > not be able to qualify.

[algogeeks] Re: Puzzle

2011-05-27 Thread L
The worst case will occur when 5 teams have the same number of wins. As only 4 can qualify, one team with the same number of points will not be able to qualify. 1. 11 2. 11 3. 11 4. 11 5. 11 6. 1 7. 0 8. 0 In this scenario, a team with 11 points will not be able to qualify. So, to ensure that i

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@vishwakarma thanks for rectifying me... its clear... 12 is not posible, i was in another way :) On Fri, May 27, 2011 at 7:46 AM, vishwakarma wrote: > correction---it was typo mistake ... > Team C loses to(one to A and one to B) > > On May 27, 7:44 pm, vishwakarma wrote: > > so here we go

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
correction-->>"Then C loses two of its matches to(one to A and one to C). " to "Then C loses two of its matches to(one to A and one to B) ". On May 27, 7:44 pm, vishwakarma wrote: > so here we go > > Let A loses two of its matches to (one to B and one to C). > Let B loses two of its matches

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
correction---it was typo mistake ... Team C loses to(one to A and one to B) On May 27, 7:44 pm, vishwakarma wrote: > so here we go > > Let A loses two of its matches to (one to B and one to C). > Let B loses two of its matches to(one to A and one to C) > Then C loses two of its matches to(o

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
so here we go Let A loses two of its matches to (one to B and one to C). Let B loses two of its matches to(one to A and one to C) Then C loses two of its matches to(one to A and one to C). Now. team D, if it ever plays with (A,B,C) will loses..hence minimum number o matches it is going to

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@Vishwakarma it is now ok that 11 should be the answer, but why any 4 teams cannot win 12 matches in total... for that they have to score 12*4 = 48 points out of 56. then wats the problem. i know how it is coming 11 now, but i am replying back for the doubt i have in a line u just mentioned in y

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@rishabh : now i understand it better... thanks :) On Fri, May 27, 2011 at 7:22 AM, Rishabh Maurya wrote: > because we want upper 4 teams to win maximum matches altogether so > to satisfy this criteria .. last team should win 0 , and team 7 must have > lost all its matches except from t

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
@Arpit Any four team cannot win 12 matches in total. ...Rishabh is wid right answer that is ( " 11 " ). Hence any team winning its any 11 out of 14 matches ensures its entry to semis. But not below 11 its entry to semi will depend on other team performance. On May 27, 7:11 pm, Arpit Mittal

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Rishabh Maurya
because we want upper 4 teams to win maximum matches altogether so to satisfy this criteria .. last team should win 0 , and team 7 must have lost all its matches except from team 8 , so it wins 2 and similarly team 6 wins 4 and team 5 wins 6 . don't forget to watch MI vs RCB .. :) --

[algogeeks] Re: Puzzle

2011-05-27 Thread vishwakarma
sorry !!! correction-->>..i misread the problem My solution gives "what is the lowest possible number of matches won by a qualifying team ". On May 27, 6:37 pm, vishwakarma wrote: > Correct me if i m wrong !!! > > Number of matches of each team  = 14. > Let team A,B,C,D qualify for semifinal. > 1

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Arpit Mittal
@rishabh : in your solution u have taken scores of last 4 teams as 6 4 2 0. what if i take 2 2 2 2 then the ans would be 56-(2+2+2+2)/4 = 12...!!! and i can also take the scores of last 4 teams as 6 4 4 2 then the ans would be 56-(6+4+4+2)/4 = 10!!! so how you can say it would be 11? On Fri,

Re: [algogeeks] Re: Puzzle

2011-05-27 Thread Rishabh Maurya
No , you are wrong .. problem statement says how many matches should a teams win to ensure its qualification , their no word like minimum or maximum ... 8 gets wrong if following situation arises 1 -> 9 2 -> 9 3 -> 9 4 -> 9 5 -> 8 6 -> 6 7 -> 4 8 -> 2 -- You received this message because you

  1   2   >