Archive for the ‘Puzzles’ Category.

Frog Puzzle

FroggerThis puzzle was brought to me by Leonid Grinberg.

A frog needs to jump across the street. The time is discrete, and at each successive moment the frog considers whether to jump or not. Unfortunately, the frog has crappy eyesight. He knows there are dangerous cars out there, but he can’t see them. If a car appears at the same moment that he decides to jump, he will die.

The adversary sends cars, hoping to kill the frog. The adversary knows the frog’s algorithm, but can use only a finite number of cars. The frog wants to maximize his chances of survival with his algorithm. The frog is allowed to use a random number generator that the adversary can’t predict. Can you suggest an algorithm for the frog to cross the street and survive with a probability of at least 1 − ε?

Share:Facebooktwitterredditpinterestlinkedinmail

Physics Puzzle, by Levy Ulanovsky

My guest blogger is Levy Ulanovsky, a maven of physics puzzles. Here is one of his favorite puzzles:

There are n points in 3-dimensional space. Every point is connected to every other point by a wire of resistance R. What is the resistance between any two of these points?

Share:Facebooktwitterredditpinterestlinkedinmail

Unrevealing Coin Weighings

In 2007 Alexander Shapovalov suggested a very interesting coin problem. Here is the kindergarten version:

You present 100 identical coins to a judge, who knows that among them are either one or two fake coins. All the real coins weigh the same and all the fake coins weigh the same, but the fake coins are lighter than the real ones.

You yourself know that there are exactly two fake coins and you know which ones they are. Can you use a balance scale to convince the judge that there are exactly two fake coins without revealing any information about any particular coin?

To solve this problem, divide the coins into two piles of 50 so that each pile contains exactly one fake coin. Put the piles in the different cups of the scale. The scale will balance, which means that you can’t have the total of exactly one fake coin. Moreover, this proves that each group contains exactly one fake coin. But for any particular coin, the judge won’t have a clue whether it is real or fake.

The puzzle is solved, and though you do not reveal any information about a particular coin, you still give out some information. I would like to introduce the notion of a revealing coefficient. The revealing coefficient is a portion of information you reveal, in addition to proving that there are exactly two fake coins. Before you weighed them all, any two coins out of 100 could have been the two fakes, so the number of equally probable possibilities was 100 choose 2, which is 5050 4950. After you’ve weighed them, it became clear that there was one fake in each pile, so the number of possibilities was reduced to 2500. The revealing coefficient shows the portion by which your possibilities have been reduced. In our case, it is (5050 − 2500)/5050 (4950-2500)/4950, slightly more less than one half.

Now that I’ve explained the kindergarten version, it’s time for you to try the elementary version. This problem is the same as above, except that this time you have 99 coins, instead of 100.

Hopefully you’ve finished that warm-up problem and we can move on to the original Shapovalov’s problem, which was designed for high schoolers.

A judge is presented with 100 coins that look the same, knowing that there are two or three fake coins among them. All the real coins weigh the same and all the fake coins weigh the same, but the fake coins are lighter than the real ones.

You yourself know that there are exactly three fake coins and you know which ones they are. Can you use a balance scale to convince the judge that there are exactly three fake coins, without revealing any information about any particular coin?

If you are lazy and do not want to solve this problem, but not too lazy to learn Russian, you can find several solutions to this problem in Russian in an essay by Konstantin Knop.

Your challenge is to solve the original Shapovalov puzzle, and for each solution to calculate the revealing coefficient. The best solution will be the one with the smallest revealing coefficient.

Share:Facebooktwitterredditpinterestlinkedinmail

Divisibility by 7 is a Walk on a Graph, by David Wilson

My guest blogger is David Wilson, a fellow fan of sequences. It is a nice exercise to understand how this graph works. When you do, you will discover that you can use this graph to calculate the remainders of numbers modulo 7. Back to David Wilson:

Divisibility by 7I have attached a picture of a graph.

Write down a number n. Start at the small white node at the bottom of the graph. For each digit d in n, follow d black arrows in a succession, and as you move from one digit to the next, follow 1 white arrow.

