## Yoak: Average Salary

Finding yourself chatting around the water cooler one afternoon, you and two co-workers agree that you would all like to know the average of your three salaries but none of you want your individual salary to be known to either of the other two.  Without need of involving any external person or machine as some sort of secret keeper, how can you achieve this end?

## Yoak: Foxy!

There are five holes in a row in my yard.  A fox lives in them moving around as follows:  Each night, it abandons it current residence and moves to an immediately neighboring hole.  If I’m allowed to check one hole each morning, identify a sequence of holes that I can check in order to be sure to catch the fox.

## Yoak: Simple Arithmetic

I recently got back in touch with an old friend and puzzler and he reminded me of a puzzle that he once told me about that confounded me for weeks.  Faced with a restatement of it, again I couldn’t come up with an answer for the life of me.  The mechanism is painfully simple, but there is something about the particulars here that short my mind out.

Combine the four number 1,3,4,and 6 with operators of addition, subtraction, multiplication and division (and parenthesis to indicate order of operation) to yield an expression equal to 24.

I assure you that you can take this in the most straight-forward manner possible.  You aren’t mean to smoosh them together to get “13” out of 1 and 3.  You aren’t meant to use “1” as a problem number or something of that sort.  An answer will look something like this:

(4-1)*3/6

except that is equal to 1.5 .  Your expression must equal 24.

I’m interested to hear if this is as difficult for others as it was for me.

## Yoak: Lewis Carroll – Some Chance I’m Being Obtuse

This will be the last of my Lewis Carroll posts.  In Pillow Problems, Carroll writes:

Three Points are taken at random on an infinite Plane.  Find the chance of their being the vertices of an obtuse-angled Triangle.

Note: An obtuse-angled triangle is one that has an angle measuring more than 90 degrees.

## Yoak: More Lewis Carroll – The Square Window

This puzzle is taken from a letter Carroll wrote to a 14-year-old girl named Helen Fielden.  Carroll writes:

I don’t know if you’re fond of puzzles, or not.  If you are, try this.  If not, never mind.  A gentlemen (a nobleman let us say, to make it more interesting) had a sitting-room with only one window in it — a square window, 3 feet high and 3 feet wide.  Now, he had weak eyes, and the window gave too much light, so (don’t you like “so” in a story?) he sent for the builder, and told hm to alter it, so as to give half the light.  Only, he was to keep it square — he was to keep it 3 feet high — and he was to keep it 3 feet wide.  How did he do it?  Remember, he wasn’t allowed to use curtains, or shutters, or coloured glass, or anything of that sort.

## Yoak: Lewis Carroll – Passing Shillings

Since my last post, I actually dug up one of my books with Carroll problems.  I’ll present this one in Carroll’s own words and add a few notes:

Carroll writes:

Some men sat in a circle, so that each had 2 neighbours; and each had a certain number of shillings.  The first had I/ more than the second, who had I/ more than the third, and so on.  The first gave I/ to the second, who gave 2/ to the third, and so on, each giving I/ more than he received, as long as possible.  There were then 2 neighbors, one of whom had 4 times as much as the other.  How many men were there?  And how much had the poorest man at first?

Notes:

A ‘/’ is clearly to be read as a shilling and the ‘I’ is to be read as 1.  With that, I think the operations is clear.  It is also clear that eventually someone will not be able to pass along 1 more shilling than he was passed, given the finite number of shillings in the game.  When that state occurs, instead of passing that person retains the shillings he was just passed.  We are then told that it is true that someone now holds 4 times as many shillings as one of his neighbors and are asked how many men there are and how many shillings the poorest of the group must have had to start.

## Yoak: Lewis Carroll, Colored Stones

I’ve enjoyed several books by and about Lewis Carroll with puzzles, games and neat observations.  I’m going to post a few here.  Here’s a simple one with which to get started.

Suppose that I secretly flip a coin and place either a blank or white stone in a bag based on the result.  I then put a white stone in the bag for two stones in total.  I invite you to pull one stone out and it turns out that it is white.  What is the chance that the other stone in the bag is also white?

## Yoak: Answer on GC: Another Buncha Prisoners

We said during the most recent podcast that we’d offer the answer to the ending puzzle on the website.

Twitter user @snoble posted a hint on #mathfactor that points to the right answer.

First, I’ll review the problem.  You and nine other prisoners will be lined up in the morning front to back.  Each of you will have either a blue or red hat placed upon your head.  Each person can see all the hats on the heads of people in front of him, but not the color of his own or of any of the people behind.

The guards will then proceed to the rear of the line and ask that person the color of the hat on his own head.  He must guess and if he guesses wrong, sadly, he’ll be shot.  Either way, the guard then proceeds to the number nine position and repeats through all of the other prisoners.

Knowing that this will happen and with a night to plan, what strategy can the prisoners develop to maximize their expected survival rate?

[spoiler]During the show, I suggested a 75% solution and claimed that you can do much better.  In fact, 95% of the prisoners should survive.  Here’s how it is done.

The person in the rear of the line announces the “red” if he sees an even number of red hats in front of him and “blue” if the number is odd.  He’ll be right about his own hat 50% of the time.  There’s no help for that as he has no information at all.  But from this, all future prisoners know with certainty the color of their own hat!  Here’s how:

If the person in the rear says “red,” number nine knows that he saw an even number of red hats.  If he also sees an even number of red hats, he knows that his own hat must be blue.  Likewise, if he sees an odd number of hats, the only way for ten to have seen an even number of red hats is if his own hat is read.

By keeping track of each answer and the change between even / odd indicated by the answers, each person can correctly guess the color of his own hat for a total of 95% success.

Interestingly, this works even if the guards know what the prisoners are up to.  Unlike the hat problem in GB where the hat placers can make failure 100% likely knowing the strategy by cheating and placing hats of all the same colors on the heads of the players, in this setup, the strategy works not only on random placement but also on malicious placement.

The hint offered on twitter was to think about “parity.”  When hiring computer programmers I would sometimes offer this as an interview questions and often the people who got it would answer me with this one word and we’d move on.  It refers to parity bits in some communication protocols on computers.  When you send information over the wire, the signal may occasionally be distorted.  Parity bits are an approach to self-correction.  Suppose you send through a block of 1024 bits, 1’s and 0’s.  Suppose that you use 1023 for data and in the last bit, called a parity bit, you send 1 of the there are an even number of 1’s in the other bits, and 0 otherwise.  The receiving party can then check to make sure that this works out.  If a bit got flipped, you can request re-transmission of that block.  Of course, two errors might give you a false positive here, but if you know about how often errors occur, you can choose the size of the block you send such that errors occur as rarely as you like (with an increased cost of transmission because of parity bits.)

[/spoiler]

## GC. Another Buncha Prisoners

Man, what is it with puzzlers and prisoners? Jeff Yoak lines ’em up and the stakes are high in this week’s puzzle.

Also, we are now twittering at MathFactor; each of the authors has an account of his own; mine is CGoodmanStrauss. You can tag solutions and comments with #mathfactor. See you there!

## GB. Hat Strategy

How can three people, each required to guess the color of hat on their head, strategize and maximize the chances they’ll all be right?