Sunday, July 14, 2013

823 Years

A passitaround has recently occurred on Facebook that runs, with variations, something like this:

March 2013 will include five Fridays, five Saturdays, and five Sundays, a phenomenon that occurs only once every 823 years.

Is this true or not?

The formula of my last post can help with this. First of all, what does a month look like if it has five of each of those three weekdays? It then will have four of the others, for a total of 31 days. Hence such a month must be a 31-day month. A look at calendar patterns will reveal that such a month must have the 29th of the month on a Friday. The above version of the post sets the month as being March, which has value 0. Let us substitute this in the formula and see what happens:

W = Y + M + D (mod 7)

6 + 28 = Y + 0 + 29 (mod 7) (can add a multiple of 7 to either side)

5 = Y (mod 7)

This says that the Doomsday of the year must be 5, or Thursday. Let's make a table of the first 28 years of this millennium, backing up to include 1999. This table shows for each year in the table the Doomsday number of that year above it.

 1234567
11999-2000200120022003-
22004200520062007-20082009
320102011-2012201320142015
4 2016201720182019-2020
5202120222023 202520262027


Note that each column has 4 years in it. This means in a period of 28 years, each Doomsday occurs 4 times, so that each Doomsday occurs 4/28 = 1/7 of the time. Further, this pattern repeats indefinitely. The years 2028 - 2055 will show exactly the same pattern of Doomsdays, as well as 2056-2083 and so forth.

This implies that on the average, years with a March with 5 Fridays, Saturdays, and Sundays in it occur every 7 years on the average, not 823 years. It does not occur every 7th year, but in a more complicated pattern, but it is still once every 7 years on the average. This is slightly off because of the Gregorian rule, which alters this sequence of years every time a century year that is not a leap year is encountered.

The questions I have at this point are: Who started this 823 thing to begin with, and why did so many people believe it?

 

 

 

Thursday, July 04, 2013

Find the Right Date

Many times people ask questions about dates, since dates are not readily obvious. Some of these questions might be:

In what years is the Fourth of July on a Wednesday?
In what months this year is the 13th of the month on a Friday?
When is the third Thursday of August, 2013?
On what day of the week was 1969 July 20?
On what day of the month is the next Sunday after 2013 March 27?

Most people when confronted with these questions will consult a calendar. However there are several ways of finding it without using a calendar or notes. One of these is based on this formula:

W = Y + M + D (mod 7)

where W is the number of the day of the week, Y is the Doomsday Number of the year, M is the number of the month,D is the day of the month (e.g., on the 4th of the month, D = 4), and "mod 7" means we throw out all 7s in the calculation, so for example, 19 = 5, because their difference, 14 = two 7s, which we throw out. In this formula we always take remainders on division by 7.

Let's explain each of these in detail. Y is the Doomsday number of the year, and is based on the Doomsday Rule, which shows how to compute the Doomsday of a year CA, where C is the century, and A is the year of the century; e.g., for 2013, C = 20 and A = 13.

1. Divide A by 12, getting a quotient and remainder. Divide the remainder by 4 and take the quotient. Add both quotients together and take the remainder upon division by 7. Example, 2018. 19 divided by 12 yields 1 with a remainder of 6. 6 divided by 4 gives a quotient of 2. 1 + 6 + 2 = 9, which leaves a remainder of 2 when divided by 7.
2. Divide C by 4 giving a remainder of r. Then the Doomsday number is 3 - 2 x r. If this is negative, add 7 over and over again until it is positive. For 2013, 20 divided by 4 yields a remainder of 0, so compute 3 - 2 x 0 = 3. Or as John Horton Conway puts it: for Quadrennial centuries take Tues., and for every century after that, go back by twos.

The numbers correspond to the days of the week according to this table:

Sunday1
Monday2
Tuesday3
Wednesday4
Thursday5
Friday6
Saturday7

For 2013, this yields Thursday, so the year number Y = 5.

M is the month number. That is given by this table:

0February(common year),March,November
1June
2September,December
3April,July,(leap year)January
4January(common year),October
5May
6August,(leapyear)February