For example, if n = 325, follow 3 black arrows, then 1 white arrow, then 2 black arrows, then 1 white arrow, and finally 5 black arrows.

If you end up back at the white node, n is divisible by 7.

Nothing earth-shattering, but I was pleased that the graph was planar.

Share:Facebooktwitterredditpinterestlinkedinmail

Countable Wise Men with Hats

Warning: this essay contains solutions to math problems.

Here is a famous hat puzzle:

A king decides to give 100 of his wise men a test. If together they pass, they can go free. Otherwise, the king will execute all of them. The test goes as follows: the wise men stand in a line one after another, all facing in the same direction. The king puts either a black or a white hat on each wise man. The wise men can only see the colors of the hats in front of them. In any order they want, each one guesses the color of the hat on his own head. Other than that, the wise men cannot speak. To pass, no more than one of them may guess incorrectly. Given that they have time to agree on a strategy beforehand, how can they assure that they will survive?

Instead of discussing the puzzle above, I’d like to look at a different version. It is an infinite variation of the puzzle that my son Sergei brought back from the Canada/USA Mathcamp last year.

The king has a countable number of wise men. The line starts from the left and is infinite in the right direction. The wise men are all facing to the right and they see the infinite tail of the line. Again, the king places either a black or white hat on each head and they can only say one of two words: black or white. Will they be able to devise a strategy beforehand that ensures that not more than one person makes a mistake?

Oh, I forgot to mention: you are allowed to use the axiom of choice.

Here is the solution. You can build an equivalence relation on the possible placements of hats. To be equivalent, two ways of placing the hats should have the same tail. In other words, there is a person such that both hat arrangements to his right are the same. By the axiom of choice you can pick a representative in any equivalence class. The first wise man looks at all the other hats and calculates in how many places the tail differs from the representative of the class they picked. This is a finite number, and by stating one color or the other, he signals the parity of that number. After that, all the wise men say their colors from left to right. Everyone sees the tail and everyone hears the color choices of the people behind. So every wise man can reconstruct the color of his hat with this information. Only the first person may potentially be mistaken.

Many things about this solution bother me. Where is this country that can fit an infinite number of people? What kind of humans can see into infinity? How much time will this procedure take?

Aside from the practical matters, there are mathematical matters that bother me, too. By the axiom of choice you can pick an element in every class. The problem is that all of the wise men have to pick the same element. The axiom of choice claims the existence of a choice function, which picks an element in each set. So the function exists, but can we distribute this function to many wise men? Remember, they need to agree on this function the night before.

We already implicitly assumed that our wise men have a lot of magical abilities. So we can add to those the ability to go through all the possible tails and memorize the representatives for all the tails in one evening.

But still, I am very curious to know what follows from the axiom of choice. Tell me what you think: does the axiom of choice imply that we can distribute the choice function, or do we need a new axiom? In your opinion, will these wise men live?

Share:Facebooktwitterredditpinterestlinkedinmail

Coins Sequence

Let me remind you of a very interesting problem from my posting Oleg Kryzhanovsky’s Problems.

You have 6 coins weighing 1, 2, 3, 4, 5 and 6 grams that look the same, except for their labels. The number (1, 2, 3, 4, 5, 6) on the top of each coin should correspond to its weight. How can you determine whether all the numbers are correct, using the balance scale only twice?

I do not want you to find the weight of each coin; I just want you to say yes if the labels are correct, or no if they are not.

I have given this problem to a lot of people, and not one of them solved it. Some of my students mistakenly thought that they succeeded. For example, they would start by putting the coins labeled 1 and 2 on the left cup of the scale and 3 on the right cup. If these coins balanced, the students assumed that the coins on the left weighed 1 and 2 grams and that the coin on the right weighed 3 grams. But they’d get the same result if they had 1 and 4 on the left, for example, and 5 on the right. I am surprised that no one has solved it yet, as I thought that this problem could be offered to middle-schoolers, since it does not actually require advanced mathematical skills.

If you want to try to solve this problem, pause here, as later in this essay I will be providing a number of hints on how to do it. The problem is fun to solve, so continue reading only if you are sure you’re ready to miss out on the pleasure of solving it.

