Thursday, July 20, 2017

I would call these Galois Games but I can't

Here is a game (Darling says I only blog about non-fun games. This post will NOT prove her wrong.)

Let D be a domain,  d ≥  1 and 0 ≠ a0  ∈ D. There are two players Wanda (for Wants root) and Nora (for No root). One of the players is Player I, the other Player II.

(1) Player I and II alternate (with Player I going first) choosing the coefficients in D of a polynomial of degree d with the constant term preset to a0.

(2) When they are done, if there is a root in D  then Wanda wins, else Nora wins.

There is a paper by Gasarch-Washington-Zbarsky here where we determine who wins the game when D is Z,Q (these proofs are elementary), any finite extension of Q (this proof uses hard number theory), R, C (actually any algebraic closed field), and any finite field.

How did I think of this game?  There was a paper called Greedy Galois Games (which I blogged about here). When I saw the title I thought the game might be that players pick coefficients from Q and if the final polynomial has a solution in radicals then (say) Player I wins. That was not correct. They only use that Galois was a bad duelist. Even so, the paper INSPIRED me! Hence the paper above! The motivating problem is still open:

Open Question: Let d be at least 5. Play the above game except that (1) the coefficients are out of Q, and (2) Wanda wins if the final poly is solvable by radicals, otherwise Nora wins. (Note that if d=1,2,3,4 then Wanda wins.) Who wins?

If they had named their game Hamilton Game (since Alexander Hamilton lost a duel) I might have been inspired to come up with a game about quaternions or Hamiltonian cycles.

POINT- take ideas for problems from any source, even an incorrect guess about a paper!

Monday, July 17, 2017

89944 Hat Problems

I've blogged about different hat problems a few times (see here). The question arises: How many hat problems are there? The answer is really infinite (literally) but I will list some parameters and bound them reasonably to get an upper bound.  Some of the combinations don't make sense, but we'll live with that. (I am also working on a website of hat problem papers. Its nowhere near finished yet and maybe never will be, but its here for your benefit. And for mine-- if there are some obvious papers I've omitted then comment or email me.)

First off, what is a hat problem? Ignoring many parameters: There are n people and c different colors of  hats and they are put on people's heads and the people have to guess what color hat they have on. They can see some or all of the other people. I'll mention one that has someone's name on it:

Winkler's Hat Problem (Peter Winkler proposed it here along with some other hat problems and some non-hat problems that are also fun)

There are n people and 2 color hats. An adversary will put the hats no peoples heads. The people must guess simultaneously their hat color. Maximize how many get it right in the worst case.

(ADDED LATER: While I have seen the above referred to as Winkler's Hat Problem, Winkler
himself told me that hs problem has the hats put on RANDOMLY, not by an adversary.)

Peter Winkler and later a paper by Ebert  et al. (Not Ebert of Siskel and Ebert--- to bad, that would be awesome!) that I mention below seem to have popularized hat games somewhat.  But this post is not about their history its about

how many hat games are there?

Here are some parameters I've seen for hat games. If you know of any others please comment!

1) Is the number of hats finite, infinite (and assume AC), infinite (but don't assume AC). I could say that since there are infinitely many infinities this is an infinite number of parameters, but we'll stick to countable and say this is a 3-valued parameter.  A paper on infinite number of hats is here.

2) The two most common puzzles are to have the people either all see each other, or in a line where person i sees person j iff i ≤ j. This can be viewed as the people are on Kn or Ln.  There have been some papers on cycles (see herehere),  triangle-free graphs (see here), some directed graphs (see here), a PhD that studies the problem on cycles (see here), and a paper with several graphs (see here). Formally this would be an infinite-valued parameter, but we'll take the number of classes of graphs that actually have been studied to be 4.

3) Do the people all guess their hat at the same time OR is there some ordering OR in rounds  3-valued.

4) Are people allowed to pass or not? (if they are then usually we demand that at least one does not pass). 2-valued. The paper by Ebert-Merkle-Vollmer which allowed passing got a lot of attention and brought hat problems to the general public. Its here. A generalization of Ebert's version is here. Ebert's game but on a line is studied here

5) Are the hats put on by an adversary who can hear your strategy (I've never seen a paper about an adversary who can't hear your strategy) or uniformly randomly or random with some known probability. The last case has been studied in several papers by Theo van Uem (see hereherehere). 3 valued

