Re: [algogeeks] Re: probability

2011-01-02 Thread Salil Joshi
@Dave
In point # 1, I had mentioned that P(A survives) + P(B survives)  + P(C
survives) = 1 as the dual will be carried out till only 1 man is left. Do
you agree on this?

By your calculations, P(A survives) = 0.17 * 1 + 0.5 = 0.67
P(C survives) = 0.4962
They add to more than 1. Please let me know your views.



On Mon, Jan 3, 2011 at 11:34 AM, Dave  wrote:

> @Salil. The point that is incorrect is:
> 2. Now, by shooting in air C increases his probability by your
> argument,
> which is not good for A.
> Thus, P(A shooting at C) should NOT be 0 if A is intelligent.
>
> If A shoots C, then B hits A with 50% probability, but if A shoots B,
> then C hits A with only 33% probability. Thus, A's probability of
> survival is higher if he shoots B rather than C.
> Hence, P(A survives) = .67 * P(A shoots B) + .5 * P(A shoots C).
> But since P(A shoots B) + P(A shoots C) = 1,  it follows that
> P(A survives) = 0.67 * P(A shoots B) + 0.5 * [1 - P(A shoots B)]
> = 0.17 * P(A shoots B) + 0.5.
> Therefore, P(A survives) is maximized when P(A shoots B) = 1 and P(A
> shoots C) = 0.
>
> Dave
>
> On Jan 2, 11:07 pm, Salil Joshi  wrote:
> > @Dave,
> > Can you please point out which of the 3 points mentioned earlier sounds
> > incorrect? Because I think that this problem is much like the Three Body
> > problem, and we can not just maximize the likelihood for C, ignoring A &
> B.
> > They will also try to maximize their survival likelihood
> >
> >
> >
> >
> >
> > On Mon, Jan 3, 2011 at 1:34 AM, Dave  wrote:
> > > @Salil: If C shoots at A instead of into the air, he increases the
> > > odds that he will be shot by B, because if C hits A then B will shoot
> > > at C instead of A.
> >
> > > On the other hand, if C shoots at B instead of into the air, he
> > > increases the odds that he will be shot by A.
> >
> > > Thus, shooting at either A or B decreases his odds of survival.
> >
> > > Dave
> >
> > > On Jan 2, 12:25 pm, Salil Joshi  wrote:
> > > > @Dave
> > > > 1. In the end only 1 will survive (after max of 2 rounds).
> > > > i.e. P(A survives in end) + P(B survives in end) + P(C survives in
> end) =
> > > 1
> >
> > > > 2. Now, by shooting in air C increases his probability by your
> argument,
> > > > which is not good for A.
> > > > Thus, P(A shooting at C) should NOT be 0 if A is intelligent.
> >
> > > > 3. If it is not 0, P(C's survival) decreases (doesn't remain
> 0.49624).
> >
> > > > Please let me know if this is clear enough.
> >
> > > > On Sun, Jan 2, 2011 at 11:15 PM, Dave 
> wrote:
> > > > > @Salil: Just to make sure we are on the same page, A hits with 100%
> > > > > probability, B hits with 50% probability, and C hits with 33%
> > > > > probability. C shoots first, then B, then A. Then the shooting
> > > > > continues among the survivors in that order until only one is
> > > > > standing.
> >
> > > > > If all three are alive and it is A's turn to shoot, he logically
> will
> > > > > choose to shoot at B rather than C since B has a greater
> probability
> > > > > of hitting him. Thus, your P(A shooting at C) = 0 if B is unhit
> when
> > > > > it is A's turn.
> >
> > > > > Similarly, if it is B's turn to choose between shooting at A or C,
> he
> > > > > rationally will choose A since A will shoot at and hit B if A gets
> a
> > > > > turn. So your P(B shooting at C) = 0 if A is unhit when it is B's
> > > > > turn.
> >
> > > > > If you dispute either of the above two paragraphs, please clealy
> state
> > > > > your objection.
> >
> > > > > Dave
> >
> > > > > On Jan 1, 11:19 pm, Salil Joshi  wrote:
> > > > > > @Dave,
> > > > > > Yeah, I had read those numbers on internet as this puzzle is well
> > > known.
> > > > > > However I am not convinced with the calculations because of
> following
> > > 2
> > > > > > points:
> >
> > > > > > 1) If C shoots in air, the probability of survival is more for
> the
> > > > > > probabilities considered in the calculations with which A & B
> will
> > > shoot
> > > > > at
> > > > > > him.
> > > > > > Now, if A & B are intelligent, they will know that increasing
> > > s