I propose the following sequence a(n). Suppose we have a set of n coins of different weights weighing exactly an integer number of grams from 1 to n. The coins are labeled from 1 to n. The sequence a(n) is the minimum number of weighings we need on a balance scale to confirm that the labels are correct. The original Oleg Kryzhanovsky’s problem asks to prove that a(6) = 2. It is easy to see that a(1) = 0, a(2) = 1, a(3) = 2. You will enjoy proving that a(4) = 2 and a(5) = 2.

In general, we can prove that a(n) ≤ n-1. For any k < n, the k-th weighing compares coins labeled k and k+1. If we get the expected result every time, then we can confirm that the weights are increasing according to the labels.

On the other hand, we can prove that a(n) ≥ log3(n). Indeed, suppose we conducted several weighings and confirmed that the labels are correct. To every coin we can assign a sequence of three letters L, R, N, corresponding to where the coin was placed during each weighing — left cup, right cup or no cup. If two coins are assigned the same letters for every weighing, then we can’t confirm that the labels on these two coins are accurate. Indeed, if we switch the labels on these two coins, the results of all the weighings will be the same.

My son, Alexey Radul, sent me the proof that a(10) = a(11) = 3. As 3 is the lower bound, we just need to describe the weighings that will work.

Here is the procedure for 10 coins. For the first weighing we put coins labeled 1, 2, 3, and 4 on one side of the scale and the coin labeled 10 on the other. After this weighing, we can divide the coins into three groups (1,2,3,4), (5,6,7,8,9) and (10). We know to which group each coin belongs, but we do not know which coin in the group is which. The second weighing is 1, 5 and 10 on the left, and 8 and 9 on the right. The left side should weigh less than the right side. The only possibility for the left side to weigh less is when the smallest weighing coins from the first and the second group and 10 are on the left, and the two largest weighing coins from the first two groups are on the right. After the second weighing we can divide all coins into groups we know they belong to: (1), (2,3,4), (5), (6,7), (8,9) and (10). The last weighing contains the lowest weighing coin from each non-single-coin group on the left and the largest weighing coin on the right, plus, in order to balance them, the coins whose weights we know. The last weighing is 2+6+8+5 = 4+7+9+1.

Here is Alexey’s solution, without explanation, for 11 coins: 1+2+3+4 < 11; 1+2+5+11 = 9+10; 6+9+1+3 = 8 +4+2+5.

Let me denote the n-th triangular number as Tn. Then a(Tn) ≤ a(n) + Tn – n – 1. Proof. The first weighing is 1+2+3 … +n = Tn. After that we can divide coins into groups, where we know that the labels stay within the group: (1,2,…,n), (n+1,n+2,…,Tn-1), (Tn). We can check the first group in a(n) weighings, the second group in Tn – n – 2 weighings, and we already used one. QED.

Similarly, a(Tn+1) ≤ a(n) + Tn – n.

For non-triangular numbers there are sometimes weighings that divide coins into three groups such that the labels can only be permuted within the same group. For example, with 13 coins, the first weighing could be 1+2+3+4+5+6+7+8 = 11+12+13. After that weighing we can divide all coins into three groups (1,2,3,4,5,6,7,8), (9,10), (11,12,13).

In all the examples so far, each weighing divided all the coins into groups. But this is not necessary. For example, here is Alexey’s solution for 9 coins. The first weighing is 1+2+3+4+5 < 7+9. When we have five coins on the left weighing less than two coins on the right, we have several different possibilities of which coins are where. Other than the case above, we can have 1+2+3+4+6 < 8+9 or 1+2+3+4+5 < 8+9. But let’s look at the next weighing that Alexey suggests: 1+2+4+7 = 6+8. Or, three coins from the previous weighing’s left cup, plus one coin from the previous weighing’s right cup equals the sum of the two coins that were left over. This can only be true if the coins in the first weighing were indeed 1+2+3+4+5 on the left and 7+9 on the right. After those two weighings everything divides into groups (1,2,4), (3,5), (6,8), (7) and (9). The last weighing 1+7+9 = 4+5+8, resolves the rest.

