Re: [algogeeks] Re: probability

2012-09-09 Thread Shruti Gupta
@Sukun: these probabilities should have been given in the questn.. since
it's not given and there are 3 possible answers, i considered probability
of each one of them to b correct as 1/3 (since there are 3 possible answers
and only one answer is correct)

On Sun, Sep 9, 2012 at 12:48 AM, Sukun Tarachandani suku...@gmail.comwrote:

 How do you get P(0.25 being correct) = P(0.5 being correct) = P(0.6 being
 correct) = 1/3?


 On Saturday, September 8, 2012 4:42:51 PM UTC+5:30, Shruti wrote:

 shouldn't it b done like this :

 P(correct answer when choosing randomly )= P(choosing 0.25)*P(0.25 being
 correct ans)+ P(choosing 0.60)*P(0.60 being correct ans) + P(choosing
 0.50)*P(0.50 being correct ans)


 = 2/4*1/3  +  1/4*1/3  +  1/4*1/3 [since 3 possible answers, hence
 prob of an ans being correct=1/3]

 taking 1/3 common,
 =1/3(2/4+1/4+1/4)
 =1/3

 pls correct me if i'm wrong

 On Fri, Sep 7, 2012 at 7:54 PM, isandeep isand...@gmail.com wrote:

 Ans : 0.5

 there is two cases :

 i) if correct ans is 0.25
 probability will be 2/4 = 0.5
 ii) if correct ans is 0.6 or 0.50
 probability will be 1/3 = 0.33

 since 0.33 is not in option so correct answer will be 0.5.

 On Friday, September 7, 2012 6:05:08 PM UTC+5:30, noname wrote:

 [image: -]14Answers http://www.careercup.com/question?id=14553727

 What is the probability of being the answer correct for this question,
 when the answer is chosen randomly:

 a. 0.25
 b. 0.60
 c. 0.25
 d. 0.50


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/algogeeks/-/SE8PpC7PLwgJhttps://groups.google.com/d/msg/algogeeks/-/SE8PpC7PLwgJ
 .

 To post to this group, send email to algo...@googlegroups.com.
 To unsubscribe from this group, send email to algogeeks+...@**
 googlegroups.com.

 For more options, visit this group at http://groups.google.com/**
 group/algogeeks?hl=en http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/z2HuFFlPSWYJ.

 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 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 algogeeks@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

2012-09-08 Thread Shruti Gupta
shouldn't it b done like this :

P(correct answer when choosing randomly )= P(choosing 0.25)*P(0.25 being
correct ans)+ P(choosing 0.60)*P(0.60 being correct ans) + P(choosing
0.50)*P(0.50 being correct ans)


= 2/4*1/3  +  1/4*1/3  +  1/4*1/3 [since 3 possible answers, hence prob
of an ans being correct=1/3]

taking 1/3 common,
=1/3(2/4+1/4+1/4)
=1/3

pls correct me if i'm wrong

On Fri, Sep 7, 2012 at 7:54 PM, isandeep isandee...@gmail.com wrote:

 Ans : 0.5

 there is two cases :

 i) if correct ans is 0.25
 probability will be 2/4 = 0.5
 ii) if correct ans is 0.6 or 0.50
 probability will be 1/3 = 0.33

 since 0.33 is not in option so correct answer will be 0.5.

 On Friday, September 7, 2012 6:05:08 PM UTC+5:30, noname wrote:

 [image: -]14Answers http://www.careercup.com/question?id=14553727

 What is the probability of being the answer correct for this question,
 when the answer is chosen randomly:

 a. 0.25
 b. 0.60
 c. 0.25
 d. 0.50


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/SE8PpC7PLwgJ.

 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 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 algogeeks@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: probability

2012-09-08 Thread Sukun Tarachandani
It cannot be either 0.25 or 0.50

http://math.stackexchange.com/questions/76491/multiple-choice-question-about-the-probability-of-a-random-answer-to-itself-bein

On Friday, September 7, 2012 6:05:08 PM UTC+5:30, noname wrote:

 [image: -]14Answers http://www.careercup.com/question?id=14553727

 What is the probability of being the answer correct for this question, 
 when the answer is chosen randomly:

 a. 0.25
 b. 0.60
 c. 0.25
 d. 0.50
  


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/Yp8D_rik3DcJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability

2012-09-08 Thread Sukun Tarachandani
How do you get P(0.25 being correct) = P(0.5 being correct) = P(0.6 being 
correct) = 1/3?

On Saturday, September 8, 2012 4:42:51 PM UTC+5:30, Shruti wrote:

 shouldn't it b done like this : 

 P(correct answer when choosing randomly )= P(choosing 0.25)*P(0.25 being 
 correct ans)+ P(choosing 0.60)*P(0.60 being correct ans) + P(choosing 
 0.50)*P(0.50 being correct ans) 


 = 2/4*1/3  +  1/4*1/3  +  1/4*1/3 [since 3 possible answers, hence 
 prob of an ans being correct=1/3]

 taking 1/3 common,
 =1/3(2/4+1/4+1/4)
 =1/3

 pls correct me if i'm wrong

 On Fri, Sep 7, 2012 at 7:54 PM, isandeep isand...@gmail.com javascript:
  wrote:

 Ans : 0.5

 there is two cases :

 i) if correct ans is 0.25
 probability will be 2/4 = 0.5
 ii) if correct ans is 0.6 or 0.50
 probability will be 1/3 = 0.33 

 since 0.33 is not in option so correct answer will be 0.5.

 On Friday, September 7, 2012 6:05:08 PM UTC+5:30, noname wrote:

 [image: -]14Answers http://www.careercup.com/question?id=14553727

 What is the probability of being the answer correct for this question, 
 when the answer is chosen randomly:

 a. 0.25
 b. 0.60
 c. 0.25
 d. 0.50
  

  -- 
 You received this message because you are subscribed to the Google Groups 
 Algorithm Geeks group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/algogeeks/-/SE8PpC7PLwgJ.

 To post to this group, send email to algo...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 algogeeks+...@googlegroups.com javascript:.
 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 view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/z2HuFFlPSWYJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability

2012-09-07 Thread isandeep
Ans : 0.5

there is two cases :

i) if correct ans is 0.25
probability will be 2/4 = 0.5
ii) if correct ans is 0.6 or 0.50
probability will be 1/3 = 0.33 

since 0.33 is not in option so correct answer will be 0.5.

On Friday, September 7, 2012 6:05:08 PM UTC+5:30, noname wrote:

 [image: -]14Answers http://www.careercup.com/question?id=14553727

 What is the probability of being the answer correct for this question, 
 when the answer is chosen randomly:

 a. 0.25
 b. 0.60
 c. 0.25
 d. 0.50
  


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/SE8PpC7PLwgJ.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability of winning with two cards

2012-01-23 Thread Lucifer
@Don and Sundi..

As Don pointed out, all we are looking for is:
 sum of a1  sum of a2
 sum of a1  sum of a3

Assumption:
1) The 2 cards picked for a particular player are unique.
2) Cards are numbered : 1,..., 12, 13.

Hence, the following code should give the answer for the a1's
probability to win:

for( int i =1; i  23; ++i)
{
   sampleCount+= a[i]*b[i-1]*b[i-1];
}

probability= sampleCount/ 474552;

sampleCount will be: 145650
probability = 0.306921


On Jan 23, 2:36 pm, Lucifer sourabhd2...@gmail.com wrote:
 @Don..

 Yup, it seems I misread it ... :) .. Thanks

 On Jan 23, 9:17 am, Don dondod...@gmail.com wrote:







  I think that you are misreading the problem. A1 wins if his sum is
  larger than A2's sum and larger than A3's sum. A1's sum doesn't have
  to be larger than A2+A3.
  Don

  On Jan 22, 5:18 pm, Lucifer sourabhd2...@gmail.com wrote:

   @sundi..

   Lets put is this way..

   Probability of (a1 wins + a1 draws + a1 losses) = 1,

   Now,  sample count a1 wins = 46298 ( using the above given code)
                   Hence, the probability (win) = 46298/474552 = .097561
   [ @ Don - as i mentioned in my previous post that i had initially
   missed a factor 2, hence the above calculated value shall justify
   that]

   Based on explanation given in the previous post, you can use the same
   approach and find out the sample count for a1's draw and loss..

   Add the following code snippet to calculate the same:

   // Draws ( a1 = a2 + a3 )

   int sampleCount2 = 0;
   for(int i =0; i 23; ++i)
   {
       for(int j = 0; j i; ++j)
       {
           if(i - j == j)
              sampleCount2 += a[j] * a[j] * a[i];
           else if (i - j  j)
              sampleCount2 += 2 * a[j] * a[i-j] * a[i];
       }

   }

   // Losses ( a1  a2 + a3 )

   int sampleCount3 = 0;
   for(int i =0; i 23; ++i)
   {
      for(int j = 0; j 23; ++j)
      {
         if (i - j + 1 ==j)
         {
            sampleCount3 += a[j] * a[j] * a[i];
            sampleCount3 += 2 * a[j] * (b[22] - b[i-j+1]) * a[i];
         }
         else if(i - j + 1  j)
         {
             // this is a special case as both i and j are smaller than
             // (i - j + 1)
             if ( i==0  j ==0 )
                sampleCount3 = a[j] * a[j] * a[i];

             sampleCount3 += 2 * a[j] * (b[22] - b[i-j]) * a[i];
         }
         else
         {
            sampleCount3 += a[j] * a[j] * a[i];
            sampleCount3 += 2 * a[j] * (b[22] - b[j]) * a[i];
         }
      }

   }

   On executing the given snippet you will get:
   sampleCount2 = 10184 (draw)
   samepleCount3 = 418070 ( loss)

   Now, for the probability to be 1:
   sampleCount + sampleCount2 + sampleCount3 should be 78^3 (474552)..

   Now,
   46298 + 10184 + 418070 = 474552 which is equal to (78^3)..

   On Jan 23, 2:34 am, Sundi sundi...@gmail.com wrote:

Hi Lucifer,
          Have you checked the sum of probability of (a winning + b
winning + c winning + draw)==1 ?

On Jan 22, 2:38 pm, Lucifer sourabhd2...@gmail.com wrote:

 @above

 editing mistake.. (btw the working code covers it)
 /*
 int j =*1*;
 for(int i = 0; i  12 ; i+=2)
 {
     A[i] = A[i+1] = A[22-i] = A[21-i] = j;
     ++j;}

 */
 On Jan 22, 6:53 pm, Lucifer sourabhd2...@gmail.com wrote:

  @Don..

  Well i will explain the approach that i took to arrive at the
  probability..
  Well yes u are correct in saying that it doesn't make a lot of sense
  but then the no. of wins by a1 keeping in mind that a1  a2 + a3 is
  much less than a1 = a2 + a3..
  Or may be I have gone wrong in calculating the same..

  Please let me know if u find some issue in the below given
  explanation..

  
  now, the given nos. are 1,2,3,4,.13..

  Hence, the possible pair sums are 3,4,5,,25...

  The total no. of pairs that can  be formed are 13 C 2 = 78.

  Now, for each pair within 3-25 (including both extremes) lets find 
  the
  no. of ways we get to the particular sum.
  i.e for 3 its 1 ( 1 + 2)
       for 7 its 3 (1 + 6, 2 + 5, 3 + 4)

  Lets take an array A[23], to store the count of occurrences for pair
  sums (3 - 25)
  A[i] - will store the no. of ways of getting 'i+3' pair-sum

  A[i] values will be:
  i  -
  0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
  18  19  20  21  22

  A[i] -
  1  1  2   2   3   3   4   4   5   5    6   6    6   5    5    4    4
  3    3    2   2    1    1

  Now, the above can be generated by using the following code:

  Lets say the input is stored in X[R] = {1,2, ..., 13}
  Here R is 13..

  Lets say, the array  A is initialized with 0.

  for (int i = 0; i  R-1; ++i)
    for ( int j = 1; i  R; ++j)
        ++A[ X[i] + X[j] ];

  Well, as the nos. are continuous , hence we can minimize the
  initialization 

[algogeeks] Re: probability of winning with two cards

2012-01-23 Thread Lucifer
@Don,
I think i misunderstood the question again.. :)..

One of major things that i went wrong with was that for me the deck
consisted of 13*3=39 cards..( basically an assumption made based on
the way i understood the question)

Thanks for the explanation..

On Jan 23, 9:17 pm, Don dondod...@gmail.com wrote:
 Close. You actually have to be sure that all 6 cards dealt to the
 players are unique.
 For instance, if I get 3 points, if you don't require that all the
 cards dealth in the game are unique, you would conclude that there is
 a very small, but positive probability that I will win. In reality, 3
 points means that my two cards are a 1 and a 2. Thus there are not 4
 1's left, and I am sure not to win.

 One way to do that is to select 2 cards for P1. Then select 2 cards
 for P2, making sure that neither one was dealt to P1. If the sum of P1
 is greater than the sum of P2, select 2 cards from the remaining deck
 for P3. If the sum of P1 is greater than the sum of P3, add one to
 your counter. I'm sure that there is a faster way to code it, but on
 my computer this ran in about 2 seconds.

 There are 52!/(46!*8) ways that the cards can be dealt.  565,271,160
 of those result in P1 winning.

 Thus P(p1 wins) = 0.30850919745967...

 Don

 On Jan 23, 7:34 am, Lucifer sourabhd2...@gmail.com wrote:







  @Don and Sundi..

  As Don pointed out, all we are looking for is:
   sum of a1  sum of a2
   sum of a1  sum of a3

  Assumption:
  1) The 2 cards picked for a particular player are unique.
  2) Cards are numbered : 1,..., 12, 13.

  Hence, the following code should give the answer for the a1's
  probability to win:

  for( int i =1; i  23; ++i)
  {
     sampleCount+= a[i]*b[i-1]*b[i-1];

  }

  probability= sampleCount/ 474552;

  sampleCount will be: 145650
  probability = 0.306921

  On Jan 23, 2:36 pm, Lucifer sourabhd2...@gmail.com wrote:

   @Don..

   Yup, it seems I misread it ... :) .. Thanks

   On Jan 23, 9:17 am, Don dondod...@gmail.com wrote:

I think that you are misreading the problem. A1 wins if his sum is
larger than A2's sum and larger than A3's sum. A1's sum doesn't have
to be larger than A2+A3.
Don