Re: [algogeeks] Re: probability

2011-01-02 Thread Salil Joshi
@Dave,
Can you please point out which of the 3 points mentioned earlier sounds
incorrect? Because I think that this problem is much like the Three Body
problem, and we can not just maximize the likelihood for C, ignoring A & B.
They will also try to maximize their survival likelihood.


On Mon, Jan 3, 2011 at 1:34 AM, Dave  wrote:

> @Salil: If C shoots at A instead of into the air, he increases the
> odds that he will be shot by B, because if C hits A then B will shoot
> at C instead of A.
>
> On the other hand, if C shoots at B instead of into the air, he
> increases the odds that he will be shot by A.
>
> Thus, shooting at either A or B decreases his odds of survival.
>
> Dave
>
> On Jan 2, 12:25 pm, Salil Joshi  wrote:
> > @Dave
> > 1. In the end only 1 will survive (after max of 2 rounds).
> > i.e. P(A survives in end) + P(B survives in end) + P(C survives in end) =
> 1
> >
> > 2. Now, by shooting in air C increases his probability by your argument,
> > which is not good for A.
> > Thus, P(A shooting at C) should NOT be 0 if A is intelligent.
> >
> > 3. If it is not 0, P(C's survival) decreases (doesn't remain 0.49624).
> >
> > Please let me know if this is clear enough.
> >
> >
> >
> >
> >
> > On Sun, Jan 2, 2011 at 11:15 PM, Dave  wrote:
> > > @Salil: Just to make sure we are on the same page, A hits with 100%
> > > probability, B hits with 50% probability, and C hits with 33%
> > > probability. C shoots first, then B, then A. Then the shooting
> > > continues among the survivors in that order until only one is
> > > standing.
> >
> > > If all three are alive and it is A's turn to shoot, he logically will
> > > choose to shoot at B rather than C since B has a greater probability
> > > of hitting him. Thus, your P(A shooting at C) = 0 if B is unhit when
> > > it is A's turn.
> >
> > > Similarly, if it is B's turn to choose between shooting at A or C, he
> > > rationally will choose A since A will shoot at and hit B if A gets a
> > > turn. So your P(B shooting at C) = 0 if A is unhit when it is B's
> > > turn.
> >
> > > If you dispute either of the above two paragraphs, please clealy state
> > > your objection.
> >
> > > Dave
> >
> > > On Jan 1, 11:19 pm, Salil Joshi  wrote:
> > > > @Dave,
> > > > Yeah, I had read those numbers on internet as this puzzle is well
> known.
> > > > However I am not convinced with the calculations because of following
> 2
> > > > points:
> >
> > > > 1) If C shoots in air, the probability of survival is more for the
> > > > probabilities considered in the calculations with which A & B will
> shoot
> > > at
> > > > him.
> > > > Now, if A & B are intelligent, they will know that increasing
> survival
> > > > probability for C is bad for them (you can calculate survival
> probability
> > > > for A & B in each case), and therefore they will shoot at C with
> higher
> > > > probability than what they were planning earlier.
> >
> > > > 2) C's survival probability depends on P(A shooting at C) * 1 and P(B
> > > > shooting at C) * 1/2.
> > > > If C shoots at A, P(A shooting at C) is less by 33% and P(B shooting
> at
> > > C)
> > > > is more by 33%. So, if P(A shooting at C) dominates by logic in 1st
> > > point,
> > > > C's survival probability will be now more.
> >
> > > > On Sun, Jan 2, 2011 at 7:59 AM, Dave 
> wrote:
> > > > > @Salil: Working out the probabilities, we find that:
> >
> > > > > 1. If C initially shoots at A, C's probability of survival is ~
> > > > > 0.35867.
> > > > > 2. If C initially shoots at B, C's probability of survival is ~
> > > > > 0.27679.
> > > > > 3. If C initially shoots in the air, C's probability of survival is
> ~
> > > > > 0.49624.
> >
> > > > > Dave
> >
> > > > > On Jan 1, 11:30 am, Salil Joshi  wrote:
> > > > > > @Rahul,
> > > > > > As per my understanding,
> > > > > > In any round P(C is dead) = P(A is alive * A shoots C * A's shot
> is
> > > > > > accurate) + P(B is alive * B shoots C * B's shot is accurate)
> > > > > > this is to be minimized.
> > > > > > by not shooting at either A or B in 1st chance, how is thi

Re: [algogeeks] Re: probability

2011-01-02 Thread Salil Joshi
@Dave
1. In the end only 1 will survive (after max of 2 rounds).
i.e. P(A survives in end) + P(B survives in end) + P(C survives in end) = 1

2. Now, by shooting in air C increases his probability by your argument,
which is not good for A.
Thus, P(A shooting at C) should NOT be 0 if A is intelligent.

3. If it is not 0, P(C's survival) decreases (doesn't remain 0.49624).

Please let me know if this is clear enough.



On Sun, Jan 2, 2011 at 11:15 PM, Dave  wrote:

> @Salil: Just to make sure we are on the same page, A hits with 100%
> probability, B hits with 50% probability, and C hits with 33%
> probability. C shoots first, then B, then A. Then the shooting
> continues among the survivors in that order until only one is
> standing.
>
> If all three are alive and it is A's turn to shoot, he logically will
> choose to shoot at B rather than C since B has a greater probability
> of hitting him. Thus, your P(A shooting at C) = 0 if B is unhit when
> it is A's turn.
>
> Similarly, if it is B's turn to choose between shooting at A or C, he
> rationally will choose A since A will shoot at and hit B if A gets a
> turn. So your P(B shooting at C) = 0 if A is unhit when it is B's
> turn.
>
> If you dispute either of the above two paragraphs, please clealy state
> your objection.
>
> Dave
>
> On Jan 1, 11:19 pm, Salil Joshi  wrote:
> > @Dave,
> > Yeah, I had read those numbers on internet as this puzzle is well known.
> > However I am not convinced with the calculations because of following 2
> > points:
> >
> > 1) If C shoots in air, the probability of survival is more for the
> > probabilities considered in the calculations with which A & B will shoot
> at
> > him.
> > Now, if A & B are intelligent, they will know that increasing survival
> > probability for C is bad for them (you can calculate survival probability
> > for A & B in each case), and therefore they will shoot at C with higher
> > probability than what they were planning earlier.
> >
> > 2) C's survival probability depends on P(A shooting at C) * 1 and P(B
> > shooting at C) * 1/2.
> > If C shoots at A, P(A shooting at C) is less by 33% and P(B shooting at
> C)
> > is more by 33%. So, if P(A shooting at C) dominates by logic in 1st
> point,
> > C's survival probability will be now more.
> >
> >
> >
> >
> >
> > On Sun, Jan 2, 2011 at 7:59 AM, Dave  wrote:
> > > @Salil: Working out the probabilities, we find that:
> >
> > > 1. If C initially shoots at A, C's probability of survival is ~
> > > 0.35867.
> > > 2. If C initially shoots at B, C's probability of survival is ~
> > > 0.27679.
> > > 3. If C initially shoots in the air, C's probability of survival is ~
> > > 0.49624.
> >
> > > Dave
> >
> > > On Jan 1, 11:30 am, Salil Joshi  wrote:
> > > > @Rahul,
> > > > As per my understanding,
> > > > In any round P(C is dead) = P(A is alive * A shoots C * A's shot is
> > > > accurate) + P(B is alive * B shoots C * B's shot is accurate)
> > > > this is to be minimized.
> > > > by not shooting at either A or B in 1st chance, how is this
> probability
> > > less
> > > > for C?
> >
> > > > On Sat, Jan 1, 2011 at 10:43 PM, Salil Joshi <
> joshi.sali...@gmail.com
> > > >wrote:
> >
> > > > > @Rahul,
> > > > > What purpose is served by wasting the shot? If C shoots at A or B,
> at
> > > least
> > > > > some probability that C is dead in future will be reduced.
> >
> > > > > On Sat, Jan 1, 2011 at 10:14 PM, RAHUL KUJUR <
> > > kujurismonu2...@gmail.com>wrote:
> >
> > > > >> @snehal:
> > > > >> will the shooting take place in increasing order of accuracy of
> > > hitting
> > > > >> the target and is that at a time only one person can take a
> shot???
> > > > >> if yes then
> > > > >> @Salil:
> > > > >> my answer would be the same as above. what C will do is that it
> will
> > > first
> > > > >> let A and B kill each other first.
> > > > >> After C wastes his shot it will be B's turn. B can kill C, but in
> that
> > > > >> case the turn would go to A and he would surely kill B. If B goes
> > > after A,
> > > > >> then B may hit it or miss it(as its probability of hitting is 50%)
> > > > >> If B misses it
> >

Re: [algogeeks] Re: probability

2011-01-01 Thread Salil Joshi
@Dave,
Yeah, I had read those numbers on internet as this puzzle is well known.
However I am not convinced with the calculations because of following 2
points:

1) If C shoots in air, the probability of survival is more for the
probabilities considered in the calculations with which A & B will shoot at
him.
Now, if A & B are intelligent, they will know that increasing survival
probability for C is bad for them (you can calculate survival probability
for A & B in each case), and therefore they will shoot at C with higher
probability than what they were planning earlier.

