Modelling Puzzles in First Order Logic

by Adrian Groza

Springer, 2021


Slides Examples
All code files: codes.tar.gz | codes.zip
If you use this book/code/slides for teaching, please let me know at
Adrian. Groza@cs.utcluj.ro.

Chapter 1. Getting started with Prover9 and Mace4

Chapter 2. Micro arithmetic puzzles

1. Logic equation 4x4: 

2. Logic equation 4x4

3. Logic equation 5x5

4. Logic equation 9x9 (pdf) (tex)

5. Three squares

6. Pocket money

7. Dividing the legacy

8. Boys and girls

9. Robinson’s age

10. Five cards

11. A square family

12. Family ages

Chapter 3. Strange numbers
 
0. Intro (abelard&heloise.pdf) (abelard&heloise.tex)

1. Adding their cubes

2. Multiplication

3. The arithmetical cabby

4. The ten barrels

5. Find the triangle area

6. A digital difficulty

7. The archery match

8. Target practice
   
9. The nine barrels
   
10. Upside-down year
   
11. A twisted number
   
12. Unusual number
     
Chapter 4. Practical puzzles


1. Secret letter to the parents
   
2. Ambiguous dates
  
3. One landlord and 100 servants
  
4. Consecutive numbers (pdf) (tex)
  
5. Colouring Dracula’s land in red (pdf) (tex)
   
6. Golomb ruler (pdf) (tex)
  
7. Two cube calendar
  
8. How many routes? (pdf) (tex)
  
9. Going to church (pdf) (tex)
  
10. Buying wine (pdf) (tex)
  
11. Railway routes
  
12. The stolen balsam
  
 
Chapter 5. Ladies and tigers

1. Ladies and tigers (pdf) (tex) (resolution)
  
2. Ladies and tigers reloaded
  
3. Ladies only
  
4. Ladies are honest but tigers are liars
  
5. Ladies are honest in some rooms only
  
6. The lady is on the other room
  
7. Better choosing the other room
  
8. Mixed messages on doors
   
9. A lady and two tigers
   
10. A lady and two tigers
   
11. A lady, two tigers, and other messages
    
12. A logic labyrinth
    
 
Chapter 6. Einstein puzzles

1. The magisterial bench
   
2. Five ships in a port
   
3. Ladies in the committee
   
4. Cocktail party
  
5. Borrowed books
  
6. Baseball coach dilemma
  
7. Perfect man
  
8. Four bikers
  
9. Movies night
  
10. Secret Santa
  
11. Seating the party
  
12. Passengers in a railroad compartment
  
 
Chapter 7. Island of truth
 
1. We are both knaves (pdf) (tex)

2. At least one of us is a knave
  
3. Either I am a knave or B is a knight
  
4. We are both the same
  
5. Three inhabitants and two messages .
  
6. Three inhabitants and not enough information
  
7. Three inhabitants and two of the same type
  
8. Jim, Jon, and Joe
    
9. A spy appears (pdf) (tex)
  
10. Who is the spy?
  
11. The whole truth and nothing but the truth
  
12. Three goddesses

 
Chapter 8. Love and marriage


1. Looking at unmarried people
   
2. Married people do not lie
   
3. Minos and aminos: we are both married
   
4. Minos and aminos: we are both married or both unmarried
   
5. Marriage in company
   
6. What is my relationship to Teresa?
   
7. Who is Helen's husband?
   
8. Arranged royal marrage
   
9. Two single persons at the end of the row
   
10. Five couples
   
11. A family tree
   
12. Uncles and aunts
   
 
Chapter 9. Grid puzzles

1. A five in the middle
   
2. Roses, shamrocks and thistles
   
3. Nine squares
    
4. Latin square (pdf) (tex)
    
5. Magic square

6. Magic five-pointed star

7. Fort Garrisons

8.  Three in a row

9. Star battle

10. Start battle reloaded
 
11. Fancy queens (pdf) (tex)

12. Playing minesweeper (pdf) (tex)

 
Chapter 10. Japanese puzzles
 
1. Killer Sudoku  (pdf) (tex)
 
2. Futoshiki

3. Kaos Sudoku

4. Kakurasu

5. Takuzo

6. Kakuro

7. Daily neighbours

8. Kendoku

9. Magic labyrinth

10. Stars and arrows

11. Tents and trees

12. Sun and moon

 
Chapter 11. Russian puzzles

 
1. Young communist arranging flags

2. Keep it even

3. Magic triangle

4. From 1 to 19

5. A duel in arithmetic

6. Twenty

7. Order the numbers

8. A mysterious box

9. The courageous garrison (pdf) (tex)

10. A grouping of integers 1 to 15
 
11. A star
 
12. The hexagon
   

Chapter 12. Polyomino puzzles
 
1. Broken chess row
 
2. A simple polyomino

3. Rotating polyomino (pdf) (tex)
 
4. Fixed Ten-Yen
   
5. Rotating Ten-Yen

6. A 4 × 5 pentomino

7. The twelve pentominoes

8. Importing six pentominoes

9. Importing other six pentominoes

10. Twelve pentominoes on a chessboard

11. Five tetrominoes on a strange shape

12. Broken chess

 
Chapter 13. Self-reference and other puzzles
 

1. Tricky messages

2. Not so tricky messages

3. Six tricky messages

4. Which hand?

5. An ornament for a window

6. At the brook

7. A car tour

8. A diamond ring

9. Drinker paradox

10. Ten sentences (pdf) (tex)

11. Ten relaxed sentences

12. Self-counting sentences