On Jan 22, 5:18 pm, Lucifer sourabhd2...@gmail.com wrote:

 @sundi..

 Lets put is this way..

 Probability of (a1 wins + a1 draws + a1 losses) = 1,

 Now,  sample count a1 wins = 46298 ( using the above given code)
                 Hence, the probability (win) = 46298/474552 = .097561
 [ @ Don - as i mentioned in my previous post that i had initially
 missed a factor 2, hence the above calculated value shall justify
 that]

 Based on explanation given in the previous post, you can use the same
 approach and find out the sample count for a1's draw and loss..

 Add the following code snippet to calculate the same:

 // Draws ( a1 = a2 + a3 )

 int sampleCount2 = 0;
 for(int i =0; i 23; ++i)
 {
     for(int j = 0; j i; ++j)
     {
         if(i - j == j)
            sampleCount2 += a[j] * a[j] * a[i];
         else if (i - j  j)
            sampleCount2 += 2 * a[j] * a[i-j] * a[i];
     }

 }

 // Losses ( a1  a2 + a3 )

 int sampleCount3 = 0;
 for(int i =0; i 23; ++i)
 {
    for(int j = 0; j 23; ++j)
    {
       if (i - j + 1 ==j)
       {
          sampleCount3 += a[j] * a[j] * a[i];
          sampleCount3 += 2 * a[j] * (b[22] - b[i-j+1]) * a[i];
       }
       else if(i - j + 1  j)
       {
           // this is a special case as both i and j are smaller than
           // (i - j + 1)
           if ( i==0  j ==0 )
              sampleCount3 = a[j] * a[j] * a[i];

           sampleCount3 += 2 * a[j] * (b[22] - b[i-j]) * a[i];
       }
       else
       {
          sampleCount3 += a[j] * a[j] * a[i];
          sampleCount3 += 2 * a[j] * (b[22] - b[j]) * a[i];
       }
    }

 }

 On executing the given snippet you will get:
 sampleCount2 = 10184 (draw)
 samepleCount3 = 418070 ( loss)

 Now, for the probability to be 1:
 sampleCount + sampleCount2 + sampleCount3 should be 78^3 (474552)..

 Now,
 46298 + 10184 + 418070 = 474552 which is equal to (78^3)..

 On Jan 23, 2:34 am, Sundi sundi...@gmail.com wrote:

  Hi Lucifer,
            Have you checked the sum of probability of (a winning + b
  winning + c winning + draw)==1 ?

  On Jan 22, 2:38 pm, Lucifer sourabhd2...@gmail.com wrote:

   @above

   editing mistake.. (btw the working code covers it)
   /*
   int j =*1*;
   for(int i = 0; i  12 ; i+=2)
   {
       A[i] = A[i+1] = A[22-i] = A[21-i] = j;
       ++j;}

   */
   On Jan 22, 6:53 pm, Lucifer sourabhd2...@gmail.com wrote:

@Don..

Well i will explain the approach that i took to arrive at the
probability..
Well yes u are correct in saying that it 

[algogeeks] Re: probability of winning with two cards

2012-01-22 Thread Lucifer
@Don..

Well i will explain the approach that i took to arrive at the
probability..
Well yes u are correct in saying that it doesn't make a lot of sense
but then the no. of wins by a1 keeping in mind that a1  a2 + a3 is
much less than a1 = a2 + a3..
Or may be I have gone wrong in calculating the same..

Please let me know if u find some issue in the below given
explanation..


now, the given nos. are 1,2,3,4,.13..

Hence, the possible pair sums are 3,4,5,,25...

The total no. of pairs that can  be formed are 13 C 2 = 78.

Now, for each pair within 3-25 (including both extremes) lets find the
no. of ways we get to the particular sum.
i.e for 3 its 1 ( 1 + 2)
 for 7 its 3 (1 + 6, 2 + 5, 3 + 4)

Lets take an array A[23], to store the count of occurrences for pair
sums (3 - 25)
A[i] - will store the no. of ways of getting 'i+3' pair-sum

A[i] values will be:
i  -
0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
18  19  20  21  22

A[i] -
1  1  2   2   3   3   4   4   5   56   66   5544
332   211


Now, the above can be generated by using the following code:

Lets say the input is stored in X[R] = {1,2, ..., 13}
Here R is 13..

Lets say, the array  A is initialized with 0.

for (int i = 0; i  R-1; ++i)
  for ( int j = 1; i  R; ++j)
  ++A[ X[i] + X[j] ];


Well, as the nos. are continuous , hence we can minimize the
initialization operation as follows
(based on fact that there is a pattern and holds for any set of
continuous nos. from 1 to K)


// initialze pair counts.. ( 3 ...  25)
int j =0;
for(int i = 0; i  12 ; i+=2)
{
A[i] = A[i+1] = A[22-i] = A[21-i] = j;
++j;
}
a[12] = 6;

[ the above code is specifically written for 1 to 13 (K), but you can
generalize it based on ur need.
All you need to do is take care of the last initialization statement
a[12] = 6; based on value K (13).]


Now, A[i] basically represent the no. of ways we can get 'i+3' - lets
say this is a1's current pick.
Now, for sum of a2 and a3's pick to be smaller than a1's we can do the
following:

If A[i] is picked by a1, then let a2 pick A[p] where p  i, then the
possible picks by a3 would be
from anywhere b/w A[p] to A[i - p - 1].
Here, there is a catch .. we need to insure that i - p -1  = p
otherwise the range for a3's pick would be invalid.
Also, the above explanation is based on the assumption that a2 =a3.
Hence, to complete figure out all the possibilities of  a1, a2 and a3,
we need to do the following..

For a given pick by a1 say A[i], then the no. of possiblites such that
a1 a2 + a3 would be:

1) if a2=a3,  A[p] * A[p] * A[i]
2) if a2!=a3  , 2 * A[p] *( cumulative sum of A[p+1] to A[i - p -1])
*A[i]
 [ a factor of 2 is multiplied to remove the
assumption a2  a3 ]

Now, once we get the total no. of possibities by the above given
equation, the probability would be:
(No. of possiblites) / (78^3) ..
[ 78 - 13 C 2]

Code:
int a[23];// to store the count
int b[23];// to store the cumulative count
int k = 1;

// initialze pair counts.. ( 3 ... 25)
for(int i = 0; i 12; i+=2)
{
a[i] = a[i+1] = a[22-i] = a[21-i] = k;
++k;
}
a[12] = 6;

b[0]=a[0];

//cumulative sum
for(int i = 1; i 23; i+=1)
{
   b[i] = b[i-1] + a[i];
}

// calculate possibilities..
// i =0 (3 :minimum sum pair)... i=22 (25 : max sum pair)
int sampleCount = 0;
for(int i =0; i 23; ++i)
{
for(int j = 0; j i; ++j)
{
   if(i - j - 1 = j)
   {
sampleCount += a[j] * a[j] * a[i];
if (i - j - 1  j)
   sampleCount += 2 * a[j] * (b[i-j-1] - b[j]) * a[i];
   }
}
}

int R = 78*78*78;
printf(probability = %f , (float)sampleCount / R);


Don, as I mentioned in the start that there is possibility i might
have gone wrong in calculation. The fact being that i missed the
factor 2 when i wrote the code.
But, then the main point here is that whether the approach is correct
or not.
-

On Jan 20, 3:41 am, Don dondod...@gmail.com wrote:
 You are saying that a1 wins roughly 1 in 20 times? How does that make
 any sence?
 Don

 On Jan 19, 2:35 pm, Lucifer sourabhd2...@gmail.com wrote:







  @correction:

  Probalilty (a1 wins) = 24575/474552 = .051786

  On Jan 20, 1:30 am, Lucifer sourabhd2...@gmail.com wrote:

   hoping that the cards are numbered 1,2,3,,13..

   Probalilty (a1 wins) = 21723/474552 = .045776

   On Jan 20, 12:47 am, Don dondod...@gmail.com wrote:

P= 8800/28561 ~= 0.308112461...

On Jan 18, 7:40 pm, Sundi sundi...@gmail.com wrote:

 there are 52 cards.. there are 3 players a1,a2,a3 each player is given
 2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
 cards is greater then the other two players sum.

 find the probability of a1 being the winner?- Hide quoted text -

  - Show quoted text -

-- 
You received this message 

[algogeeks] Re: probability of winning with two cards

2012-01-22 Thread Lucifer
@above

editing mistake.. (btw the working code covers it)
/*
int j =*1*;
for(int i = 0; i  12 ; i+=2)
{
A[i] = A[i+1] = A[22-i] = A[21-i] = j;
++j;
}
*/
On Jan 22, 6:53 pm, Lucifer sourabhd2...@gmail.com wrote:
 @Don..

 Well i will explain the approach that i took to arrive at the
 probability..
 Well yes u are correct in saying that it doesn't make a lot of sense
 but then the no. of wins by a1 keeping in mind that a1  a2 + a3 is
 much less than a1 = a2 + a3..
 Or may be I have gone wrong in calculating the same..

 Please let me know if u find some issue in the below given
 explanation..

 
 now, the given nos. are 1,2,3,4,.13..

 Hence, the possible pair sums are 3,4,5,,25...

 The total no. of pairs that can  be formed are 13 C 2 = 78.

 Now, for each pair within 3-25 (including both extremes) lets find the
 no. of ways we get to the particular sum.
 i.e for 3 its 1 ( 1 + 2)
      for 7 its 3 (1 + 6, 2 + 5, 3 + 4)

 Lets take an array A[23], to store the count of occurrences for pair
 sums (3 - 25)
 A[i] - will store the no. of ways of getting 'i+3' pair-sum

 A[i] values will be:
 i  -
 0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
 18  19  20  21  22

 A[i] -
 1  1  2   2   3   3   4   4   5   5    6   6    6   5    5    4    4
 3    3    2   2    1    1

 Now, the above can be generated by using the following code:

 Lets say the input is stored in X[R] = {1,2, ..., 13}
 Here R is 13..

 Lets say, the array  A is initialized with 0.

 for (int i = 0; i  R-1; ++i)
   for ( int j = 1; i  R; ++j)
       ++A[ X[i] + X[j] ];

 Well, as the nos. are continuous , hence we can minimize the
 initialization operation as follows
 (based on fact that there is a pattern and holds for any set of
 continuous nos. from 1 to K)

 // initialze pair counts.. ( 3 ...  25)
 int j =0;
 for(int i = 0; i  12 ; i+=2)
 {
     A[i] = A[i+1] = A[22-i] = A[21-i] = j;
     ++j;}

 a[12] = 6;

 [ the above code is specifically written for 1 to 13 (K), but you can
 generalize it based on ur need.
 All you need to do is take care of the last initialization statement
 a[12] = 6; based on value K (13).]
 

 Now, A[i] basically represent the no. of ways we can get 'i+3' - lets
 say this is a1's current pick.
 Now, for sum of a2 and a3's pick to be smaller than a1's we can do the
 following:

 If A[i] is picked by a1, then let a2 pick A[p] where p  i, then the
 possible picks by a3 would be
 from anywhere b/w A[p] to A[i - p - 1].
 Here, there is a catch .. we need to insure that i - p -1  = p
 otherwise the range for a3's pick would be invalid.
 Also, the above explanation is based on the assumption that a2 =a3.
 Hence, to complete figure out all the possibilities of  a1, a2 and a3,
 we need to do the following..

 For a given pick by a1 say A[i], then the no. of possiblites such that
 a1 a2 + a3 would be:

 1) if a2=a3,  A[p] * A[p] * A[i]
 2) if a2!=a3  , 2 * A[p] *( cumulative sum of A[p+1] to A[i - p -1])
 *A[i]
                      [ a factor of 2 is multiplied to remove the
 assumption a2  a3 ]

 Now, once we get the total no. of possibities by the above given
 equation, the probability would be:
 (No. of possiblites) / (78^3) ..
 [ 78 - 13 C 2]

 Code:
 int a[23];// to store the count
 int b[23];// to store the cumulative count
 int k = 1;

 // initialze pair counts.. ( 3 ... 25)
 for(int i = 0; i 12; i+=2)
 {
     a[i] = a[i+1] = a[22-i] = a[21-i] = k;
     ++k;}

 a[12] = 6;

 b[0]=a[0];

 //cumulative sum
 for(int i = 1; i 23; i+=1)
 {
    b[i] = b[i-1] + a[i];

 }

 // calculate possibilities..
 // i =0 (3 :minimum sum pair)... i=22 (25 : max sum pair)
 int sampleCount = 0;
 for(int i =0; i 23; ++i)
 {
     for(int j = 0; j i; ++j)
     {
        if(i - j - 1 = j)
        {
             sampleCount += a[j] * a[j] * a[i];
             if (i - j - 1  j)
                sampleCount += 2 * a[j] * (b[i-j-1] - b[j]) * a[i];
        }
     }

 }

 int R = 78*78*78;
 printf(probability = %f , (float)sampleCount / R);

 
 Don, as I mentioned in the start that there is possibility i might
 have gone wrong in calculation. The fact being that i missed the
 factor 2 when i wrote the code.
 But, then the main point here is that whether the approach is correct
 or not.
 -

 On Jan 20, 3:41 am, Don dondod...@gmail.com wrote:







  You are saying that a1 wins roughly 1 in 20 times? How does that make
  any sence?
  Don

  On Jan 19, 2:35 pm, Lucifer sourabhd2...@gmail.com wrote:

   @correction:

   Probalilty (a1 wins) = 24575/474552 = .051786

   On Jan 20, 1:30 am, Lucifer sourabhd2...@gmail.com wrote:

hoping that the cards are numbered 1,2,3,,13..

Probalilty (a1 wins) = 21723/474552 = .045776

On Jan 20, 12:47 am, Don dondod...@gmail.com wrote:

 P= 8800/28561 ~= 0.308112461...

 On Jan 18, 7:40 pm, Sundi 

[algogeeks] Re: probability of winning with two cards

2012-01-22 Thread Sundi
Hi Lucifer,
  Have you checked the sum of probability of (a winning + b
winning + c winning + draw)==1 ?

On Jan 22, 2:38 pm, Lucifer sourabhd2...@gmail.com wrote:
 @above

 editing mistake.. (btw the working code covers it)
 /*
 int j =*1*;
 for(int i = 0; i  12 ; i+=2)
 {
     A[i] = A[i+1] = A[22-i] = A[21-i] = j;
     ++j;}

 */
 On Jan 22, 6:53 pm, Lucifer sourabhd2...@gmail.com wrote:







  @Don..

  Well i will explain the approach that i took to arrive at the
  probability..
  Well yes u are correct in saying that it doesn't make a lot of sense
  but then the no. of wins by a1 keeping in mind that a1  a2 + a3 is
  much less than a1 = a2 + a3..
  Or may be I have gone wrong in calculating the same..

  Please let me know if u find some issue in the below given
  explanation..

  
  now, the given nos. are 1,2,3,4,.13..

  Hence, the possible pair sums are 3,4,5,,25...

  The total no. of pairs that can  be formed are 13 C 2 = 78.

  Now, for each pair within 3-25 (including both extremes) lets find the
  no. of ways we get to the particular sum.
  i.e for 3 its 1 ( 1 + 2)
       for 7 its 3 (1 + 6, 2 + 5, 3 + 4)

  Lets take an array A[23], to store the count of occurrences for pair
  sums (3 - 25)
  A[i] - will store the no. of ways of getting 'i+3' pair-sum

  A[i] values will be:
  i  -
  0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
  18  19  20  21  22

  A[i] -
  1  1  2   2   3   3   4   4   5   5    6   6    6   5    5    4    4
  3    3    2   2    1    1

  Now, the above can be generated by using the following code:

  Lets say the input is stored in X[R] = {1,2, ..., 13}
  Here R is 13..

  Lets say, the array  A is initialized with 0.

  for (int i = 0; i  R-1; ++i)
    for ( int j = 1; i  R; ++j)
        ++A[ X[i] + X[j] ];

  Well, as the nos. are continuous , hence we can minimize the
  initialization operation as follows
  (based on fact that there is a pattern and holds for any set of
  continuous nos. from 1 to K)

  // initialze pair counts.. ( 3 ...  25)
  int j =0;
  for(int i = 0; i  12 ; i+=2)
  {
      A[i] = A[i+1] = A[22-i] = A[21-i] = j;
      ++j;}

  a[12] = 6;

  [ the above code is specifically written for 1 to 13 (K), but you can
  generalize it based on ur need.
  All you need to do is take care of the last initialization statement
  a[12] = 6; based on value K (13).]
  

  Now, A[i] basically represent the no. of ways we can get 'i+3' - lets
  say this is a1's current pick.
  Now, for sum of a2 and a3's pick to be smaller than a1's we can do the
  following:

  If A[i] is picked by a1, then let a2 pick A[p] where p  i, then the
  possible picks by a3 would be
  from anywhere b/w A[p] to A[i - p - 1].
  Here, there is a catch .. we need to insure that i - p -1  = p
  otherwise the range for a3's pick would be invalid.
  Also, the above explanation is based on the assumption that a2 =a3.
  Hence, to complete figure out all the possibilities of  a1, a2 and a3,
  we need to do the following..

  For a given pick by a1 say A[i], then the no. of possiblites such that
  a1 a2 + a3 would be:

  1) if a2=a3,  A[p] * A[p] * A[i]
  2) if a2!=a3  , 2 * A[p] *( cumulative sum of A[p+1] to A[i - p -1])
  *A[i]
                       [ a factor of 2 is multiplied to remove the
  assumption a2  a3 ]

  Now, once we get the total no. of possibities by the above given
  equation, the probability would be:
  (No. of possiblites) / (78^3) ..
  [ 78 - 13 C 2]

  Code:
  int a[23];// to store the count
  int b[23];// to store the cumulative count
  int k = 1;

  // initialze pair counts.. ( 3 ... 25)
  for(int i = 0; i 12; i+=2)
  {
      a[i] = a[i+1] = a[22-i] = a[21-i] = k;
      ++k;}

  a[12] = 6;

  b[0]=a[0];

  //cumulative sum
  for(int i = 1; i 23; i+=1)
  {
     b[i] = b[i-1] + a[i];

  }

  // calculate possibilities..
  // i =0 (3 :minimum sum pair)... i=22 (25 : max sum pair)
  int sampleCount = 0;
  for(int i =0; i 23; ++i)
  {
      for(int j = 0; j i; ++j)
      {
         if(i - j - 1 = j)
         {
              sampleCount += a[j] * a[j] * a[i];
              if (i - j - 1  j)
                 sampleCount += 2 * a[j] * (b[i-j-1] - b[j]) * a[i];
         }
      }

  }

  int R = 78*78*78;
  printf(probability = %f , (float)sampleCount / R);

  
  Don, as I mentioned in the start that there is possibility i might
  have gone wrong in calculation. The fact being that i missed the
  factor 2 when i wrote the code.
  But, then the main point here is that whether the approach is correct
  or not.
  -

  On Jan 20, 3:41 am, Don dondod...@gmail.com wrote:

   You are saying that a1 wins roughly 1 in 20 times? How does that make
   any sence?
   Don

   On Jan 19, 2:35 pm, Lucifer sourabhd2...@gmail.com wrote:

@correction:

Probalilty (a1 wins) = 24575/474552 = .051786


[algogeeks] Re: probability of winning with two cards

2012-01-22 Thread Lucifer
@sundi..

Lets put is this way..

Probability of (a1 wins + a1 draws + a1 losses) = 1,

Now,  sample count a1 wins = 46298 ( using the above given code)
Hence, the probability (win) = 46298/474552 = .097561
[ @ Don - as i mentioned in my previous post that i had initially
missed a factor 2, hence the above calculated value shall justify
that]

Based on explanation given in the previous post, you can use the same
approach and find out the sample count for a1's draw and loss..

Add the following code snippet to calculate the same:

// Draws ( a1 = a2 + a3 )

int sampleCount2 = 0;
for(int i =0; i 23; ++i)
{
for(int j = 0; j i; ++j)
{
if(i - j == j)
   sampleCount2 += a[j] * a[j] * a[i];
else if (i - j  j)
   sampleCount2 += 2 * a[j] * a[i-j] * a[i];
}
}

// Losses ( a1  a2 + a3 )

int sampleCount3 = 0;
for(int i =0; i 23; ++i)
{
   for(int j = 0; j 23; ++j)
   {
  if (i - j + 1 ==j)
  {
 sampleCount3 += a[j] * a[j] * a[i];
 sampleCount3 += 2 * a[j] * (b[22] - b[i-j+1]) * a[i];
  }
  else if(i - j + 1  j)
  {
  // this is a special case as both i and j are smaller than
  // (i - j + 1)
  if ( i==0  j ==0 )
 sampleCount3 = a[j] * a[j] * a[i];

  sampleCount3 += 2 * a[j] * (b[22] - b[i-j]) * a[i];
  }
  else
  {
 sampleCount3 += a[j] * a[j] * a[i];
 sampleCount3 += 2 * a[j] * (b[22] - b[j]) * a[i];
  }
   }
}

On executing the given snippet you will get:
sampleCount2 = 10184 (draw)
samepleCount3 = 418070 ( loss)

Now, for the probability to be 1:
sampleCount + sampleCount2 + sampleCount3 should be 78^3 (474552)..

Now,
46298 + 10184 + 418070 = 474552 which is equal to (78^3)..


On Jan 23, 2:34 am, Sundi sundi...@gmail.com wrote:
 Hi Lucifer,
           Have you checked the sum of probability of (a winning + b
 winning + c winning + draw)==1 ?

 On Jan 22, 2:38 pm, Lucifer sourabhd2...@gmail.com wrote:







  @above

  editing mistake.. (btw the working code covers it)
  /*
  int j =*1*;
  for(int i = 0; i  12 ; i+=2)
  {
      A[i] = A[i+1] = A[22-i] = A[21-i] = j;
      ++j;}

  */
  On Jan 22, 6:53 pm, Lucifer sourabhd2...@gmail.com wrote:

   @Don..

   Well i will explain the approach that i took to arrive at the
   probability..
   Well yes u are correct in saying that it doesn't make a lot of sense
   but then the no. of wins by a1 keeping in mind that a1  a2 + a3 is
   much less than a1 = a2 + a3..
   Or may be I have gone wrong in calculating the same..

   Please let me know if u find some issue in the below given
   explanation..

   
   now, the given nos. are 1,2,3,4,.13..

   Hence, the possible pair sums are 3,4,5,,25...

   The total no. of pairs that can  be formed are 13 C 2 = 78.

   Now, for each pair within 3-25 (including both extremes) lets find the
   no. of ways we get to the particular sum.
   i.e for 3 its 1 ( 1 + 2)
        for 7 its 3 (1 + 6, 2 + 5, 3 + 4)

   Lets take an array A[23], to store the count of occurrences for pair
   sums (3 - 25)
   A[i] - will store the no. of ways of getting 'i+3' pair-sum

   A[i] values will be:
   i  -
   0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
   18  19  20  21  22

   A[i] -
   1  1  2   2   3   3   4   4   5   5    6   6    6   5    5    4    4
   3    3    2   2    1    1

   Now, the above can be generated by using the following code:

   Lets say the input is stored in X[R] = {1,2, ..., 13}
   Here R is 13..

   Lets say, the array  A is initialized with 0.

   for (int i = 0; i  R-1; ++i)
     for ( int j = 1; i  R; ++j)
         ++A[ X[i] + X[j] ];

   Well, as the nos. are continuous , hence we can minimize the
   initialization operation as follows
   (based on fact that there is a pattern and holds for any set of
   continuous nos. from 1 to K)

   // initialze pair counts.. ( 3 ...  25)
   int j =0;
   for(int i = 0; i  12 ; i+=2)
   {
       A[i] = A[i+1] = A[22-i] = A[21-i] = j;
       ++j;}

   a[12] = 6;

   [ the above code is specifically written for 1 to 13 (K), but you can
   generalize it based on ur need.
   All you need to do is take care of the last initialization statement
   a[12] = 6; based on value K (13).]
   

   Now, A[i] basically represent the no. of ways we can get 'i+3' - lets
   say this is a1's current pick.
   Now, for sum of a2 and a3's pick to be smaller than a1's we can do the
   following:

   If A[i] is picked by a1, then let a2 pick A[p] where p  i, then the
   possible picks by a3 would be
   from anywhere b/w A[p] to A[i - p - 1].
   Here, there is a catch .. we need to insure that i - p -1  = p
   otherwise the range for a3's pick would be invalid.
   Also, the above explanation is based on the assumption that a2 =a3.
   Hence, to complete figure out all the possibilities of  a1, a2 and a3,
   we need to do the following..

   For 

[algogeeks] Re: probability of winning with two cards

2012-01-22 Thread Don
I think that you are misreading the problem. A1 wins if his sum is
larger than A2's sum and larger than A3's sum. A1's sum doesn't have
to be larger than A2+A3.
Don

On Jan 22, 5:18 pm, Lucifer sourabhd2...@gmail.com wrote:
 @sundi..

 Lets put is this way..

 Probability of (a1 wins + a1 draws + a1 losses) = 1,

 Now,  sample count a1 wins = 46298 ( using the above given code)
                 Hence, the probability (win) = 46298/474552 = .097561
 [ @ Don - as i mentioned in my previous post that i had initially
 missed a factor 2, hence the above calculated value shall justify
 that]

 Based on explanation given in the previous post, you can use the same
 approach and find out the sample count for a1's draw and loss..

 Add the following code snippet to calculate the same:

 // Draws ( a1 = a2 + a3 )

 int sampleCount2 = 0;
 for(int i =0; i 23; ++i)
 {
     for(int j = 0; j i; ++j)
     {
         if(i - j == j)
            sampleCount2 += a[j] * a[j] * a[i];
         else if (i - j  j)
            sampleCount2 += 2 * a[j] * a[i-j] * a[i];
     }

 }

 // Losses ( a1  a2 + a3 )

 int sampleCount3 = 0;
 for(int i =0; i 23; ++i)
 {
    for(int j = 0; j 23; ++j)
    {
       if (i - j + 1 ==j)
       {
          sampleCount3 += a[j] * a[j] * a[i];
          sampleCount3 += 2 * a[j] * (b[22] - b[i-j+1]) * a[i];
       }
       else if(i - j + 1  j)
       {
           // this is a special case as both i and j are smaller than
           // (i - j + 1)
           if ( i==0  j ==0 )
              sampleCount3 = a[j] * a[j] * a[i];

           sampleCount3 += 2 * a[j] * (b[22] - b[i-j]) * a[i];
       }
       else
       {
          sampleCount3 += a[j] * a[j] * a[i];
          sampleCount3 += 2 * a[j] * (b[22] - b[j]) * a[i];
       }
    }

 }

 On executing the given snippet you will get:
 sampleCount2 = 10184 (draw)
 samepleCount3 = 418070 ( loss)

 Now, for the probability to be 1:
 sampleCount + sampleCount2 + sampleCount3 should be 78^3 (474552)..

 Now,
 46298 + 10184 + 418070 = 474552 which is equal to (78^3)..

 On Jan 23, 2:34 am, Sundi sundi...@gmail.com wrote:







  Hi Lucifer,
            Have you checked the sum of probability of (a winning + b
  winning + c winning + draw)==1 ?

  On Jan 22, 2:38 pm, Lucifer sourabhd2...@gmail.com wrote:

   @above

   editing mistake.. (btw the working code covers it)
   /*
   int j =*1*;
   for(int i = 0; i  12 ; i+=2)
   {
       A[i] = A[i+1] = A[22-i] = A[21-i] = j;
       ++j;}

   */
   On Jan 22, 6:53 pm, Lucifer sourabhd2...@gmail.com wrote:

@Don..

Well i will explain the approach that i took to arrive at the
probability..
Well yes u are correct in saying that it doesn't make a lot of sense
but then the no. of wins by a1 keeping in mind that a1  a2 + a3 is
much less than a1 = a2 + a3..
Or may be I have gone wrong in calculating the same..

Please let me know if u find some issue in the below given
explanation..


now, the given nos. are 1,2,3,4,.13..

Hence, the possible pair sums are 3,4,5,,25...

The total no. of pairs that can  be formed are 13 C 2 = 78.

Now, for each pair within 3-25 (including both extremes) lets find the
no. of ways we get to the particular sum.
i.e for 3 its 1 ( 1 + 2)
     for 7 its 3 (1 + 6, 2 + 5, 3 + 4)

Lets take an array A[23], to store the count of occurrences for pair
sums (3 - 25)
A[i] - will store the no. of ways of getting 'i+3' pair-sum

A[i] values will be:
i  -
0  1  2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17
18  19  20  21  22

A[i] -
1  1  2   2   3   3   4   4   5   5    6   6    6   5    5    4    4
3    3    2   2    1    1

Now, the above can be generated by using the following code:

Lets say the input is stored in X[R] = {1,2, ..., 13}
Here R is 13..

Lets say, the array  A is initialized with 0.

for (int i = 0; i  R-1; ++i)
  for ( int j = 1; i  R; ++j)
      ++A[ X[i] + X[j] ];

Well, as the nos. are continuous , hence we can minimize the
initialization operation as follows
(based on fact that there is a pattern and holds for any set of
continuous nos. from 1 to K)

// initialze pair counts.. ( 3 ...  25)
int j =0;
for(int i = 0; i  12 ; i+=2)
{
    A[i] = A[i+1] = A[22-i] = A[21-i] = j;
    ++j;}

a[12] = 6;

[ the above code is specifically written for 1 to 13 (K), but you can
generalize it based on ur need.
All you need to do is take care of the last initialization statement
a[12] = 6; based on value K (13).]


Now, A[i] basically represent the no. of ways we can get 'i+3' - lets
say this is a1's current pick.
Now, for sum of a2 and a3's pick to be smaller than a1's we can do the
following:

If A[i] is picked by a1, then let a2 pick A[p] where p  i, then the
possible picks by a3 would 

[algogeeks] Re: probability of winning with two cards

2012-01-19 Thread Sundi
:)...
Lets say you have two players a and b
one card is distrbuted to each player
if the card with a is higher then a wins  else a loses.

probability of a winning:
total num of cards with combos where a wins a is the first player:
2-1,3-1...13-1
3-2...13-2
..
13-12
this sum equals = (13+12+...1)*4, 4 suites are possible

therefore probability=sum/52C2.

I dont think it is half in this case.

similarly extending for 3 players with 2 cards each i dont think its
going to be 1/3 becoz of the condition given.

I might be wrong. Please correct me if so.


On Jan 19, 1:08 am, Prateek Jain prateek10011...@gmail.com wrote:
 ya obviously...it is 1/3.no need of any data is required

 On 1/18/12, sunny agrawal sunny816.i...@gmail.com wrote:







  isn't the answer will be 1/3, without any calculations :)

  On Thu, Jan 19, 2012 at 7:10 AM, Sundi sundi...@gmail.com wrote:

  there are 52 cards.. there are 3 players a1,a2,a3 each player is given
  2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
  cards is greater then the other two players sum.

  find the probability of a1 being the winner?

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.

  --
  Sunny Aggrawal
  B.Tech. V year,CSI
  Indian Institute Of Technology,Roorkee

  --
  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 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 algogeeks@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: probability of winning with two cards

2012-01-19 Thread Dave
@Sunny: The probability of a1 being the winner is not 1/3 because of
ties. I.e., if a1 = a2  a3, then a1 and a2 are tied and there is no
winner. What we can say with no calculations is that P(a1 winning) =
(1 - P(no winner)) / 3.

Dave

On Jan 18, 10:52 pm, sunny agrawal sunny816.i...@gmail.com wrote:
 isn't the answer will be 1/3, without any calculations :)





 On Thu, Jan 19, 2012 at 7:10 AM, Sundi sundi...@gmail.com wrote:
  there are 52 cards.. there are 3 players a1,a2,a3 each player is given
  2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
  cards is greater then the other two players sum.

  find the probability of a1 being the winner?

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 Sunny Aggrawal
 B.Tech. V year,CSI
 Indian Institute Of Technology,Roorkee

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability of winning with two cards

2012-01-19 Thread Don
P= 8800/28561 ~= 0.308112461...