2) C's survival probability depends on P(A shooting at C) * 1 and P(B
shooting at C) * 1/2.
If C shoots at A, P(A shooting at C) is less by 33% and P(B shooting at C)
is more by 33%. So, if P(A shooting at C) dominates by logic in 1st point,
C's survival probability will be now more.



On Sun, Jan 2, 2011 at 7:59 AM, Dave  wrote:

> @Salil: Working out the probabilities, we find that:
>
> 1. If C initially shoots at A, C's probability of survival is ~
> 0.35867.
> 2. If C initially shoots at B, C's probability of survival is ~
> 0.27679.
> 3. If C initially shoots in the air, C's probability of survival is ~
> 0.49624.
>
> Dave
>
> On Jan 1, 11:30 am, Salil Joshi  wrote:
> > @Rahul,
> > As per my understanding,
> > In any round P(C is dead) = P(A is alive * A shoots C * A's shot is
> > accurate) + P(B is alive * B shoots C * B's shot is accurate)
> > this is to be minimized.
> > by not shooting at either A or B in 1st chance, how is this probability
> less
> > for C?
> >
> > On Sat, Jan 1, 2011 at 10:43 PM, Salil Joshi  >wrote:
> >
> >
> >
> >
> >
> > > @Rahul,
> > > What purpose is served by wasting the shot? If C shoots at A or B, at
> least
> > > some probability that C is dead in future will be reduced.
> >
> > > On Sat, Jan 1, 2011 at 10:14 PM, RAHUL KUJUR <
> kujurismonu2...@gmail.com>wrote:
> >
> > >> @snehal:
> > >> will the shooting take place in increasing order of accuracy of
> hitting
> > >> the target and is that at a time only one person can take a shot???
> > >> if yes then
> > >> @Salil:
> > >> my answer would be the same as above. what C will do is that it will
> first
> > >> let A and B kill each other first.
> > >> After C wastes his shot it will be B's turn. B can kill C, but in that
> > >> case the turn would go to A and he would surely kill B. If B goes
> after A,
> > >> then B may hit it or miss it(as its probability of hitting is 50%)
> > >> If B misses it
> > >> then
> > >> it depends on A whom to kill. A may kill B or C. A will try to kill
> one
> > >> who is better shooter i.e. B as C is less likely to hit A.
> > >> If B hits A then we are done. Round 1 is complete(as required in the
> > >> question) and C survives the first round.
> > >> Look the problem is not that who gets killed at last but rather what C
> > >> should fire in the first round obviously to survive(as I understood
> the
> > >> problem). It may happen that eventually C gets killed. But what should
> C
> > >> shoot in first round to survive.
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Algorithm Geeks" group.
> > >> To post to this group, send email to algoge...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> algogeeks+unsubscr...@googlegroups.com
> 
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/algogeeks?hl=en.
> >
> > > --
> >
> > > 
> > > Thanks & Regards
> > > Salil Joshi.
> > > CSE MTech II, IITB
> > > A-414, Hostel 12
> > > +91.9819.442.865
> >
> > > This is a confidential E-Mail. If it has reached you by mistake or if
> you
> > > are not the intended receiver, please send it back to me.
> >
> > --
> >
> > 
> > Thanks & Regards
> > Salil Joshi.
> > CSE MTech II, IITB
> > A-414, Hostel 12
> > +91.9819.442.865
> >
> > This is a confidential E-Mail. If it has reached you by mistake or if you
> > are not the intended receiver, please send it back to me.- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to 

Re: [algogeeks] Re: probability

2011-01-01 Thread Salil Joshi
@Rahul,
As per my understanding,
In any round P(C is dead) = P(A is alive * A shoots C * A's shot is
accurate) + P(B is alive * B shoots C * B's shot is accurate)
this is to be minimized.
by not shooting at either A or B in 1st chance, how is this probability less
for C?


On Sat, Jan 1, 2011 at 10:43 PM, Salil Joshi wrote:

> @Rahul,
> What purpose is served by wasting the shot? If C shoots at A or B, at least
> some probability that C is dead in future will be reduced.
>
>
>
> On Sat, Jan 1, 2011 at 10:14 PM, RAHUL KUJUR wrote:
>
>> @snehal:
>> will the shooting take place in increasing order of accuracy of hitting
>> the target and is that at a time only one person can take a shot???
>> if yes then
>> @Salil:
>> my answer would be the same as above. what C will do is that it will first
>> let A and B kill each other first.
>> After C wastes his shot it will be B's turn. B can kill C, but in that
>> case the turn would go to A and he would surely kill B. If B goes after A,
>> then B may hit it or miss it(as its probability of hitting is 50%)
>> If B misses it
>> then
>> it depends on A whom to kill. A may kill B or C. A will try to kill one
>> who is better shooter i.e. B as C is less likely to hit A.
>> If B hits A then we are done. Round 1 is complete(as required in the
>> question) and C survives the first round.
>> Look the problem is not that who gets killed at last but rather what C
>> should fire in the first round obviously to survive(as I understood the
>> problem). It may happen that eventually C gets killed. But what should C
>> shoot in first round to survive.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
>
> 
> Thanks & Regards
> Salil Joshi.
> CSE MTech II, IITB
> A-414, Hostel 12
> +91.9819.442.865
>
>
> This is a confidential E-Mail. If it has reached you by mistake or if you
> are not the intended receiver, please send it back to me.
>



-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability

2011-01-01 Thread Salil Joshi
@Rahul,
What purpose is served by wasting the shot? If C shoots at A or B, at least
some probability that C is dead in future will be reduced.


On Sat, Jan 1, 2011 at 10:14 PM, RAHUL KUJUR wrote:

> @snehal:
> will the shooting take place in increasing order of accuracy of hitting the
> target and is that at a time only one person can take a shot???
> if yes then
> @Salil:
> my answer would be the same as above. what C will do is that it will first
> let A and B kill each other first.
> After C wastes his shot it will be B's turn. B can kill C, but in that case
> the turn would go to A and he would surely kill B. If B goes after A, then B
> may hit it or miss it(as its probability of hitting is 50%)
> If B misses it
> then
> it depends on A whom to kill. A may kill B or C. A will try to kill one who
> is better shooter i.e. B as C is less likely to hit A.
> If B hits A then we are done. Round 1 is complete(as required in the
> question) and C survives the first round.
> Look the problem is not that who gets killed at last but rather what C
> should fire in the first round obviously to survive(as I understood the
> problem). It may happen that eventually C gets killed. But what should C
> shoot in first round to survive.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability

2011-01-01 Thread Salil Joshi
@Rahul:
We (Dave and me) saw your reply as joke ... it doesn't make any sense
seriously speaking.
Even if C wastes his shot, A and B can still shoot him... by wasting it, C
will be in loss.


On Sat, Jan 1, 2011 at 8:49 PM, RAHUL KUJUR wrote:

> @Dave: first of all "By shooting in air" I meant that C will not fire any
> one. That was my figure of speech:))
> He will simply waste his shot.
> @Salil: its a duel. everyone will get chance to shoot in each round
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability

