Prof. Dr. Tobias Friedrich

# Anton Krohmer

Research Group Algorithm Engineering
Hasso Plattner Institute

Office: A-1.7/8
Tel.: +493315509-414
E-Mail: Anton.Krohmer(at)hpi.de

# Publications

The technical reason is: No template was found. View could not be resolved for action "preview" in class "AcademicPuma\ExtBibsonomyCsl\Controller\DocumentController".

## Other Works

• Finding Cliques in Scale-Free Networks. [pdf]
Master Thesis, 2012.
• Rational File Sharing. [pdf]
Bachelor Thesis, 2009.

# Nice Riddles

Here's a collection of my favorite riddles.

Battling Coins

You and your friend are playing the following game on a rectangular table. Each of you has an unlimited supply of equally-sized coins. Whenever it's a player's turn, the player has to put down a coin on an unoccupied space on the table. In particular, the coin cannot overlap with previously placed coins.

The first player who cannot put down a coin loses.

Do you want to go first or second in this game? What is a winning strategy?

Squaring Squares

Assume you are given four points in the plane that form a square with side length 1. You are allowed to modify the position of the points as follows: You can mirror a point at another one of the four points.

Is it possible to create a square with side length 2 using only these operations?

Robot Meeting

Two robots land safely with their parachutes on the integer line. They leave their parachute at the landing position and then proceed to execute their coded programs. They both contain exactly the same program. Your task is to write this program in such a way that they will eventually meet. You have access to the following operations:

• Move left
• Move right
• GOTO x (where x is a line number in your code)
• If there is a parachute at your position, skip the next line of code

Your program should not be longer than 10 lines.

Spiders, Spiders Everywhere!

This riddle is a little different, and it is hard to get all constraints straight, but let's try:

You inherited a room in which you intend to sleep. Unfortunately, the room is haunted, and spiders can spawn on the walls and on the ceiling. A spider can crawl essentially everywhere, and it can also let itself drop from wherever it is hanging right now.

Your task is to place your bed inside the room such that you can sleep without being pestered by spiders. To this end, you can build immovable structures (in particular, you cannot build a house inside your room since you cannot enter the room without a door); and you can use water.

Spiders hate water. While you can step over it (if it is narrow enough), they cannot cross water. However, you cannot just "place water" in your room; the laws of gravity still apply. To this end, if you want to place water somewhere, you will have to build a structure such that it contains the water. The structures are of non-negligible thickness, i.e., you cannot contain water within walls of "thickness almost 0." If in doubt, there is always a spider small enough that can land on the wall.

For instance, it is possible to build a small moat around your bed. Then, spiders cannot enter your bed via the floor. They still can, however, enter your bed by crawling on the ceiling and then dropping in your mouth while you sleep.

How can you prevent spiders from reaching your bed?