On Jan 18, 7:40 pm, Sundi sundi...@gmail.com wrote:
 there are 52 cards.. there are 3 players a1,a2,a3 each player is given
 2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
 cards is greater then the other two players sum.

 find the probability of a1 being the winner?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability of winning with two cards

2012-01-19 Thread Lucifer
hoping that the cards are numbered 1,2,3,,13..

Probalilty (a1 wins) = 21723/474552 = .045776

On Jan 20, 12:47 am, Don dondod...@gmail.com wrote:
 P= 8800/28561 ~= 0.308112461...

 On Jan 18, 7:40 pm, Sundi sundi...@gmail.com wrote:







  there are 52 cards.. there are 3 players a1,a2,a3 each player is given
  2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
  cards is greater then the other two players sum.

  find the probability of a1 being the winner?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability of winning with two cards

2012-01-19 Thread Lucifer
@correction:

Probalilty (a1 wins) = 24575/474552 = .051786


On Jan 20, 1:30 am, Lucifer sourabhd2...@gmail.com wrote:
 hoping that the cards are numbered 1,2,3,,13..

 Probalilty (a1 wins) = 21723/474552 = .045776

 On Jan 20, 12:47 am, Don dondod...@gmail.com wrote:







  P= 8800/28561 ~= 0.308112461...

  On Jan 18, 7:40 pm, Sundi sundi...@gmail.com wrote:

   there are 52 cards.. there are 3 players a1,a2,a3 each player is given
   2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
   cards is greater then the other two players sum.

   find the probability of a1 being the winner?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability of winning with two cards

2012-01-19 Thread Don
You are saying that a1 wins roughly 1 in 20 times? How does that make
any sence?
Don

On Jan 19, 2:35 pm, Lucifer sourabhd2...@gmail.com wrote:
 @correction:

 Probalilty (a1 wins) = 24575/474552 = .051786

 On Jan 20, 1:30 am, Lucifer sourabhd2...@gmail.com wrote:



  hoping that the cards are numbered 1,2,3,,13..

  Probalilty (a1 wins) = 21723/474552 = .045776

  On Jan 20, 12:47 am, Don dondod...@gmail.com wrote:

   P= 8800/28561 ~= 0.308112461...

   On Jan 18, 7:40 pm, Sundi sundi...@gmail.com wrote:

there are 52 cards.. there are 3 players a1,a2,a3 each player is given
2 cards each one of A=2...J=11,Q=12,K=13..a user wins if his sum of
cards is greater then the other two players sum.

find the probability of a1 being the winner?- Hide quoted text -

 - Show quoted text -

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability question

2011-09-05 Thread piyush agarwal
Take it simple silly ...

for each 10 min interval, if man comes in first 2 min, he'll catch the 1st
train, if he comes in next 8 min, he'll catch the 2nd train.

hence for harbor line - (2/10) 0.2 and for main line 0.8.


On Wed, Aug 31, 2011 at 10:37 PM, ravi rravi...@gmail.com wrote:


 A man goes to the station every day to catch the first train that comes ??
 = man catches the first train that comes after him


 On Wed, Aug 31, 2011 at 10:30 PM, Dave dave_and_da...@juno.com wrote:

 @Ankul: According to the problem statement, the first train is the one
 that arrives at 5:00 a.m.

 Dave

 On Aug 31, 11:26 pm, Ankuj Gupta ankuj2...@gmail.com wrote:
  I could not get it. What does first train mean here?
 
  On Sep 1, 1:08 am, Don dondod...@gmail.com wrote:
 
 
 
   Assuming that the man arrives at a random time during the 24-hour day,
   there are 228 minutes in the day when the next train will be the
   harbour line (2 minutes of every 10 for 19 hours). For the other 1212
   minutes the main line will be the next train. Therefore, the
   probability of catching the main line train is 0.841666...
   Don
 
   On Aug 31, 8:37 am, swetha rahul swetharahu...@gmail.com wrote:
 
In a railway station, there are two trains going. One in the harbour
 line
and one in the main line, each having a frequency of 10 minutes. The
 main
line service starts at 5 o'clock and the harbour line starts at
 5.02A.M. A
man goes to the station every day to catch the first train that
 comes.What
is the probability of the man catching the first
train?- Hide quoted text -
 
  - Show quoted text -

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 --
 Ravi Ramadasu | Computer Science and Engineering, IIT Bombay |
 rravi...@gmail.com | +919757074652

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Piyush Agarwal
Final Year Undergraduate
Department of Computer Engineering
Malaviya National Institute of Technology
Jaipur

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability ques

2011-09-01 Thread Dave
@Aditya: If you are comfortable with working with fractions of area,
with area being a real number, then why not length, also being a real
number? The probability of a randomly selected point in the interval
[1, 100] satisfying a + 100/a  50 is exactly sqrt(2100)/99.

Dave

On Sep 1, 3:43 am, Aditya Virmani virmanisadi...@gmail.com wrote:
 the space in tht case is restricted... my point is...number of points in a 4
 m2 area wud be exactly 4 times of the number of points in 1 m2 area... so we
 r actually talking over area in ur qn...now if i were to say...tht find the
 probability tht it will hit the target at coordinate (0,0) ... tht wud be
 close to 0...



 On Thu, Sep 1, 2011 at 2:57 AM, Dave dave_and_da...@juno.com wrote:
  @Aditya. There are an infinite number of points in that target, too.
  But we don't have any trouble saying that 1/4 of them are in the
  bullseye.

  Dave

  On Aug 31, 4:07 pm, Aditya Virmani virmanisadi...@gmail.com wrote:
   @DAVE again u r considering a finite space... in the above case...but how
   wud u take the space in real number thing...with no particular info
  thr
   r infinite real number  frm 1-100...if i cud change the qn to find the
   probability the chosen number is in the range a to a+1 ...thn it cud be
   aptly answered

   On Tue, Aug 30, 2011 at 10:10 AM, Dave dave_and_da...@juno.com wrote:
@AnikKumar: Most people normally wouldn't have difficulty with
probabilities on the real numbers. E.g., there is a target with two
regions, the bullseye with radius 1 and a concentric region with
radius 2. What is the probability of a randomly-thrown dart hitting
the bullseye, given that it hits the target? Most people would say
that since the area of the bullseye is 1/4 the area of the target, the
probability is 1/4. Wouldn't you say that, too?

Dave

On Aug 29, 11:15 pm, AnilKumar B akumarb2...@gmail.com wrote:
 Agree with Don.

 But what if we want to find probability of on real line?

 How we can consider R as sample space?

 Is that Sample space should be COUNTABLE and FINITE?

 *By the quadratic formula, a is 2.08712 or 47.9128.
 The range is 45.8256.
 A falls in the range of 1..100 or 99. So the probability is
  47.9128/99*
 *
 *
 *Here you are considering Sample space as length of the interval,
  right?
but
 i think it should be cardinal({x/x belongs to Q and x belongs to
[1,100]}).*

 On Fri, Aug 26, 2011 at 2:04 AM, Aditya Virmani 
virmanisadi...@gmail.comwrote:

  +1 Don... nthin is specified fr the nature of numbers if thy can be
  rational or thy hav to be only natural/integral numbers...

  On Wed, Aug 24, 2011 at 9:33 PM, Don dondod...@gmail.com wrote:

  First find the endpoints of the region where the condition is met:

  a + 100/a = 50
  a^2 - 50a + 100 = 0
  By the quadratic formula, a is 2.08712 or 47.9128.
  The range is 45.8256.
  A falls in the range of 1..100 or 99. So the probability is
  47.9128/99
  = 0.48397

  Don

  On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
   Let 'a' be  a number between 1 and 100. what is the probability
  of
  choosing
   'a' such that a+ (100/a) 50

   --
   Regards
   Ramya
   *
   *
   *Try to learn something about everything and everything about
something*

  --
  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 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 algogeeks@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.-Hidequoted text -

 - Show quoted text -

--
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 group at
   http://groups.google.com/group/algogeeks?hl=en.-Hide quoted text -

   - Show quoted text -

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.- 

[algogeeks] Re: probability question

2011-08-31 Thread Abhishek Mallick
0.8

On Aug 31, 6:37 pm, swetha rahul swetharahu...@gmail.com wrote:
 In a railway station, there are two trains going. One in the harbour line
 and one in the main line, each having a frequency of 10 minutes. The main
 line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A
 man goes to the station every day to catch the first train that comes.What
 is the probability of the man catching the first
 train?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability question

2011-08-31 Thread Don
In my experience, the probability that a train stays on schedule to
within 5 minutes is about 0.01, so I'm going to say that the
probability is about 0.51.
Don

On Aug 31, 8:37 am, swetha rahul swetharahu...@gmail.com wrote:
 In a railway station, there are two trains going. One in the harbour line
 and one in the main line, each having a frequency of 10 minutes. The main
 line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A
 man goes to the station every day to catch the first train that comes.What
 is the probability of the man catching the first
 train?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability question

2011-08-31 Thread Dave
@Swetha: My probability of reaching any train station by 5:00 a.m is
zero. So I would never catch the first train. Now if the trains
started at 8 or 9 a.m., then I might have some probability of catching
the first one. :-)

(In case it isn't obvious, I'm focusing on the wording of the question
at the end of the puzzle. It would be better if it asked for the
probability of catching a train on the main line instead of asking
about the probability of catching the first train, which leaves at
5:00 a.m.)

Dave

On Aug 31, 8:37 am, swetha rahul swetharahu...@gmail.com wrote:
 In a railway station, there are two trains going. One in the harbour line
 and one in the main line, each having a frequency of 10 minutes. The main
 line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A
 man goes to the station every day to catch the first train that comes.What
 is the probability of the man catching the first
 train?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability question

2011-08-31 Thread annarao kataru
i think ur question is not clear dear acc  to ur question  the man
should reacch the station exactly at 5 or before 5 to get the first
train . then prob will be  1  otherwise  prob will be  0. correct me
if i am wrong.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability question

2011-08-31 Thread Don
Assuming that the man arrives at a random time during the 24-hour day,
there are 228 minutes in the day when the next train will be the
harbour line (2 minutes of every 10 for 19 hours). For the other 1212
minutes the main line will be the next train. Therefore, the
probability of catching the main line train is 0.841666...
Don

On Aug 31, 8:37 am, swetha rahul swetharahu...@gmail.com wrote:
 In a railway station, there are two trains going. One in the harbour line
 and one in the main line, each having a frequency of 10 minutes. The main
 line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A
 man goes to the station every day to catch the first train that comes.What
 is the probability of the man catching the first
 train?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability ques

2011-08-31 Thread Aditya Virmani
@DAVE again u r considering a finite space... in the above case...but how
wud u take the space in real number thing...with no particular info thr
r infinite real number  frm 1-100...if i cud change the qn to find the
probability the chosen number is in the range a to a+1 ...thn it cud be
aptly answered

On Tue, Aug 30, 2011 at 10:10 AM, Dave dave_and_da...@juno.com wrote:

 @AnikKumar: Most people normally wouldn't have difficulty with
 probabilities on the real numbers. E.g., there is a target with two
 regions, the bullseye with radius 1 and a concentric region with
 radius 2. What is the probability of a randomly-thrown dart hitting
 the bullseye, given that it hits the target? Most people would say
 that since the area of the bullseye is 1/4 the area of the target, the
 probability is 1/4. Wouldn't you say that, too?

 Dave

 On Aug 29, 11:15 pm, AnilKumar B akumarb2...@gmail.com wrote:
  Agree with Don.
 
  But what if we want to find probability of on real line?
 
  How we can consider R as sample space?
 
  Is that Sample space should be COUNTABLE and FINITE?
 
  *By the quadratic formula, a is 2.08712 or 47.9128.
  The range is 45.8256.
  A falls in the range of 1..100 or 99. So the probability is 47.9128/99*
  *
  *
  *Here you are considering Sample space as length of the interval, right?
 but
  i think it should be cardinal({x/x belongs to Q and x belongs to
 [1,100]}).*
 
  On Fri, Aug 26, 2011 at 2:04 AM, Aditya Virmani 
 virmanisadi...@gmail.comwrote:
 
 
 
   +1 Don... nthin is specified fr the nature of numbers if thy can be
   rational or thy hav to be only natural/integral numbers...
 
   On Wed, Aug 24, 2011 at 9:33 PM, Don dondod...@gmail.com wrote:
 
   First find the endpoints of the region where the condition is met:
 
   a + 100/a = 50
   a^2 - 50a + 100 = 0
   By the quadratic formula, a is 2.08712 or 47.9128.
   The range is 45.8256.
   A falls in the range of 1..100 or 99. So the probability is 47.9128/99
   = 0.48397
 
   Don
 
   On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
Let 'a' be  a number between 1 and 100. what is the probability of
   choosing
'a' such that a+ (100/a) 50
 
--
Regards
Ramya
*
*
*Try to learn something about everything and everything about
 something*
 
   --
   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 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 algogeeks@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.- Hide quoted text -
 
  - Show quoted text -

 --
 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 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 algogeeks@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: probability ques

2011-08-31 Thread Dave
@Aditya. There are an infinite number of points in that target, too.
But we don't have any trouble saying that 1/4 of them are in the
bullseye.

Dave

On Aug 31, 4:07 pm, Aditya Virmani virmanisadi...@gmail.com wrote:
 @DAVE again u r considering a finite space... in the above case...but how
 wud u take the space in real number thing...with no particular info thr
 r infinite real number  frm 1-100...if i cud change the qn to find the
 probability the chosen number is in the range a to a+1 ...thn it cud be
 aptly answered



 On Tue, Aug 30, 2011 at 10:10 AM, Dave dave_and_da...@juno.com wrote:
  @AnikKumar: Most people normally wouldn't have difficulty with
  probabilities on the real numbers. E.g., there is a target with two
  regions, the bullseye with radius 1 and a concentric region with
  radius 2. What is the probability of a randomly-thrown dart hitting
  the bullseye, given that it hits the target? Most people would say
  that since the area of the bullseye is 1/4 the area of the target, the
  probability is 1/4. Wouldn't you say that, too?

  Dave

  On Aug 29, 11:15 pm, AnilKumar B akumarb2...@gmail.com wrote:
   Agree with Don.

   But what if we want to find probability of on real line?

   How we can consider R as sample space?

   Is that Sample space should be COUNTABLE and FINITE?

   *By the quadratic formula, a is 2.08712 or 47.9128.
   The range is 45.8256.
   A falls in the range of 1..100 or 99. So the probability is 47.9128/99*
   *
   *
   *Here you are considering Sample space as length of the interval, right?
  but
   i think it should be cardinal({x/x belongs to Q and x belongs to
  [1,100]}).*

   On Fri, Aug 26, 2011 at 2:04 AM, Aditya Virmani 
  virmanisadi...@gmail.comwrote:

+1 Don... nthin is specified fr the nature of numbers if thy can be
rational or thy hav to be only natural/integral numbers...

On Wed, Aug 24, 2011 at 9:33 PM, Don dondod...@gmail.com wrote:

First find the endpoints of the region where the condition is met:

a + 100/a = 50
a^2 - 50a + 100 = 0
By the quadratic formula, a is 2.08712 or 47.9128.
The range is 45.8256.
A falls in the range of 1..100 or 99. So the probability is 47.9128/99
= 0.48397

Don

On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
 Let 'a' be  a number between 1 and 100. what is the probability of
choosing
 'a' such that a+ (100/a) 50

 --
 Regards
 Ramya
 *
 *
 *Try to learn something about everything and everything about
  something*

--
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 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 algogeeks@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.-Hide quoted text -

   - Show quoted text -

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.- Hide quoted text -

 - Show quoted text -

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability question

