tag:blogger.com,1999:blog-57303912024-03-18T19:20:53.837-07:00Blaine's Puzzle BlogWeekly discussion on the NPR puzzler, brain teasers, math problems and more.Blainehttp://www.blogger.com/profile/06379274325110866036noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5730391.post-37928743186760356772014-10-19T08:17:00.000-07:002014-10-26T07:08:20.437-07:00NPR Sunday Puzzle (Oct 19, 2014): Time To Flex Those Math Muscles<a href="http://www.npr.org/2014/10/19/357183310/time-to-flex-those-math-muscles">NPR Sunday Puzzle (Oct 19, 2014): Time To Flex Those Math Muscles</a>: <blockquote><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBNqyvQOWQs0Dzd7zjJfpiVkQSLncSGN9ej0SvBUJdadzi-169I7V6eXKAZpT3vZbDz_l9b0w9XADQhvpkCiBMJ15ASKdopWp6-x5k9ITGhfUYmDcrluIEd4AD_rjH_okFI5fU/s1600/blue-eye.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBNqyvQOWQs0Dzd7zjJfpiVkQSLncSGN9ej0SvBUJdadzi-169I7V6eXKAZpT3vZbDz_l9b0w9XADQhvpkCiBMJ15ASKdopWp6-x5k9ITGhfUYmDcrluIEd4AD_rjH_okFI5fU/s200/blue-eye.jpg" /></a></div><b>Q: </b>The following challenge is based on a puzzle from a Martin Gardner book, that may not be well-known. Out of a regular grade school classroom, two students are chosen at random. Both happen to have blue eyes. If the odds are exactly 50-50 that two randomly chosen students in the class will have blue eyes: How many students are in the class?</blockquote>It's going to be hard to provide hints to the answer this week.<br/><br/><b>Edit: </b>My hint was "Be" which is the symbol for Berylium, element 4 on the periodic table. While 4 is a technically correct answer (3 blue-eyed children --> 3/4 x 2/3 = 1/2) the intended answer was for a more typical class size.<blockquote><b>A: </b>21 students (15 with blue eyes and 7 without).<br/><br/>The probability the first child has blue eyes is 15/21 or 5/7. Once that child is taken out of consideration, there are 14 children with blue eyes out of 20 so the probability is 7/10. Multiplying that together, we have 5/7 x 7/10 = 5/10 = 1/2</blockquote>Blainehttp://www.blogger.com/profile/06379274325110866036noreply@blogger.com153tag:blogger.com,1999:blog-5730391.post-82010752979273162702012-07-21T08:21:00.000-07:002012-07-21T08:21:54.307-07:00GeekDad Puzzle of the Week: Dog Siblings<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxn41HKXarlgygyFiMEZuLeHySEElR5It9KMDPPxodfCzl_kYrO6eIsbE0rd6KMvhm1232377ERqhvsjLscRrVtJTXCwaZWGJV0GVKzKTj6j825rTBu1wWQpfI7F_aOitg_IG_/s1600/BlackLabs.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="Black Labs, mrpattersonsir@flickr" border="0" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxn41HKXarlgygyFiMEZuLeHySEElR5It9KMDPPxodfCzl_kYrO6eIsbE0rd6KMvhm1232377ERqhvsjLscRrVtJTXCwaZWGJV0GVKzKTj6j825rTBu1wWQpfI7F_aOitg_IG_/s320/BlackLabs.png" style="border: 8px solid rgb(17, 174, 195);" width="160" /></a><a href="http://www.wired.com/geekdad/2012/07/geekdad-puzzle-of-the-week-dog-siblings/">GeekDad Puzzle of the Week: Dog Siblings</a>: <br />
<blockquote>
<b>Q: </b>A guy with a black lab said that his dog, Selkie, has five brothers and sisters in town. "But I’ve never run into one of them," he said. "I wonder what are the chances of that?"<br />
<br />
Imagine that each of the six dogs goes out somewhere an average of once every three days. And imagine that between trails and parks and fields there are 200 places a dog can go, all (let's say...) with equal probability.<br />
<br />
If it's been exactly two years — 730 days — since Selkie's owner picked her up from the litter, what are the chances that during this time Selkie would NOT see a doggie sibling?<br />
For extra credit, what are the chances over the same time that any sibling will meet any other sibling?</blockquote>
I've got my answers which I will reveal after the deadline. In the meantime, feel free to solve it and submit your answer to GeekDad.<br />
<br />
<strong>Edit:</strong> The deadline was Friday, so here is how I went about solving the puzzle.<br />
<br />
The key to this puzzle is figure out the chances of dogs <strong><em>not</em></strong> meeting on one day. From there it is easy to figure out the chance of them <strong><em>not </em></strong>meeting for 730 days. And then if necessary, you can figure out the probability of the opposite case (meeting) by subtracting from 100%.<br />
<br />
<h4>
Part 1 - Selkie doesn't meet a doggie sibling</h4>
In order for a dog to be at a specific location, they must be out (with 1/3 probability) and at that specific spot (1/200 probability). That means there is a 1/600 chance of a specific dog being out at a specific location. Thinking of the negative probability, that means there is a 599/600 chance that a dog is *not* at a specific location.<br />
<br />
Selkie will *not* meet another dog on a specific day if,<br />
1) Selkie is at home (2/3)<br />
2) Selkie is out at any location (1/3) and dog 1 is not there (599/600) and dog 2 is not there (599/600) and dog 3 is not there...<br />
<br />
In other words, the chance that Selkie doesn't meet any other dog on a specific day is:<br />
2/3 + 1/3 x (599/600)^5 ≈ 99.7231466062%<br />
<br />
And the chance that Selkie doesn't meet any dogs for 2 years (730 days) is:<br />
[ 2/3 + 1/3 x (599/600)^5 ]^730 ≈ 13.2148023616%<br />
<br />
<blockquote><b>A: </b>(Part 1) The chance that Selkie does NOT see a doggie sibling is around 13.2148%</blockquote>
<h4>
<br />Part 2 - Chances that any sibling meets another sibling</h4>
This is the much tougher question. First let's make a table of probabilities of having 0 dogs out, 1 dog out, 2 dogs out, etc.<br />
<br />
The chance that 'n' dogs are out on any one day is C(6,n) x (1/3)^n x (2/3)^(6-n).<br />
And given 'n' dogs are out, the chance that they do NOT meet is 200/200 x 199/200 x 198/200 ... (using the number of dogs that are out.)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNCBJSJGTanuHwk1HMTTYxBYa5QzQhrfPWXxNmQa-8ZjGNXr2bZj20D5HYECUjuaFDWDjtz48cZzishE4AiQm8Ox1meTwfCjtqByxjjarBtmzMWZK8z5mgSKiGlyUmrOJ9aITR/s1600/DoggieChart.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNCBJSJGTanuHwk1HMTTYxBYa5QzQhrfPWXxNmQa-8ZjGNXr2bZj20D5HYECUjuaFDWDjtz48cZzishE4AiQm8Ox1meTwfCjtqByxjjarBtmzMWZK8z5mgSKiGlyUmrOJ9aITR/s400/DoggieChart.png" width="400" /></a></div>
<br />
Thus, the chance that no dogs meet on a single day is around 99.1717389885%<br />
The chance that no dogs meet for 730 days is (99.1717389885%)^730 ≈ 0.2307745729%<br />
Subtracting from 100%, you get the probability that at least two siblings will meet (100% - 0.230774573%) = 99.769225427%<br />
<br />
<blockquote><b>A: </b>(Part 2) The chance that any of the siblings meet during those 2 years is around 99.7692%</blockquote>Blainehttp://www.blogger.com/profile/06379274325110866036noreply@blogger.com1tag:blogger.com,1999:blog-5730391.post-9729275556528646272012-07-04T09:59:00.000-07:002012-07-08T07:39:54.230-07:00GeekDad Puzzle of the Week: Poaching Berries<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5z3R4cyprSgTKdb3O6lEfDjM2Lkn9Tt2yhQIjoZ11aJ7DZDnzjjhdAqtP8OhtLwyaUg81EDNwj7gq8ySi-rH3-cAzOVZK_ZogZhOLsBe3sszLOl45_fg8-FL-wxw3hQRfiKlL/s1600/RedRaspberries.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="Red Raspberries, photofarmer@Flickr" border="0" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5z3R4cyprSgTKdb3O6lEfDjM2Lkn9Tt2yhQIjoZ11aJ7DZDnzjjhdAqtP8OhtLwyaUg81EDNwj7gq8ySi-rH3-cAzOVZK_ZogZhOLsBe3sszLOl45_fg8-FL-wxw3hQRfiKlL/s320/RedRaspberries.jpg" style="border: 8px solid rgb(17, 174, 195);" width="160" /></a><a href="http://www.wired.com/geekdad/2012/07/geekdad-puzzle-week-poaching-berries/">GeekDad Puzzle of the Week: Poaching Berries</a>: <br />
<blockquote>
<b>Q: </b>Leif and Kestrel are willing to give GeekDad a 20% cut of berries they poach for turning a blind eye. Imagine that Leif picks five berries per poach and Kestrel picks three berries per poach and that they attempt to poach once every day, with the exception of any day just after they’ve been caught. Now imagine that each time they poach berries, they have a 15% chance of getting caught. How many berries can GeekDad expect to eat each each week, averaged over time?</blockquote>
I'll post my thoughts on the answer after the answer is revealed (generally early next week).<br />
<br />
<b>Edit: </b>The <a href="http://www.wired.com/geekdad/2012/07/geekdad-puzzle-of-the-week-answer-poaching-berries/">following answer</a> was what I submitted to end up winning the puzzle:<br />
<br />
Let's assume a few things:<br />
1) Leif and Kestrel start in a state where they haven't ever been caught.<br />
2) Each time they are caught, the berries that day don't count. Also, they must skip the next day until trying again.<br />
<br />
There are essentially 3 states that each child could be in. Since the probabilities for each child are the same we can group them together, though in reality the puzzle allows for one child to be caught and the other not. The results work out the same, so let's just simplify it to a pair of children trying to poach 8 berries a day.<br />
<br />
The children could be:<br />
1) Caught the day before and therefore have no chance of getting berries that day (must sit out).<br />
2) Caught today (15%, if not caught the day before)<br />
3) Not caught today (85%, if not caught the day before)<br />
<br />
Each day, the chance of being caught the day before is just carried forward. So on day 2, the chance is 15% they are sitting out. That leaves 85% chance they are attempting poaching. Of that 85%, there's a 15% chance they are caught (0.85 x 0.15 = 12.75%) and an 85% chance they poach successfully (0.85 x 0.85 = 72.25%).<br />
<br />
If you repeat this, the next day (Day 3) they have a 12.75% chance of sitting out and a 87.25% chance of attempting poaching. Day 4, the chance of sitting out is 0.15 x 87.25% = 13.0875% and not sitting out is 86.9125%. Day 5, the chance of sitting out is 0.15 x 86.9125% = 13.036875% and not sitting out is 86.963125%. You can continue this progression and you will see that the chance they are sitting out approaches a value of about 13.043478%. The chance they are caught that day is equivalently about 13.043478%. That leaves a 73.913043% chance they are able to poach 8 berries with an expected return of 5.913043478 berries a day.<br />
<br />
That equates to approximately 41.39130435 berries a week. With a 20% "commission" after awhile you will be eating approximately 8.27826087 berries each week.<br />
<br />
<strong>Note:</strong> For a more accurate answer (rather than just a decimal approximation) we can solve this algebraically as follows:<br />
<br />
Let p be the chance that you ARE sitting out.
<br />
Let q be the chance you are NOT sitting out.
<br />
<br />
Together these are mutually exclusive and therefore add up to 100% (or mathematically we say 1)
<br />
p + q = 1
<br />
p = 1 - q
<br />
<br />
The chance you are NOT sitting out, but CAUGHT is 0.15q
<br />
The chance you are NOT sitting out, and SUCCESSFULLY POACHED is 0.85q
<br />
<br />
We know that eventually the two values p and 0.15q end up being the same, so equate them
<br />
p = 0.15q
<br />
<br />
Substitute in 1-q:
<br />
1 - q = 0.15q
<br />
<br />
Rearrange:
<br />
1 = 1.15q
<br />
q = 1/1.15
<br />
<br />
The chance we are caught that day is 0.15q<br />
0.15q = 0.15(1/1.15) = 0.15/1.15 = 15/115 = 3/23
<br />
And the chance we poach some berries is 0.85q
<br />
0.85q = 0.85(1/1.15) = 0.85/1.15 = 85/115 = 17/23
<br />
<br />
For the sake of completeness that means you have:
<br />
3/23 = chance child is sitting out
<br />
3/23 = chance child was caught today
<br />
17/23 = chance child was able to poach successfully
<br />
<br />
Now multiply this last number by 8 berries attempted times 7 days and then times 1/5 (20% commission) to get the expected number of berries poached each week.
<br />
Berries per week = 17/23 x 8 x 7 x 1/5
<br />
<br />
If you reduce that to a fraction you end up with:
<br />
952/115 = 8 32/115 berries each week.<br />
<br />
<blockquote><b>A: </b>8 32/115 berries each week.<br/>
8.2<u>7826086956521739130434</u>... (underlined portion repeats indefinitely)</blockquote>Blainehttp://www.blogger.com/profile/06379274325110866036noreply@blogger.com7tag:blogger.com,1999:blog-5730391.post-16696092587308840102012-06-16T14:57:00.002-07:002012-06-18T06:03:58.417-07:00GeekDad Puzzle of the Week: When Are the Odds Even?<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ZXKeXRQR9Lj08rFswbMSF1D3tIPEbsZ24u2uHH2jUGzoLftPjrxE3_crVdXTcGeHtYsVgJh0em4AY2dUzbTJan4H-Msz-PAzRy5_gnFZlJWIV7xyV4wCjkpOTvU01DAA_k-j/s1600/Marbles.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img alt="Black and white marbles" border="0" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ZXKeXRQR9Lj08rFswbMSF1D3tIPEbsZ24u2uHH2jUGzoLftPjrxE3_crVdXTcGeHtYsVgJh0em4AY2dUzbTJan4H-Msz-PAzRy5_gnFZlJWIV7xyV4wCjkpOTvU01DAA_k-j/s320/Marbles.jpg" title="" width="120" style="border: 8px solid rgb(17,174,195);"/></a><a href="http://www.wired.com/geekdad/2012/06/geekdad-puzzle-of-the-week-when-are-the-odds-even/">GeekDad Puzzle of the Week: When Are the Odds Even?</a>:<br/><blockquote><b>Q: </b>If we have a bag containing equal numbers of black and white marbles, and we pull out <b>one</b> marble, the odds of it being black are even. If we have a bag containing 120 marbles, 85 of which are black, the odds of us pulling out <b>two</b> marbles and them both being black is also even — (85/120)x(84/119) = 0.5 or 50%.<br />
<br />
If the largest bag we have can hold 1,000,000 marbles, for how many sets of marbles (i.e., the 120 marbles described above are one set) can we pull <b>two</b> marbles and have a 50% chance of them being the same designated color? Are there any sets of marbles for which we can pull <b>three</b> marbles and have a 50% chance of them being the same designated color? If so, how many?</blockquote>After the solution is revealed, I'll post the details of my answer.<br/><br/><b>Edit: </b><a href="http://www.wired.com/geekdad/2012/06/geekdad-puzzle-of-the-week-solution-when-are-the-odds-even/">GeekDad Puzzle Solution:</a><br/>In the first case you are essentially looking for integer solutions to:<br/>
a(a-1) = 2b(b-1)<br/><br/>There are EIGHT sets under 1 million that will result in even odds when 2 balls are drawn.<br/><br/>
4 marbles (3 black) --> 4 x 3 = 2(3 x 2)<br/>
21 marbles (15 black) --> 21 x 20 = 2(15 x 14)<br/>
120 marbles (85 black) --> 120 x 119 = 2(85 x 84)<br/>
697 marbles (493 black) --> 697 x 696 = 2(493 x 492)<br/>
4,060 marbles (2,871 black) --> 4,060 x 4,059 = 2(2,871 x 2,870)<br/>
23,661 marbles (16,731 black) --> 23,661 x 23,660 = 2(16,731 x 16,730)<br/>
137,904 marbles (97,513 black) --> 137,904 x 137,903 = 2(97,513 x 97,512)<br/>
803,761 marbles (568,345 black) --> 803,761 x 803,760 = 2(568,345 x 568,344)<br/><br/>
Interestingly, the next number in each sequence can be computed as follows:<br/>
a(n) = 6a(n-1) - a(n-2) - 2<br/><br/>
So for example, the next numbers in the sequence would be:<br/>
Total balls: 6 x 803,761 - 137,904 - 2 = 4,684,660 marbles<br/>
Black balls: 6 x 568,345 - 97,513 - 2 = 3,312,555 black<br/><br/>
Integer sequences: <a href="http://oeis.org/A011900">A011900</a> and <a href="http://oeis.org/A046090">A046090</a><br/><br/>
In the second case you are looking for integer solutions to:</br>
a(a-1)(a-2) = 2b(b-1)(b-2)<br/><br/>
There is only ONE set under 1 million that will result in even odds when 3 balls are drawn.</br><br/>
6 marbles (5 black) --> 6 x 5 x 4 = 2(5 x 4 x 3)<br/><br/>Blainehttp://www.blogger.com/profile/06379274325110866036noreply@blogger.com5