2011-01-01 Thread Salil Joshi
well, since it is not mentioned that everyone gets to shoot only once, C can
keep shooting A & B until both are dead... case solved :-))

On Sat, Jan 1, 2011 at 8:29 PM, Dave  wrote:

> @Rahul: If shooter C shoots into the air, doesn't he still have only a
> 33% chance of hitting it? If so, then he would have a 67% chance of
> hitting B or C, or, I suppose, himself. :-)
>
> This brings up another alternative. In round 1 he shoots himself in
> the foot. If he is successful (33% of the time), he is certain to
> survive the duel because he is out as soon as he is hit. If he is
> unsuccessful (67% of the time), the result is the same as if he had
> shot into the air, i.e., he survives with probability 66/133 ~=
> 0.49624. Putting this all together, by shooting himself in the foot,
> his probability of survival increases to about 0.66248. :-)
>
> Dave
>
> On Jan 1, 6:58 am, RAHUL KUJUR  wrote:
> > Suppose three gunmen are A, B, and C who have a probability of 100%, 50%
> and
> > 33% respectively. The shooting will start from C, then B and at last A.
> > Now there are several possibilities for C. If C shoots B, then A would
> shoot
> > C with an accuracy of 100% or in other case if C shoots A, then B would
> > shoot him with an accuracy of 50%. So he has a probability of getting
> > killed. We can see in either of the cases C will die.
> > So what C will do in first round is that it will fire the shot in air.
> Now
> > the scenario gets interesting. By doing this C has turned the battle
> among
> > three people into two people A and B. This will increase the chances of
> > survival of C. So now its B's turn of firing. So he can fire at either A
> or
> > C. If B fires at C, then A will shoot B with an accuracy of 100% and B
> knows
> > that he will surely die so B won't do that. If B shoots A, then C will
> shoot
> > B.
> > I think this is the solution. Please point out if there are any
> loopholes.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] probability

