Some challenging mathematical problems related to CS103

Here are some mathematical problems that are a bit more difficult than the homework problems. There is no credit for solving them, but thinking about them can be helpful to better understand some of the ideas from the class.

About cardinality

Let S be a set of points in the plane, meaning that each element of S is a pair of real numbers. Suppose that S is a set of isolated points. This means that for every point x in S there is a radius rx such that there is no other elements of S at distance less than rx from x. (That is, x is the unique element of S belonging to the disc of center x and radius rx)

Prove that S must be countable.

[This question was asked in the qualifying exam of a Berkeley math PhD student by the Functional Analysis examiner. I have no idea why he chose to ask an elementary question (meaning, a question that can be answered from first principles) like this, but the student had some trouble coming up with the right answer]

"Prisoners and hats" Problems

There is a family of mathematical puzzles that has the following scenario in common: there are n prisoners, and on each of them is put a colored hat. The colors of the hats may be thought to be random, although usually the puzzle does not ask about probability. No prisoner knows the color of his own hat, but each prisoner gets to see the colors of the hats of (some or all of) the other prisoners. Each prisoner tries to guess the color of his own hat. If sufficiently many prisoners guess correctly, they all get released. They are allowed to strategize in advance, but not to communicate once the game begins. Surprisingly, although each of them has to make a guess about something that they have zero information about, they can collectively do much better than if each one guessed at random.

The following are three versions of this problem, in increasing order of difficulty.

  1. The hats can be either red or blue. The prisoners are lined up and face forward, so that prisoner 1 can see the hats of prisoners 2, 3, ..., n, but not his own, prisoner 2 can see the hats of prisoners 3, 4, ..., n but not his own nor the hat of prisoner 1, and so on. Prisoner n sees nothing. The game is that each prisoner says his guess aloud, in the order in which they are lined up, so that is prisoner 1 is first, prisoner 2 is second and so on. Everybody can hear what everybody before him says. The prisoners are all released if at most one of them makes a mistake. Prove that, with the proper strategy, they get released no matter the initial hat colors.
  2. The hats can be of any of n colors; the list of n allowed colors is known. Every prisoner can see the hats of everybody else (but not his own). Every prisoner writes down his guess for his own color on a slip of paper and gives it to the guards, so no prisoner knows anything about the other prisoners' guesses. The prisoners get released if at least one of them makes the correct guess. Prove that there is a strategy that, if followed, allows the prisoners to always get released
    [This is tricky. The solution uses modular arithmetic]
  3. The hats can be either red or blue. There are infinitely many prisoners, each one identified by a natural number, so there is prisoner 1, prisoner 2, ... and so on. Each prisoner sees everybody else's hat colors. As in the second problem above, each prisoner makes a guess that is unknown to everybody else. The prisoners are released if only finitely many of them make a mistake. Prove that there is a strategy that allows them to always get released.
    [This is much harder than the other two. The solution uses equivalence classes]

About graphs (and induction, and the pigeonhole principle)

In a graph G=(V,E), a subset K of V is called a clique if for every two verticex u,v in K the edge {u,v} in in E. A subset I is called an independent set if for every two vertices u,v in I the edge {u,v} is not in E.

Prove that, for every k, every sufficiently large graph must have either a clique of size at least k or an independent set of size at least k. That is, prove that for every k there is a number nk such that in every graph that has at least nk vertices there must be either a clique of size at least k or an independent set of size at least k.

Here is a hint: try to prove the seemingly stronger (but actually equivalent) statement that for every k and every i there is a number ni,k such that in every graph that has at least ni,k vertices there must be either a clique of size at least k or an independent set of size at least i. Here is another hint: proceed by induction on i+k.