MatMod logo

All Posts

In this blog, I will add a new post all 3-5 days. Each post contains a complete (optimization) problem, many of them are puzzles. Each problem consists of a comprehensive description of the problem, a description of the modeling (translation from spoken language to mathematical language), a mathematical formulation, an implementation in the LPL modeling language, and a link to solve the problem directly through the Internet. A full document is also downloadable as a PDF.

I start with easy puzzle problems, but later on, more complicated problems will be presented. Enjoy!

Werewolves (wolves)

Suppose you are visiting a forest in which every inhabitant is either a knight or a knave. Knights always tell the truth and knaves always lie. In addition some of the inhabitants are werewolves and have the annoying habit of sometimes turning into wolves at night and devouring people. A werewolf can be either a knight or a knave.

Read more

Lady and Tiger Puzzle II (tiger2)

A prisoner is faced with a decision where he must open one of nine doors. The rooms behind each door may be empty or contain either a lady or a tiger. If the prisoner opens a door and finds a lady he will marry her and if he opens a door and finds a tiger he will be eaten alive.

Read more

Lady and Tiger Puzzle I (tiger1)

In this puzzle a prisoner is faced with a decision where he must open one of two doors. Behind each door there either is a lady or a tiger. There might be two tigers, two ladies or one of each. If the prisoner opens a door and finds a lady he will marry her and if he opens a door and finds a tiger he will be eaten alive. Of course, the prisoner would prefer to be married than eaten alive. Each of the doors has a sign bearing a statement that may be either true or false.

Read more

Find Assignment (friends)

“Last week my friends Anne, Carl, Eva, Gustaf and I went out for dinner every night, Monday to Friday. I missed the meal on Friday because I was visiting my sister and her friends. But otherwise, every one of us had selected a restaurant for a particular night and served as a host for that dinner. Overall, the following restaurants were selected: a French bistro, a sushi bar, a pizzeria, A Greek restaurant, and the Brauhaus. Eva took us out on Wednesday. The Friday dinner was at the Brauhaus. Carl, who doesn’t eat sushi, was the first host. Gustaf had selected the bistro for the night before one of the friends took everyone to the pizzeria. Tell me, who selected which restaurant for which night?”. This puzzle has been published in [1] p. 56.

Read more

The 6-Runners Puzzle (logpuzz)

The six following persons arrived first at the marathon of New York, but we do not know their rankings. However, we have the following additional information:

Read more

Cats among Pigeons (cats)

Downs, Heath, Field, Forest, and Marsh – five elderly pigeon fanciers – were worried by the depredations of marauding cats owned by five not less elderly ladies. Hoping to get control of the cats, they married the cat owners.

Read more

Fancy Dress Party (fancy)

Mr. Greenfan wants to give a dress party where all male guests are obliged wear green clothing. The following rules are imposed for every male guest:

Read more

Euler Knight Tour (knight)

A knight’s tour is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. If the knight ends on a square that is one knight’s move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed, otherwise it is open (from Wikipedia). Find a (closed) knight tour!

Read more

Queen Placement III (chess6)

An initial position of 8 Queens on a chessboard is given. Now move exactly three of the Queens to other cells so that there will be 11 cells on the board which are not under attack. To move the Queens, it is not necessary to use proper ’Queen moves’. You may take them up and place them anywhere. Is there only one solution? The initial positions are as follows (1 means “a Queen is placed there”, 0 “no Queen is placed) :

Read more