2011-01-01 Thread Salil Joshi
hahaha... lol... shoot in air ... lamo :-))



On Sat, Jan 1, 2011 at 6:28 PM, RAHUL KUJUR wrote:

> Suppose three gunmen are A, B, and C who have a probability of 100%, 50%
> and 33% respectively. The shooting will start from C, then B and at last A.
> Now there are several possibilities for C. If C shoots B, then A would
> shoot C with an accuracy of 100% or in other case if C shoots A, then B
> would shoot him with an accuracy of 50%. So he has a probability of getting
> killed. We can see in either of the cases C will die.
> So what C will do in first round is that it will fire the shot in air. Now
> the scenario gets interesting. By doing this C has turned the battle among
> three people into two people A and B. This will increase the chances of
> survival of C. So now its B's turn of firing. So he can fire at either A or
> C. If B fires at C, then A will shoot B with an accuracy of 100% and B knows
> that he will surely die so B won't do that. If B shoots A, then C will shoot
> B.
> I think this is the solution. Please point out if there are any loopholes.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Please let me know if you are working on Friday.

2010-11-24 Thread Salil Joshi
what does that mean??


On Wed, Nov 24, 2010 at 7:51 PM, k shivaprasad  wrote:

> Hello Friends,
>
> Please let me know  if you are working on Friday.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Salil Joshi
@Ashim,
Dunno... you can call it Salil's Puzzle if you like ;-)
afaik. its been listed in KT book Randomized algorithms chapter.