It is best to remember the 12-number string (we do something like this all the time with telephone numbers and credit card numbers) 400-351-362-402, and change 400 to 360 in leap years. Or you can remember the 7 categories of months:

Here is an example date. 1969 July 20. 69 divided by 12 yields 5 with a remainder of 9; 9 divided by 4 gives a quotient of 2. 5 + 9 + 2 = 16; remaider after dividing by 7: 2. The 1900s are 3 centuries past the Quadrennium (1600s), so take 2 x 3 = 6 days before Tuesday and get Wednesday. 2 days past Wednesday is Friday, so the Doomsday of 1969 is Friday, and the Doomsday Number Y = 6. The month number M of common year July is 3, and the day number is 20. So we compute the weekday number as:

W = Y + M + D (mod 7)

= 6 + 3 + 20 = 29 = 1 after throwing out the 7s

So 1969 July 20 was a Sunday. That's the day Neil Armstrong landed on the Moon, so the Moon is a Sunday World.

The equation W = Y + M + D (mod 7) has four variables. If any three are known, the fourth can be computed. This leads to four different types of date questions.

Type 1. Y is unknown. We know the month and days of the month and week and want to find the year. A typical question might be "In which year is April 4 on a Tuesday?" The equation is Y = W - M - D (mod 7). A real world example would be if someone found an old document marked "Tuesday, April 4" but the year doesn't appear anywhere. Then this formula gives the Doomsday number of the year. It then remains to search years to find which one has this Doomsday. One can count through the years, adding 1 for each common year and 2 for each leap year.

Type 2. M is unknown. We know the year, day and day of week but want to find the month. An amusing example is to find out when all the Friday the 13ths of the year occur. The equation is M = W - Y - D (mod 7).

Type 3. D is unknown. We know the year and month, and the weekday, but not the day of the month. This appears commonly in finding out when meetings and certain holidays occur.The formula is D = W - Y - M (mod 7). For example, in finding out when the third Thursday of August 2013 is, 2013's Doomsday is Thursday, which has value 5, and August's value is 6. So compute D = W - Y - M = 5 - 5 - 6 = -6 = 1, when we add 7. This just tells us that August 1 is Thursday, and so is the first Thursday of the month. The third Thursday is obtained by adding 14 to this: August 15.

Type 4.W is unknown. We know the date but not the day of the week. The formula is W = Y + M + D (mod 7).

Most date questions fall in these four types. One that doesn't is "What day of the month is the next Sunday after 2013 March 27?". One could ask what day of the week is 2013 March 27. That's a Type 4 question. Then one can figure from that when the next Sunday is.

The things to remember with this system are the Doomsday Rule and the month numbers. Then you can tell what day of the week any date is, as well as answer many other date questions.

 

 

 

 

Sunday, October 16, 2011

Marilyn Vos Savant's Even and Odd Game

On 2011 October 16, Marilyn Vos Savant proposed a simple game:


"As children, my siblings and I often settled a disagreement with a game called
"Evens and Odds." In this game, one side is assigned "evens" and the other is
assigned "odds". Then on the count of three, a representative of each side reveals
a number of fingers from zero to five. If the sum of the two numbers is even,
the "evens" win; if the sum is odd, the "odds" win. Is this method fair? Or
do the "evens" have an advantage? - Andy G., Cedar Hill, Mo.


The game is fair. One might guess that the "evens" have an advantage because
the sum of two even numbers is even and the sum of two odd numbers is even,
too. Only an odd number plus an even number will yield an odd sum. But there
are two ways to get an odd sum: ()1) an odd plus an even, and (2) an even plus
an odd. So there are twice as many odd sums as you might think. "Evens and Odds"
is a nice game. The odds are even!"


She puts an interesting little pun at the end. But she still has not explained
why it is fair. If one side plays evens twice as much as the other, does that
get an advantage? Also if Evens plays even, then Odds can beat him by playing
odds. But then Evens can win by playing odds too. But then Odds can beat that
by playing evens. So it goes around in a vicious cycle and it is hard to know
who has the advantage. Game theory comes to the rescue. First of all it calls
upon us to list the strategies for each side. Each side can play a number from
0 through 5. But playing a 2 is the same as playing a 4, isn't it? Because both
are even, either wins against an even number and loses to an odd number. So
that reduces the number of strategies on each side to just two: even and odd.
These can be described by a game matrix as follows:

















 EvenOdd
