MATH
SOLUTIONS
Below are mathematical solutions for the problems above. Check that the answers of your programs
are similar to the solutions below.
MATH
SOLUTION FOR 2A
The first card can be any card, so it's good 100% of the time.
The second card has to be one of the 3 remaining cards of the same value. And there are 51 cards in the deck. So the odds of getting this are 3 / 51
which is about 5.9%.
The third card has to be one of the
2 remaining cards of the same value.
And there are 50 cards in the deck.
So the odds of getting this are 2 / 50 which is 4%.
The fourth card has to be the one remaining card of the same value. And there are 49 cards in the deck. So the odds of getting this are 1 / 49
which is about 2%.
To calculate the overall odds of
this happening, we multiply the individual odds together.
Overall odds are 100% x 5.9% x 4% x
2% which equals 0.0047%.
That is a very very
rare event. You'd have to try this
over 20000 times to be able to expect this to happen once!
Of course, trying it on a computer
20000 is super easy! Hurray!
|