## 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.

Labels:
brain teasers,
puzzles

## 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.

The digit that needs to be moved is the 2. Just move it up into the exponent and the equation is correct.

101 - 10

101 - 10

^{2}= 1## 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.

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 (A005150) for more terms following that.

## Saturday, April 1, 2017

### Beer Run

A man runs

*laps around a circular track with a radius of*

**n***miles. He says he will drink*

**t***quarts of beer for every mile he runs. How many quarts will he drink? Click below for the answer.*

**s**He will only need one quart, no matter how far he runs. If the radius of the track is

*miles, then the circumference is 2*pi*t miles. The man will run***t***laps, so the total distance is 2*pi*n*t miles. If he drinks***n***quarts per mile, then the total amount of beer is 2*pi*n*t*s, which equals one quart!***s**## 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.

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.

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.

90000 00000

Now we have a 9, so there should also be a 1 in the 9 column.

90000 00001

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.

81000 00001

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.

82000 00010

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.

72100 00010

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

62100 01000

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.

90000 00000

Now we have a 9, so there should also be a 1 in the 9 column.

90000 00001

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.

81000 00001

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.

82000 00010

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.

72100 00010

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

62100 01000

## 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.

$25 is sitting with the cashier, $2 is back with the diners, and $3 is with the waiter. That adds to the required $30, so there really is no extra dollar.

The mistake is expecting that what the diners paid and what the waiter kept to add up to what they initially gave. Adding $28 and $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 $30.

The mistake is expecting that what the diners paid and what the waiter kept to add up to what they initially gave. Adding $28 and $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 $30.

Labels:
logic puzzles,
numbers

## 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.

It's certainly possible to try all 22 different ways to partition eight identical digits, but there is a shortcut.

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.

8888 + 8 + 8 + 8 + 8

888 + 88 + 8 + 8 + 8

88 + 88 + 88 + 8 + 8

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.

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.

8888 + 8 + 8 + 8 + 8

888 + 88 + 8 + 8 + 8

88 + 88 + 88 + 8 + 8

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.

Subscribe to:
Posts (Atom)