2011-08-31 Thread Ankuj Gupta
I could not get it. What does first train mean here?

On Sep 1, 1:08 am, Don dondod...@gmail.com wrote:
 Assuming that the man arrives at a random time during the 24-hour day,
 there are 228 minutes in the day when the next train will be the
 harbour line (2 minutes of every 10 for 19 hours). For the other 1212
 minutes the main line will be the next train. Therefore, the
 probability of catching the main line train is 0.841666...
 Don

 On Aug 31, 8:37 am, swetha rahul swetharahu...@gmail.com wrote:







  In a railway station, there are two trains going. One in the harbour line
  and one in the main line, each having a frequency of 10 minutes. The main
  line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A
  man goes to the station every day to catch the first train that comes.What
  is the probability of the man catching the first
  train?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability ques

2011-08-29 Thread AnilKumar B
Agree with Don.

But what if we want to find probability of on real line?

How we can consider R as sample space?

Is that Sample space should be COUNTABLE and FINITE?

*By the quadratic formula, a is 2.08712 or 47.9128.
The range is 45.8256.
A falls in the range of 1..100 or 99. So the probability is 47.9128/99*
*
*
*Here you are considering Sample space as length of the interval, right? but
i think it should be cardinal({x/x belongs to Q and x belongs to [1,100]}).*


On Fri, Aug 26, 2011 at 2:04 AM, Aditya Virmani virmanisadi...@gmail.comwrote:

 +1 Don... nthin is specified fr the nature of numbers if thy can be
 rational or thy hav to be only natural/integral numbers...


 On Wed, Aug 24, 2011 at 9:33 PM, Don dondod...@gmail.com wrote:

 First find the endpoints of the region where the condition is met:

 a + 100/a = 50
 a^2 - 50a + 100 = 0
 By the quadratic formula, a is 2.08712 or 47.9128.
 The range is 45.8256.
 A falls in the range of 1..100 or 99. So the probability is 47.9128/99
 = 0.48397

 Don

 On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
  Let 'a' be  a number between 1 and 100. what is the probability of
 choosing
  'a' such that a+ (100/a) 50
 
  --
  Regards
  Ramya
  *
  *
  *Try to learn something about everything and everything about something*

 --
 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 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 algogeeks@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 algogeeks@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: probability ques

2011-08-29 Thread Dave
@AnikKumar: Most people normally wouldn't have difficulty with
probabilities on the real numbers. E.g., there is a target with two
regions, the bullseye with radius 1 and a concentric region with
radius 2. What is the probability of a randomly-thrown dart hitting
the bullseye, given that it hits the target? Most people would say
that since the area of the bullseye is 1/4 the area of the target, the
probability is 1/4. Wouldn't you say that, too?

Dave

On Aug 29, 11:15 pm, AnilKumar B akumarb2...@gmail.com wrote:
 Agree with Don.

 But what if we want to find probability of on real line?

 How we can consider R as sample space?

 Is that Sample space should be COUNTABLE and FINITE?

 *By the quadratic formula, a is 2.08712 or 47.9128.
 The range is 45.8256.
 A falls in the range of 1..100 or 99. So the probability is 47.9128/99*
 *
 *
 *Here you are considering Sample space as length of the interval, right? but
 i think it should be cardinal({x/x belongs to Q and x belongs to [1,100]}).*

 On Fri, Aug 26, 2011 at 2:04 AM, Aditya Virmani 
 virmanisadi...@gmail.comwrote:



  +1 Don... nthin is specified fr the nature of numbers if thy can be
  rational or thy hav to be only natural/integral numbers...

  On Wed, Aug 24, 2011 at 9:33 PM, Don dondod...@gmail.com wrote:

  First find the endpoints of the region where the condition is met:

  a + 100/a = 50
  a^2 - 50a + 100 = 0
  By the quadratic formula, a is 2.08712 or 47.9128.
  The range is 45.8256.
  A falls in the range of 1..100 or 99. So the probability is 47.9128/99
  = 0.48397

  Don

  On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
   Let 'a' be  a number between 1 and 100. what is the probability of
  choosing
   'a' such that a+ (100/a) 50

   --
   Regards
   Ramya
   *
   *
   *Try to learn something about everything and everything about something*

  --
  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 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 algogeeks@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.- Hide quoted text -

 - Show quoted text -

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability ques

2011-08-29 Thread Prem Krishna Chettri
Hi Guys,

  Comment required from NIT Warangal ppls.   Who is this guy?? Who claims
this ...

http://timesofindia.indiatimes.com/tech/careers/job-trends/Facebook-hires-NIT-Warangal-student-for-Rs-45-lakh/articleshow/9793300.cms

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability ques

2011-08-25 Thread Aditya Virmani
+1 Don... nthin is specified fr the nature of numbers if thy can be rational
or thy hav to be only natural/integral numbers...

On Wed, Aug 24, 2011 at 9:33 PM, Don dondod...@gmail.com wrote:

 First find the endpoints of the region where the condition is met:

 a + 100/a = 50
 a^2 - 50a + 100 = 0
 By the quadratic formula, a is 2.08712 or 47.9128.
 The range is 45.8256.
 A falls in the range of 1..100 or 99. So the probability is 47.9128/99
 = 0.48397

 Don

 On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
  Let 'a' be  a number between 1 and 100. what is the probability of
 choosing
  'a' such that a+ (100/a) 50
 
  --
  Regards
  Ramya
  *
  *
  *Try to learn something about everything and everything about something*

 --
 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 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 algogeeks@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: probability ques

2011-08-24 Thread Don
First find the endpoints of the region where the condition is met:

a + 100/a = 50
a^2 - 50a + 100 = 0
By the quadratic formula, a is 2.08712 or 47.9128.
The range is 45.8256.
A falls in the range of 1..100 or 99. So the probability is 47.9128/99
= 0.48397

Don

On Aug 23, 11:56 am, ramya reddy rmy.re...@gmail.com wrote:
 Let 'a' be  a number between 1 and 100. what is the probability of choosing
 'a' such that a+ (100/a) 50

 --
 Regards
 Ramya
 *
 *
 *Try to learn something about everything and everything about something*

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability ques

2011-08-23 Thread manoj
sorry i thought it was a+ 100/a50 because same question was asked by
national instrument 2 days ago
in this case it'll be [3-47]  45 no so prob will be 45/100

On Aug 24, 8:21 am, Ankur Goel goel.anku...@gmail.com wrote:
 Dude how it can be 50 if u do 50 + 100/50 which is 52 50



 On Wed, Aug 24, 2011 at 8:42 AM, Manoj Bagari manojbag...@gmail.com wrote:
  possible value for a can be 1,2,48,49,50 and all (50-100]
  no.

  so prob will be 55/100
  On Tue, Aug 23, 2011 at 10:41 PM, priya ramesh 
  love.for.programm...@gmail.com wrote:

  try substituting values for a.
  for a=1, 2 it's  50
  for a=3, 4, 5, 6, 7... it's less than 50
  when a approaches 48, 49... it's  50
  the max value of a that satisfies the condition is 47.

  p= total numbers between 3 and 47 (inclusive of 3 and 47)
                          /
       total numbers between 1 and 100

  = 45/98

   --
  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 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 algogeeks@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.- Hide quoted text -

 - Show quoted text -

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability ques

2011-08-23 Thread Dave
@Dheeraj: Because there are 98 numbers between 1 and 100. They are 2,
3, 4, ..., 99. It is a matter of semantics. 1 and 100 are not between
1 and 100.

Dave

On Aug 23, 11:21 pm, Dheeraj Sharma dheerajsharma1...@gmail.com
wrote:
 y its 45/98 and not 45/100 ??

 On Wed, Aug 24, 2011 at 9:41 AM, Manoj Bagari manojbag...@gmail.com wrote:
  oh sorry i thought it was a+100/a50 because this same question asked by
  national instrument 2 day ago.
  in this case  passibe cases wil be  44 [3-47} no so it'll be 44/100

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 *Dheeraj Sharma*
 Comp Engg.
 NIT Kurukshetra
 +91 8950264227

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability ques

2011-08-23 Thread Dheeraj Sharma
ok thanks

On Wed, Aug 24, 2011 at 10:02 AM, Dave dave_and_da...@juno.com wrote:

 @Dheeraj: Because there are 98 numbers between 1 and 100. They are 2,
 3, 4, ..., 99. It is a matter of semantics. 1 and 100 are not between
 1 and 100.

 Dave

 On Aug 23, 11:21 pm, Dheeraj Sharma dheerajsharma1...@gmail.com
 wrote:
  y its 45/98 and not 45/100 ??
 
  On Wed, Aug 24, 2011 at 9:41 AM, Manoj Bagari manojbag...@gmail.com
 wrote:
   oh sorry i thought it was a+100/a50 because this same question asked
 by
   national instrument 2 day ago.
   in this case  passibe cases wil be  44 [3-47} no so it'll be 44/100
 
   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  *Dheeraj Sharma*
  Comp Engg.
  NIT Kurukshetra
  +91 8950264227

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra
+91 8950264227

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability! tough one to crack!

2011-08-20 Thread priya ramesh
a wonderful explaination divye!! thank you so much :) :)

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability! tough one to crack!

2011-08-19 Thread Dave
@Priya: Consider one of the squares in the grid. It has an area of 4
square inches. If the coin lands so that its center is within 1/2 inch
of any grid line, the coin will touch the line. The area of the region
within 1/2 inch of the boundary is 3 square inches. Therefore, 3/4 of
the time the coin will touch a grid line, leaving 1/4 as the
probability of not touching any of the grid lines.

Dave

On Aug 19, 11:50 am, priya ramesh love.for.programm...@gmail.com
wrote:
 A 1 inch diameter coin is thrown on a table covered with a grid of lines two
 inches apart. What is the probability the coin lands in a square without
 touching any of the lines of the grid?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability! tough one to crack!

2011-08-19 Thread Sanjay Rajpal
@Dave : me too didnt get the meaning you want to convey, plz throw some
light.

Sanjay Kumar
B.Tech Final Year
Department of Computer Engineering
National Institute of Technology Kurukshetra
Kurukshetra - 136119
Haryana, India




On Fri, Aug 19, 2011 at 10:09 AM, priya ramesh 
love.for.programm...@gmail.com wrote:

 @dave: You are great!! The ans is indeed 1/4.

 I dint understand this sentence...

 The area of the region
 within 1/2 inch of the boundary is 3 square inches.

 --
 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 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 algogeeks@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! tough one to crack!

2011-08-19 Thread Romil .......
The requirements will be satisfied if the centre of the coin is such that
the coin just touches the square. This is possible only when the centre of
coin is in a smaller square of 1 inch side.
Hence the result.



On Fri, Aug 19, 2011 at 10:41 PM, Sanjay Rajpal srn...@gmail.com wrote:

 @Dave : me too didnt get the meaning you want to convey, plz throw some
 light.

 Sanjay Kumar
 B.Tech Final Year
 Department of Computer Engineering
 National Institute of Technology Kurukshetra
 Kurukshetra - 136119
 Haryana, India




 On Fri, Aug 19, 2011 at 10:09 AM, priya ramesh 
 love.for.programm...@gmail.com wrote:

 @dave: You are great!! The ans is indeed 1/4.

 I dint understand this sentence...

 The area of the region
 within 1/2 inch of the boundary is 3 square inches.

 --
 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 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 algogeeks@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.




-- 
Romil

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability! tough one to crack!

2011-08-19 Thread priya ramesh
why this sentence??

3/4 of
the time the coin will touch a grid line??

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability! tough one to crack!

2011-08-19 Thread Sanjay Rajpal
got it.

Sanju
:)



On Fri, Aug 19, 2011 at 10:25 AM, Romil ... vamosro...@gmail.comwrote:

 Because this is the answer. Rest of the times it will not touch any of the
 grid lines.


 On Fri, Aug 19, 2011 at 10:50 PM, priya ramesh 
 love.for.programm...@gmail.com wrote:

 why this sentence??

 3/4 of
 the time the coin will touch a grid line??

  --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Romil


  --
 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 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 algogeeks@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! tough one to crack!

2011-08-19 Thread DK
For those of you who want an explanation of Dave's answer, please refer to 
the diagram below.

| 0.5 in |-| 0.5 in |
xxx -
xxx 0.5 in
xxx - 
xx...xx   |
xx...xx   |
xx...xx   |
xx...xx   |
xxx -
xxx 0.5 in
xxx - 

Since the radius of the coin is 0.5 in, if the center of the coin falls in 
the x area, it will cross a grid line.
So, probability of the coin not crossing the grid lines is area of dots / 
area of square = (1 inch square / 4 inch square) = 1/4

--
DK

http://www.divye.in
http://twitter.com/divyekapoor
http://gplus.to/divyekapoor

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/osMGCscKC70J.
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability! tough one to crack!

2011-08-19 Thread sagar pareek
GOOD one dave
and thanks divye for a wonderful explanation

On Fri, Aug 19, 2011 at 11:44 PM, DK divyekap...@gmail.com wrote:

 For those of you who want an explanation of Dave's answer, please refer to
 the diagram below.

 | 0.5 in |-| 0.5 in |
 xxx -
 xxx 0.5 in
 xxx -
 xx...xx   |
 xx...xx   |
 xx...xx   |
 xx...xx   |
 xxx -
 xxx 0.5 in
 xxx -

 Since the radius of the coin is 0.5 in, if the center of the coin falls in
 the x area, it will cross a grid line.
 So, probability of the coin not crossing the grid lines is area of dots /
 area of square = (1 inch square / 4 inch square) = 1/4

 --
 DK

 http://www.divye.in
 http://twitter.com/divyekapoor
 http://gplus.to/divyekapoor

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/osMGCscKC70J.

 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: probability tough one!

2011-08-17 Thread Aditya Jain
Is that exactly 2 or atleast 2?

P(atleast 2)=1-P(no 2 people )=1-(364*363*362*.*317/365^49)





On Aug 17, 5:24 pm, priya ramesh love.for.programm...@gmail.com
wrote:
 nothing is specified. I guess it's 365

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability tough one!

2011-08-17 Thread sukran dhawan
can yo explain it pl?


On Wed, Aug 17, 2011 at 6:11 PM, Aditya Jain aditya2...@gmail.com wrote:

 Is that exactly 2 or atleast 2?

 P(atleast 2)=1-P(no 2 people )=1-(364*363*362*.*317/365^49)





 On Aug 17, 5:24 pm, priya ramesh love.for.programm...@gmail.com
 wrote:
  nothing is specified. I guess it's 365

 --
 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 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 algogeeks@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 tough one!