Even1-1
Odd-11

So for example, if Even picks the first row and Odd the second column, the
result is -1; i.e., Even wins. The game matrix is given in terms of how Even
fares; Odd fairs the exact opposite. The sum of the results is zero, as one
player wins and the other loses. We call such a game a "zero-sum game". According
to the theory, the optimal strategies form a "saddle point". That is, a pair
of strategies, one for each side, such that if either deviates from these strategies,
he can do no better (and probably will do worse) than how he is doing now. A
property of a saddle point matrix entry is that it is the minimum of its row
and the maximum of its column. However, an examination of this matrix reveals
that it does not contain a saddle point. So what do we do now? The argument
I gave earlier suggests that one should keep one's strategy to himself; if you
know what the opponent is going to do, by playing the appropriate strategy,
you will win. So how about flipping a coin? Even you won't know the result of
that. If you do that, then half the time you will win and half the time you
will lose. We say that we play the strategies in the ratio of 1:1. Of course
Odds also can play the same strategy, since the game is symmetric. The result
in the long run is that the wins and losses for Evens will cancel each other
out, and the value of the game (expected outcome) is zero; i.e., the game is
fair, verifying what Marilyn said. But why bring in this stuff with the fingers,
when all that is needed is whether the number is even and odd? It seems to me
that the number of fingers should be significant, too. So let's alter the game.
The two players each put out a number of fingers. Evens wins if the total is
even; Odds wins otherwise. But this time they win the total number of fingers
(except that we make payment in dollars instead, of course). So if Evens plays
3 and Odds 5, then the total is 8, so Evens wins 8 dollars. Now the actual number
of fingers is significant, so each player now has six strategies. So now the
matrix looks like this:












 012345 
00-12-34-5 
1-12-34-56 
22-34-56-7 
3-34-56-78 
44-56-78-9 
5-56-78-910  
        


One can argue like this. If Evens plays 3, Odds can maximize his outcome by playing 4, causing a 7 point loss for Evens (and gain for Odds). But if Evens knows Odds will play 4, he will play 4 also and win. But if Odds knows Evens will play 4, Odds will play 5 and win 9. But if Evens knows this, he plays 5 too, and wins 10. But if Odds knows this, he plays 4 and wins 9, bringing us back to the beginning. This suggests that some random mix of 4 and 5 fingers is optimal for both players, but if you calculate how 0, 1, 2, or 3 fingers fares against this mix, one gets better results. This game matrix is considerably more complicated.

So to find the optimal strategy, I converted the game problem into a linear program, using the standard procedure, and solved it using a program I devised to illustrate the simplex algorithm to a class at Florida Tech at Ft Lee, Virginia. The result is:








 012345 
00-12-34-51
1-12-34-56 
22-34-56-7 
3-34-56-784
44-56-78-93
5-56-78-910 
 242    


In other words, a strategy for Odds is to play Strategies 0, 1, and 2 in the ratio of 2:4:2. This is the same as 1:2:1. In other words, pick a number of
fingers between 0 and 2 at random but put higher odds (twice as high) on 2 fingers. Another way is to flip two coins, count the heads, and display that number of fingers.


How about Evens? His optimal strategy is to play 0, 3, and 4 fingers in the ratio of 1:4:3. The numbers in the odds ("oddments"?) add to 8, so that this strategy can be realized with an octahedral die. Since the game matrix is symmetric, an optimal strategy for either player is to play the other players' optimal strategy. So either player can play fingers 0, 1, and 2 according to odds 1:2:1, or to play fingers 0, 3, and 4 in the ratio of 1:4:3. A theorem of game theory
states that if A and B are any two optimal strategies, then any linear combination
of A and B is also an optimal strategy. So if you add the two and get fingers
0,1,2,3,4 according to odds 2:2:1:4:3, that is also an optimal strategy.
The value of the game is the same as before: zero, so it is also a fair game. The game resembles Three-Finger Morra.


