Promising them an increase in their allowance if they get the answer, I offer my two sons, Peter and Paul, the following puzzler:

"I am thinking of a rectangle with integer sides, each of which are greater than one inch. The total perimeter of the rectangle is no greater than eighty inches."

I then whisper the total area to Peter and the total perimeter to Paul. Neither of them are allowed to tell the other what they heard: their job is to work out the rectangle's dimensions.

Their subsequent conversation goes like this:

Peter: Hmmm... I have no idea what the perimeter is.

Paul: I knew you were going to say that. However, I don't know what the area is.

Peter: Still no clue as to the perimeter...

Paul: But now I know what the area is!

Peter: And I know what the perimeter is!

What are the dimensions of the rectangle?

Solution to area/perimeter problem

If Peter could get the perimeter immediately then the area would

have to be of the form p*q where p and q are primes between 2 and 40.

This is the set {2,3,5,7,11,13,17,19,23,29,31,37}

(Note that p and q need not be distinct.)

They now both know that the perimeter is not of the form 2 * (p + q).

This eliminates all of the perimeters <= 80 except {22,34,46,54,58,70,74}.

At this point Paul doesn't have enough information about the area.

When Peter says he still doesn't know the perimeter then the area must be

generated by 2 or more perimeters in that list.

Looking at all the possible areas with these perimeters yield

the following duplicates:

Area 30: Perimeter 22 2 * ( 6 + 5) Perimeter 34 2 * (15 + 2)

Area 42: Perimeter 46 2 * (21 + 2) Perimeter 34 2 * (14 + 3)

Area 60: Perimeter 46 2 * (20 + 3) Perimeter 34 2 * (12 + 5)

These are all of the duplicate areas - (verified with Excel.)

(Note that perimeters 34 and 46 generate more than one duplicate area.)

Paul now knows that the area is one of the duplicates listed above,

otherwise Peter would know the perimeter from its unique area generated

by the allowable perimeters.

The only way Paul could now determine the area would be if the perimeter

has exactly one duplicate area. This is the case with perimeter 22 so the

area is 30.

Now Peter knows the perimeter is 22 because the only way Paul could

get the area is by the reasoning above.

Q.E.D.