2011-08-17 Thread Romil .......
Take it as:
P(atleast 2) = 1-P(no 2 have same b'day) = 1- ((365C50)/50!)
where C represents the combinations

On Wed, Aug 17, 2011 at 6:14 PM, sukran dhawan sukrandha...@gmail.comwrote:

 can yo explain it pl?


 On Wed, Aug 17, 2011 at 6:11 PM, Aditya Jain aditya2...@gmail.com wrote:

 Is that exactly 2 or atleast 2?

 P(atleast 2)=1-P(no 2 people )=1-(364*363*362*.*317/365^49)





 On Aug 17, 5:24 pm, priya ramesh love.for.programm...@gmail.com
 wrote:
  nothing is specified. I guess it's 365

 --
 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 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 algogeeks@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.




-- 
Romil

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability tough one!

2011-08-17 Thread Adi Srikanth
there is something anamoly about this birthday probability caculation.
Search in google..you may find it.


Regards,
Adi Srikanth.
Mob No 9887233349
Personal Pages: adisrikanth.co.nr


On Wed, Aug 17, 2011 at 6:25 PM, Romil ... vamosro...@gmail.com wrote:

 Take it as:
 P(atleast 2) = 1-P(no 2 have same b'day) = 1- ((365C50)/50!)
 where C represents the combinations

 On Wed, Aug 17, 2011 at 6:14 PM, sukran dhawan sukrandha...@gmail.comwrote:

 can yo explain it pl?


 On Wed, Aug 17, 2011 at 6:11 PM, Aditya Jain aditya2...@gmail.comwrote:

 Is that exactly 2 or atleast 2?

 P(atleast 2)=1-P(no 2 people )=1-(364*363*362*.*317/365^49)





 On Aug 17, 5:24 pm, priya ramesh love.for.programm...@gmail.com
 wrote:
  nothing is specified. I guess it's 365

 --
 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 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 algogeeks@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.




 --
 Romil


  --
 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 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 algogeeks@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 tough one!

2011-08-17 Thread saurabh singh
The question is directly taken from coreman...read it,the best is
explained there

On Wed, Aug 17, 2011 at 7:10 PM, Adi Srikanth adisriika...@gmail.com wrote:

 there is something anamoly about this birthday probability caculation. Search 
 in google..you may find it.


 Regards,
 Adi Srikanth.
 Mob No 9887233349
 Personal Pages: adisrikanth.co.nr


 On Wed, Aug 17, 2011 at 6:25 PM, Romil ... vamosro...@gmail.com wrote:

 Take it as:
 P(atleast 2) = 1-P(no 2 have same b'day) = 1- ((365C50)/50!)
 where C represents the combinations

 On Wed, Aug 17, 2011 at 6:14 PM, sukran dhawan sukrandha...@gmail.com 
 wrote:

 can yo explain it pl?

 On Wed, Aug 17, 2011 at 6:11 PM, Aditya Jain aditya2...@gmail.com wrote:

 Is that exactly 2 or atleast 2?

 P(atleast 2)=1-P(no 2 people )=1-(364*363*362*.*317/365^49)





 On Aug 17, 5:24 pm, priya ramesh love.for.programm...@gmail.com
 wrote:
  nothing is specified. I guess it's 365

 --
 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 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 algogeeks@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.



 --
 Romil


 --
 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 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 algogeeks@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.



--
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability tough one!

2011-08-17 Thread priya ramesh
I don't have coreman. If you have an e book can you plz upload it??

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: probability tough one!

2011-08-17 Thread saurabh singh
Sorry the problems are not same.I should have read the problem more
carefully.Anyways I would recommend its high time you get a hard copy
of coreman..
Trying for a solution now.
On Wed, Aug 17, 2011 at 7:19 PM, priya ramesh
love.for.programm...@gmail.com wrote:
 I don't have coreman. If you have an e book can you plz upload it??

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Saurabh Singh
B.Tech (Computer Science)
MNNIT ALLAHABAD

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-16 Thread Jacob Ridley
I think there is some ambiguity in the question.

 (All this time you don't know you were tossing a fair coin or not).
1) Does the above statement mean that the thower don't know whether he
or she threw a fair coin even after throwing? Or is the thrower not
informed beforehand that one of them is not a fair coin?
2) Does the coin count reduce after every throw or should it be put
back?
3) Depending on 1) and 2), there will be different answers.


On Aug 9, 12:13 am, Maddy madhu.mitha...@gmail.com wrote:
 I think the answer is 17/80, because
 as you say the 5 trials are independent.. but
 the fact that a head turns up in all the 5 trials, give some
 information about our original probability of choosing the coins.

 in case we had obtained a tail in the first trial, we can be sure its
 the fair coin, and so the consecutive trials would become
 independent..

 but since that is not the case, every head is going to increase the
 chance of choosing the biased coin(initially), and hence affect the
 probability of the next head..

 before the first trial probability of landing a head is 3/5, but once
 u see the first head, the probability of landing a head on the second
 trial changes to 4/5*1/4+1/5, and so on..that is, there is a higher
 probability that we chose a biased coin, rather than the fair coin.

 hope its clear..

 On Aug 7, 11:36 pm, sumit gaur sumitgau...@gmail.com wrote:



  (3/5)

  On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:

   A bag contains 5 coins. Four of them are fair and one has heads on
   both sides. You randomly pulled one coin from the bag and tossed it 5
   times, heads turned up all five times. What is the probability that
   you toss next time, heads turns up. (All this time you don't know you
   were tossing a fair coin or not).- Hide quoted text -

 - Show quoted text -

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-16 Thread pacific :-)
I'm little late but I too got 17/18.

On Tue, Aug 16, 2011 at 10:47 PM, Jacob Ridley jridley2...@gmail.comwrote:

 I think there is some ambiguity in the question.

  (All this time you don't know you were tossing a fair coin or not).
 1) Does the above statement mean that the thower don't know whether he
 or she threw a fair coin even after throwing? Or is the thrower not
 informed beforehand that one of them is not a fair coin?
 2) Does the coin count reduce after every throw or should it be put
 back?
 3) Depending on 1) and 2), there will be different answers.


 On Aug 9, 12:13 am, Maddy madhu.mitha...@gmail.com wrote:
  I think the answer is 17/80, because
  as you say the 5 trials are independent.. but
  the fact that a head turns up in all the 5 trials, give some
  information about our original probability of choosing the coins.
 
  in case we had obtained a tail in the first trial, we can be sure its
  the fair coin, and so the consecutive trials would become
  independent..
 
  but since that is not the case, every head is going to increase the
  chance of choosing the biased coin(initially), and hence affect the
  probability of the next head..
 
  before the first trial probability of landing a head is 3/5, but once
  u see the first head, the probability of landing a head on the second
  trial changes to 4/5*1/4+1/5, and so on..that is, there is a higher
  probability that we chose a biased coin, rather than the fair coin.
 
  hope its clear..
 
  On Aug 7, 11:36 pm, sumit gaur sumitgau...@gmail.com wrote:
 
 
 
   (3/5)
 
   On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 
A bag contains 5 coins. Four of them are fair and one has heads on
both sides. You randomly pulled one coin from the bag and tossed it 5
times, heads turned up all five times. What is the probability that
you toss next time, heads turns up. (All this time you don't know you
were tossing a fair coin or not).- Hide quoted text -
 
  - Show quoted text -

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
regards,
chinna.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-14 Thread Ankit Gupta
A=p(biased coin/5 heads)=8/9  probability that the coin is biased
given 5 heads (bayes theorem)

B=p(unbiased coin/5 heads)=1/9

P(6th head)=A*1+B*1/2=17/18

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability

2011-08-11 Thread Hurricane
Let f(x)= no. of ways of getting a sum x when pair of dice is thrown.

S()=sum .

tot=S( f(i) )  2=i=12

So the solution is :   S( f(i)*(tot-f(i)) )/(6^4).


Is daT fine.. ?

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability

2011-08-11 Thread Prakash D
total possible outcomes= 6*6*6*6

possibility of sum gives 2 in both pair -- 1*1*1*1 =1
possibility of sum gives 3 in both pair -- 2*1*2*1 =4
{because the possibilities are (1,2)(1,2), (1,2)(2,1), (2,1)(1,2),
(2,1)(2,1)}
possibility of 4 -- 9 { 2,2  1,3 and 3,1}
possibility of 5 -- 16  {1,4 2,3 3,2 4,1}
possibility of 6 -- 25{1,5 2,4 3,3 4,2 5,1}
possibility of 7 -- 36{1,6 2,5 3,4 4,3 5,2 6,1}
possibility of 8 -- 25{2,6 3,5 4,4 5,3 6,2}
9--  16
10 -- 9
11 -- 4
12 -- 1

so probability required = (1+4+9+16+25+36+25+16+9+4+1)/(6*6*6*6)
=146/1296
=73/648

On Fri, Aug 12, 2011 at 1:19 AM, Hurricane ashman...@gmail.com wrote:

 Let f(x)= no. of ways of getting a sum x when pair of dice is thrown.

 S()=sum .

 tot=S( f(i) )  2=i=12

 So the solution is :   S( f(i)*(tot-f(i)) )/(6^4).


 Is daT fine.. ?

 --
 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 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 algogeeks@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-08-11 Thread Prakash D
sorry that was for equal case : for unequal case 1-(73/648)= 575/648

On Fri, Aug 12, 2011 at 2:28 AM, Prakash D cegprak...@gmail.com wrote:

 total possible outcomes= 6*6*6*6

 possibility of sum gives 2 in both pair -- 1*1*1*1 =1
 possibility of sum gives 3 in both pair -- 2*1*2*1 =4
 {because the possibilities are (1,2)(1,2), (1,2)(2,1), (2,1)(1,2),
 (2,1)(2,1)}
 possibility of 4 -- 9 { 2,2  1,3 and 3,1}
 possibility of 5 -- 16  {1,4 2,3 3,2 4,1}
 possibility of 6 -- 25{1,5 2,4 3,3 4,2 5,1}
 possibility of 7 -- 36{1,6 2,5 3,4 4,3 5,2 6,1}
 possibility of 8 -- 25{2,6 3,5 4,4 5,3 6,2}
 9--  16
 10 -- 9
 11 -- 4
 12 -- 1

 so probability required = (1+4+9+16+25+36+25+16+9+4+1)/(6*6*6*6)
 =146/1296
 =73/648


-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-09 Thread Arun Vishwanathan
@dave: yes it seems so that 17/18 is correct...I deduced it from the cond
prob formula..

I have a minor doubt in general why  prob( 2nd toss is a head given that
a head occurred in the first toss ) doesnt seem same as p( head in first
toss and head in second toss with fair coin) +p(head in first toss and head
in second toss with unfair coin)? is it due to the fact that we are not
looking at the same sample space in both cases?i am not able to visualise
the difference in general..this is also the reason why most of the people
said earlier 17/80 as the answer

moreover, if the question was exactly the same except in that it was NOT
mentioned that heads occurred previously , what would the prob of getting a
head in the second toss?

would it be P( of getting tail in first toss and head in second toss given
that fair coin is chosen) +P( of getting head in first toss and head in
second toss given that fair coin is chosen) +P( getting heads in first toss
and heads in second toss given that unfair coin is chosen) ? this for any
toss turns out to be 3/5 can u explain the logic abt why it always gives
3/5?

On Tue, Aug 9, 2011 at 7:37 AM, raj kumar megamonste...@gmail.com wrote:

 plz reply am i right or wrong

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
 People often say that motivation doesn't last. Well, neither does bathing
- that's why we recommend it daily.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread arpit.gupta
it is (1/5)/( (4/5 *(1/2)^6) + (1/5 * 1)) = 80/85 = 16/17

On Aug 7, 10:54 pm, Nitish Garg nitishgarg1...@gmail.com wrote:
 Should be (4/5 *(1/2)^6) + (1/5 * 1) = 17/80

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-09 Thread shady
go through the posts before posting anything :)

On Tue, Aug 9, 2011 at 6:29 PM, arpit.gupta arpitg1...@gmail.com wrote:

 it is (1/5)/( (4/5 *(1/2)^6) + (1/5 * 1)) = 80/85 = 16/17

 On Aug 7, 10:54 pm, Nitish Garg nitishgarg1...@gmail.com wrote:
  Should be (4/5 *(1/2)^6) + (1/5 * 1) = 17/80

 --
 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 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 algogeeks@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: Probability Puzzle

2011-08-09 Thread arpit.gupta
ans is 16/17 + 1/2*1/17 = 33/34

On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 A bag contains 5 coins. Four of them are fair and one has heads on
 both sides. You randomly pulled one coin from the bag and tossed it 5
 times, heads turned up all five times. What is the probability that
 you toss next time, heads turns up. (All this time you don't know you
 were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread Dave
@Arpit: No. The probability of getting 6 consecutive heads is
1/5 * 1 + 4/5 * (1/2)^6 ) = 17/80,
while the probability of getting 5 consecutive heads is
1/5 * 1 + 4/5 * (1/2)^6 ) = 9/40.
Thus, the probability of getting a head on the sixth roll given that
you have gotten heads on all five previous rolls is (17/80) / (9/40),
which is 17/18.

Dave

On Aug 9, 7:59 am, arpit.gupta arpitg1...@gmail.com wrote:
 it is (1/5)/( (4/5 *(1/2)^6) + (1/5 * 1)) = 80/85 = 16/17

 On Aug 7, 10:54 pm, Nitish Garg nitishgarg1...@gmail.com wrote:



  Should be (4/5 *(1/2)^6) + (1/5 * 1) = 17/80

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread Dave
@Arun: The probability of getting a head on the first toss is
1/5 * 1 + 4/5 * (1/2) ) = 3/5,
while the probability of getting 2 consecutive heads is
1/5 * 1 + 4/5 * (1/2)^2 ) = 2/5.
Thus, the probability of getting a head on the second roll given that
you have gotten a head on the first roll is (2/5) / (3/5), which is
2/3.

If you didn't know the outcome of the first roll, the probability of
heads on the second roll would still be 3/5.

Dave

On Aug 9, 2:57 am, Arun Vishwanathan aaron.nar...@gmail.com wrote:
 @dave: yes it seems so that 17/18 is correct...I deduced it from the cond
 prob formula..

 I have a minor doubt in general why  prob( 2nd toss is a head given that
 a head occurred in the first toss ) doesnt seem same as p( head in first
 toss and head in second toss with fair coin) +p(head in first toss and head
 in second toss with unfair coin)? is it due to the fact that we are not
 looking at the same sample space in both cases?i am not able to visualise
 the difference in general..this is also the reason why most of the people
 said earlier 17/80 as the answer

 moreover, if the question was exactly the same except in that it was NOT
 mentioned that heads occurred previously , what would the prob of getting a
 head in the second toss?

 would it be P( of getting tail in first toss and head in second toss given
 that fair coin is chosen) +P( of getting head in first toss and head in
 second toss given that fair coin is chosen) +P( getting heads in first toss
 and heads in second toss given that unfair coin is chosen) ? this for any
 toss turns out to be 3/5 can u explain the logic abt why it always gives
 3/5?

 On Tue, Aug 9, 2011 at 7:37 AM, raj kumar megamonste...@gmail.com wrote:
  plz reply am i right or wrong

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
  People often say that motivation doesn't last. Well, neither does bathing
 - that's why we recommend it daily.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread arpit.gupta
@dave- calculation mistake on my part - method is right.

getting 17/18 only thanks anyways.

On Aug 9, 6:26 pm, Dave dave_and_da...@juno.com wrote:
 @Arun: The probability of getting a head on the first toss is
 1/5 * 1 + 4/5 * (1/2) ) = 3/5,
 while the probability of getting 2 consecutive heads is
 1/5 * 1 + 4/5 * (1/2)^2 ) = 2/5.
 Thus, the probability of getting a head on the second roll given that
 you have gotten a head on the first roll is (2/5) / (3/5), which is
 2/3.

 If you didn't know the outcome of the first roll, the probability of
 heads on the second roll would still be 3/5.

 Dave

 On Aug 9, 2:57 am, Arun Vishwanathan aaron.nar...@gmail.com wrote:







  @dave: yes it seems so that 17/18 is correct...I deduced it from the cond
  prob formula..

  I have a minor doubt in general why  prob( 2nd toss is a head given that
  a head occurred in the first toss ) doesnt seem same as p( head in first
  toss and head in second toss with fair coin) +p(head in first toss and head
  in second toss with unfair coin)? is it due to the fact that we are not
  looking at the same sample space in both cases?i am not able to visualise
  the difference in general..this is also the reason why most of the people
  said earlier 17/80 as the answer

  moreover, if the question was exactly the same except in that it was NOT
  mentioned that heads occurred previously , what would the prob of getting a
  head in the second toss?

  would it be P( of getting tail in first toss and head in second toss given
  that fair coin is chosen) +P( of getting head in first toss and head in
  second toss given that fair coin is chosen) +P( getting heads in first toss
  and heads in second toss given that unfair coin is chosen) ? this for any
  toss turns out to be 3/5 can u explain the logic abt why it always gives
  3/5?

  On Tue, Aug 9, 2011 at 7:37 AM, raj kumar megamonste...@gmail.com wrote:
   plz reply am i right or wrong

   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.

  --
   People often say that motivation doesn't last. Well, neither does bathing
  - that's why we recommend it daily.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread Dave
