CSCE 411 Lecture 29
« previous | Monday, November 5, 2012 | next »
The Hat Game
Players cannot do better than 50%, but as a team, they can do much better by spreading out the "good guesses" and concentrating the "bad guesses"
In General
When played over all combinations with players, any strategy produces correct guesses and incorrect guesses. The best possible guess arrangement is:
- 1 correct guess per winning combination
- correct guesses per losing combination
This is called a perfect strategy and cannot be obtained for certain numbers of players.
We've already solved for , but what about other ?
Finding a Perfect Strategy
Let be the set of all possible hat configurations (0 for one color, 1 for the other)
Let be the number of places in which two elements of differ.
Example:
1 0 0 1 0 1 1 0 1 1 0 1 1 0 1 0 0 1
dist(H) = 2
Let a ball of radius around be the set of all configurations whose distance from is at most .
Example:
h: 1001 B[1](H) = 0001, 1101, 1011,1000
Note that
Let be a deterministic strategy.
Let be the set of all hat configurations where a team playing according to loses.
Let be the set of all hat configurations where a team playing according to wins.
Note , and and are mutually exclusive and mutually exhaustive.
Suppose and are elements of that differ only in the th entry.
According to , if Player guesses correctly in , then he guesses incorrectly in , and vice versa.
Every element is contained in a ball of radius 1 around some element of .
In a perfect strategy , the balls of radius 1 around l do not overlap
Let a Perfect code of length be a subset such that the balls of radius 1 around the points of include all of and do not overlap.
A perfect strategy yields a perfect code:
Instructions for each player:
- If the hat configuration might be in , guess so that if it's in , you'll be wrong.
- If you can tell that the configuration is not in , pass.
If is a perfect strategy for players, then the probability of winning is .
Do perfect codes exist for ? Yes:
A perfect code of length exists for .
Proof: A perfect code splits into disjoint balls of radius 1. Each ball has points and has 2^n points, so is divisible by , so is a power of 2, so
NP-Completeness
Intrinsic hardness of problems.
NP = set of problems that can be checked quickly, but take a long time to solve (i.e. difficult)
Informal discussion: we will never get very formal in this course.
Polynomial Time Algorithms
Most of the algorithms we've seen so far run in time that is upper bounded by a polynomial in the input size ():
- Sorting: , .
- Matrix Multiplication: ,
- Graph Algorithms: ,
In fact, the running time of these algorithms are bounded by small polynomials.
Categorization
We call computational problem tractable iff it can be solved in polynomial time.
Decision Problems and Class P
Computational problem with yes/no answer is called a decision problem
is class of all tractable decision problems.