6) The players strategy can be deterministic or randomized. 2-valued. Butler et. al's paper about deterministic strategies covers a lot of material: here. 2 valued.

7) What is the goal? To get as many right as possible all the time? To get the expected number right as large as possible (prob may be based on either the random placement of hats or the random strategy of the players). There are even more variations here such as you want for each color there is a guaranteed fraction that get it right (see here) 3-valued

8) Is there some other information available. Examples I've seen: (a) at least one hat is RED, (b) for each color there is a bound on how many hats there are of that color, (c) the hats are natural numbes x,y, and x+y. (see here) (d) there are n+1 colors, n people, and each perosn has a different color (see here). Many values depending on the information given, but we'll just say 4-valued, the info above and no info.

9) Can some other information be revealed first? I've seen a paper where first everyone who sees a RED hat raises their hand. 2-valued.

10) Is a delay allowed? There are some puzzles where the people do reasoning about what others might deduce, so there is a delay in answers. 2-valued

11) I've never seen this- but how about trying to make sure that everyone gets it WRONG. 2-valued

12) I don't count this as a hat problem but some do: they want to find collectively information about all of the hats. Aspnes et al has 0-1 valued hats and wants to simul vote on the parity, see here. 2-valued.

This puts an upper bound on the number of possible hat puzzles at

3 x 4 x 3 x 2 x 3 x 2 x 3 x 4 x 2 x 2 x 2 x 2 = 89944.

This figure is wrong for reasons for reasons that both argue higher and lower.

a) Lower: MANY of  these combinations do not work together. For example, if you have an adversary and a deterministic strategy you can't talk about doing well in the average case.

b) Higher: For many of the above categories my number-of-values is low. For example you could look at hat games on many different graphs.

c) Higher: there are other variants I have not listed. That's where YOU come in! If you know of a version I have not discussed then please comment or email it to me!

Thursday, July 13, 2017

Solutions to some Hat Problem AND some points of interest.

In my last blog here I asked three (known) hat problems since they may be new to you (one of them I just learned last week) and I had a point to make about them. I have WRITTEN UP the proofs  here since html is clumsy with math (or I'm clumsy with html-math), so this post is mostly about the points to make about these problems. I would urge you to read the writeup pointed to before reading the post.

1) N people 1,...,N, two colors R,B, Hats put on RANDOMLY (no adversary).

People are in a line and pe sees person j's hat iff i ≤ j .

There is a well known strategy where nobody passes which guarantees n-1 get it right (see here), but that strategy has EVERYONE get it right 1/2 of the time. We want MORE than that. LOTS more.

The following strategy works: For i=1,2,..., N person i does the following: if nobody has said RED yet AND ALL of the hats i sees are BLUE then i says RED. Otherwise Red passes

This fails on B^n. It works on everything else with the last R getting it right and everyone else passing. So the prob of getting it right is 1- 1/2^n.

POINT: I originally didn't have one to make, but a commenter misread the problem (or I miswrote it) in an interesting way. My problem was: Hats put on randomly, players are deterministic. They thought it was Hats put on by an adversary but players can use a randomized strategy. That problem (which frankly is more intersting) has a similar solution to the above: the players get a random string of R,B of length n and treat that like I treat B^n above.

2) omega people: 1,2,3,... and as above. We want to get all but a finite number of people get it right. See my writeup of it pointed to above. The proof I use uses the Axiom of choice and this is needed (see here).

POINT: some of my students didn't like that the players need uncountable memory. How much does this bother me: not even a little. A fellow blogger thought this result was so non-intuitive that he now thinks the axiom of choice is wrong (see here) Personally I am a lot more bothered by the Banach Tarski Paradox (see here), though that paradox has lead to what my wife calls either the best or the most obscure math joke ever: what is an anagram of Banach-Tarski? Answer: Banach-Tarski Banach-Tarski.

3) omega people: 1,2,3,... and as above but now we want to get at most ONE wrong. You CAN do this! see the writeup.

POINT: When I first learned problem (2) I assumed you could not get it down to a finite bound. And I was sure I could prove it, though I never got around to it, prob because I thought it was true and easy. Well, my turn to eat humble pie (an expression only said on TV and not in real live)--- you CAN do this with only one error.  The problem where you have an infinite number of people, they all see each others hats, and they all shout at the same time- that one I am sure you can't do with at most 1 error. I might need to eat humble pie once again.