So Marilyn is correct, but game theory explains in more detail just why the
conclusion she came to is correct.


Jim Blowers

Thursday, April 29, 2010

This blog has moved


This blog is now located at http://hilhotel.blogspot.com/.
You will be automatically redirected in 30 seconds, or you may click here.

For feed subscribers, please update your feed subscriptions to
http://hilhotel.blogspot.com/feeds/posts/default.

Wednesday, May 27, 2009

Schoolgirls do not Necessarily Form a Group

In the previous blog, I said that I was not certain that defining an addition on the schoolgirls of the Kirkman Schoolgirl Problem would produce an Abelian group. The Kirkman Schoolgirl problem was to find a 7-day schedule of 3x5 schoolgirl formations among 15 schoolgirls so that each pair of girls marches in the same line once and only once. I then defined an operation + on {0, the schoolgirls} by:

0+0=0
0+a schoolgirl is that same schoolgirl back
Any schoolgirl + herself is 0
If A and B are any two schoolgirls, find the line that contains them (guaranteed by the conditions of the problem). There are three girls in that line, namely A, B, and another schoolgirl C. Define A+B = C.

The operation is defined to be commutative. Also any two schoolgirls added make another one, 0 is the identity, and each girl is her inverse. The only requirement left to make the schoolgirls and 0 into an Abelian group is the associative law:

(A + B) + C = A + (B + C)

I remarked on how hard it would be to prove this on the schoolgirls.

Today I found that the conjecture is false. Given a solution to the schoolgirls problem, if you define + like this, it may not be an Abelian group, since it may not obey the associative law. Take this situation, for example:

1pm2pm3pm4pm5pm
Day1ABCDEFGHIJKLMNO
Day2ADGBEJCFMHKNILO
Day3AENBDOCHLFIKGJM
Day4AIMBGLCDKEHOFJN
Day5AHJBKMCEIDLNFGO
Day6AFLBINCJODHMEGK
Day7AKOBFHCGNDIJELM

This comes from a column on the Mathematical Association of America website. Consider the sums (B + D) + A and B + (D + A). The first one is

(B + D) + A = O + A

This is because BDO form a line in the Kirkman schedule. Further,

O + A = K

Since this OAK tree is in the Kirkman Schedule. So (B + D) + A = K.

The second one runs:

B + (D + A) = B + G

since ADG is a line. Further,

B + G = L,

Since BGL is a line. Therefore,

(B + D) + A != B + (D + A)

So that + is non-associative.

This shows that there is a solution to the Kirkman problem that is not the standard one given by using Klein triples in Z24. In fact, I hear tell that there are 7 solutions, of which the Z24 is just one.

Thursday, May 14, 2009

Kirkman's Schoolgirls

I find this to be a fascinating problem. Kirkman in 1850 poses this problem:

Fifteen young ladies of a school walk out three abreast for seven days in succession: it is required to arrange them daily so that no two shall walk abreast more than once.

I find it interesting that he refers to breasts, but that's for another blog. I want to see how to solve this problem.

To solve this problem, I look to elementary binary groups (EBGs). These are groups that are products of copies of Z2, the group whose elements are {0,1}, and 0 plus any element is that element back again, and 1 + 1 = 0. Let's take products of 0 though 4 of these:

0. Identity. Product of no Z2s. This is the identity group. Only one element. Not much of interest.

1. Binary. Product of one Z2; i.e., Z2 itself. This is the 0-1 group. The subgroups are Z2 itself and the identity group. This is the group of off and on, back and forth, 0 and 1, something and nothing, and so forth.

2. Klein triples. Product of two Z2s; i.e., Z2xZ2 or Z22. This is called the Klein 4-group. Suppose its elements are {0, a, b, c}. Then 0 + anything is that something back again. An element plus itself is 0; for example b + b = 0. If you take two non-equal non-zero elements and add them, you get the third one. For example, b + c = a, and a + c = b.

