You're right, wofa. The side (or height) of the cylinder is 6 inches. I left that out by mistake. The problem was given in the Mathematical Games section of Scientific American when Martin Gardner ran it, time back way back. It was stated that you didn't need higher math to solve the problem. Your reasoning about the arbitrariness of the diameter of the sphere was in the canonical answer.

Here's another one from the series of problems (which came about once every eight months or so):

Farmer Brown has ten pigs; seven of them are brown, two are white and one is pink. How many of them can say that they are not the same color as any other of Farmer Brown's pigs?