Colored Squares and Cubes

  1. Color each square in a grid, such that no two neighboring squares have the same color, and each square neighbors any other color only once. (Neighboring squares share sides - don't consider corner-touching squares to be neighbors.) What is the minimum number of colors needed for:
    1. a 3x3 grid?
    2. a 4x4 grid?
    3. the plane?
  2. Color each cube in a 3-D lattice such that no two neighboring cubes have the same color, and each cube neighbors any other color only once. (Neighboring cubes share faces - don't consider corner- or edge-touching cubes to be neighbors.) What is the minimum number of colors needed for:
    1. a 2x2x2 cube?
    2. a 3x3x3 cube?
    3. a 4x4x4 cube?
    4. 3-space?
Extra Credit: How do the answers change if we allow wrapping - that is, if we assume left touches right, top touches bottom, (and front touches back, for the second part)?

Source: Original.


Solution
Mail to Ken