We shall meet this group later, and so I will give it a special name. I shall call the non-zero elements of an instance of this group a Klein triple. So {a, b, c} is such a triple, as is {3, 5, 6} with the operation of (logical) AND. 3 AND 5 = 6, since in binary, if we and 011 and 101, we get 110 (add the components as in Z2).

3. The Fano Plane. Product of three Z2s. This is a group of 8 elements, with 7 non-zero elements. How many Z2xZ2 subgroups does it have? How many Klein triples does it have? You can select any of 7 elements for the first element. You can't select that one again, but you can select any other for your second element, giving you 6 choices, but then that forces your third element, which is the AND of the first two elements. That's 42 possibilities. But each Klein triple occurs 6 times in this enumeration, so we have only 7 subgroups. Since subgroups isomorphic to Z2 are essentially the same as elements of order 2, there are 7 of these. So which of these 7 4-element groups contains which of the 2 element groups?

What if you intersect two Klein triples, or Z2xZ2s? They have to intersect in a Z2. This is similar to two planes in 3-space intersecting in a line. So each of seven 3-sets intersect each other in exactly one element. If you try to construct a set of 7 elements like this, you get something like:

123
145
167
246
257
347
356

This is called a Fano Plane. Fano planes have interesting properties. For example, each pair of triples intersects in a single element, and if you name two elements, one and only one triple has both of them. This makes it a magic pattern, similar to magic squares, and some cultures must have worshipped this plane. A Fano Plane is also a (7, 3, 1) design - read a book on combinatorics to find what that is.

4. Kirkman Schoolgirls. Now let's look at Z24. This has 15 elements of order 2, forming 15 subgroups of order 2. I shall call these elements schoolgirls. Linear algebra tells us that there are then 15 subgroups isomorphic to the Fano group above (Z23). How many groups isomorphic to Z2xZ2 are there, or what is the same thing, how many Klein triples are in the Kirkman group?

Number the girls 1 through 15. Pick one girl. There are 15 possibilities. Then pick another one. 14 choices. Your choice of the third girl is now forced. You must take the AND of their numbers and find that girl. So there are 14*15 or 210 triples, but each triple occurs 6 times in that total, so there are really only 35 such triples. Here are these triples, arranged in 7 columns to represent the 7 days. Given in this form, these triples solve the Kirkman problem (this arrangement is due to Brown and Mellinger):
RANK/DAYSUN MON TUE WED THU FRI SAT
1123 145 246 167 347 356 257
241014 21315 189 2911 21214 2810 11415
37815 3910 31215 4812 11011 41115 4913
45912 6814 51114 31314 5813 11213 3811
561113 71112 71013 51015 6915 7914 61012
The Kirkman Schoolgirls bring up some interesting problems. For example, each day consists of one even-even-even triple and four triples with two odd girls and one even one. If you divide by 2 and take the quotients in one table and the remainders in the other one, you find a lot of structure. In particular, the first table contains clusters of elements from 1 through 7, and if you look through these, you will see the Fano plane in disguise. The Fano plane also appears in the top row of the schedule above.

The most interesting problem is whether there is a solution to the Kirkman Schoolgirls essentially different from this one. Here is an idea that may shed some light on this. Suppose someone hands you a 7-day Kirkman schoolgirl schedule. Let us attempt to form a group of order 16, consisting of these girls and the number 0. I shall define an addition + on these girls like this:

1. 0 + 0 = 0.
2. 0 + any girl = that girl again.
3. Any girl + herself = 0.
4. Compute the sum of two girls as follows. These are two separate girls. By the Kirkman property, there is one and exactly one line in the Kirkman schedule that contains both these girls. The sum of these girls is defined to be the third girl in that line.

It is easy to prove that the sum of two girls is a girl, that 0 is the identity, and each girl is her own inverse. The tricky part is to show that + is associative, that is, for all elements of the group a, b, and c, a + (b + c) = (a + b) + c. If any of a, b, and c are equal to each other or to 0, that is easy to prove. The tricky one is for different non-zero a, b, and c. a + (b + c) means go to the line contain Betty and Carol and find, say Doris in the same line with them, then find the line with Doris and Anne and take the third girl in this line. (a + b) + c means go to the line containing Anne and Betty and find, say Ethyl in their line, then find the line with Ethyl and Carol in it and take the third girl in that.