On Mon, Nov 22, 2010 at 3:36 PM, Ashim Kapoor  wrote:

> what is the name of this famous puzzle ?
>
> On Mon, Nov 22, 2010 at 2:57 PM, Salil Joshi wrote:
>
>> Hi,
>> The puzzle needs to be rephrased as:
>> "If the rank of the student who comes out of the classroom is better
>> than ranks of all students who came out before him/her, then he/she
>> gets a lollipop".
>> Rephrased this way, this is a famous puzzle, and the answer is
>> log(69).
>>
>>
>>
>> On Nov 22, 12:44 pm, shiva  wrote:
>> > If all the person got his rank increased except the first(he is last
>> > know)  then
>> >
>> > 1. if the previous first ranked person stand front in queue then  69
>> > lollipop need to be distributed.
>> > 2. other case 68 lollipop need to be distributed.
>> >
>> > On Nov 21, 9:46 pm, Shiv Shankar Prajapati 
>> > wrote:
>> >
>> > > Its total no. of Student i.e. 69.
>> > >If all the students ranking is increased then all the student will
>> get
>> > > the lollipop. But there is one student left who was at top n now on
>> the
>> > > least ranking and as the condition is given that student may appear
>> first
>> > > and get the lollipop. So professor need will give 69 lollipop. in this
>> > > (worst) case.
>> >
>> > > On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor 
>> wrote:
>> > > > Do you mean if the rank of a student is better than the rank of the
>> prev
>> > > > student then he/she gets a lollipop?
>> >
>> > > > Thank you,
>> > > > Ashim
>> >
>> > > > On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu <
>> marpu.vam...@gmail.com>wrote:
>> >
>> > > >> Does anybody know the solution for the following problem :
>> >
>> > > >> *A headmaster of a primary school performs an activity with the
>> students
>> > > >> of a class to encourage them to perform better in academics. He
>> asks them to
>> > > >> stand in queue, starts calling the students out one by one and asks
>> them
>> > > >> their rank in class. Each one has a unique rank in class. If the
>> rank of a
>> > > >> student is better than his/her previous best rank, then he awards
>> him/ her a
>> > > >> lollipop (students love lollipops). Note that the first one in the
>> queue
>> > > >> will always get a lollipop and the students arrange themselves in
>> random
>> > > >> order in the queue. What is the expected number of lollipops the
>> headmaster
>> > > >> will have to distribute among students if the total number of
>> students in
>> > > >> the class is 69? Note that the answer can be a fractional number.*
>> >
>> > > >> Thanks and Regards,
>> > > >> M. Vamsee
>> >
>> > > >> --
>> > > >> You received this message because you are subscribed to the Google
>> Groups
>> > > >> "Algorithm Geeks" group.
>> > > >> To post to this group, send email to algoge...@googlegroups.com.
>> > > >> To unsubscribe from this group, send email to
>> > > >> algogeeks+unsubscr...@googlegroups.com
>> 
>> >
>> > > >> .
>> > > >> For more options, visit this group at
>> > > >>http://groups.google.com/group/algogeeks?hl=en.
>> >
>> > > >  --
>> > > > You received this message because you are subscribed to the Google
>> Groups
>> > > > "Algorithm Geeks" group.
>> > > > To post to this group, send email to algoge...@googlegroups.com.
>> > > > To unsubscribe from this group, send email to
>> > > > algogeeks+unsubscr...@googlegroups.com
>> 
>> >
>> > > > .
>> > > > For more options, visit this group at
>> > > >http://groups.google.com/group/algogeeks?hl=en.
>> >
>> > > --
>> > > With Regards,
>> >
>> > > Shiv Shankar,
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Salil Joshi
Well,
Since the students are mixed randomly (as mentioned in the problem), the
chances (probability) that the 'i' th student who comes out is ranked best
so far is directly (1/i). Since this is an independent Random Variable, the
answer thus becomes sum_1^n {1/i} which for large value of n can be
approximated to log (n).

