Consider a two player game in which the players take turns breaking up an NxM block of chocolate. On a players turn, they select one existing block of chololate and break it in a straight line along one of its break lines making two smaller blocks of chocolate. The players alternate turns, selecting a single block and breaking it into two smaller blocks. If on a players turn they have no legal moves (because there are only 1x1 blocks left), they lose. Determine the optimal strategy and who will be the winning player from a starting NxM position.To clarify, a legal move is to select an available NxM block, then select a positive integer k less than N or a positive integer i less and M and turn that NxM block into either a (N-k)xM block plus a kxM block, or into a Nx(M-i) block plus a Nxi block. To give some examples, in the 1x1 case the first player loses (having no legal moves), and in the 1x2 case the first player wins (by making the only legal move).
Breaking Chocolate
Alright, new puzzle time. I'm a bit surprised I hadn't posted this puzzle before, as I thought of it many years ago. Anyway, I sort of came up with it myself, but I may have had some influence from Carl Michal. Also, this game appears exactly in Winning Ways For Your Mathematical Plays, so I cannot claim that that book didn't give me inspiration. Anyway, on to the puzzle:
Trinary Answer
Two posts in one month? Unheard of. Anyway, I found a new puzzle recently, so now I have two puzzles I haven't posted and I want to waste them as soon as possible (also, post them before I forget what they are).
Alright, solution to last times light bulb puzzle:
You turn on one switch and leave it on for a reasonable amount of time, then turn it off and turn on a different switch. Go to the other building and check to see if the light bulb is on, warm, or cold, each of these results points to a different switch.Not much to it, there are proably other answers, but its hard to come up with one as reasonable as this one. If you have any, I would love to hear them.
A Silly Puzzle
New puzzle time? I am probably out of puzzles by this point, time to dig up the old bad ones from years ago. Actually, I also thought of a somewhat decent one, but I want to do this bad one first. I first heard this puzzle from Carl Michal:
There is a building with a lightbulb in it, and in the building next door there are three switches, one of which can turn the lightbulb on or off. You are in the building with the switches, and may manipulate them as you like, when you are done you may go to the building with the light bulb. You may not return to the bulding with the switches once you leave. You must determine which switch operates the light bulb.The solution is somewhat silly, in that I mean to say that if you converted this problem into "math" then there is no solution (this isn't hard to prove). You can make use of the "reality" of the situation in your solution. The actual solution is quite reasonable, not actually bad at all, just not mathematical. It is a practical solution one could impliment and does not require anything unstated from the puzzle (such a calling a friend to come help, or being able to see the light from the next building over).
Off The Edge
I still blog, I swear. Anyway, I suppose I should put up the solution for the plane puzzle from last time.
There is a standard puzzle of this form where you have camels going into a desert and you have to feed them, bananas or something, but each camel can only carry a finite amount of food. Suppose a camel can carry enough food to go 90 meters (I choose 90 so I can take fractions of it easily), then with two camels you head out 45 meters, transfer all the food from camel 2 to camel 1 and can then go another 90 meters with camel 1 making a total of 135 meters. With 3 camels we can go 30 meters out, move all the food from camel 3 to 2 and 1 and then make it another 135 on top of the 30 for a total of 165. In general if one camel can carry the food for distance x, then the nth camel adds an extra x/n to your total distance.
Anyway, then with our planes we can use this sort of strategy to go 1+1/2+1/3 times the distance half-way around the world, but that is only 11/6, so we are short. The solution to this is to make use of the fact that the puzzle is happening on the world, so we can go around the other way. Use two planes to go 3/2 the distance of one plane (that is 3/4 of the way around the world) and have the other plane meet you by going the last bit in the other direction.
Its not much of a puzzle, but its sort of cute and I thought it was a neat variation on a standard puzzle.
Flying Along
Ok, time for a new puzzle. I found this one a few months ago over at Tanya Khovanova's math blog:
You are sitting at the equator and you have three planes. You would like to fly around the equator. Each plane is full of gas and each has enough gas to take you half way around. Planes can transfer gas between themselves mid-air. You have friends, so that you can fly more than one plane at once. How do you fly around the equator?Its sort of like an old puzzle involving camels going into the desert and you only have a finite amount of food for them, but a bit of a twist on this one. Anyway, thats it for now.
Find The Circle
OK, time to post the solution to the sums of squares problem I put up a little while ago.
I once heard of a game that Feynman used to play with his classmates called "find the circle" in which somebody would state some mathematical fact that has a pi in it and the other players would have to figure out what circle came up in the math behind the fact that resulted in a pi showing up (I can currently find no evidence of this game ever being played, so its possible I was imagining this story, or the relavent character was not Feynman). Essentially, the point is that the only places that pi ever would show up involve a circle, and when it shows up other places you can bet there is a circle hiding somewhere. Personally I don't agree with that philosophy, I think that pi is more fundamental than that, but this puzzle will not be a demonstration of my belief, a circle will show up quite nicely for us.
Alright, let us suppose we have a function, called g(k), which is the number of times that k can be written as the sum of two squares as outlined in the puzzle. Next we will let f(m) be the sum of 1 through m of g(k), then the average number of ways that numbers can be written as the sum of two squares is f(n)/n, that is, we seek to prove that for large N
f(N)/N = πConsider taking some value k, for each way it can be expressed as the sum of two squares, we can write x2+y2=k for some (x,y), and for each pair (x,y) that solves x2+y2=k, we have a way to write k as the sum of two squares. That is, for each point in the plane with integer coordinates on a circle of radius √k, we have a way to express k as the sum of two squares. So we can say that g(k) is the number of integer points on a circle of radius √k. This means that we can say that f(m) is equal to the number of integer points that lie on a circle of radius equal to root some integer less than or equal to m. But every point with integer coordinates lies on a circle of radius equal to the square root of some integer (specifically (x,y) lies on a circle of radius √(x2+y2)) so f(m) is simply equal to the number of integer points that lie inside a circle of radius √m. So, how do we calculate the number of integer points that lie inside a circle of radius R? Suppose for each such point, we shade the 1x1 square that is to its lower left. Then the total area shaded is equal to the number of points, and we can easily see that the shaded area is approximately equal to the area of the circle of radius R. I always hate using the term "approximately" in a non-technical sense though, so lets be technical about it. It is easy to see that the shaded area equal to the circle area up to an error term that is, at most, the area of a strip with width √2 that runs around the circumference of the circle. In reality the error will be much smaller than this, we tend to have missing area in the upper right parts and extra area in the lower left parts and these will typically cancel pretty well, but nevermind that, I want an easy upper bound on the size of the error term. Since the shaded area is known to equal f(m) and the area of a circle of radius √m is πm, we can see that
f(m)=πm+C√mwhere C√m is our error term, C can be positive or negative, and can depend on m, but its absolute value is bounded by a constant (the constant being 2π√2, for those paying attention). So finally we can see that
f(N)/N=π+C/√Nfor large enough N to consider the second term small, the average number of ways the first N numbers can be written as the sum of two squares is π.
Sums Of Squares
New puzzle time? New puzzle time.
I first found this one at Futility Closet:
Consider the number of ways a positive integer can be written as the sum of two integer squares, for example, 8 can be written four ways, m2+n2 as (m,n)=(2,2), (-2,2), (2,-2), (2,2), while 5 can be done eight ways (2,1), (-2,1), (2,-1), (-2,-1), (1,2), (-1,2), (1,-2), (-1,-2), and 7 cannot be written as the sum of two squares at all. Over a very large collection of integers from 1 to N, the average number of ways a number can be written as the sum of two squares approaches π, why should this be?Just in case we are using different browsers, π is supposed to render as pi, it looks a bit funny in firefox. The puzzle is a bit of a weird one, being something of a proof more than anything, but there is a proof that can be understood only using high school math, so I don't think its too tricky. There are probably more convoluted proofs, of course, being that π is involved.
Subscribe to:
Posts (Atom)
