Introduction: The Case of the 4 Captured Soldiers

Consider the puzzle of the 4 captured soldiers. We’ll call them A, B, C and D as shown in the picture.

They cannot move, and they can only look forward. Between A and B is a solid brick wall, which cannot be seen through. They all know that between them they are wearing four hats--two black and two white. They do not know what color they are wearing. Each of them knows the position of the other men.

In order to avoid being shot, one of them must call out to the executioner the color of his hat. If he gets it wrong, everyone will be shot. They are not allowed to talk to each other and have 10 minutes to fathom it out. After one minute, one of them calls out.

**Question:** Which one of them calls out? Why is he certain of the color of his hat?

If you want you can immediately jump to the end to see the solution; however if you read the entire Wizard you’ll learn some skills to help you solve this logic problem as well as become more effective at solving both database problems and problems in general.

Recap

In the last *Wizard*, we reviewed the basics of Polya's Problem Solving Method:

- Understand the problem
- Make a plan
- Execute the plan
- Look back

In this *Wizard*, we review other problem-solving approaches.

## Simplify the Problem

This is a truly powerful technique for solving complicated problems. If you have a problem with many interrelated parts, start taking away pieces to create a simpler problem. The goal is to get to a point where you have a problem that is simple enough to solve. What did you learn? Sometimes with this step you gain an insight to solving the larger problem. If not, then add layers of complexity back to the problem to approach the solution.

## Trace the Data

In an Access database, you are almost always reading, writing, editing, or manipulating data. Interrupt your process at critical points in the program and either inspect the data to determine at what point the data is not what you expect it to be. When you reach that spot, look to the preceding code for the source of the error.