Alok Menghrajani

Previously: security engineer at Square, co-author of HackLang, put the 's' in https at Facebook. Maker of CTFs.


This blog does not use any tracking cookies and does not serve any ads. Enjoy your anonymity; I have no idea who you are, where you came from, and where you are headed to. Let's dream of an Internet from times past.


Home | Contact me | Github | RSS feed | Consulting services | Tools & games

Over the years, I have collected a number of math puzzles. My first website was actually just links to such puzzles.

This page contains a few of my favorite ones. I have included hints or solutions in some cases.

If you enjoy these puzzles, make sure to checkout IBM's ponder this. IBM has been publishing a fun math puzzle every month since 1998. If you email the correct solution they'll add your name to the list of people who have answered correctly. Solutions are posted at the end of every month.

538's the riddler is published every week on Friday.

CMU's Puzzle Toad are fun to solve too. The puzzles have very detailed solutions.

Finally, the Dunks family farm (CrossNumbers) is lots of fun too. It's a crossword with numbers instead of letters.

9 non-overlapping triangles

Construct 9 non-overlapping triangles by drawing 3 lines through a capital M.

(hint)

Four corners

There are four towns at the corners of a perfect square with a side of 1. Your task is to connect these towns through a railroad such that all the four towns are connected and the length of the railroad is the smallest.

As an example, if you connect all the four sides of the square, then the length of the railroad is 4. If you connect any three sides, all the four towns are still connected, and the length is 3. Can you do better?

(hint)

Two ropes

We have two ropes made of non-homogeneous material. Each rope takes eactly one hour to burn.

How can you measure 45 minutes?

(hint)

The traveling bee

Two trains are travelling towards each other at speeds of 30 km/h and 20mk/h. When they are 50 km apart, a bee starts flying from one train to the other at an astoundishing speed of 50 km/h. When the bee reaches the other train, it turns around and heads back towards the first train. Then it turns around again, etc. until the trains meet.

What is the total distance covered by the bee?

Ages of the three daughters

Two friends meet after a long time. The first one says "I now have 3 daughters". The second one asks their age.

First person: The product of their ages is 36.

Second person: I need some more information.

First person: The sum of their ages is the same as the number of that house.

Second person: I still can't calculate their ages.

First person: Ah right, the eldest is blonde.

Second person: I now know their ages.

How old are the three girls?

Next number in the series

What is the next number in this series?

1
11
21
1211
111221
312211
13112221
(solution)

The farmers

Two farmers share a cow herd. One day, they sell their cows and get as many dollars per cow as the total number of cows they sold.

With this money, they buy some sheeps. They pay 10 dollars per sheep, and they buy a lamb with the remaining money.

One of the farmers gets the lamb, and the other one gets an extra sheep. The one who gets the sheep must also pay some money to his friend.

How much money does he need to pay in order for the trade to be fair? (assuming the amount is an integer)

(hint)

Water jugs

You have got two jugs. The first one has got a capacity of 5L and the second one has got a capacity of 7L.

You also have some water, and you want to mesure exactly 3L. How can you do that? What other amounts can you measure?

(hint)

Weighing scale

A merchant has a balance scale and a 40kg stone. He trades his stone against four smaller ones, which all sum up to 40kg. Using only these four smaller stones, he is now able to weigh any item from 1kg to 40kg.

What are the weights of these four stones?

The lift

A 30 year old man lives on the 25th floor of a building. Every morning he uses the lift to get to the ground floor and goes to work. When he gets back, he takes the lift up to the 24th floor and then walks his way up the last floor. He has this strange habit of walking the last floor every day, except when it has been a rainy day, in which case he takes the lift straight up to the last floor.

Can you explain this man's strange behavior?

(solution)

Prisoners and a light bulb

There are 100 prisoners in solitary cells. In the court yard, there is a light bulb. No prisoner can see the light bulb from his or her own cell.

Everyday, the warden picks a random prisoner and that prisoner is allowed to toggle the bulb.

The prisoners can assert that all 100 prisoners have been in the court yard. If that is true, they will all be set free. If that isn't true, all the prisoners are executed.

On the first night, the prisoners are allowed to get together and come up with a strategy. How can they free themselves?

Mr. P and Mr. S

There are two numbers between 1 and 100. Mr. P knows their product, and Mr. S their sum. They have the following conversation:

Mr P: "I don't know the numbers."

Mr S: "I knew you didn't. Neither do I."

Mr P: "Now I do."

Mr S: "Now I do, too."

What are the numbers?

25 horses

You have 25 horses and you can race them 5 at a time.

What is the minimum number of races required to find the 3 fastest horses without using a stopwatch?

(solution)