To check 7 or 8 coins in three weighings is simpler than the cases for 9, 10, and 11 coins, so I leave it as an exercise. As of today I do not know if it is possible to check 7, 8 or 9 coins in two weighings. Consider this a starred exercise.

I invite you to play with this amusing sequence and calculate some bounds. Also, let me know if you can prove or disprove that this sequence is non-decreasing.

Share:Facebooktwitterredditpinterestlinkedinmail

It’s All Greek to Me

When my son Sergei made it to the International Linguistics Olympiad I got very excited. After I calmed down I realized that training for this competition is not easy because it is very difficult to find linguistics puzzles in English. This in turn is because these Olympiads started in the USSR many years ago and were adopted here only recently. So I started translating problems from Russian and designing them myself for my son and his team. For this particular problem I had an ulterior motive. I wanted to remind my son and his team of rare words in English with Greek origins. Here is the problem:

We use many words that have Greek origins, for example: amoral, asymmetric, barometer, chronology, demagogue, dermatology, gynecologist, horoscope, mania, mystic, orthodox, philosophy, photography, polygon, psychology, telegram and telephone. In this puzzle, I assume that you know the meanings of these words. Also, since I am a generous person, I will give you definitions from Answers.com of some additional words derived from Greek. If you do not know these words, you should learn them, as I picked words for this list that gave me at least one million Google results.

  • Agoraphobia — an abnormal fear of open or public places.
  • Anagram — a word or phrase formed by reordering the letters of another word or phrase, such as satin to stain.
  • Alexander — defender of men.
  • Amphibian — an animal capable of living both on land and in water.
  • Anthropology — the scientific study of the origin, the behavior, and the physical, social, and cultural development of humans.
  • Antipathy — a strong feeling of aversion or repugnance.
  • Antonym — a word having a meaning opposite to that of another word.
  • Bibliophile — a lover of books or a collector of books.
  • Dyslexia — a learning disability characterized by problems in reading, spelling, writing, speaking or listening.
  • Fibromyalgia — muscle pain.
  • Hippodrome — an arena for equestrian shows.
  • Misogyny — hatred of women.
  • Otorhinolaryngology — the medical specialty concerned with diseases of the ear, nose and throat.
  • Pedophilia — the act or fantasy on the part of an adult of engaging in sexual activity with a child or children.
  • Polygamy — the condition or practice of having more than one spouse at one time.
  • Polyglot — a person having a speaking, reading, or writing knowledge of several languages.
  • Tachycardia — a rapid heart rate.
  • Telepathy — communication through means other than the senses, as by the exercise of an occult power.
  • Toxicology — the study of the nature, effects, and detection of poisons and the treatment of poisoning.

In the list below, I picked very rare English words with Greek origins. You can derive the meanings of these words without looking in a dictionary, just by using your knowledge of the Greek words above.

  • Barology
  • Bibliophobia
  • Cardialgia
  • Dromomania
  • Gynophilia
  • Hippophobia
  • Logophobia
  • Misandry
  • Misanthropy
  • Misogamy
  • Monandry
  • Monoglottism
  • Mystagogue
  • Pedagogue
  • Philanthropism

Here are some other words. You do not have enough information in this text to derive their definitions, but you might be able to use your erudition to guess the meaning.

  • Antinomy
  • Apatheist
  • Axiology
  • Dactyloscopy
  • Enneagon
  • Oology
  • Paraskevidekatriaphobia
  • Philadelphia
  • Phytology
  • Triskaidekaphobia
Share:Facebooktwitterredditpinterestlinkedinmail

Evolutionarily Stable Strategy

Robert Calderbank and Ingrid Daubechies jointly taught a course called “The Theory of Games” at Princeton University in the spring. When I heard about it I envied the students of Princeton — what a team to learn from!

Here is a glimpse of this course — a problem on Evolutionarily Stable Strategy from their midterm exam with a poem written by Ingrid:

On an island far far away, with wonderful beaches
Lived a star-bellied people of Seuss-imagin’d Sneetches.

Others liked it there too — they loved the beachy smell,
From their boats they would yell “Can we live here as well?”
But it wasn’t to be — steadfast was the “No” to the Snootches:
For their name could and would rhyme only with booches …

