Saturday, April 22, 2017

Marking a Ruler


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.



Saturday, April 15, 2017

Move One Digit


The following equation is incorrect. Can you make the equation balanced by moving only a single digit?

101 - 102 = 1

Click below to see the answer.



Saturday, April 8, 2017

What is the next number in the sequence?


Without Googling it, can you tell me the next number in the following sequence?

1
11
21
1211
111221
312211
13112221
1113213211

That should be enough to see the pattern, but this sequence goes on infinitely. Click below to see the answer.


Saturday, April 1, 2017

Beer Run


A man runs n laps around a circular track with a radius of t miles. He says he will drink s quarts of beer for every mile he runs. How many quarts will he drink? Click below for the answer.


Saturday, March 25, 2017

10-digit Number


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.

Click below to see the answer.






Saturday, March 18, 2017

The Extra Dollar


Here is an old math puzzle that you can find many versions of online.

Two friends have a meal at a restaurant, and the bill is $25. The friends pay $15 each, which the waiter gives to the cashier. The cashier gives back $5 to the waiter. The friends tell the waiter to keeps $3 as a tip, so he hands back $1 to each of the two diners.

So, the friends paid $14 each for the meal, for a total of $28. The waiter kept $3, and that makes $31. Where did the extra dollar come from? Give yourself a moment to think about it before clicking below for the solution.


Saturday, March 11, 2017

Arranging Eights


Can you arrange eight 8's so that when added they will equal 1000? Click below to see the answer.


Saturday, March 4, 2017

A Unique Number


What is unique about the number 8,549,176,320? Click below to see the answer (and a bonus question).


Saturday, February 25, 2017

Best Poker Hand


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.


For reference, here are the rankings of poker hands.
  • Royal flush - A, K, Q, J, 10, all the same suit.
  • Straight flush - Five cards in a sequence, all the same suit.
  • Four of a kind - Four cards all of the same rank.
  • Full house - Three of a kind with a side pair.
  • Flush - Any five cards, all the same suit
  • Straight - Five cards in a sequence, any suits.
  • Three of a kind - Three cards all of the same rank.
  • Two pair - Two different pairs.
  • One pair - Two cards of the same rank.
  • High card - Highest card in your hand.

Click below to see the answer.






Saturday, February 18, 2017

The Collapsing Bridge


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.

Only two people can cross at a time.
  • Alice takes one minute to cross.
  • Bob takes two minutes.
  • Carol takes five minutes
  • Dave takes 10 minutes to cross.
How can they all get across before the bridge collapses? Click below to see the answer.




Friday, February 10, 2017

The Island of Knights and Knaves


Raymond Smullyan, 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 What Is the Name of This Book?

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.

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?

Click below for the solution.




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.



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 some of his books, or The Hardest Logic Puzzle Ever, also credited to Smullyan.

Finally, I leave you with a quote.

Why should I be worried about dying?
It's not going to happen in my lifetime!

-Raymond Smullyan (1919 - 2017)



Saturday, February 4, 2017

Animal Kingdom


What do the following animals all have in common?
  • firefly
  • jackrabbit
  • koala bear
  • prairie dog
  • silkworm
  • guinea pig

Click below to see the answer.



Saturday, January 28, 2017

Name this Book


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.


Saturday, January 21, 2017

The Brodie Helmet


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.

In April of 1916, British soldiers began using a metal helmet in battle called the Brodie helmet, but authorities discovered that the proportion of head injuries then increased. Why should the incidence of head injuries increase when soldiers wore metal helmets rather than cloth caps? Click below to see the answer.




Saturday, January 14, 2017

Panama Canal


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.



Saturday, January 7, 2017

Rope Around the Earth


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.









Sunday, January 1, 2017

Voyageurs

I've been reading The Revenant by Michael Punke and came across the following few passages. The main character, Hugh Glass, is embarking on a canoe trip up the Missouri River with a group of French Canadian fur traders known as voyageurs.
...For the rest of their voyage, Glass manned not a paddle but an enormous sponge, constantly bailing water as it pooled on the bottom of the canoe.
It was a full-time job, since the bâtard leaked steadily. The canoe reminded Glass of a floating quilt. Its patchwork skin of birch bark was sewn together with wattope, the fine root of a pine tree. The seams were sealed with pine tar, reapplied constantly as leaks appeared. As birch had become more difficult to find, the voyageurs were forced to use other materials in their patching and plugging. Rawhide had been employed in several spots, stitched on and then slathered in gum. Glass was amazed at the fragility of the craft. A stiff kick would easily puncture the skin, and one of La Vierge's main tasks as steersman was the avoidance of lethal, floating debris. At least they benefited from the relatively docile flow of the fall season. The spring floods could send entire trees crashing downstream.
If you've ever maintained a large code base, you probably already see where I'm going with this. The constant patching and plugging of leaks, the fragility of the craft, one man constantly bailing out water while several others row the boat guided by a steersman. These elements all remind me of several large software projects I've been on.  The passage continues.
There was an upside to the bâtard's shortcomings. If the vessel was frail, it was also light, an important consideration as they labored against the current. Glass came quickly to understand the odd affection of voyageurs for their craft. It was a marriage of sorts, a partnership between the men who propelled the boat and the boat that propelled the men. Each relied upon the other. The voyageurs spent half their time complaining bitterly about the manifold ails of the craft, and half their time nursing them tenderly.
This reminds me not only of the relationship programmers have with our code, but also of the relationship we have with our tools. How much time do we spend complaining about an IDE or a framework? How much time configuring them? But after we've gotten comfortable using them, most of us will strongly resist switching to a new one. Finally...
They took great pride in the appearance of the bâtard, dressing it in jaunty plumes and bright paint. On the high prow they had painted a stag's head, its antlers tilted challengingly toward the flowing water. (On the stern, La Vierge had painted the animal's ass.)
This final bit surprises me the most, but in a way I suppose it shouldn't. I don't know much about boating, but I do know that you should fix the leaks in your boat before you bother to decorate it. But that isn't how we always approach software development, is it? I've seen people spend plenty of time refactoring and cleaning code that didn't really need to change, or adding test cases just to get a higher percentage in test coverage. At times I've been guilty of this myself. I guess it's worth it to ask yourself, before you make a change to your code, am I fixing a leak, or am I just painting a stag's ass on this canoe?



Quetico Superior Route, Passing a Waterfall by Frances Anne Hopkins