The probability of getting n consecutive heads is
P(n heads) = 1/5 * 1 + 4/5 * (1/2)^n,
Thus, the probability of getting a head on the n+1st roll given that
you have gotten heads on all n previous rolls is
P(n+1 heads | n heads) = P(n+1) / P(n)
= ( 1/5 * 1 + 4/5 * (1/2)^(n+1) ) / ( 1/5 * 1 + 4/5 * (1/2)^n ).
Multiplying numerator and denominator by 5* 2^(n-1) and recognizing 4
as 2^2 gives
P(n+1 heads | n heads) = (2^(n-1) + 1) / (2^(n-1) + 2).

Dave

On Aug 9, 12:30 am, programming love love.for.programm...@gmail.com
wrote:
 @Dave: I guess 17/18 is correct. Since we have to *calculate the probability
 of getting a head in the 6th flip given that first 5 flips are a head*. Can
 you please explain how you got the values of consequent flips when you said
 this?

 *In fact, the probability is 3/5 for the first flip. After a head is
 flipped, the probability of a head is 2/3. After two heads have been
 flipped, it is 3/4. After 3 heads, it is 5/6. After 4 heads, the
  probability is 9/10, and after 5 heads, the probability is 17/18.*

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread arpit.gupta
@dave - method is right, calculation mistake on my part, getting 17/18
only. thanks anyways.

On Aug 9, 6:26 pm, Dave dave_and_da...@juno.com wrote:
 @Arun: The probability of getting a head on the first toss is
 1/5 * 1 + 4/5 * (1/2) ) = 3/5,
 while the probability of getting 2 consecutive heads is
 1/5 * 1 + 4/5 * (1/2)^2 ) = 2/5.
 Thus, the probability of getting a head on the second roll given that
 you have gotten a head on the first roll is (2/5) / (3/5), which is
 2/3.

 If you didn't know the outcome of the first roll, the probability of
 heads on the second roll would still be 3/5.

 Dave

 On Aug 9, 2:57 am, Arun Vishwanathan aaron.nar...@gmail.com wrote:







  @dave: yes it seems so that 17/18 is correct...I deduced it from the cond
  prob formula..

  I have a minor doubt in general why  prob( 2nd toss is a head given that
  a head occurred in the first toss ) doesnt seem same as p( head in first
  toss and head in second toss with fair coin) +p(head in first toss and head
  in second toss with unfair coin)? is it due to the fact that we are not
  looking at the same sample space in both cases?i am not able to visualise
  the difference in general..this is also the reason why most of the people
  said earlier 17/80 as the answer

  moreover, if the question was exactly the same except in that it was NOT
  mentioned that heads occurred previously , what would the prob of getting a
  head in the second toss?

  would it be P( of getting tail in first toss and head in second toss given
  that fair coin is chosen) +P( of getting head in first toss and head in
  second toss given that fair coin is chosen) +P( getting heads in first toss
  and heads in second toss given that unfair coin is chosen) ? this for any
  toss turns out to be 3/5 can u explain the logic abt why it always gives
  3/5?

  On Tue, Aug 9, 2011 at 7:37 AM, raj kumar megamonste...@gmail.com wrote:
   plz reply am i right or wrong

   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.

  --
   People often say that motivation doesn't last. Well, neither does bathing
  - that's why we recommend it daily.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread ritu
The statement You randomly pulled one coin from the bag and tossed
tells that all the  events of tossing the coin are independent hence
ans is 3/5

On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 A bag contains 5 coins. Four of them are fair and one has heads on
 both sides. You randomly pulled one coin from the bag and tossed it 5
 times, heads turned up all five times. What is the probability that
 you toss next time, heads turns up. (All this time you don't know you
 were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-09 Thread programming love
@Dave: Thanks for the explanation :)

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-09 Thread Dave
@Ritu: We are flipping one coin five times. Are you saying that you
don't learn anything about the coin by flipping it? Would you learn
something if any one of the five flips turned up tails? After a tails,
would you say that the probability of a subsequent head is still 3/5?

Dave

On Aug 9, 11:19 am, ritu ritugarg.c...@gmail.com wrote:
 The statement You randomly pulled one coin from the bag and tossed
 tells that all the  events of tossing the coin are independent hence
 ans is 3/5

 On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:



  A bag contains 5 coins. Four of them are fair and one has heads on
  both sides. You randomly pulled one coin from the bag and tossed it 5
  times, heads turned up all five times. What is the probability that
  you toss next time, heads turns up. (All this time you don't know you
  were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-09 Thread Prakash D
@dave: thank you.. nice explanation :)

On Wed, Aug 10, 2011 at 3:24 AM, Dave dave_and_da...@juno.com wrote:

 @Ritu: We are flipping one coin five times. Are you saying that you
 don't learn anything about the coin by flipping it? Would you learn
 something if any one of the five flips turned up tails? After a tails,
 would you say that the probability of a subsequent head is still 3/5?

 Dave

 On Aug 9, 11:19 am, ritu ritugarg.c...@gmail.com wrote:
  The statement You randomly pulled one coin from the bag and tossed
  tells that all the  events of tossing the coin are independent hence
  ans is 3/5
 
  On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 
 
 
   A bag contains 5 coins. Four of them are fair and one has heads on
   both sides. You randomly pulled one coin from the bag and tossed it 5
   times, heads turned up all five times. What is the probability that
   you toss next time, heads turns up. (All this time you don't know you
   were tossing a fair coin or not).

 --
 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 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 algogeeks@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 Puzzle

2011-08-09 Thread Shachindra A C
@dave : nice explanationsthank you for pointing out :)

On Wed, Aug 10, 2011 at 3:39 AM, Prakash D cegprak...@gmail.com wrote:

 @dave: thank you.. nice explanation :)


 On Wed, Aug 10, 2011 at 3:24 AM, Dave dave_and_da...@juno.com wrote:

 @Ritu: We are flipping one coin five times. Are you saying that you
 don't learn anything about the coin by flipping it? Would you learn
 something if any one of the five flips turned up tails? After a tails,
 would you say that the probability of a subsequent head is still 3/5?

 Dave

 On Aug 9, 11:19 am, ritu ritugarg.c...@gmail.com wrote:
  The statement You randomly pulled one coin from the bag and tossed
  tells that all the  events of tossing the coin are independent hence
  ans is 3/5
 
  On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 
 
 
   A bag contains 5 coins. Four of them are fair and one has heads on
   both sides. You randomly pulled one coin from the bag and tossed it 5
   times, heads turned up all five times. What is the probability that
   you toss next time, heads turns up. (All this time you don't know you
   were tossing a fair coin or not).

 --
 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 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 algogeeks@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.




-- 
Regards,
Shachindra A C

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread sumit gaur
(3/5)