Until with some Lorxes they came!
These now also enter’d the game;
A momentous change this wrought
As they found, after deep thought.

Can YOU tell me now
How oh yes, how?
In what groupings or factions
Or gaggles and fractions
They all settled down?

Sneetches and Snootches only:

  Sneetches Snootches
Sneetches 4 3
Snootches 3 2

Sneetches and Snootches and Lorxes:

  Sneetches Snootches Lorxes
Sneetches 4 3 8
Snootches 3 2 16
Lorxes 8 16 -60

Find all the ESSes, in both cases.

Share:Facebooktwitterredditpinterestlinkedinmail

More Linguistics Puzzles

Due to the popularity of my previous posting of linguistics puzzles, I’ve translated some more puzzles from the online book Problems from Linguistics Olympiads 1965-1975. I’ve kept the same problem number as in the book; and I’ve used the Unicode encoding for special characters.

Problem 180. Three Tajik sentences in Russian transliteration with their translations are below:

  • дӯсти хуби ҳамсояи шумо — a good friend of your neighbor
  • ҳамсояи дӯсти хуби шумо — a neighbor of your good friend
  • ҳамсояи хуби дӯсти шумо — a good neighbor of your friend

Your task is to assign a meaning to each out of four used Tajik words.

Problem 185. For every sequence of words given below, explain whether it can be used in a grammatically correct English sentence. If it is possible show an example. In the usage there shouldn’t be any extra signs between the given words.

  1. could to
  2. he have
  3. that that
  4. the John
  5. he should
  6. on walked
  7. the did

Problem 241. In a group of relatives each person is denoted by a lower-case letter and relations by upper-case letters. The relations can be summarized in a table below:

a b c d e f g
a A A B D E E
b A A E D E E
c F F G H I I
d H J J K L L
e B B B N N N
f O O D L Q A
g J J H L K F

The table should be read as following: if the intersection of the row x and the column y has symbol Z, then x is Z with respect to y. It is known that e is a man.

You task is to find out the meaning of every capital letter in the table (each letter can be represented as one English word).

Share:Facebooktwitterredditpinterestlinkedinmail

Can You Count to 100?

Of course you can. Can you do it in Russian? You do not need to know Russian to do it; you just need to solve my puzzle. Below are some numerals written in Russian. You have enough information to write any number from 1 to 99 inclusive in Russian.

  • 1 — один
  • 10 — десять
  • 11 — одиннадцать
  • 12 — двенадцать
  • 13 — тринадцать
  • 14 — четырнадцать
  • 15 — пятнадцать
  • 18 — восемнадцать
  • 22 — двадцать два
  • 31 — тридцать один
  • 33 — тридцать три
  • 40 — сорок
  • 44 — сорок четыре
  • 46 — сорок шесть
  • 55 — пятьдесят пять
  • 88 — восемьдесят восемь
  • 97 — девяносто семь
  • 99 — девяносто девять

If you are too lazy to write all the Russian numerals I requested, try the most difficult ones: 16, 17, 19, 67 and 76.

If you know Russian, then I have a back-up puzzle for you. Do the same thing for French:

  • 1 — un
  • 10 — dix
  • 11 — onze
  • 12 — douze
  • 13 — treize
  • 14 — quatorze
  • 16 — seize
  • 17 — dix-sept
  • 21 — vingt-et-un
  • 22 — vingt-deux
  • 31 — trente-et-un
  • 33 — trente-trois
  • 40 — quarante
  • 44 — quarante-quatre
  • 46 — quarante-six
  • 48 — quarante-huit
  • 55 — cinquante-cinq
  • 61 — soixante-et-un
  • 71 — soixante et onze
  • 72 — soixante-douze
  • 75 — soixante-quinze
  • 79 — soixante-dix-neuf
  • 80 — quatre-vingts
  • 81 — quatre-vingt-un
  • 91 — quatre-vingt-onze
  • 98 — quatre-vingt-dix-huit

And again, if you are lazy, you can concentrate on translating 15, 18, 19, 41, 51, 56, 65, 78 and 99 into French.

I invite my readers to create similar puzzles in all languages.

Share:Facebooktwitterredditpinterestlinkedinmail