Are these two third girls the same? If one can prove that is always the case, then 0, the girls and + form an abelian group isomorphic to Z24. Further, taking the 4-element subgroups of this group gives you back the original Kirkman design. But maybe one can't prove this. Is it possible to find a Kirkman schoolgirl arrangement where this set is not a group? If so, there are at least two distinct solutions to the Kirkman Schoolgirl Problem.

Monday, January 19, 2009

The Big Rip Ripoff?

In the 2009 February issue of Astronomy magazine, by Liz Kruesi, Liz explains that it is possible the universe could rip itself to infinity instead of just simply expanding into the cold wilderness. The usual theory now is that the universe will continue expanding until galaxies, stars, planets, rocks, and even atoms are incredible distances apart, and they will continue to expand forever. This is called the Big Chill. What is proposed in this article is that instead, the universe will continue to expand for a while, and then the expansion will increase, slowly at first, then more rapidly. At some time, maybe a few hundred billion years from now, it will expand so rapidly that it will tear everything apart and send everything to infinity in a finite amount of time, a time called the Big Rip.

This reminds me of another situation. Suppose you have a population that is growing at a rate proportional to the population itself; for example, if it is humans, then the women have a constant rate of childbearing. To see what kind of growth rate results, differential equations can help. Suppose you have an initial population, and that the growth rate is some constant r times the population. If we let t denote the time, and x the population, the equation is:

x' = rx

or dx/dt = rx

The way to solve this is to take this last equation and invert it:

dt/dx = 1/rx

You then integrate both sides with respect to x to get:

t = log(rx) - B

where B is some constant to be determined by initial conditions. Solve for x and you get:

x = Cert

where C = eB. This is an exponential function. An exponential function grows rapidly, and the more you go out, the more rapidly it grows. Note that x = x1, as anything to the 1 power is itself again. The number 1 here is a growth factor that in some ways tells how fast the function goes.

But suppose the increase is more than exponential. Suppose instead that we use some number greater than 1 as the power to which we take x. Suppose we take 2 instead. Then we get:

x' = rx2

or dx/dt = rx2

The way to solve this is to take this last equation and invert it:

dt/dx = 1/rx2

This is a power function, and the integral of 1/rx2 is -1/rx + D. That is,

t = D - 1/rx

or upon solving for x,

x = 1/r(t-D)

I chose D because it stands for "Doomsday". Now we have t in the denominator, so something really off the wall happens when t rises to become equal to D. That means the denominator becomes 0, with the numerator not 0. Such a division can't be done, but it can be thought of in a way as representing infinity, and indeed the value of x increases without bound as t approaches the dreaded Doomsday D.

Doesn't this sound like the Big Rip scenario? If we let a represent the exponent (which is 1 for the first example and 2 for the second), then it turns out that when a is 1, then the function stays finite forever, but when it is greater than 1, then the function reaches infinity in a finite amount of time. Is there such an a around in cosmology? Yes there is, according to the article. It is a number called the "equation of state" w. If this number is -1, then the universe will always exist. If it is less than -1, the universe will cease to exist eventually. The article associates -1 with the cosmological constant, and less than -1 with something called "phantom energy" - that maybe some dark energy out there somewhere makes w less than -1 and hence the exponent is greater than one, so an infinite blowup in a finite amount of time occurs. It is also interesting that w is the negative of the a I use in these two examples.

Can such a thing as a Big Rip happen? I don't think so, because I believe in the Infinity Principle: you cannot have a far infinity in the real world. This means a mass can't have infinite density, a distance can't be infinite and so forth. You have to allow for "deep" infinity, however, else we can't go anywhere, as Zeno's paradox shows, but an infinity that is way far out there, so to speak, cannot exist in our realm of existence. So I believe that before the Rip can occur, it will stop when quantum effects stop the expansion, leaving the Universe an extremely sparse sea of elementary particles.