On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 A bag contains 5 coins. Four of them are fair and one has heads on
 both sides. You randomly pulled one coin from the bag and tossed it 5
 times, heads turned up all five times. What is the probability that
 you toss next time, heads turns up. (All this time you don't know you
 were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread Shachindra A C
@brijesh

*first five times* is mentioned intentionally to mislead i think. I vote for
3/5. Moreover, 17/80 doesn't make sense also. Plz correct me if I am wrong.


On Mon, Aug 8, 2011 at 12:06 PM, sumit gaur sumitgau...@gmail.com wrote:

 (3/5)

 On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
  A bag contains 5 coins. Four of them are fair and one has heads on
  both sides. You randomly pulled one coin from the bag and tossed it 5
  times, heads turned up all five times. What is the probability that
  you toss next time, heads turns up. (All this time you don't know you
  were tossing a fair coin or not).

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Regards,
Shachindra A C

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread Puneet Goyal
I think 17/80 is wrong
because if you say that while calculating the answer 3/5, you havent
included the first 5 cases, then even after including it will only increase
the probability of getting the biased coin in hand and thus increasing the
overall probability of getting the heads and 17/80 is a way lesser than 3/5
although i am not sure about 3/5 even coz of the reasoning i just gave

also, when you are calculating 4/5*1/2^6 you are not getting any benefit out
of the first five tosses, like, they must have gave you some positive
response towards that yes, you will get the head even next time, but doing
this you are actually decreasing the probability as compared to the one you
could have get without those 5 cases

On Mon, Aug 8, 2011 at 1:06 PM, Shachindra A C sachindr...@gmail.comwrote:

 @brijesh

 *first five times* is mentioned intentionally to mislead i think. I vote
 for 3/5. Moreover, 17/80 doesn't make sense also. Plz correct me if I am
 wrong.


 On Mon, Aug 8, 2011 at 12:06 PM, sumit gaur sumitgau...@gmail.com wrote:

 (3/5)

 On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
  A bag contains 5 coins. Four of them are fair and one has heads on
  both sides. You randomly pulled one coin from the bag and tossed it 5
  times, heads turned up all five times. What is the probability that
  you toss next time, heads turns up. (All this time you don't know you
  were tossing a fair coin or not).

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards,
 Shachindra A C

  --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
---
Puneet Goyal
Student of B. Tech. III Year (Software Engineering)
Delhi Technological University, Delhi
---

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Maddy
I think the answer is 17/80, because
as you say the 5 trials are independent.. but
the fact that a head turns up in all the 5 trials, give some
information about our original probability of choosing the coins.

in case we had obtained a tail in the first trial, we can be sure its
the fair coin, and so the consecutive trials would become
independent..

but since that is not the case, every head is going to increase the
chance of choosing the biased coin(initially), and hence affect the
probability of the next head..

before the first trial probability of landing a head is 3/5, but once
u see the first head, the probability of landing a head on the second
trial changes to 4/5*1/4+1/5, and so on..that is, there is a higher
probability that we chose a biased coin, rather than the fair coin.

hope its clear..

On Aug 7, 11:36 pm, sumit gaur sumitgau...@gmail.com wrote:
 (3/5)

 On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:







  A bag contains 5 coins. Four of them are fair and one has heads on
  both sides. You randomly pulled one coin from the bag and tossed it 5
  times, heads turned up all five times. What is the probability that
  you toss next time, heads turns up. (All this time you don't know you
  were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Don
The answer is 17 in 18, because flipping 5 heads in a row is evidence
that the probability is high that we have the coin with two heads.
Don

On Aug 7, 12:34 pm, Algo Lover algolear...@gmail.com wrote:
 A bag contains 5 coins. Four of them are fair and one has heads on
 both sides. You randomly pulled one coin from the bag and tossed it 5
 times, heads turned up all five times. What is the probability that
 you toss next time, heads turns up. (All this time you don't know you
 were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread Arun Vishwanathan
@don: i too get yr answer 17/18 using conditional probability...does that
make sense??i guess this is first new answer lol

On Mon, Aug 8, 2011 at 9:29 PM, Don dondod...@gmail.com wrote:

 The answer is 17 in 18, because flipping 5 heads in a row is evidence
 that the probability is high that we have the coin with two heads.
 Don

 On Aug 7, 12:34 pm, Algo Lover algolear...@gmail.com wrote:
  A bag contains 5 coins. Four of them are fair and one has heads on
  both sides. You randomly pulled one coin from the bag and tossed it 5
  times, heads turned up all five times. What is the probability that
  you toss next time, heads turns up. (All this time you don't know you
  were tossing a fair coin or not).

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
 People often say that motivation doesn't last. Well, neither does bathing
- that's why we recommend it daily.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Don
Consider the 5 * 64 possible outcomes for the selection of coin and
six flips, each one happening with equal probability. Of those 320
possible outcomes, 4*62 are excluded by knowing that the first 5 flips
are heads. That leaves 64 outcomes with the rigged coin and 2 outcomes
with each of the fair coins, for a total of 72 outcomes. 68 of those
are heads, so the answer to the puzzle is 68 of 72, or 17 of 18.
Don

On Aug 8, 2:36 am, Shachindra A C sachindr...@gmail.com wrote:
 @brijesh

 *first five times* is mentioned intentionally to mislead i think. I vote for
 3/5. Moreover, 17/80 doesn't make sense also. Plz correct me if I am wrong.



 On Mon, Aug 8, 2011 at 12:06 PM, sumit gaur sumitgau...@gmail.com wrote:
  (3/5)

  On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
   A bag contains 5 coins. Four of them are fair and one has heads on
   both sides. You randomly pulled one coin from the bag and tossed it 5
   times, heads turned up all five times. What is the probability that
   you toss next time, heads turns up. (All this time you don't know you
   were tossing a fair coin or not).

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 Regards,
 Shachindra A C

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread shady
answer is 3/5. 17/80 is the answer for 6 consecutive heads.

On Tue, Aug 9, 2011 at 2:07 AM, Don dondod...@gmail.com wrote:

 Consider the 5 * 64 possible outcomes for the selection of coin and
 six flips, each one happening with equal probability. Of those 320
 possible outcomes, 4*62 are excluded by knowing that the first 5 flips
 are heads. That leaves 64 outcomes with the rigged coin and 2 outcomes
 with each of the fair coins, for a total of 72 outcomes. 68 of those
 are heads, so the answer to the puzzle is 68 of 72, or 17 of 18.
 Don

 On Aug 8, 2:36 am, Shachindra A C sachindr...@gmail.com wrote:
  @brijesh
 
  *first five times* is mentioned intentionally to mislead i think. I vote
 for
  3/5. Moreover, 17/80 doesn't make sense also. Plz correct me if I am
 wrong.
 
 
 
  On Mon, Aug 8, 2011 at 12:06 PM, sumit gaur sumitgau...@gmail.com
 wrote:
   (3/5)
 
   On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
A bag contains 5 coins. Four of them are fair and one has heads on
both sides. You randomly pulled one coin from the bag and tossed it 5
times, heads turned up all five times. What is the probability that
you toss next time, heads turns up. (All this time you don't know you
were tossing a fair coin or not).
 
   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  Regards,
  Shachindra A C

 --
 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 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 algogeeks@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 Puzzle

2011-08-08 Thread Arun Vishwanathan
@shady: 3/5 can be the answer to such a question: what is prob of getting
head on nth toss if we have 4 coins fair and one biased...then at nth toss u
choose 4/5 1/5 prob and then u get 3/5

@shady , don: i did this: P( 6th head | 5 heads occured)= P( 6 heads )/ P( 5
heads)

answr u get is 17/18..i cud be wrong please correct if so

On Mon, Aug 8, 2011 at 10:45 PM, shady sinv...@gmail.com wrote:

 answer is 3/5. 17/80 is the answer for 6 consecutive heads.


 On Tue, Aug 9, 2011 at 2:07 AM, Don dondod...@gmail.com wrote:

 Consider the 5 * 64 possible outcomes for the selection of coin and
 six flips, each one happening with equal probability. Of those 320
 possible outcomes, 4*62 are excluded by knowing that the first 5 flips
 are heads. That leaves 64 outcomes with the rigged coin and 2 outcomes
 with each of the fair coins, for a total of 72 outcomes. 68 of those
 are heads, so the answer to the puzzle is 68 of 72, or 17 of 18.
 Don

 On Aug 8, 2:36 am, Shachindra A C sachindr...@gmail.com wrote:
  @brijesh
 
  *first five times* is mentioned intentionally to mislead i think. I vote
 for
  3/5. Moreover, 17/80 doesn't make sense also. Plz correct me if I am
 wrong.
 
 
 
  On Mon, Aug 8, 2011 at 12:06 PM, sumit gaur sumitgau...@gmail.com
 wrote:
   (3/5)
 
   On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
A bag contains 5 coins. Four of them are fair and one has heads on
both sides. You randomly pulled one coin from the bag and tossed it
 5
times, heads turned up all five times. What is the probability that
you toss next time, heads turns up. (All this time you don't know
 you
were tossing a fair coin or not).
 
   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  Regards,
  Shachindra A C

 --
 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 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 algogeeks@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.




-- 
 People often say that motivation doesn't last. Well, neither does bathing
- that's why we recommend it daily.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread Shuaib Khan
Man, I feel so stupid. Yes, it is a case of conditional probability. We have
to calculate the probability of six heads, given that 5 heads have
occured. So answer is 17/18.

On Tue, Aug 9, 2011 at 1:47 AM, Arun Vishwanathan aaron.nar...@gmail.comwrote:

 @shady: 3/5 can be the answer to such a question: what is prob of getting
 head on nth toss if we have 4 coins fair and one biased...then at nth toss u
 choose 4/5 1/5 prob and then u get 3/5

 @shady , don: i did this: P( 6th head | 5 heads occured)= P( 6 heads )/ P(
 5 heads)

 answr u get is 17/18..i cud be wrong please correct if so


 On Mon, Aug 8, 2011 at 10:45 PM, shady sinv...@gmail.com wrote:

 answer is 3/5. 17/80 is the answer for 6 consecutive heads.


 On Tue, Aug 9, 2011 at 2:07 AM, Don dondod...@gmail.com wrote:

 Consider the 5 * 64 possible outcomes for the selection of coin and
 six flips, each one happening with equal probability. Of those 320
 possible outcomes, 4*62 are excluded by knowing that the first 5 flips
 are heads. That leaves 64 outcomes with the rigged coin and 2 outcomes
 with each of the fair coins, for a total of 72 outcomes. 68 of those
 are heads, so the answer to the puzzle is 68 of 72, or 17 of 18.
 Don

 On Aug 8, 2:36 am, Shachindra A C sachindr...@gmail.com wrote:
  @brijesh
 
  *first five times* is mentioned intentionally to mislead i think. I
 vote for
  3/5. Moreover, 17/80 doesn't make sense also. Plz correct me if I am
 wrong.
 
 
 
  On Mon, Aug 8, 2011 at 12:06 PM, sumit gaur sumitgau...@gmail.com
 wrote:
   (3/5)
 
   On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
A bag contains 5 coins. Four of them are fair and one has heads on
both sides. You randomly pulled one coin from the bag and tossed it
 5
times, heads turned up all five times. What is the probability that
you toss next time, heads turns up. (All this time you don't know
 you
were tossing a fair coin or not).
 
   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
  Regards,
  Shachindra A C

 --
 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 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 algogeeks@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.




 --
  People often say that motivation doesn't last. Well, neither does
 bathing - that's why we recommend it daily.

  --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Shuaib
http://www.bytehood.com
http://twitter.com/ShuaibKhan

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread vinay aggarwal
answer should be 3/5
think like that tossing 5 times will not help you predict the outcome
of sixth toss. Therefore that information is meaningless.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Dave
@Vinay: What if you tossed 100 consecutive heads? Would that be enough
to convince you that you had the double-headed coin? If so, then
doesn't tossing 5 consecutive heads give you at least an inkling that
you might have it? Wouldn't you then think that there would be a
higher probability of getting a head on the sixth toss than there was
on the first toss (3/5)? Don's conditional probability answer 17/18 is
the right answer.

Dave

On Aug 8, 5:04 pm, vinay aggarwal vinayiiit2...@gmail.com wrote:
 answer should be 3/5
 think like that tossing 5 times will not help you predict the outcome
 of sixth toss. Therefore that information is meaningless.

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread Dipankar Patro
3/5.

As the question doesn't ask anything about the sequence.
Had the question been  Find the probability that all 6 are H  then it
would have been 17/80.

On 9 August 2011 04:07, Dave dave_and_da...@juno.com wrote:

 @Vinay: What if you tossed 100 consecutive heads? Would that be enough
 to convince you that you had the double-headed coin? If so, then
 doesn't tossing 5 consecutive heads give you at least an inkling that
 you might have it? Wouldn't you then think that there would be a
 higher probability of getting a head on the sixth toss than there was
 on the first toss (3/5)? Don's conditional probability answer 17/18 is
 the right answer.

 Dave

 On Aug 8, 5:04 pm, vinay aggarwal vinayiiit2...@gmail.com wrote:
  answer should be 3/5
  think like that tossing 5 times will not help you predict the outcome
  of sixth toss. Therefore that information is meaningless.

 --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
___

Please do not print this e-mail until urgent requirement. Go Green!!
Save Papers = Save Trees

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Dave
@Dipankar: You are correct about the answer to your alternative
question being 17/80, but your answer 3/5 says that you don't think
you have learned anything by the five heads flips. Don has given a
good explanation as to why the answer is 17/18, but you apparently
refuse to accept it. There is none so blind as one who will not see.

Dave

On Aug 8, 9:26 pm, Dipankar Patro dip10c...@gmail.com wrote:
 3/5.

 As the question doesn't ask anything about the sequence.
 Had the question been  Find the probability that all 6 are H  then it
 would have been 17/80.

 On 9 August 2011 04:07, Dave dave_and_da...@juno.com wrote:





  @Vinay: What if you tossed 100 consecutive heads? Would that be enough
  to convince you that you had the double-headed coin? If so, then
  doesn't tossing 5 consecutive heads give you at least an inkling that
  you might have it? Wouldn't you then think that there would be a
  higher probability of getting a head on the sixth toss than there was
  on the first toss (3/5)? Don's conditional probability answer 17/18 is
  the right answer.

  Dave

  On Aug 8, 5:04 pm, vinay aggarwal vinayiiit2...@gmail.com wrote:
   answer should be 3/5
   think like that tossing 5 times will not help you predict the outcome
   of sixth toss. Therefore that information is meaningless.

  --
  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 group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
 ___­

 Please do not print this e-mail until urgent requirement. Go Green!!
 Save Papers = Save Trees

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread coder dumca
it's 3/5

On Tue, Aug 9, 2011 at 8:29 AM, Dave dave_and_da...@juno.com wrote:

 @Dipankar: You are correct about the answer to your alternative
 question being 17/80, but your answer 3/5 says that you don't think
 you have learned anything by the five heads flips. Don has given a
 good explanation as to why the answer is 17/18, but you apparently
 refuse to accept it. There is none so blind as one who will not see.

 Dave

 On Aug 8, 9:26 pm, Dipankar Patro dip10c...@gmail.com wrote:
  3/5.
 
  As the question doesn't ask anything about the sequence.
  Had the question been  Find the probability that all 6 are H  then it
  would have been 17/80.
 
  On 9 August 2011 04:07, Dave dave_and_da...@juno.com wrote:
 
 
 
 
 
   @Vinay: What if you tossed 100 consecutive heads? Would that be enough
   to convince you that you had the double-headed coin? If so, then
   doesn't tossing 5 consecutive heads give you at least an inkling that
   you might have it? Wouldn't you then think that there would be a
   higher probability of getting a head on the sixth toss than there was
   on the first toss (3/5)? Don's conditional probability answer 17/18 is
   the right answer.
 
   Dave
 
   On Aug 8, 5:04 pm, vinay aggarwal vinayiiit2...@gmail.com wrote:
answer should be 3/5
think like that tossing 5 times will not help you predict the outcome
of sixth toss. Therefore that information is meaningless.
 
   --
   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 group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
 
 ___­
 
  Please do not print this e-mail until urgent requirement. Go Green!!
  Save Papers = Save Trees

 --
 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 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 algogeeks@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 Puzzle

2011-08-08 Thread raj kumar
@all those who gave Should be (4/5 *(1/2)^6) + (1/5 * 1) = 17/80


when it's already given that 5 heads have turned up already then why abut
are you adding that probability
you all are considering it as finding the probability of finding 6
consecutive heads.

since all tosses are independent the answer should be 3/5.
 the point that 5 heads have turned up already may points that the coin
selected is biased in that case pr(6)=1;
now the answer depends on the interviewer  according to me it should be 3/5


thanks

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread sagar pareek
Pls check the ques 8th
This may remove misunderstanding...

http://www.folj.com/puzzles/difficult-logic-problems.htm

On Tue, Aug 9, 2011 at 10:21 AM, raj kumar megamonste...@gmail.com wrote:

 @all those who gave Should be (4/5 *(1/2)^6) + (1/5 * 1) = 17/80


 when it's already given that 5 heads have turned up already then why abut
 are you adding that probability
 you all are considering it as finding the probability of finding 6
 consecutive heads.

 since all tosses are independent the answer should be 3/5.
  the point that 5 heads have turned up already may points that the coin
 selected is biased in that case pr(6)=1;
 now the answer depends on the interviewer  according to me it should be 3/5


 thanks


  --
 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 group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
**Regards
SAGAR PAREEK
COMPUTER SCIENCE AND ENGINEERING
NIT ALLAHABAD

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Dave
@Coder: You (and others) are saying that the probability of a head is
3/5 on the first flip, and that it doesn't change after any number of
heads are flipped. Notice, however, that if the first flip were tails,
you wouldn't say that the probability of getting heads on the next
flip is 3/5. You would have learned that one of the four fair coins
was chosen. So even though the probability of a head was 3/5 on the
first flip, it changes to 1/2 on all flips subsequent to a tail. Since
the probabililty changes if a tail is flipped, what makes you think it
doesn't change if a head is flipped.

In fact, the probability is 3/5 for the first flip. After a head is
flipped, the probability of a head is 2/3. After two heads have been
flipped, it is 3/4. After 3 heads, it is 5/6. After 4 heads, the
probability is 9/10, and after 5 heads, the probability is 17/18.

Dave

On Aug 8, 11:23 pm, coder dumca coder.du...@gmail.com wrote:
 it's 3/5



 On Tue, Aug 9, 2011 at 8:29 AM, Dave dave_and_da...@juno.com wrote:
  @Dipankar: You are correct about the answer to your alternative
  question being 17/80, but your answer 3/5 says that you don't think
  you have learned anything by the five heads flips. Don has given a
  good explanation as to why the answer is 17/18, but you apparently
  refuse to accept it. There is none so blind as one who will not see.

  Dave

  On Aug 8, 9:26 pm, Dipankar Patro dip10c...@gmail.com wrote:
   3/5.

   As the question doesn't ask anything about the sequence.
   Had the question been  Find the probability that all 6 are H  then it
   would have been 17/80.

   On 9 August 2011 04:07, Dave dave_and_da...@juno.com wrote:

@Vinay: What if you tossed 100 consecutive heads? Would that be enough
to convince you that you had the double-headed coin? If so, then
doesn't tossing 5 consecutive heads give you at least an inkling that
you might have it? Wouldn't you then think that there would be a
higher probability of getting a head on the sixth toss than there was
on the first toss (3/5)? Don's conditional probability answer 17/18 is
the right answer.

Dave

On Aug 8, 5:04 pm, vinay aggarwal vinayiiit2...@gmail.com wrote:
 answer should be 3/5
 think like that tossing 5 times will not help you predict the outcome
 of sixth toss. Therefore that information is meaningless.

--
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 group at
   http://groups.google.com/group/algogeeks?hl=en.

   --

  ___­­

   Please do not print this e-mail until urgent requirement. Go Green!!
   Save Papers = Save Trees

  --
  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 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 algogeeks@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: Probability Puzzle

2011-08-08 Thread Dave
@Raj. Granted that the first flip has a 3/5 probability of getting a
head. But if it produces a tail, would you say that the second flip
also has a 3/5 probability of getting a head? Or have you learned
something from the tail? If you learn something from a tail, why don't
you learn something from a head?

Dave

On Aug 8, 11:51 pm, raj kumar megamonste...@gmail.com wrote:
 @all those who gave Should be (4/5 *(1/2)^6) + (1/5 * 1) = 17/80

 when it's already given that 5 heads have turned up already then why abut
 are you adding that probability
 you all are considering it as finding the probability of finding 6
 consecutive heads.

 since all tosses are independent the answer should be 3/5.
  the point that 5 heads have turned up already may points that the coin
 selected is biased in that case pr(6)=1;
 now the answer depends on the interviewer  according to me it should be 3/5

 thanks

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread raj kumar
Just to resolve the issue what will be the probability of getting 6
consecutive heads

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread raj kumar
no then it will be 1/2

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Dave
@Raj: After getting 5 consecutive heads, the probability of getting a
6th head is 17/18.

Dave

On Aug 9, 12:17 am, raj kumar megamonste...@gmail.com wrote:
 Just to resolve the issue what will be the probability of getting 6
 consecutive heads

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-08 Thread Dave
@Raj. Good. So now answer my last question?

Dave

On Aug 9, 12:21 am, raj kumar megamonste...@gmail.com wrote:
 no then it will be 1/2

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread programming love
@Dave: I guess 17/18 is correct. Since we have to *calculate the probability
of getting a head in the 6th flip given that first 5 flips are a head*. Can
you please explain how you got the values of consequent flips when you said
this?

*In fact, the probability is 3/5 for the first flip. After a head is
flipped, the probability of a head is 2/3. After two heads have been
flipped, it is 3/4. After 3 heads, it is 5/6. After 4 heads, the
 probability is 9/10, and after 5 heads, the probability is 17/18.*

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread raj kumar
http://math.arizona.edu/~jwatkins/f-condition.pdf
see this link now  ithink the answer should be 65/66

bcoz the probability of selectting double headed coin after n heads
=2^n/2^n+1

and fair coin is =1/2^n+1


so for 6th head it should be :2^n/2^n+1*1+((1/2^n+1)*1/2)

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Probability Puzzle

2011-08-08 Thread raj kumar
plz reply am i right or wrong

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-07 Thread saurabh chhabra
0.6?

On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 A bag contains 5 coins. Four of them are fair and one has heads on
 both sides. You randomly pulled one coin from the bag and tossed it 5
 times, heads turned up all five times. What is the probability that
 you toss next time, heads turns up. (All this time you don't know you
 were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-07 Thread saurabh chhabra
sry...its wrong

On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:
 A bag contains 5 coins. Four of them are fair and one has heads on
 both sides. You randomly pulled one coin from the bag and tossed it 5
 times, heads turned up all five times. What is the probability that
 you toss next time, heads turns up. (All this time you don't know you
 were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: Probability Puzzle

2011-08-07 Thread Algo Lover
Can anyone explain the approach how to solve this .
I think all tosses are independent so it should be 3/5. why is this in-
correct


On Aug 7, 10:55 pm, saurabh chhabra saurabh131...@gmail.com wrote:
 sry...its wrong

 On Aug 7, 10:34 pm, Algo Lover algolear...@gmail.com wrote:







  A bag contains 5 coins. Four of them are fair and one has heads on
  both sides. You randomly pulled one coin from the bag and tossed it 5
  times, heads turned up all five times. What is the probability that
  you toss next time, heads turns up. (All this time you don't know you
  were tossing a fair coin or not).

-- 
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 group at 
http://groups.google.com/group/algogeeks?hl=en.



  1   2   >