tag:blogger.com,1999:blog-91827054998982524962017-06-27T10:52:49.756-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.comBlogger197125tag:blogger.com,1999:blog-9182705499898252496.post-14713334387756298032017-06-24T09:39:00.002-04:002017-06-24T09:39:51.333-04:00Bags of Marbles<br />You have three identical bags, each containing two marbles. Bag A contains two white marbles, Bag B contains two black marbles, and Bag C contains one white and one black marble. You pick a bag at random and draw out one marble. If the marble is white, what is the probability that the other marble in the same bag is also white? Click below to see the answer.<br /><br /><div id="bags_of_marbles" style="background-color: honeydew; display: none; padding: 5px;">Many people will instinctively answer 50%, or 1/2, since the marble has two possible colors, but the probability is actually 2/3 (66.67%). Why? If the first marble is white, then you know you didn't randomly select Bag B. That means that the first marble you selected has three (not two) possibilities:<br /><ol><li>The first marble in Bag A.</li><li>The second marble in Bag A.</li><li>The white marble in Bag C.</li></ol>Only in the third case will the other marble be black, so there's a 2/3 probability that when the first marble is white, the second marble will also be white.<br /></div><br /><button onclick="showHideDiv('bags_of_marbles');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br />If you want to see how you would model this problem in Python, you can look at <a href="https://github.com/BillCruise/Probability/blob/master/scripts/bags_of_marbles.py">my solution on GitHub</a>.Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-29609989186458842022017-06-17T09:16:00.000-04:002017-06-17T09:16:36.060-04:00The Monk and the Mountain Path<br />One morning at precisely 9:00 AM a monk begins walking up a mountain path. He takes his time, stopping several times to rest along the way. He arrives at the temple at the mountain's summit at precisely 5:00 PM that evening. The next day, the monk leaves the temple at precisely 9:00 AM and makes his way back down the path. Again, he takes his time and rests at several points along the journey. He arrives back at his original starting point at precisely 5:00 PM that evening. Is there any time when the monk is in exactly the same spot on both days? Click below to see the answer.<br /><br /><div id="monk_mountain" style="background-color: honeydew; display: none; padding: 5px;">Since the monk isn't travelling at a constant rate of speed on his two trips, it's tempting to say that there's not <i>necessarily</i> a time when the monk is in the same spot at the same time on both days. However, such a time and place <i>must</i> exist. To see why, take a look at the following plot of the two trips.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://1.bp.blogspot.com/-VCbpcsFYG0I/WTb_PMYEIRI/AAAAAAAADhk/L43JIrhEzCYAlUS2mLxUxG9rq4od94b5QCLcB/s400/Mountain-Path.png" width="400" height="234" data-original-width="678" data-original-height="396" /></div><br />Imagine that you can grab the lines on the plot and bend them however you like, you just can't move the endpoints, and the lines must stay within the bounds of the two axes. No matter how you stretch and bend the lines, <i>they must cross somewhere</i>.<br /><br />To think of it another way, imagine there were two monks, one at the base of the mountain and one at the temple, and they started their journeys on the same day. If they were to begin and end their trips at the same time, they would have to pass each other on the path at some point during the day.<br /></div><br /><button onclick="showHideDiv('monk_mountain');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://3.bp.blogspot.com/-4KRSAOsFoEU/WTb7-8SdygI/AAAAAAAADhg/IRNlyOCleE8h25KDO6N6TQ0yKRK7G5UOwCLcB/s320/monk_mountain_path.jpg" width="320" height="240" data-original-width="640" data-original-height="480" /></div><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com2tag:blogger.com,1999:blog-9182705499898252496.post-57042472069698146732017-06-10T10:27:00.000-04:002017-06-10T10:27:13.302-04:00The Pigeonhole Principle<br />The <a href="https://en.wikipedia.org/wiki/Pigeonhole_principle"><b>pigeonhole principle</b></a> states that if a group of pigeons flies into a set of pigeonholes, and there are more pigeons than pigeonholes, then there must be at least one pigeonhole with two pigeons in it. More generally, if <i>k + 1</i> or more objects are placed into <i>k</i> boxes, then there is at least one box containing two or more of the objects. Despite its seeming simplicity (perhaps obviousness), it can be used to solve a surprising range of problems in probability, number theory, and computer science, just to name a few. See if you can use it to solve the following three problems.<br /><br /><ol><li>(Warm up) A drawer contains a dozen blue socks and a dozen black socks, all unmatched. If the room is dark, how many socks do you have to take out to be sure you have a matching pair?</li><li>Prove that there are at least two people in Tokyo with exactly the same number of hairs on their heads.</li><li>Prove that if five distinct integers are selected from the numbers 1 through 8, there must be at least one pair with a sum equal to 9.</li></ol><br />Click below to see the answers.<br /><br /><div id="pigeonhole_principle" style="background-color: honeydew; display: none; padding: 5px;"><ol><li>(Warm up) If you've only heard one problem involving the pigeonhole principle, it was probably the classic sock drawer problem. You only need to pick three socks to make sure you have one matching pair. When you pick two socks, you might already have a matching pair, or you might have one of each color sock. Selecting one more sock ensures that you have at least two socks of one color or the other.</li><li>The Tokyo hairs problem sounds like something you might be asked as a "brain teaser" interview question. If you're stuck in an interview, then the first step is to show off your estimating skills. Since we're not in that situation, we can just use Google to find out that there are <a href="http://www.newworldencyclopedia.org/entry/Hair">about 100,000 hairs on the average human head</a>, and that <a href="https://en.wikipedia.org/wiki/Tokyo">Tokyo is home to about 13.6 million people</a>. That's more than enough people for our proof. For the sake of simplicity, let's say that 200,000 is the <b>maximum</b> number of hairs a person can have on their head. Then, if you select 200,001 people who happen to each have a distinct number of hairs on their heads (zero is a valid number of hairs to have on your head), you only need one more to ensure that two people have the same number of hairs. (Note: This puzzle will work with any city larger than 200,001 residents.)</li><li>To see how the pigeonhole principle applies to this problem, you just need to group the numbers 1 through 8 in pairs that sum to 9. {1,8}, {2,7}, {3,6}, {4,5}. Now, if I select four distinct numbers from that range, I might select one number from each of the four pairs. If I select a fifth number, then I must complete one of the pairs that sums to 9.</li></ol></div><br /><button onclick="showHideDiv('pigeonhole_principle');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://1.bp.blogspot.com/-XiSyOIHYk3c/WS2ThhllYJI/AAAAAAAADg8/T6wkVqPjnqkWS0stS-JeggJsZcMRzZubQCLcB/s1600/pigeonhole.jpg" data-original-width="216" data-original-height="153" /></div>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-87516301531454672252017-06-03T09:23:00.000-04:002017-06-03T09:23:24.052-04:00Coffee with Cream<br />Suppose you have two cups in front of you, one with precisely 8 fluid ounces of coffee, and the other with precisely 8 fluid ounces of cream. You take precisely one teaspoon of the cream and add it to your coffee. You stir it in so that it's thoroughly mixed. Then you take precisely one teaspoon of that coffee/cream mixture and put it back into the cup of cream. Does the cup of coffee have more cream in it, or does the cup of cream contain more coffee? Click below for the answer.<br /><br /><div id="coffee_with_cream" style="background-color: honeydew; display: none; padding: 5px;">This question is a bit tricky. It's tempting to think that the cup of coffee contains more cream, because the teaspoon of cream added to the coffee was 100% pure, while the teaspoon of coffee added to the cream was diluted. However, it's important to remember that the total volume of each vessel changed by one teaspoon after the first transfer of fluid. The coffee/cream mixture was greater by two teaspoons than the pure cream. Before I reveal the answer, let's re-frame the question in discrete units.<br /><br />Suppose that instead of liquids, our two cups contained 20 black marbles and 20 white marbles. You take 5 white marbles and thoroughly mix then in with the black marbles. Then you randomly select 5 marbles from the black/white marble mixture and place them back in the cup of white marbles. Are there more white marbles in the black cup or more black marbles in the white cup?<br /><br />If you're like me, you may be tempted to treat this as a probability problem, but it isn't one. When I think about randomly drawing marbles, I want to immediately start writing a quick simulation in Python, but as you'll see, that isn't necessary. We can easily enumerate all possible outcomes in this scenario to find the answer to the question. When we draw 5 marbles from the cup with a mixture of 20 black and 5 white marbles, then place them in the cup with the other 15 white marbles, there are only 6 possible outcomes:<br /><br /><table><tr> <th align="center">black</th> <th align="center">white</th> <th align="center">black/white mix</th> <th align="center">white/black mix</th> </tr><tr> <td align="center">5</td> <td align="center">0</td> <td align="center">15/5</td> <td align="center">15/5</td> </tr><tr> <td align="center">4</td> <td align="center">1</td> <td align="center">16/4</td> <td align="center">16/4</td> </tr><tr> <td align="center">3</td> <td align="center">2</td> <td align="center">17/3</td> <td align="center">17/3</td> </tr><tr> <td align="center">2</td> <td align="center">3</td> <td align="center">18/2</td> <td align="center">18/2</td> </tr><tr> <td align="center">1</td> <td align="center">4</td> <td align="center">19/1</td> <td align="center">19/1</td> </tr><tr> <td align="center">0</td> <td align="center">5</td> <td align="center">20/0</td> <td align="center">20/0</td> </tr></table><br />So the black/white ratio of the 5 marbles in the second transfer doesn't really matter. The end result is that <i>there are always the same number of white marbles in the black cup as there are black marbles in the white cup</i>.<br /><br />The same is true of the original coffee/cream problem. The ratio of the two liquids in the teaspoon that is transferred to the cup of cream is such that you will end up with precisely the same volume of coffee in your cream as there is cream in your coffee. So the answer to the trick question posed at the beginning is "neither, they are the same."<br /></div><br /><button onclick="showHideDiv('coffee_with_cream');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://4.bp.blogspot.com/--W6RivrGyW0/WS7NEjZFSgI/AAAAAAAADhM/IN3KrNt8bh8HzAPFQkhJZCrDEQZMcwXawCLcB/s1600/Cup-of-Coffee.jpg" data-original-width="320" data-original-height="240" /></div>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-72605165162656509992017-05-27T08:28:00.000-04:002017-05-27T08:28:45.113-04:00Letter Groupings<br />The letters of the (English) alphabet can be grouped into four distinct categories.<br /><br />A M<br /><br />B C D E K<br /><br />F G J L<br /><br />H I<br /><br />Based on the categories established by the first 13 letters, can you place each of the remaining 13 letters in the correct group?<br /><br /><br /><div id="letter_groupings" style="background-color: honeydew; display: none; padding: 5px;">This question is tricky because it's not about the sounds the letters make, or the frequency of letters, but about the shapes of the (capital) letters.<br /><br />The categories are:<br /><br />A M T U V W Y (left-right mirror images)<br /><br />B C D E K (top-bottom mirror images)<br /><br />F G J L N P Q R S Z (no symmetry)<br /><br />H I O X (symmetry about both axes)<br /></div><br /><button onclick="showHideDiv('letter_groupings');" 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-47897881664029192902017-05-20T10:39:00.000-04:002017-05-20T10:39:19.911-04:00Number Words<br />In the solution to <a href="http://www.billthelizard.com/2017/03/a-unique-number.html">A Unique Number</a>, I asked a bonus question. "Can you think of a number whose letters when spelled out in English are all in alphabetical order?" Several people replied via Twitter with the correct answer of "forty." You may have found a shortcut to the solution if you noted that none of the single-digit numbers have their letters in alphabetical order, nor does the word "teen." This allows you to skip ahead to 20, 30, etc. Can you use a similar strategy to answer the following questions?<br /><ul><li>What is the lowest number that requires the five vowels A, E, I, O, and U only once each in its spelling?</li><li>What is the lowest number that requires the six letters A, E, I, O, U, and Y only once each in its spelling?</li></ul>Click below to see the answers.<br /><br /><br /><div id="number_words" style="background-color: honeydew; display: none; padding: 5px;">The lowest number that requires the five vowels A, E, I, O, and U once each in its spelling is <b>206</b> (two-hundred and six).<br /><br />The lowest number that requires the six letters A, E, I, O, U, and Y once each in its spelling is <b>230</b> (two-hundred and thirty).<br /><br />The strategy to quickly find these answers is to note which vowels are used in the base numbers, one, two, three, etc, then avoid combinations that include multiples of the same vowel. For example, you can skip past the 100s entirely, because "one-hundred" contains two of the letter "e".<br /></div><br /><button onclick="showHideDiv('number_words');" title="Click to Show/Hide Answer">Show/Hide Answer</button>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com4tag:blogger.com,1999:blog-9182705499898252496.post-36315916991346836392017-05-13T08:38:00.000-04:002017-05-13T08:38:08.206-04:00The Nine Dot Puzzle<br />The following is a classic "thinking outside the box" puzzle. Can you connect all nine dots below by drawing exactly four straight lines, without lifting your pencil or tracing back over any line?<br /><br /><div class="separator" style="clear: both; text-align: center;"><img src="https://4.bp.blogspot.com/-a_ARkyZKKyw/WQ_UDTqjosI/AAAAAAAADgU/IWQ8sIFFr_guFGjTF_BZQbCZKKYTAtB2gCLcB/s1600/9dots.png" style="border: none" /></div><br />Give it a try before you click below for the answer.<br /><br /><div id="nine_dot_puzzle" style="background-color: honeydew; display: none; padding: 5px;">If this puzzle looks familiar, it's because it dates back at least as far as Sam Loyd's 1914 <i>Cyclopedia of Puzzles</i>. When I said this was a classic "thinking outside the box" puzzle, that was a clue. You have to think outside the bounds of the box created by the nine dots to come up with a solution.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img src="https://2.bp.blogspot.com/-YhlRAZ-p6ik/WQ_ULGUO9nI/AAAAAAAADgY/z7ubmtzHKFQ1hsmKKBtMU4bIuYW4xIqSACLcB/s1600/9dots-solution.png" style="border: none" /></div></div><br /><button onclick="showHideDiv('nine_dot_puzzle');" 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-75193488327030486032017-05-06T09:30:00.001-04:002017-05-06T10:20:52.662-04:00Apples and Oranges<br />You work in a factory boxing fruit. In front of you are three boxes labeled "apples," "oranges," and "apples & oranges." One box contains only apples, one contains only oranges, and one contains a mixture of both apples and oranges. Unfortunately, the label machine has gone haywire and has mislabeled all three boxes. Can you look at one piece of fruit from only one of the boxes and correctly label all three? Click below for the solution.<br /><br /><div id="apples_and_oranges" style="background-color: honeydew; display: none; padding: 5px;">The key to this puzzle is that the type of fruit you pull from the box is not the only piece of information you have to work with. You also have the three labels that you know are incorrect. Pull a piece of fruit from the box labeled "apples & oranges." If it is an apple, then you know that this is the apples-only box. That means that the box (incorrectly) labeled "oranges" must be the box with both apples and oranges, and the box labeled "apples" must contain only oranges.<br /><br />(It's interesting to note that if you pick from either the box labeled "apples" or the box labeled "oranges," you can't figure out the composition of the box. Only selecting from the box labeled "apples & oranges" leads to a solution.)<br /></div><br /><button onclick="showHideDiv('apples_and_oranges');" 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-57723409054526057732017-04-29T09:18:00.000-04:002017-04-29T09:18:50.713-04:00Common Thread<br />What do the following words have in common?<br /><ul><li>dust</li><li>seed</li><li>left</li><li>resign</li><li>weather</li><li>sanction</li></ul>Click below to see the answer.<br /><br /><div id="common_thread" style="background-color: honeydew; display: none; padding: 5px;">Each word has at least two meanings, and in each case one of those meanings is the opposite of the other.<br /><br /><ul><li><b>dust</b> - as a verb can mean either to add or remove something.</li><li><b>seed</b> - also means either to add or remove something. If you seed the lawn you add seeds, but if you seed a tomato you remove them.</li><li><b>left</b> - can mean either remaining or departed.</li><li><b>resign</b> - can mean "to quit" but can also mean "to sign up again."</li><li><b>weather</b> - can mean "to withstand or make through" (weather the storm) or can mean "to be worn away."</li><li><b>sanction</b> - can mean 'give official permission or approval for (an action)' or conversely, 'impose a penalty on.'</li></ul><br />For these and more, see the Mental Floss article <a href="http://mentalfloss.com/article/57032/25-words-are-their-own-opposites">25 Words That Are Their Own Opposites</a>.<br /></div><br /><button onclick="showHideDiv('common_thread');" 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-7528436609578894322017-04-22T09:10:00.000-04:002017-04-22T09:10:59.153-04:00Marking a Ruler<br />A 13-inch ruler only needs four markings on it so that it can be used to measure any whole number of inches from 1 to 13. At what positions should the four markings be? (Do not include the two ends, which are understood to be markings 0 and 13.) Click below to see the answer.<br /><br /><div id="marking_a_ruler" style="background-color: honeydew; display: none; padding: 5px;">The markings should be at the 1, 2, 6, and 10-inch positions. Use the following markings to measure each whole-number length:<br /><br />1 inch: 0 to 1<br />2 inches: 0 to 2<br />3 inches: 10 to 13<br />4 inches: 2 to 6<br />5 inches: 1 to 6<br />6 inches: 0 to 6<br />7 inches: 6 to 13<br />8 inches: 2 to 10<br />9 inches: 1 to 10<br />10 inches: 0 to 10<br />11 inches: 2 to 13<br />12 inches: 1 to 13<br />13 inches: 0 to 13<br /></div><br /><button onclick="showHideDiv('marking_a_ruler');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-3867177479732504212017-04-15T08:49:00.000-04:002017-04-15T08:49:07.145-04:00Move One Digit<br />The following equation is incorrect. Can you make the equation balanced by moving only a single digit?<br /><br />101 - 102 = 1<br /><br />Click below to see the answer.<br /><br /><div id="move_one_digit" style="background-color: honeydew; display: none; padding: 5px;">The digit that needs to be moved is the 2. Just move it up into the exponent and the equation is correct.<br /><br />101 - 10<sup>2</sup> = 1<br /></div><br /><button onclick="showHideDiv('move_one_digit');" 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-77428370398601623872017-04-08T10:28:00.001-04:002017-04-08T10:28:21.606-04:00What is the next number in the sequence?<br />Without Googling it, can you tell me the next number in the following sequence?<br /><br />1<br />11<br />21<br />1211<br />111221<br />312211<br />13112221<br />1113213211<br /><br />That should be enough to see the pattern, but this sequence goes on infinitely. Click below to see the answer.<br /><br /><div id="next_number" style="background-color: honeydew; display: none; padding: 5px;">This sequence is known as the "Look and Say" or "Say What You see" sequence. Each term is formed by describing the previous term. The first term is just the digit 1. To describe it you would say "one one," so the next term is 11. To describe that you'd say "two one," and so on. The next term after the ones shown is 31131211131221. Check the Online Encyclopedia of Integer Sequences (<a href="https://oeis.org/A005150">A005150</a>) for more terms following that.<br /></div><br /><button onclick="showHideDiv('next_number');" 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-35903532556278157052017-04-01T09:46:00.000-04:002017-04-01T09:57:19.478-04:00Beer Run<br />A man runs <i><b>n</b></i> laps around a circular track with a radius of <i><b>t</b></i> miles. He says he will drink <i><b>s</b></i> quarts of beer for every mile he runs. How many quarts will he drink? Click below for the answer.<br /><br /><div id="beer_run" style="background-color: honeydew; display: none; padding: 5px;">He will only need one quart, no matter how far he runs. If the radius of the track is <i><b>t</b></i> miles, then the circumference is 2*pi*t miles. The man will run <i><b>n</b></i> laps, so the total distance is 2*pi*n*t miles. If he drinks <i><b>s</b></i> quarts per mile, then the total amount of beer is 2*pi*n*t*s, which equals one quart!<br /></div><br /><button onclick="showHideDiv('beer_run');" 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-82323587919945782682017-03-25T09:07:00.000-04:002017-03-25T09:07:31.034-04:0010-digit Number<br />Find a 10-digit number where the first digit is how many 0's there are in the number, the second digit is how many 1's in the number, the third digit is how many 2's, and so on, until the tenth digit which is how many 9's there are in the number.<br /><br />Click below to see the answer.<br /><br /><div id="ten_digit_number" style="background-color: honeydew; display: none; padding: 5px;">As a programmer, I'm often tempted to try to use a brute force approach to find the answers to number puzzles. That often works, but when brute force involves looping through all 10-digit numbers, you should probably look for a more elegant approach.<br /><br />Let's see if we can construct the solution using logic instead. We can't have 0 zeroes, because then we would have to put 0 in the zeroes digit, and it would immediately be wrong. I'll start with a 9 in the zeros digit and the rest zeros, then make corrections until we hit on a solution.<br /><br />90000 00000<br /><br />Now we have a 9, so there should also be a 1 in the 9 column.<br /><br />90000 00001<br /><br />But now there aren't 9 zeroes, there are only 8. There's also a 1, which means we have to change the first and second digits.<br /><br />81000 00001<br /><br />Wait, now there isn't a 9, so we have to move that last 1 over. There are also two 1's, so we have to change the second digit.<br /><br />82000 00010<br /><br />That's closer, but now there is a 2, so we have to record it in the twos column. There are also fewer 0's, so we have to change the first digit as well.<br /><br />72100 00010<br /><br />Still not quite right. There are now only six 0's, so we have to change the first digit again. There's also no longer an 8. We can make both of these changes at once, giving us a final answer of<br /><br />62100 01000<br /></div><br /><button onclick="showHideDiv('ten_digit_number');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><br /><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com4tag:blogger.com,1999:blog-9182705499898252496.post-37362591543321226462017-03-18T10:15:00.000-04:002017-03-18T10:15:24.858-04:00The Extra Dollar<br />Here is an old math puzzle that you can find many versions of online.<br /><br />Two friends have a meal at a restaurant, and the bill is <span>$</span>25. The friends pay <span>$</span>15 each, which the waiter gives to the cashier. The cashier gives back <span>$</span>5 to the waiter. The friends tell the waiter to keeps <span>$</span>3 as a tip, so he hands back <span>$</span>1 to each of the two diners.<br /><br />So, the friends paid <span>$</span>14 each for the meal, for a total of <span>$</span>28. The waiter kept <span>$</span>3, and that makes <span>$</span>31. Where did the extra dollar come from? Give yourself a moment to think about it before clicking below for the solution.<br /><br /><div id="the_extra_dollar" style="background-color: honeydew; display: none; padding: 5px;"><span>$</span>25 is sitting with the cashier, <span>$</span>2 is back with the diners, and <span>$</span>3 is with the waiter. That adds to the required <span>$</span>30, so there really is no extra dollar.<br /><br />The mistake is expecting that what the diners paid and what the waiter kept to add up to what they initially gave. Adding <span>$</span>28 and <span>$</span>3 is just a bit of sleight-of-hand. It's the amount that the meal effectively cost them (including tip), plus the amount they received back, that should add to <span>$</span>30.<br /></div><br /><button onclick="showHideDiv('the_extra_dollar');" 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-43610020161374558132017-03-11T10:05:00.001-05:002017-03-11T10:07:50.859-05:00Arranging Eights<br />Can you arrange eight 8's so that when added they will equal 1000? Click below to see the answer.<br /><br /><div id="arranging_eights" style="background-color: honeydew; display: none; padding: 5px;">It's certainly possible to try all 22 different ways to <a href="https://en.wikipedia.org/wiki/Partition_(number_theory)">partition</a> eight identical digits, but there is a shortcut.<br /><br />All of the numbers that are created by arranging eight 8's will end in the digit 8, and the sum of the last digits of those numbers must be a multiple of 10 (because the target sum of 1000 ends in 0), so we know there must be exactly five groups of digits in the correct solution. That means we only have to check 3 different partitions of the eight digits.<br /><br />8888 + 8 + 8 + 8 + 8<br />888 + 88 + 8 + 8 + 8<br />88 + 88 + 88 + 8 + 8<br /><br />These are the only three ways to partition eight identical objects into five groups, and they are the only groupings whose sums end in the digit 0. You can check with quick mental arithmetic that the second grouping is the correct solution.<br /></div><br /><button onclick="showHideDiv('arranging_eights');" 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-17713050258688330032017-03-04T10:05:00.001-05:002017-03-04T23:18:37.136-05:00A Unique Number<br />What is unique about the number 8,549,176,320? Click below to see the answer (and a bonus question).<br /><br /><div id="unique_number" style="background-color: honeydew; display: none; padding: 5px;">There's nothing <i>numerically</i> particularly unique or interesting about the number above. It is made up of all of the digits from 0 to 9, but a lot of numbers have that property. The unique thing about this number is that all of the digits from 0 to 9 are in alphabetical order when spelled out in English.<br /><br /><b>Bonus question:</b> Can you think of a number whose letters when spelled out in English are all in alphabetical order? Example: The first three letters of the word "five" are in alphabetical order, but the "e" at the end spoils it.<br /></div><br /><button onclick="showHideDiv('unique_number');" 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-64886370994730038742017-02-25T09:36:00.000-05:002017-02-25T10:10:52.458-05:00Best Poker Hand<br />Which of the following poker hands is the best? Assume one standard 52-card deck is used. The game is five-card draw, so there are no community cards, with no wild cards.<br /><br /><ol><li><div class="separator" style="clear: both; text-align: center;"><img border="0" height="112" src="https://3.bp.blogspot.com/-3pgqt2xiH2M/WIpai2V4hbI/AAAAAAAADZ8/HupkTuKpbbA5UP9hNu26tsaykg8-TeLcgCLcB/s400/Hand1.png" width="400" /></div></li><li><div class="separator" style="clear: both; text-align: center;"><img border="0" height="112" src="https://3.bp.blogspot.com/-KYqaUO6tHO8/WIpa0VNYlSI/AAAAAAAADaA/cRtkxSaP7lUi0PAVKjCI02p6bfu_qQS9QCLcB/s400/Hand2.png" width="400" /></div></li><li><div class="separator" style="clear: both; text-align: center;"><img border="0" height="112" src="https://4.bp.blogspot.com/-hHSCKI5ghr4/WIpbPFeqiUI/AAAAAAAADaE/ad0eZ6syg_8hWRbx0XRaWX1PeaCUUHKIwCLcB/s400/Hand3.png" width="400" /></div></li><li><div class="separator" style="clear: both; text-align: center;"><img border="0" height="112" src="https://1.bp.blogspot.com/-6UuccHqWZac/WIpbTcSOhgI/AAAAAAAADaI/YfCd8RwfSwcWbzFYu5m1gpIA6vJJ4obggCLcB/s400/Hand4.png" width="400" /></div></li><li><div class="separator" style="clear: both; text-align: center;"><img border="0" height="112" src="https://4.bp.blogspot.com/-WaQz-c6jlf8/WIpbUXKhBqI/AAAAAAAADaM/tk1yZ00Jmvoy07UFccxA26aBpiuQsMxjwCLcB/s400/Hand5.png" width="400" /></div></li></ol><br />For reference, here are the rankings of poker hands.<br /><ul><li><b>Royal flush</b> - A, K, Q, J, 10, all the same suit.</li><li><b>Straight flush</b> - Five cards in a sequence, all the same suit.</li><li><b>Four of a kind</b> - Four cards all of the same rank.</li><li><b>Full house</b> - Three of a kind with a side pair.</li><li><b>Flush</b> - Any five cards, all the same suit</li><li><b>Straight</b> - Five cards in a sequence, any suits.</li><li><b>Three of a kind</b> - Three cards all of the same rank.</li><li><b>Two pair</b> - Two different pairs.</li><li><b>One pair</b> - Two cards of the same rank.</li><li><b>High card</b> - Highest card in your hand.</li></ul><br />Click below to see the answer.<br /><br /><div id="answer_best_poker_hand" style="background-color: honeydew; display: none; padding: 5px;">Hand #1 is the highest-ranking hand shown, but since all of these hands cannot occur on the same deal, it isn't the best hand to have in a real game.<br /><br />To determine which hand is <i>best</i>, you have to look at how many other hands can beat each hand when dealt from the same deck. All of the hands above can be beaten by the same number of four-of-a-kinds, but by different numbers of straight flushes. Having two sixes as your side pair breaks up more of these possible straight flushes than having two kings, so hand #4 is actually the best hand to have. (There are 32 possible straight flushes that beat the kings hand, but only 24 that beat the sixes.)<br /></div><br /><button onclick="showHideDiv('answer_best_poker_hand');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><style>li img { vertical-align: middle; display: inline-block; } </style><br /><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-84741374696150772912017-02-18T09:17:00.000-05:002017-02-18T09:17:59.219-05:00The Collapsing Bridge<br />The bridge will collapse in 17 minutes! Four people need to cross the bridge before it collapses. It is a dark night and they have only one flashlight among them.<br /><br />Only <b>two people</b> can cross at a time.<br /><ul><li>Alice takes one minute to cross.</li><li>Bob takes two minutes.</li><li>Carol takes five minutes</li><li>Dave takes 10 minutes to cross.</li></ul>How can they all get across before the bridge collapses? Click below to see the answer.<br /><br /><div id="answer_collapsing_bridge" style="background-color: honeydew; display: none; padding: 5px;">The trick to this puzzle is to get the slowest members of the group to cross only once together, while the fastest members cross back and forth multiple times.<br /><ol><li>Alice and Bob cross first using up 2 minutes.</li><li>Alice comes back making it 3.</li><li>Carol and Dave cross together making it 13 minutes.</li><li>Then Bob crosses back, making it 15 minutes.</li><li>Finally, Alice and Bob cross together to make it a total of 17 minutes.</li></ol></div><br /><button onclick="showHideDiv('answer_collapsing_bridge');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://1.bp.blogspot.com/-wpaoPgjdyBo/WIzMUf9TMDI/AAAAAAAADag/2hT4ThNb2sArEVW_mvjvQNPJ2a8Pq5slACLcB/s320/Kotmale_footbridge_-Sri_Lanka.jpg" width="240" height="320" /></div>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com2tag:blogger.com,1999:blog-9182705499898252496.post-74553235301364398262017-02-10T11:58:00.000-05:002017-02-10T14:03:44.717-05:00The Island of Knights and Knaves<br /><a href="https://en.wikipedia.org/wiki/Raymond_Smullyan">Raymond Smullyan</a>, one of the grand masters of logic puzzles, sadly passed away at the age of 97 earlier this week. In his honor, I present a classic puzzle adapted from his book <a href="https://www.amazon.com/What-Name-This-Book-Recreational/dp/0486481980/ref=sr_1_1">What Is the Name of This Book?</a><br /><br />There is a wide variety of puzzles about an island in which certain inhabitants called "knights" always tell the truth and others called "knaves" always lie. It is assumed that every inhabitant of the island is either a knight or a knave.<br /><br />In this problem, there are only two people, A and B, each of whom is either a knight or a knave. A makes the following statement: "At least one of us is a knave." What are A and B?<br /><br />Click below for the solution.<br /><br /><div id="island_of_knights_and_knaves" style="background-color: honeydew; display: none; padding: 5px;">The solutions to these puzzles are often found by making one or more assumptions, then reasoning out whether or not it can be true. In this case, assume A is a knave. Then the statement "At least one of us is a knave" would be false, since knaves always lie. Hence, both A and B would be knights, which is impossible because we started with the assumption that A is a knave. Therefore, A must be a knight, and the statement "At least one of us is a knave" must be true, and B is a knave.<br /></div><br /><button onclick="showHideDiv('island_of_knights_and_knaves');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br />Raymond Smullyan presented a couple more of his puzzles in a 1982 interview on the Tonight Show with Johnny Carson. When you see the white hair and long beard, it seems like even 35 years ago that Smullyan was an old man, but the twinkle in his eye and the playfulness in his voice reveal that he was always a child at heart. Watch the full interview below.<br /><br /><iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/E27v83WWiGo" width="480"></iframe><br /><br />If these puzzles seem too easy, they're just a small sample of Dr. Smullyan's brilliant work. If you really want a challenge, I encourage you to check out <a href="https://www.amazon.com/Raymond-M.-Smullyan/e/B000AQ1NF0">some of his books</a>, or <a href="https://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever">The Hardest Logic Puzzle Ever</a>, also credited to Smullyan.<br /><br />Finally, I leave you with a quote.<br /><br /><blockquote>Why should I be worried about dying?<br />It's not going to happen in my lifetime!<br /><br />-Raymond Smullyan (1919 - 2017)</blockquote><br /><br /><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-27190378701389690482017-02-04T11:39:00.000-05:002017-02-04T11:39:33.794-05:00Animal Kingdom<br />What do the following animals all have in common?<br /><ul><li>firefly</li><li>jackrabbit</li><li>koala bear</li><li>prairie dog</li><li>silkworm</li><li>guinea pig</li></ul><br />Click below to see the answer.<br /><br /><div id="answer_animal_kingdom" style="background-color: honeydew; display: none; padding: 5px;">All of the animals listed above are impostors.<br /><ul><li>The <a href="https://en.wikipedia.org/wiki/Firefly">firefly</a> is not a fly. It is a beetle.</li><li>The <a href="https://en.wikipedia.org/wiki/Hare">jackrabbit</a> is not a rabbit. It is a hare.</li><li>The <a href="https://en.wikipedia.org/wiki/Koala">koala</a> is not a bear. It is a marsupial.</li><li>The <a href="https://en.wikipedia.org/wiki/Prairie_dog">prairie dog</a> is not a dog. It is a rodent.</li><li>The <a href="https://en.wikipedia.org/wiki/Bombyx_mori">silkworm</a> is not a worm. It is a caterpillar.</li><li>The <a href="https://en.wikipedia.org/wiki/Guinea_pig">guinea pig</a> is not a pig. It is a rodent. (And it's not even from <a href="https://en.wikipedia.org/wiki/Guinea">Guinea</a>, a country on the west coast of Africa. Guinea pigs originated in the Andes mountains in South America.)</li></ul></div><br /><button onclick="showHideDiv('answer_animal_kingdom');" 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-4447028016348500182017-01-28T09:58:00.002-05:002017-01-28T09:58:28.767-05:00Name this Book<br />When this book first came out, it was only read by a handful of rather wealthy people. Now almost everyone has a copy, and many people read it regularly. You cannot buy it from a bookstore or borrow it from the library. Can you name this book? Click below for the answer.<br /><br /><div id="answer_name_the_book" style="background-color: honeydew; display: none; padding: 5px;">It's a phone book.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://1.bp.blogspot.com/-aEZzHzvrJXk/WIIawBWB6oI/AAAAAAAADZo/rJw70xTVJH4mzzN_g18wYKEU2ygCeXszwCLcB/s1600/yellow-pages.jpg" /></div><br />This is a good example of an old riddle that has not aged well, so don't feel bad if you found it a bit tricky. Newer technology has rendered phone books practically useless, yet I still get one delivered to my house every year. In another generation or so, many people might not know what they were used for.<br /></div><br /><button onclick="showHideDiv('answer_name_the_book');" 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-4148921617928907122017-01-21T11:30:00.001-05:002017-01-26T15:47:11.480-05:00The Brodie Helmet<br />At the outbreak of World War I, none of the combatant nations provided steel helmets to their troops. Soldiers of most nations went into battle wearing cloth or leather hats that offered little protection from modern weapons. As a result, many soldiers suffered head injuries from exploding shrapnel.<br /><br />In April of 1916, British soldiers began using a metal helmet in battle called the <a href="https://en.wikipedia.org/wiki/Brodie_helmet">Brodie helmet</a>, but authorities discovered that the proportion of head injuries then <i>increased</i>. Why should the incidence of head injuries increase when soldiers wore metal helmets rather than cloth caps? Click below to see the answer.<br /><br /><div id="answer_brodie_helmet" style="background-color: honeydew; display: none; padding: 5px;">The number of recorded head injuries did increase after the introduction of the Brodie helmet, but the number of deaths <i>decreased</i>. Prior to the introduction of metal helmets, if a soldier were hit in the head with a piece of shrapnel, it would have likely killed him. This would have been recorded as a death, not a head injury. More head injuries were recorded after the helmets were introduced due to the simple fact that more soldiers were surviving them.<br /></div><br /><button onclick="showHideDiv('answer_brodie_helmet');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://2.bp.blogspot.com/-BxzszU3YEmM/WHpHA1X5N1I/AAAAAAAADZY/gFToP01X4UkQBAgL-V6pWmdq1RBE064-wCLcB/s320/Brodie.jpg" width="320" height="228" /></div>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com1tag:blogger.com,1999:blog-9182705499898252496.post-2425302113900861482017-01-14T10:50:00.000-05:002017-01-20T09:27:23.527-05:00Panama Canal<br />A ship sailed through the Panama Canal going from west to east. When it exited the canal, it entered the Pacific Ocean. (The ship did not double back.) How can this be so? Click below to see the answer.<br /><br /><div id="answer2" style="background-color: honeydew; display: none; padding: 5px;">Normally when we think about the American continents, we think of the Pacific Ocean being to the west and the Atlantic Ocean to the east, but that isn't strictly the case. Panama is an isthmus that curves, and the Panama Canal was constructed so that it runs from the Caribbean Sea on the northwest end to the Pacific Ocean on the southeast. In the age of instant access to world maps, this "puzzle" is probably a lot easier to verify now than when the canal was originally built.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://en.wikipedia.org/wiki/Panama_Canal#/media/File:Pm-map.png"><img alt=" Panama Canal" border="0" height="286" src="https://4.bp.blogspot.com/-zvqRwo4CWbA/WHet04FxDgI/AAAAAAAADZA/R3vo4gbxShgqLEHDvgz0a1Y-EfyPkR3ZwCLcB/s640/Panama-Canal-map.png" width="540" /></a></div></div><br /><button onclick="showHideDiv('answer2');" 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-83198296450737465312017-01-07T12:06:00.000-05:002017-01-20T09:25:48.042-05:00Rope Around the Earth<br />Suppose you tie a rope tightly around the Earth at the equator. (Assume the Earth is perfectly spherical, and that the surface is smooth so that the rope lies tight against the surface at all points.) Now suppose that you add an additional 6 feet to the length of the rope. How high off the surface would the rope lie? You could look up the Earth's circumference and do the math to come up with an exact answer, but can you quickly come up with an intuitive guess? (High enough to slide a piece of paper under? To wave your hand under? To walk under?) Click below to see a hint or the answer.<br /><br /><div id="hint1" style="background-color: #ffffcc; display: none; padding: 5px;"><b>Hint:</b> If I reversed the parameters and told you that I increased the length enough to raise the rope 6 feet from the surface in all directions, could you tell me how much was added to the length of the rope? (Given the formula for the circumference of a circle, C = 2πr, but not knowing the circumference of the Earth, can you come up with a guess?) Reversing that, can you come up with the answer to the original problem?<br /></div><br /><button onclick="showHideDiv('hint1');" title="Click to Show/Hide Hint">Show/Hide Hint</button><br /><br /><div id="answer1" style="background-color: honeydew; display: none; padding: 5px;"><b>Answer:</b> The first time they hear this puzzle, many people will try to do the math starting with the circumference of the Earth. That doesn't matter though. It's a property of any circle that if you increase the circumference by a fixed amount, the radius will change by that amount divided by 2π (because r = C/2π). The rope could be tied around a beach ball or a tennis ball and the answer would not change. So the exact answer to the problem is 0.95493 feet, but if you said "about 1 foot" you were right.<br /></div><br /><button onclick="showHideDiv('answer1');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br /><br /><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com5