4) n people, c colors, everyrone sees everyone else's hat, simul shouting, deterministic, and want to maximize how many get it right. OH- and adversarial.

Can do it with floor(n/c) but can't to better. See writeup.

POINT: The argument that you can't do better is a probabilistic argument! That's great! It may help bridge the gap between recreational and serious math (is there even a gap anymore?) that we use a Prob method on a fun hat problem! 

Sunday, July 09, 2017

Two hat problems you may or may not have seen but I have a point to make about one of them

Hat problems are fun and often require clever solutions. I have posted about one type of hat problem here.

In this post I ask three. For two of them I have a point to make which I will make when I post the answer later in the week. Feel free to post your thoughts and answers, BUT be warned that if you don't want to know the answer then don't look at the comments.

1) N people stand in a line and are numbered 1,2,3,..,n. If i < j then person i can see person j's hat color.

Hats are going to be put on the heads RANDOMLY- prob of RED or BLUE is 1/2. (so no adversary)

The people, in order 1,2,3,..., n either say RED or BLUE or PASS.

We want to maximize the probability that (1) someone does not say PASS, and (2) ALL who do not say PASS are correct.

They can meet ahead of time to discuss strategy but after the hats are on ALL they can say
is RED, BLUE, PASS and only when they are supposed to.

(Also try with 3 colors, 4 colors, etc.)

(ADDED LATER- some comments I got inspire a clarification and a new problem.

Clarify: NO adversary. The players are deterministic. So the prob of failure is based on the randomness of the hats. So you want to minimize the number of seq of R and B where the players mess up.

Another problem: Their IS an adversary but the players are allowed to flip coins. Now the prob of failure is based on the players coin flips.

2) omega people in a line are numbered 1,2,3,...  If < j then person i can see person j's hat color.

An ADVERSARY is going to put hats on peoples heads RED or BLUE.

The people in order 1,2,3,... either say RED or BLUE

They can meet ahead of time and discuss strategy as in problem 1. The Adversary KNOWS the strategy

a) Prove or Disprove: there is a protocol  such that they always get all but a finite number of hats right

b) Prove or Disprove: there is a protocol such that they always get all but at most ONE right.

3) N people in a circle (so they see each others hats).

An Adversary is going to put hats on peoples heads- there are c hat colors.

The people AT THE SAME TIME shout out a hat color.

Give a protocol that maximizes how many get it right (in the worst case).  Show there is no better protocol.

Wednesday, July 05, 2017

The Complexity of Rubik's Cube

In my book I use Rubik's Cube as an example of a puzzle we can computationally solve efficiently (as opposed to Sudoku or Rush Hour). How does this square with the new result of Erik Demaine, Sarah Eisenstat and Mikhail Rudoy that finding the shortest solution is NP-complete? New Scientist now proclaims It’s not you – solving a Rubik’s cube quickly is officially hard. No, it's still you.

To study the complexity of Rubik's cube we can't just fixate on the 3x3x3 cube with its finite state space but on the general NxNxN cube. (One could also generalize to 3-sided hypercubes in N dimensions but good luck constructing a 3x3x3x3x3 Rubik's cube.)  For a given mixed-up NxNxN cube we can find in polynomial time a polynomial number of steps to return the cube to the original state. A mixed-up cube is just a member of the permutation group of the 6N2 small squares and we want to find a sequence of generators (allowable rotations of the cube) that yield the mixed-up cube. Group theorists have come up with very efficient algorithms to find these sequences which we can apply in reverse to solve the cube.

Group theory does not necessarily come up with the shortest possible sequence and only in 2010 did we discover that solving the worst-case 3x3x3 cube, the so-called "God's Number", required 20 moves. A year later Demaine et. al showed that the minimum sequence for an NxNxN cube is Θ(N2/log N).

Two weeks ago Demain, Eisenstat and Rudoy posted their proof that given a fixed NxNxN cube finding the shortest sequence in NP-complete. Their proof is combinatorial, showing that solving an NxNx1 cube is NP-complete and reducing to the NxNxN cube.

So there you have it, solving a generalized Rubik's cube is easy but finding the shortest possible solution is hard. Despite Rubik's Cube achieving popularity during my nerdy high school days, I never had the patience to solve it, but that's just me.