MatMod logo

Puzzles

Chess Puzzles      Logical Puzzles      Simple Puzzles      

The Sudoku Game II (sudokuInt)

This code implements the sudoku game using general integer variables (for an implementation using binary variables see model sudoku. The sudoku game ask to complete the partially filled grid with numbers between 1 and 9 so that every row, every column, and the 9 non-overlapping 3 × 3 subblocks contain each digit 1 to 9 exactly once (see, Figure 1).

Read more

The Sudoku Game I (sudoku)

So, what is it? The puzzle is simple and can be explained in one sentence: “Fill in the grid (see, for example, Figure 1) so that every row, every column, and every 3 × 3 subblock contains the digits 1 to 9.” That’s all there is to it!

Read more

Magic Honeycomb (honeycomb2)

A honeycomb is defined in the same way as in model honeycomb. The problem presented here is well known: In a honeycomb of order o, assign the numbers from 1 to 3o2 – 3o + 1 in such a way to the hexagons, that the sum of the numbers in all 3(2o- 1) straight rows is the same. We call this the magic sum M. (Two hexagons belong to the same ‘row” if they share a common edge.)

Read more

Layered Honeycomb (honeycomb)

A honeycomb consists of hexagons attached to each other. We consider honeycomb of a special structure: hexagons attached on “layers” around each others. The number of layers define the order o of the structure. Figure 1 shows the layered honeycomb of order 1, 2, and 3.

Read more

Magic Squares (magicsq)

Place different integer numbers (from 1 to 9) in each of the 9 cells of a 3 × 3 square in such a way that the sum of all rows, all columns, and the two main diagonals are equal (See [1], p.146 and [2], chap 17).

Read more

Snakes Problem (snake1)

This is another board game similar to the problem described in snake. Given 50 pellets each colored with one of five colors. 10 pellets at a time have the same color. The problem is to place all pellets on a board consisting of 50 notches layouted on a 10 × 5 grid points in such a way that all pellets with the same color must have at least one neighbor and build a sequence without braching. Two pellets are neighbors if they are immediate horizontal or vertical neighbors on the grid. The game begins after 5 pellets – all of different colors – have been placed on arbitary grid points (notches).

Read more

6-Snakes Problem (snake)

The 6-snakes problem is a board game for one person. The board is a hexagon with 72 notches where the 72 pellets must be placed (see Figure 1). The pellets are divided into 6 groups of 12 pellets. In each group the pellets have the same color – hence there are 6 colors.

Read more

The 6-Magic Star (mstar)

A 6-pointed magic star is a star polygon in which numbers are placed at each of the 6 vertices and 6 intersections, such that the four numbers on each line sum to the same magic constant (see Figure 1).

Read more

Who Went Hiking Alone? (hikers)

A group of 17 persons, named A, B, …, Q went hiking. The next day, they came together with their friend James who was not on the hike. They told him that soon after the start they split into 4 groups and each group went on its own continuing hiking. Each person gave James four names with whom he was not in the same group. This information is displayed in Table 1. He was also told that one person went alone and there was a group of three persons. James then immediately told them who was the person that went alone. How did he find out?

Read more