Hence the answer.


On Mon, Nov 22, 2010 at 3:54 PM, shiva wrote:

>
> Any explanation of how it works and how you got log(69) as answer.
>
> Thanks in advance.
>
>
> On Nov 22, 2:27 pm, Salil Joshi  wrote:
> > Hi,
> > The puzzle needs to be rephrased as:
> > "If the rank of the student who comes out of the classroom is better
> > than ranks of all students who came out before him/her, then he/she
> > gets a lollipop".
> > Rephrased this way, this is a famous puzzle, and the answer is
> > log(69).
> >
> > On Nov 22, 12:44 pm, shiva  wrote:
> >
> > > If all the person got his rank increased except the first(he is last
> > > know)  then
> >
> > > 1. if the previous first ranked person stand front in queue then  69
> > > lollipop need to be distributed.
> > > 2. other case 68 lollipop need to be distributed.
> >
> > > On Nov 21, 9:46 pm, Shiv Shankar Prajapati 
> > > wrote:
> >
> > > > Its total no. of Student i.e. 69.
> > > >If all the students ranking is increased then all the student will
> get
> > > > the lollipop. But there is one student left who was at top n now on
> the
> > > > least ranking and as the condition is given that student may appear
> first
> > > > and get the lollipop. So professor need will give 69 lollipop. in
> this
> > > > (worst) case.
> >
> > > > On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor 
> wrote:
> > > > > Do you mean if the rank of a student is better than the rank of the
> prev
> > > > > student then he/she gets a lollipop?
> >
> > > > > Thank you,
> > > > > Ashim
> >
> > > > > On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu <
> marpu.vam...@gmail.com>wrote:
> >
> > > > >> Does anybody know the solution for the following problem :
> >
> > > > >> *A headmaster of a primary school performs an activity with the
> students
> > > > >> of a class to encourage them to perform better in academics. He
> asks them to
> > > > >> stand in queue, starts calling the students out one by one and
> asks them
> > > > >> their rank in class. Each one has a unique rank in class. If the
> rank of a
> > > > >> student is better than his/her previous best rank, then he awards
> him/ her a
> > > > >> lollipop (students love lollipops). Note that the first one in the
> queue
> > > > >> will always get a lollipop and the students arrange themselves in
> random
> > > > >> order in the queue. What is the expected number of lollipops the
> headmaster
> > > > >> will have to distribute among students if the total number of
> students in
> > > > >> the class is 69? Note that the answer can be a fractional number.*
> >
> > > > >> Thanks and Regards,
> > > > >> M. Vamsee
> >
> > > > >> --
> > > > >> You received this message because you are subscribed to the Google
> Groups
> > > > >> "Algorithm Geeks" group.
> > > > >> To post to this group, send email to algoge...@googlegroups.com.
> > > > >> To unsubscribe from this group, send email to
> > > > >> algogeeks+unsubscr...@googlegroups.com
> 
> >
> > > > >> .
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/algogeeks?hl=en.
> >
> > > > >  --
> > > > > You received this message because you are subscribed to the Google
> Groups
> > > > > "Algorithm Geeks" group.
> > > > > To post to this group, send email to algoge...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > algogeeks+unsubscr...@googlegroups.com
> 
> >
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/algogeeks?hl=en.
> >
> > > > --
> > > > With Regards,
> >
> > > > Shiv Shankar,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 


