tag:blogger.com,1999:blog-91827054998982524962017-08-17T10:10:35.357-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.comBlogger204125tag:blogger.com,1999:blog-9182705499898252496.post-78970575768431500102017-08-12T09:02:00.002-04:002017-08-12T09:02:33.275-04:00Minimum Percentage<br />75% of men from a certain group are tall, 75% have brown hair, and 75% have brown eyes. What is the minimum percentage that are tall, have brown hair, <i>and</i> have brown eyes? Click below to see the answer.<br /><br /><div id="minimum_percentage" style="background-color: honeydew; display: none; padding: 5px;">Instead of thinking in percentages to solve this problem, it's helpful to think back to the <a href="http://www.billthelizard.com/2017/06/the-pigeonhole-principle.html">Pigeonhole Principle</a>. Think of a group of 100 men, then 75 are tall, 75 have brown hair, and 75 have brown eyes. That's 225 individual attributes to assign to 100 men, so at least 25 of them (or <b>25%</b>) must have each of the three attributes.<br /></div><br /><button onclick="showHideDiv('minimum_percentage');" 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-32450245227305312802017-08-05T08:33:00.000-04:002017-08-05T08:33:01.099-04:00A Two-Digit Number<br />Find a two-digit number that's equal to two times the result of multiplying its digits. Click below to see the answer.<br /><br /><div id="two_digit_number" style="background-color: honeydew; display: none; padding: 5px;">My first attempt at solving this puzzle was to set it up as an equation and try to solve it algebraically. Let's say the two digits are $x$ and $y$. Then the equation would be:<br /><br />$10x + y = 2xy$<br /><br />The left-hand side is the two-digit number ($x$ in the tens place, $y$ in the ones place) and the right-hand side is two times the result of multiplying its digits. If you try to isolate either $x$ or $y$, you'll see that it's not very easy to come up with a clean solution. That's because the equation above describes a hyperbola.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://2.bp.blogspot.com/-ZmCgq6t5V0E/WX3hk42LFMI/AAAAAAAADi8/v_EYiDg41ogMywLfBhtVbtrrCqFLl9FxgCLcBGAs/s1600/hyperbola.gif" data-original-width="200" data-original-height="213" /></div><br />That's not exactly a dead end, but it isn't the kind of easy-to-understand (once you see it) solution I like in a logic puzzle. Luckily, there's an easier way. There aren't that many possibilities (we're only dealing with two digits), and we can eliminate a lot of them.<br /><br />For example, we know that neither digit is 0. Also, we know that $2xy$ is an even number, so $y$ must be even (because the result of adding it to an even number is even). We also know that the product of the digits must be less than 50, otherwise $2xy$ would have three digits. That gets us down to only 32 possibilities to test.<br /><br /><div class="separator" style="clear: both; text-align: center;"><img border="0" src="https://4.bp.blogspot.com/-N5YnHP9cx9o/WX3nb6U8oSI/AAAAAAAADjM/ESN3uWAJ46kND-kjxI4aGhaRp722WRauACLcBGAs/s1600/possibilities.png" data-original-width="321" data-original-height="201" /></div><br />Any other shortcuts that I can think of would only eliminate a few possibilities, but it's easy to just test the remaining ones (I went through them manually, but you could write a short script or use a spreadsheet), and find that the solution is<br /><br />$36 = 2 * 3 * 6$<br /></div><br /><button onclick="showHideDiv('two_digit_number');" title="Click to Show/Hide Answer">Show/Hide Answer</button><br /><br />Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com2tag:blogger.com,1999:blog-9182705499898252496.post-89933902456152111202017-07-29T09:03:00.003-04:002017-07-29T09:03:31.780-04:00Identical Twins<br />Alice and Eve are identical twin sisters. One always lies and the other always tells the truth, but we don't know which is which. We ask one of them "Is Alice the one that always lies?" and she replies "Yes." Did we speak to Alice or Eve? Click below to see the answer.<br /><br /><div id="identical_twins" style="background-color: honeydew; display: none; padding: 5px;">We spoke to Eve. A person who always lies or always tells the truth cannot admit that they are a liar, so Alice could not have answered "Yes" to that question. (Note that we still don't know which sister is the liar and which is the truth teller.)<br /></div><br /><button onclick="showHideDiv('identical_twins');" 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-23704839958327485652017-07-22T08:35:00.002-04:002017-07-22T08:35:20.939-04:00Counting Socks<br />All my socks are red except two. All my socks are white except two. All my socks are blue except two. How many socks do I have? Click below for the answer.<br /><br /><div id="counting_socks" style="background-color: honeydew; display: none; padding: 5px;">Oddly, I only have three socks. Don't let the fact that socks normally come in matching pairs distract you. No other number satisfies all three conditions above.<br /></div><br /><button onclick="showHideDiv('counting_socks');" 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-20033286181022604682017-07-15T08:51:00.000-04:002017-07-15T08:51:18.819-04:00Circumnavigation<br />From 1519 until 1522, Ferdinand Magellan's <i>Victoria </i> was the first ship to successfully circumnavigate the globe. (Magellan himself did not survive the entire voyage.) Can you tell me which part of the ship traveled the greatest distance? Click below for the answer.<br /><br /><div id="circumnavigation" style="background-color: honeydew; display: none; padding: 5px;">If you remembered the <a href="http://www.billthelizard.com/2017/01/rope-around-earth.html">Rope Around the Earth</a> puzzle I posted a few months ago, you probably got this one pretty quickly. Since the world is roughly spherical, the tip of the tallest mast of the ship would have traveled the greatest distance in sailing around the globe. Imagine if a boat sailed in a perfect circle around the equator. The part of the boat deepest under water (the keel) would create a smaller circle than the tip of the mast several feet above the water, so the tip of the mast travels the greatest distance during the voyage.<br /></div><br /><button onclick="showHideDiv('circumnavigation');" 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/-bBbSml44s2Q/WV-rP4V7fOI/AAAAAAAADic/uA9WE3etDxg0roaJzLCu5_HtEDJVa5rUgCLcBGAs/s320/Nao_Victoria.jpg" width="320" height="240" data-original-width="1280" data-original-height="960" /></div><div style="clear: both; text-align: center; font-size: 80%;">Replica of the Victoria, Photograph by <a href="https://commons.wikimedia.org/w/index.php?curid=371163">Gnsin - Own work, CC BY-SA 3.0</a></div>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag:blogger.com,1999:blog-9182705499898252496.post-85100362687461626332017-07-08T09:59:00.001-04:002017-07-08T09:59:04.355-04:0050 factorial<br />50! = 30414093201713378043612608166064768844377641568960512071337804000<br /><br />Without doing the full computation, can you tell whether the above statement is true or false? Click below for the answer.<br /><br /><div id="fifty_factorial" style="background-color: honeydew; display: none; padding: 5px;">You can probably guess that the statement is false, otherwise it wouldn't be much of a puzzle. The reasoning, though, is that the factorial for 50 must include the factors 10, 20, 30, 40, and 50, so it must end in at least five zeroes. The value above ends in only three zeroes, so it cannot be correct. (The correct value is 30414093201713378043612608166064768844377641568960512000000000000.)<br /></div><br /><button onclick="showHideDiv('fifty_factorial');" 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-60670354582130822962017-07-01T08:09:00.002-04:002017-07-01T08:09:14.877-04:00The Missing Fish<br />Two fathers took their sons fishing. Each man and his son caught one fish, but when they all returned to camp they only had three fish. None of the fish were eaten, lost, or thrown back. How could this be? Click below to see the answer.<br /><br /><div id="missing_fish" style="background-color: honeydew; display: none; padding: 5px;">There were only three people on the fishing trip. One man was the father and grandfather of the other two.<br /></div><br /><button onclick="showHideDiv('missing_fish');" 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/-z897STj_WRQ/WUqNWeRKvdI/AAAAAAAADiA/ov3_yb28tTk6RpHrtCnCZUu9uHqnTRxYgCLcBGAs/s1600/Fish.JPG" data-original-width="480" data-original-height="283" /></div>Bill the Lizardhttp://www.blogger.com/profile/09810099093752485841noreply@blogger.com0tag: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.com1