tag:blogger.com,1999:blog-91827054998982524962018-03-23T10:43:42.469-04:00Bill the Lizard"The time has come," the Walrus said,
"To talk of many things..."Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.comBlogger234125tag:blogger.com,1999:blog-9182705499898252496.post-67373478239921142222018-03-10T07:54:00.000-05:002018-03-10T08:45:37.677-05:00Mismatched Letters<br />Soon after her wedding, a young bride hand-writes 100 thank you letters to all of her recent wedding guests and addresses 100 matching envelopes. Being in a hurry to get them in the mail, her new husband randomly stuffs the letters into envelopes and mails them out. What is the probability that exactly 99 of the letters made it into the right envelope?<br /><br /><div id="mismatched_letters" style="background-color: honeydew; display: none; padding: 5px;">This problem may seem difficult to model, but don't worry, it isn't necessary. If 99 out of 100 letters are in the right envelope, then the 100th one must be as well. So there is a probability of 0 that <i>exactly</i> 99 are correct.<br /></div><br /><button onclick="showHideDiv('mismatched_letters');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-5892328009767555942018-03-03T08:10:00.000-05:002018-03-03T08:10:48.918-05:00Flipping 100 Coins<br />You have 100 fair coins and you flip them all at the same time. Any that come up tails you set aside. The ones that come up heads you flip again. How many rounds do you expect to play before only one coin remains? What if you start with 1000 coins? Click below for the answer.<br /><br /><div id="flipping_100_coins" style="background-color: honeydew; display: none; padding: 5px;">When you flip 100 coins in the first round, you should expect to see about 50 heads. When you flip those 50 coins again in the second round, you should expect about 25 heads. This (approximate) halving pattern will continue until you're left with only one coin. On average, it will take 6 or 7 rounds when starting with 100 coins because $$log_2(100) = 6.644$$ <br />When you start with 1000 coins, the game will last about 10 rounds. (So if you want to bet someone that you can flip a coin and have it come up heads 10 times in a row, you'll greatly improve your odds if you start with 1000 coins!)<br /><br />See my <a href="https://github.com/BillCruise/Probability/blob/master/scripts/flipping_n_coins.py">Probability GitHub repository</a> for a script that shows how to model this problem in Python.<br /></div><br /><button onclick="showHideDiv('flipping_100_coins');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-64940350159560455502018-02-24T08:03:00.001-05:002018-02-24T08:03:40.023-05:00Coin Flipping Game<br />You have ten coins in a row, all facing tails up. You are to perform a sequence of moves on the coins where one move consists of flipping over any one coin from tails to heads, then flipping over the coin to its immediate right (whether the second coin is heads or tails does not matter, just flip it over). Can you prove that no matter what moves you select, there are a finite number of moves in the sequence? (In other words, prove that you will always reach a state where there are no more legal moves.) Click below for the answer.<br /><br /><div id="coin_flipping_game" style="background-color: honeydew; display: none; padding: 5px;">It helps to try this out a few times to get a feel for how the combinations of coins progresses as you make moves in this game. If you don't have any coins handy, just use 0s (tails) and 1s (heads) on a piece of paper, starting with ten 0s, and work through a few sequences. Here's an example:<br /><br />00000 00000<br />00000 11000<br />00001 01000<br />00001 10000<br />00001 11100<br />00010 11100<br />...<br /><br />Now, instead of focusing on the sequence of moves, focus on the sequence of resulting numbers. Do you notice anything? This is a binary number sequence that is <i>always increasing</i>. The rules of the game are designed such that no matter which bit you choose, the next number in the sequence will always be higher. (Because you flip a 0 to a 1, then flip a lower-order bit.) Since the sequence is strictly increasing, you must eventually reach a state where there are no more legal moves.<br /></div><br /><button onclick="showHideDiv('coin_flipping_game');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-91851118193879559042018-02-17T07:34:00.000-05:002018-02-17T07:35:02.716-05:00A Knight, a Knave, and a Spy<br />You find yourself on the Island of Knights, Knaves, and Spies, a logical kingdom whose inhabitants always lie (Knaves), always tell the truth (Knights), or who can do either (Spies). You encounter three of said inhabitants, call them Alice, Bob, and Carol. You are told by your guide (a trustworthy Knight) that in this group there are one of each type of inhabitant, a Knight, a Knave, and a Spy. You ask the following questions.<br /><br />To Alice you ask, "Are you a Knight?"<br /><br />"No," she answers.<br /><br />To Bob you ask, "Are you a Spy?"<br /><br />"No," replies Bob.<br /><br />Finally, you ask Carol, "Are you a Knave?"<br /><br />"No," she says.<br /><br />Can you tell from these answers who is a Knight, who is a Knave, and who is a Spy? Click below for the answer.<br /><br /><div id="knight_knave_spy" style="background-color: honeydew; display: none; padding: 5px;">Alice must be a Spy. A Knight could never answer "No" to her question, because they'd be lying. A Knave couldn't either, because they'd be telling the truth.<br /><br />Bob must be a Knight. A Knave could not answer "No" to that question, since they'd be telling the truth. A Spy could, but we've already established that Alice is the Spy in this group.<br /><br />Carol's answer is consistent with what a Knight or a Knave would say (or a Spy might say), but by process of elimination, she must be a Knave.<br /></div><br /><button onclick="showHideDiv('knight_knave_spy');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-86811161755639478102018-02-10T08:09:00.003-05:002018-02-10T08:09:38.006-05:00The King's Adviser<br />A king decides he is going to fire one of his advisers. He tells him that he has written "You're fired" on one slip of paper, and "You can stay" on another, and that the adviser is to choose one at random. The king has secretly written "You're fired" on both notes, but unbeknownst to the king, the adviser has found this out! How can the adviser keep his job without telling the king that he knows both notes are the same?<br /><br /><div id="kings_adviser" style="background-color: honeydew; display: none; padding: 5px;">The adviser can select either one of the notes, then destroy it by throwing it in the fire (or by eating it, if there is no convenient fire nearby). He can then tell the king to open the other note, and deduce by elimination which was the one selected. Since the remaining note is guaranteed to say "You're fired," the king must pretend that the note the adviser selected said "You can stay."<br /></div><br /><button onclick="showHideDiv('kings_adviser');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-72083752194088664802018-02-03T08:00:00.000-05:002018-02-03T08:01:40.274-05:00Water Glasses<br />You have five glasses arranged in a row. The first two are empty and the last three are filled with water. By moving only one glass, can you arrange them so full and empty glasses alternate? Click below for the answer.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://1.bp.blogspot.com/-uvHtv5_U3hA/Wm3nvnYsfHI/AAAAAAAADqA/njmv6eRTf1Y47J5kV2zxJnAwWTtPGJhQgCLcBGAs/s400/Water-Glasses.jpg" width="400" height="161" data-original-width="804" data-original-height="323" /></div><br /><div id="water_glasses" style="background-color: honeydew; display: none; padding: 5px;">Pick up the fourth glass, pour the water into the first glass, then replace the fourth (now empty) glass to its original position.<br /></div><br /><button onclick="showHideDiv('water_glasses');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-26716573504519418552018-01-27T08:15:00.001-05:002018-01-27T08:22:30.267-05:00Knights or Knaves?<br />You find yourself on the Island of Knights and Knaves, a logical kingdom whose inhabitants either always lie (Knaves) or always tell the truth (Knights). You encounter three of said inhabitants, call them Alice, Bob, and Carol. You ask the following questions.<br /><br />To Alice you ask, "Is Bob a Knight or a Knave?"<br /><br />"A Knight," she answers.<br /><br />To Bob you ask, "Are Alice and Carol both Knights or both Knaves?"<br /><br />"Yes," replies Bob.<br /><br />Finally, you ask Carol, "Is Bob a Knight or a Knave?"<br /><br />"A Knave," she says.<br /><br />Who is a Knight and who is a Knave? Click below for the answer.<br /><br /><div id="knights_or_knaves" style="background-color: honeydew; display: none; padding: 5px;">Since Alice and Carol answered differently to the same question, they cannot both be Knights or Knaves, they must represent one of each type. Since this is counter to what Bob answered, he must be lying. Bob must be a Knave. That means that Carol answered truthfully, and is a Knight, and Alice did not, so she is a Knave.<br /></div><br /><button onclick="showHideDiv('knights_or_knaves');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-63494843461114473862018-01-20T08:06:00.001-05:002018-01-20T08:06:30.974-05:00True or False?<br />You're taking your college entrance exam, and things are not going well. You spent too much time answering the essay questions and word problems, and now you're running out of time. You turn to the final section and are relieved to find that it consists of 100 True/False questions. The bad news is that you only have 2 minutes left to complete the entire exam!<br /><br />You figure it doesn't matter if you answer all True, all False, or just guess randomly. Odds are you'll probably get half of them right either way. You begin scribbling in your answers.<br /><br />How many different ways (unique sequences) are there to answer 100 True/False questions? Click below for the answer.<br /><br /><div id="true_or_false" style="background-color: honeydew; display: none; padding: 5px;">If you're a computer programmer, you may have recognized right away that this is just a binary counting problem in disguise. Substitute 1 for True and 0 for False, and this is the same as asking how many unique values can be represented by 100 binary bits. Since that's every value from all 0s to all 1s, the answer is $2^{100}$, or 1,267,650,600,228,229,401,496,703,205,376.<br /></div><br /><button onclick="showHideDiv('true_or_false');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-4943923078422086662018-01-13T08:09:00.000-05:002018-01-13T08:09:50.777-05:00King's Sentence<br />A man is caught poaching on the King's property. He is brought before the King to be sentenced. <br /><br />The King says, "You must give me one statement. If it is true, you will killed by lions. If it is false, you will be killed by trampling of wild buffalo."<br /><br />In the end, the King has to let the man go.<br /><br />What was the man's statement? Click below to see the answer.<br /><br /><div id="kings_sentence" style="background-color: honeydew; display: none; padding: 5px;">The man can get out of the punishment by making a paradoxical statement, such as "I will NOT be killed by lions." If that statement was true, the man would be killed by lions, making the statement false. Another statement that would have worked is "I will be killed by trampling of wild buffalo."<br /></div><br /><button onclick="showHideDiv('kings_sentence');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-84357290378638368632018-01-06T07:46:00.000-05:002018-01-06T08:28:57.488-05:00A Boy and a Girl<br />Two children, one boy and one girl, make the following statements.<br /><br />"I am a boy" said the child with brown hair.<br /><br />"I am a girl" said the child with red hair.<br /><br />At least one of the children is lying. Who is the boy and who is the girl? Click below for the answer.<br /><br /><div id="a_boy_and_a_girl" style="background-color: honeydew; display: none; padding: 5px;">Both children are lying.<br /><br />The child with the brown hair is the girl, and the child with the red hair is the boy.<br /><br />(If only one child had lied, they would both be boys or both be girls.)<br /></div><br /><button onclick="showHideDiv('a_boy_and_a_girl');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com2tag:blogger.com,1999:blog-9182705499898252496.post-70781918926171668562017-12-30T08:07:00.000-05:002017-12-30T08:07:56.273-05:00Number System<br />In a slightly eccentric numbering system, the numbers on the left are converted to regular decimal numbers by applying a simple rule.<br /><br />9999 = 4<br />8888 = 8<br />1816 = 3<br />1212 = 0<br /><br />Can you answer<br /><br />2419 = ?<br /><br />Click below for the answer.<br /><br /><div id="number_system" style="background-color: honeydew; display: none; padding: 5px;">To convert numbers from this system to decimal, just count the number of closed areas in each digit. The digit 9 has one closed area, so 9999 = 4. An 8 has two closed areas, so 8888 = 8, and so on. The digits in 2419 have two closed areas, so <b>2419 = 2</b>.<br /></div><br /><button onclick="showHideDiv('number_system');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-38780245137933808262017-12-23T08:09:00.001-05:002017-12-23T08:09:35.252-05:00Fraction of 1000<br />What is 1/2 of 2/3 of 3/4 of 4/5 of 5/6 of 6/7 of 7/8 of 8/9 of 9/10 of 1000? Click below for the answer.<br /><br /><div id="fraction_of_1000" style="background-color: honeydew; display: none; padding: 5px;">At first glance, this problem looks a lot harder than it is. If you work backwards starting at 9/10 of 1000, it's easier to see that the final answer is <b>100</b>.<br /></div><br /><button onclick="showHideDiv('fraction_of_1000');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-8877672242551042922017-12-16T08:16:00.000-05:002017-12-16T08:16:01.729-05:00Three Water Bottles<br />You have three water bottles with capacities of 8 quarts, 5 quarts, and 3 quarts. The largest bottle is filled with water, and the other two are empty. If there are no graduation marks on any of the bottles, how can you split the water evenly so that two of the bottles contain exactly 4 quarts each? You can only use these three bottles. Click below for the answer.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://2.bp.blogspot.com/-_Zo_dWIyEWA/WiwGXD1MiCI/AAAAAAAADpM/CaPRbTD1Q7YAQXdpPZUatqAxGyYsltRqwCLcBGAs/s400/water.png" width="400" height="366" data-original-width="327" data-original-height="299" /></div><br /><div id="three_water_bottles" style="background-color: honeydew; display: none; padding: 5px;">There may be other ways to solve this problem, but here's one sequence that works.<br /><ol><li>Fill the 5 quart bottle, leaving 3 quarts in the 8 quart bottle.</li><li>Pour 3 quarts from the 5 quart bottle into the 3 quart bottle, leaving 2 quarts in the 5 quart bottle.</li><li>Empty the 3 quart bottle into the 8 quart bottle , leaving 6 quarts in the 8 quart bottle.</li><li>Pour the 2 quarts from the 5 quart bottle into the 3 quart bottle.</li><li>Fill the 5 quart bottle from the 8 quart bottle , leaving 1 quart in the 8 quart bottle.</li><li>Pour 1 quart from the 5 quart bottle into the 3 quart bottle (filling it), leaving 4 quarts in the 5 quart bottle.</li><li>Pour the 3 quarts from the 3 quart bottle into the 8 quart bottle, leaving 4 quarts in the 8 quart bottle.</li></ol>That's a lot to follow, so here are the steps in tabular form.<br /><br /><table><tr><th>8 qt.</th><th>5 qt.</th><th>3 qt.</th></tr><tr><td align="center">8</td><td align="center">0</td><td align="center">0</td></tr><tr><td align="center">3</td><td align="center">5</td><td align="center">0</td></tr><tr><td align="center">3</td><td align="center">2</td><td align="center">3</td></tr><tr><td align="center">6</td><td align="center">2</td><td align="center">0</td></tr><tr><td align="center">6</td><td align="center">0</td><td align="center">2</td></tr><tr><td align="center">1</td><td align="center">5</td><td align="center">2</td></tr><tr><td align="center">1</td><td align="center">4</td><td align="center">3</td></tr><tr><td align="center">4</td><td align="center">4</td><td align="center">0</td></tr></table><br /></div><br /><button onclick="showHideDiv('three_water_bottles');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-41491941725018321442017-12-09T08:28:00.001-05:002017-12-10T21:30:03.934-05:00The Compulsive Gambler<br />You are approached by a compulsive gambler with the following proposal. You are to flip a fair coin four times. If heads and tails both appear twice each, he will pay you <span>$</span>11. If any other combination of heads and tails appears, you have to pay him only <span>$</span>10. Do you take the wager? Click below for the answer.<br /><br /><div id="the_compulsive_gambler" style="background-color: honeydew; display: none; padding: 5px;">This is not a good gamble. Below are all the possible outcomes for four successive coin flips.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://3.bp.blogspot.com/-vA9V36nMCO0/WhGisQg07VI/AAAAAAAADok/2fVpC72YRXA14L7eVVNNqcF3UqdCUls2wCLcBGAs/s640/4_coin_flips.png" width="373" height="640" data-original-width="664" data-original-height="1139" /></div><br />Notice that exactly two heads and two tails only appear six out of sixteen times, so you can only expect to win this game about 37.5% of the time. At the offered stakes (<span>$</span>11 for a win, <span>$</span>10 for a loss) you'd be losing an average of around <span>$</span>2.12 every time you play.<br /><br />This problem appeared as an exercise in <a href="https://www.amazon.com/Introductory-Graph-Theory-Dover-Mathematics-ebook/dp/B008TVFB1U/">Introductory Graph Theory</a> by Gary Chartrand.<br />See my <a href="https://github.com/BillCruise/Probability/blob/master/scripts/four_flips.py">Probability GitHub repository</a> for a script that shows how to model this problem in Python.<br /></div><br /><button onclick="showHideDiv('the_compulsive_gambler');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com2tag:blogger.com,1999:blog-9182705499898252496.post-51890013816252367872017-12-02T08:24:00.002-05:002017-12-02T08:24:12.539-05:00The Lily Pad<br />A lily pad starts out very small, but doubles in size every day. After 60 days it has completely covered a pond. After how many days had it covered one-quarter the area of the pond? Click below for the answer.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://3.bp.blogspot.com/-dOep6ItLRLg/WhGdSRPpoUI/AAAAAAAADoU/-Zr4EsATW9QqMZ7VQYjxLxOHX91nCrsewCLcBGAs/s1600/Lily-Pad.jpg" data-original-width="420" data-original-height="315" /></div><br /><div id="the_lily_pad" style="background-color: honeydew; display: none; padding: 5px;">The instinctive answer might seem to be 15 days, but that would only be correct if the lily pad was growing linearly. Remember, the lily pad <i>doubles</i> in size every day, which is exponential. To solve this puzzle, just work backwards. If the lily pad completely covers the pond on day 60, then half the pond was covered on day 59, and one-quarter of the pond was covered on day <b>58</b>.<br /></div><br /><button onclick="showHideDiv('the_lily_pad');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-35700811494153863952017-11-25T08:01:00.000-05:002017-11-25T08:01:53.684-05:00Three Coin Flips<br />The following game has a <span>$</span>10 entry fee. You are to flip a fair coin three times. The first time it comes up heads you are paid <span>$</span>5. The second time it comes up heads you're paid an additional <span>$</span>7. The third time it comes up heads you're paid <span>$</span>9 more, for a possible maximum prize of <span>$</span>21. Would you pay the <span>$</span>10 entry fee to play?<br /><br />If not, what would be a fair price for this game? Click below for the answer.<br /><br /><div id="three_coin_flips" style="background-color: honeydew; display: none; padding: 5px;">It's not a good idea to play this game at the offered entry fee. Here are the eight possible outcomes when flipping a coin three times, along with how much you would win after each flip. <br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://3.bp.blogspot.com/-B_AAhrqI2zw/WhDBBQlholI/AAAAAAAADnw/hECTGTtnxtUF9IMiVYJPNN_TqmIjbbBXgCLcBGAs/s400/3_coin_flips.png" width="384" height="400" data-original-width="541" data-original-height="563" /></div><br />When you subtract out the <span>$</span>10 entry fee, you only win "big" (<span>$</span>11) one out of eight times. Three times you win only <span>$</span>2, three times you lose <span>$</span>5, and one out of the eight times you lose your entire <span>$</span>10 entry fee. If you average these, you can expect to lose <span>$</span>1 every time you play. So, if you lower the entry fee to <span>$</span>9 this would be a fair game.<br /><br />This problem appeared as an exercise in <a href="https://www.amazon.com/Introductory-Graph-Theory-Dover-Mathematics-ebook/dp/B008TVFB1U/">Introductory Graph Theory</a> by Gary Chartrand.<br />See my <a href="https://github.com/BillCruise/Probability/blob/master/scripts/three_flips.py">Probability GitHub repository</a> for a script that shows how to model this problem in Python.<br /></div><br /><button onclick="showHideDiv('three_coin_flips');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-40238577305756009582017-11-18T08:54:00.000-05:002017-11-18T08:54:48.718-05:00One equals 0.999...<br />The following is a mathematical proof that 1 is equal to 0.999.... What's wrong with it? Click below for the answer.<br /><div class="separator" style="clear: both; text-align: center;">$x = 0.999...$<br />$10x = 9.999...$<br />$10x = 9 + 0.999...$<br />$10x = 9 + x$<br />$9x = 9$<br />$x = 1$<br /></div><br /><div id="one_equals_point_nine_nine_nine" style="background-color: honeydew; display: none; padding: 5px;">There's nothing wrong with it. 1 really is equal to <a href="https://en.wikipedia.org/wiki/0.999...">0.999...</a><br /></div><br /><button onclick="showHideDiv('one_equals_point_nine_nine_nine');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-86621959475818267532017-11-11T08:16:00.000-05:002017-11-11T08:16:05.882-05:00Two equals one?<br />The following is a mathematical proof that two equals one. What's wrong with it? Click below for the answer.<br /><div class="separator" style="clear: both; text-align: center;">$a = b$<br />$aa = ab$<br />$aa - bb = ab - bb$<br />$(a + b)(a - b) = b(a - b)$<br />$a + b = b$<br />$a + a = a$<br />$2a = a$<br />$2 = 1$<br /></div><br /><div id="two_equals_one" style="background-color: honeydew; display: none; padding: 5px;">The problem is in the fourth step, where both sides of the equation are divided by $(a - b)$. Since $a = b$ is given at the start, $a - b$ is 0, and you can't divide by 0.<br /></div><br /><button onclick="showHideDiv('two_equals_one');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-14271222612714640682017-11-04T08:12:00.002-04:002017-11-04T08:12:54.580-04:00State Names<br />There's only one letter in the English alphabet that is not used in the name of any of the 50 United States. Do you know which letter it is? Click below for the answer.<br /><br /><div id="state_names" style="background-color: honeydew; display: none; padding: 5px;">If you said 'J' or 'Z' you weren't far off. Each of those letters appear only once in the names of the 50 states (thanks to New Jersey and Arizona). The correct answer, though, is the letter <b>Q</b>, which does not appear in any state name.<br /><br />To find the solution, I used <a href="https://github.com/BillCruise/Probability/blob/master/scripts/state_names.py">a Python script</a> to load a list of state names and count the occurrence of each letter of the alphabet. This method takes a lot less time than consulting a map.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-50u-MnuwwdQ/WfTFBbz8okI/AAAAAAAADms/9MWrHPRMNQwJ-o1e3KCefoqatYlIkcW8QCLcBGAs/s1600/50-States.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-50u-MnuwwdQ/WfTFBbz8okI/AAAAAAAADms/9MWrHPRMNQwJ-o1e3KCefoqatYlIkcW8QCLcBGAs/s400/50-States.png" width="400" height="247" data-original-width="600" data-original-height="371" /></a></div><br /></div><br /><button onclick="showHideDiv('state_names');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-33247298699123768392017-10-28T08:36:00.000-04:002017-10-28T08:58:22.900-04:00Tic-Tac-Toe<br />In a standard game of Tic-Tac-Toe, players take turns placing X's and O's on a 3x3 grid until one player makes three-in-a-row in any direction (horizontally, vertically, or diagonally). Because of these rules, you can only place a maximum of five of either symbol on the board during a game, often ending in a draw.<br /><br />Can you place <i>six</i> X's on a Tic-Tac-Toe board <i>without</i> making three-in-a-row in any direction? (Without placing any O's.) Click below for the solution.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://2.bp.blogspot.com/-iysAo1_IoE0/WdjH-0ZmreI/AAAAAAAADlY/A6xWXQv6DloQPv3QlEg_r7o1CP-yZd39wCLcBGAs/s320/board_0.png" width="300" height="300" data-original-width="360" data-original-height="360" /></div><br /><div id="tic_tac_toe" style="background-color: honeydew; display: none; padding: 5px;">I found the solution below with a little trial and error. The trick to this puzzle is that you cannot solve it with an X in the center position.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://4.bp.blogspot.com/-zQByHR1mzvM/WdjJb_U_PyI/AAAAAAAADlk/vVvPmQlEk18r1nXTQhn9n0CCmC7RcFgqwCLcBGAs/s320/board_6.png" width="300" height="300" data-original-width="360" data-original-height="360" /></div></div><br /><button onclick="showHideDiv('tic_tac_toe');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com2tag:blogger.com,1999:blog-9182705499898252496.post-4172443500455156192017-10-21T07:34:00.001-04:002017-10-21T07:34:43.626-04:00Draw Two<br />Two numbers are drawn at random from the integers 1 through 10. What is the expected value of their sum? Does it change if the second draw is done with or without replacement? Click below for the answers.<br /><br /><div id="draw_two" style="background-color: honeydew; display: none; padding: 5px;">This puzzle is from <a href="https://twitter.com/MrHonner/status/917546796322377728">Patrick Honner</a>. It's easy to calculate the expected value with replacement. It's just two times the expected value of a random draw from 1...10, so 2 * 5.5, or 11. The interesting part is that when you draw two numbers <i>without</i> replacement the expected sum doesn't change. Why is that? <br /><br />To find out, take a look at what happens to the expected value of the second draw for each value of the first draw. (Expected value is just the average of the remaining numbers.)<br /><br /><table><tr><th>1st draw</th><th>E(2nd draw)</th><tr><td>$1$</td><td>$6$</td><tr><td>$2$</td><td>$5\frac{8}{9}$</td><tr><td>$3$</td><td>$5\frac{7}{9}$</td><tr><td>$4$</td><td>$5\frac{2}{3}$</td><tr><td>$5$</td><td>$5\frac{5}{9}$</td><tr><td>$6$</td><td>$5\frac{4}{9}$</td><tr><td>$7$</td><td>$5\frac{1}{3}$</td><tr><td>$8$</td><td>$5\frac{2}{9}$</td><tr><td>$9$</td><td>$5\frac{1}{9}$</td><tr><td>$10$</td><td>$5$</td> </table><br />As the value of the first draw increases, the expected value of the second draw decreases. If you take the sum of each column you get 55. Divide by 10 to get the average and you get 5.5, so when you add them together you arrive back at the solution of 11.<br /><br />See my <a href="https://github.com/BillCruise/Probability/blob/master/scripts/draw_two.py">Probability GitHub repository</a> for a script that shows how to model this problem in Python.<br /></div><br /><button onclick="showHideDiv('draw_two');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-29614942147763367942017-10-14T07:55:00.000-04:002017-10-14T07:55:00.694-04:00Chicken McNuggets<br />You drove for hours last week to get your hands on <a href="http://www.snopes.com/2017/10/09/mcdonalds-szechuan-sauce-rick-and-morty/">McDonald's limited edition Szechuan sauce</a>, and now you need some chicken nuggets for you and all of your friends. You can buy McNuggets in boxes of 6, 9, and 20. What is the <i>largest</i> whole number of nuggets that it is <b>not possible</b> to obtain by purchasing some combination of boxes of 6, 9, and 20? Click below for the answer.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://3.bp.blogspot.com/-aG4Y9Gj358c/WdvHmiO8tuI/AAAAAAAADl8/xdTzyiqe8S4yIKymoSIlW60SaltLH-W_wCLcBGAs/s320/Szechuan.jpg" width="259" height="320" data-original-width="375" data-original-height="464" /></div><br /><div id="chicken_mcnuggets" style="background-color: honeydew; display: none; padding: 5px;">There might be cleverer solutions to this problem, but we can do this fairly easily by listing combinations. Once we hit a streak of six numbers in a row that we <i>can</i> obtain, we know that the last number we <i>couldn't</i> obtain before the streak is the largest such number. Beyond that streak of six we can just add one or more boxes of 6 nuggets to one of those numbers to obtain any higher number. (There may be other combinations to obtain some of these numbers, but we only need one combination for each.)<br /><br /><table><tr><th>Number</th><th>Boxes</th></tr><tr><td>1</td><td>Not Possible</td></tr><tr><td>2</td><td>Not Possible</td></tr><tr><td>3</td><td>Not Possible</td></tr><tr><td>4</td><td>Not Possible</td></tr><tr><td>5</td><td>Not Possible</td></tr><tr><td>6</td><td>6</td></tr><tr><td>7</td><td>Not Possible</td></tr><tr><td>8</td><td>Not Possible</td></tr><tr><td>9</td><td>9</td></tr><tr><td>10</td><td>Not Possible</td></tr><tr><td>11</td><td>Not Possible</td></tr><tr><td>12</td><td>6 + 6</td></tr><tr><td>13</td><td>Not Possible</td></tr><tr><td>14</td><td>Not Possible</td></tr><tr><td>15</td><td>6 + 9</td></tr><tr><td>16</td><td>Not Possible</td></tr><tr><td>17</td><td>Not Possible</td></tr><tr><td>18</td><td>9 + 9</td></tr><tr><td>19</td><td>Not Possible</td></tr><tr><td>20</td><td>20</td></tr><tr><td>21</td><td>6 + 6 + 9</td></tr><tr><td>22</td><td>Not Possible</td></tr><tr><td>23</td><td>Not Possible</td></tr><tr><td>24</td><td>6 + 9 + 9</td></tr><tr><td>25</td><td>Not Possible</td></tr><tr><td>26</td><td>20 + 6</td></tr><tr><td>27</td><td>9 + 9 + 9</td></tr><tr><td>28</td><td>Not Possible</td></tr><tr><td>29</td><td>20 + 9</td></tr><tr><td>30</td><td>6 + 6 + 9 + 9</td></tr><tr><td>31</td><td>Not Possible</td></tr><tr><td>32</td><td>6 + 6 + 20</td></tr><tr><td>33</td><td>6 + 9 + 9 + 9</td></tr><tr><td>34</td><td>Not Possible</td></tr><tr><td>35</td><td>6 + 9 + 20</td></tr><tr><td>36</td><td>9 + 9 + 9 + 9</td></tr><tr><td>37</td><td>Not Possible</td></tr><tr><td>38</td><td>9 + 9 + 20</td></tr><tr><td>39</td><td>6 + 6 + 9 + 9 + 9</td></tr><tr><td>40</td><td>20 + 20</td></tr><tr><td>41</td><td>6 + 6 + 9 + 20</td></tr><tr><td>42</td><td>6 + 9 + 9 + 9 + 9</td></tr><tr><td>43</td><td>Not Possible</td></tr><tr><td>44</td><td>6 + 9 + 9 + 20</td></tr><tr><td>45</td><td>9 + 9 + 9 + 9 + 9</td></tr><tr><td>46</td><td>6 + 20 + 20</td></tr><tr><td>47</td><td>9 + 9 + 9 + 20</td></tr><tr><td>48</td><td>6 + 6 + 9 + 9 + 9 + 9</td></tr><tr><td>49</td><td>9 + 20 + 20</td></tr></table><br />That's six in a row, so we can get any higher number of nuggets just by adding boxes of 6 to those combinations. That means that <b>43</b> is the largest number of Chicken McNuggets that you cannot buy by combining boxes of 6, 9, and 20.<br /></div><br /><button onclick="showHideDiv('chicken_mcnuggets');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-79094631238159027482017-10-07T07:35:00.000-04:002017-10-07T07:35:54.186-04:00Pennies<br />Would you rather have a ton of pennies, four miles of pennies lined up end-to-end, or a stack of pennies half a mile tall? Click below for a hint, or for the answer.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://3.bp.blogspot.com/-N0XhKlsfaK0/WcexvY9xc3I/AAAAAAAADlA/F232PIh41bYG1LLA1o9Zbvhd3uEvKHPCgCLcBGAs/s1600/Pennies.jpg" data-original-width="512" data-original-height="288" /></div><br /><div id="pennies_hint" style="background-color: #ffffcc; display: none; padding: 5px;">One penny weighs 2.500 grams (according to the <a href="https://www.usmint.gov/learn/coin-and-medal-programs/coin-specifications">U.S. Mint</a>).<br />There are about 28.35 grams in an ounce<br />There are 16 ounces in a pound.<br />There are 2,000 pounds in a (U.S.) ton.<br /><br />One penny is 0.750 inches in diameter.<br />There are 12 inches in a foot.<br />There are 5,280 feet in a mile.<br /><br />One penny is 1.52 millimeters thick.<br />There are 25.4 millimeters in an inch.<br /></div><br /><button onclick="showHideDiv('pennies_hint');" title="Click to Show/Hide Hint">Show/Hide Hint</button><br /><br /><div id="pennies_answer" style="background-color: honeydew; display: none; padding: 5px;">Four miles of pennies lined up end-to-end would be <b>$3,379.20</b>, while one ton is <b>$3,628.80</b>, so between the first two options you would be better off to take the ton. However, a stack of pennies half a mile tall would be <b>$5,293.89</b>, so the stack is by far the best option.<br /></div><br /><button onclick="showHideDiv('pennies_answer');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-11409406971016993382017-09-30T07:52:00.001-04:002017-09-30T07:52:26.622-04:00Western Leaders<br />Here's a freaky coincidence about World War II. If you add up the year of birth, age in 1944, year of taking power, and the number of years in office in 1944 for each of the five main leaders of the Western world during World War II, the sums are all the same.<br /><br /><table><tr><th></th><th>Churchill</th><th>Hitler</th><th>Mussolini</th><th>Roosevelt</th><th>Stalin</th></tr><tr><th>Year of birth</th><td align="right">1874</td><td align="right">1889</td><td align="right">1883</td><td align="right">1882</td><td align="right">1878</td></tr><tr><th>Age in 1944</th><td align="right">70</td><td align="right">55</td><td align="right">61</td><td align="right">62</td><td align="right">66</td></tr><tr><th>Took power</th><td align="right">1940</td><td align="right">1933</td><td align="right">1922</td><td align="right">1933</td><td align="right">1922</td></tr><tr><th>Years in office</th><td align="right">4</td><td align="right">11</td><td align="right">22</td><td align="right">11</td><td align="right">22</td></tr><tr><th>Sum</th><td align="right">3,888</td><td align="right">3,888</td><td align="right">3,888</td><td align="right">3,888</td><td align="right">3,888</td></tr></table><br />Can you explain this coincidence? Click below for the answer.<br /><br /><div id="western_leaders" style="background-color: honeydew; display: none; padding: 5px;">There's really no coincidence at all. If you take any person's year of birth and add their age in 1944, the sum will be... 1944. This also goes for the year a leader took office and the number of years they had held office in 1944, so the sum of all four values will always be 1944 + 1944 = 3888. You can make your own puzzle using any year as a reference point.<br /></div><br /><button onclick="showHideDiv('western_leaders');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-19920450564357068592017-09-23T08:19:00.000-04:002017-09-23T08:19:54.196-04:00Concentric Shapes<br />See the image below of a square inscribed inside a circle inscribed inside a square. If the outer square has an area of 100 square inches, is there a quick way of figuring out the area of the inner square? Click below for the answer.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img src="https://3.bp.blogspot.com/-1hy5k8jQnTw/Wb3Hx_YAs2I/AAAAAAAADkk/Djf9qmQPdVoA-mtcZ0x-jFnqTIwe3uCDwCLcBGAs/s400/Concentric-1.png" style="border: none" /></div><br /><div id="concentric_shapes" style="background-color: honeydew; display: none; padding: 5px;">Spin the inner square around so the corners touch the top, bottom, and sides of the outer square.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img src="https://4.bp.blogspot.com/-84ncZyrET3s/Wb3H6TAQFWI/AAAAAAAADko/BhOJvSz9chcP0DranKup4mkPu05MuxdCgCLcBGAs/s400/Concentric-2.png" style="border: none" /></div><br />Now imagine taking each corner of the outer square and folding them in so they touch in the center of the image. It's easy to see that the area outside the inner square will perfectly cover the area inside, so the inner square has exactly half the area of the outer square, or 50 square inches.<br /></div><br /><button onclick="showHideDiv('concentric_shapes');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0