Thanks & Regards
Salil Joshi.
CSE MTech II, IITB
A-414, Hostel 12
+91.9819.442.865


This is a confidential E-Mail. If it has reached you by mistake or if you
are not the intended receiver, please send it back to me.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Mathematics Puzzle

2010-11-22 Thread Salil Joshi
Hi,
The puzzle needs to be rephrased as:
"If the rank of the student who comes out of the classroom is better
than ranks of all students who came out before him/her, then he/she
gets a lollipop".
Rephrased this way, this is a famous puzzle, and the answer is
log(69).



On Nov 22, 12:44 pm, shiva  wrote:
> If all the person got his rank increased except the first(he is last
> know)  then
>
> 1. if the previous first ranked person stand front in queue then  69
> lollipop need to be distributed.
> 2. other case 68 lollipop need to be distributed.
>
> On Nov 21, 9:46 pm, Shiv Shankar Prajapati 
> wrote:
>
> > Its total no. of Student i.e. 69.
> >    If all the students ranking is increased then all the student will get
> > the lollipop. But there is one student left who was at top n now on the
> > least ranking and as the condition is given that student may appear first
> > and get the lollipop. So professor need will give 69 lollipop. in this
> > (worst) case.
>
> > On Sun, Nov 21, 2010 at 8:42 PM, Ashim Kapoor  wrote:
> > > Do you mean if the rank of a student is better than the rank of the prev
> > > student then he/she gets a lollipop?
>
> > > Thank you,
> > > Ashim
>
> > > On Sun, Nov 21, 2010 at 6:57 PM, vamsee marpu 
> > > wrote:
>
> > >> Does anybody know the solution for the following problem :
>
> > >> *A headmaster of a primary school performs an activity with the students
> > >> of a class to encourage them to perform better in academics. He asks 
> > >> them to
> > >> stand in queue, starts calling the students out one by one and asks them
> > >> their rank in class. Each one has a unique rank in class. If the rank of 
> > >> a
> > >> student is better than his/her previous best rank, then he awards him/ 
> > >> her a
> > >> lollipop (students love lollipops). Note that the first one in the queue
> > >> will always get a lollipop and the students arrange themselves in random
> > >> order in the queue. What is the expected number of lollipops the 
> > >> headmaster
> > >> will have to distribute among students if the total number of students in
> > >> the class is 69? Note that the answer can be a fractional number.*
>
> > >> Thanks and Regards,
> > >> M. Vamsee
>
> > >> --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "Algorithm Geeks" group.
> > >> To post to this group, send email to algoge...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> algogeeks+unsubscr...@googlegroups.com
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/algogeeks?hl=en.
>
> > >  --
> > > You received this message because you are subscribed to the Google Groups
> > > "Algorithm Geeks" group.
> > > To post to this group, send email to algoge...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > algogeeks+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/algogeeks?hl=en.
>
> > --
> > With Regards,
>
> > Shiv Shankar,

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.