Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2016 September 20

From Wikipedia, the free encyclopedia
Mathematics desk
< September 19 << Aug | September | Oct >> September 21 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


September 20

[edit]

February 29

[edit]
Leap Days (PGC=Proleptic Gregorian Calendar)
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
1576 (PGC) 1560 (PGC) 1572 (PGC) 1584 1568 (PGC) 1580 (PGC) 1564 (PGC)
1604 1588 1600 1612 1596 1608 1592
1632 1616 1628 1640 1624 1636 1620
1660 1644 1656 1668 1652 1664 1648
1688 1672 1684 1696 1680 1692 1676
1728 1712 1724 1708 1720 1704 1716
1756 1740 1752 1736 1748 1732 1744
1784 1768 1780 1764 1776 1760 1772
1796 1792 1788
1824 1808 1820 1804 1816 1828 1812
1852 1836 1848 1832 1844 1856 1840
1880 1864 1876 1860 1872 1884 1868
1892 1888 1896
1920 1904 1916 1928 1912 1924 1908
1948 1932 1944 1956 1940 1952 1936
1976 1960 1972 1984 1968 1980 1964
2004 1988 2000 2012 1996 2008 1992
2032 2016 2028 2040 2024 2036 2020
2060 2044 2056 2068 2052 2064 2048
2088 2072 2084 2096 2080 2092 2076
2128 2112 2124 2108 2120 2104 2116
2156 2140 2152 2136 2148 2132 2144
2184 2168 2180 2164 2176 2160 2172
2196 2192 2188
2224 2208 2220 2204 2216 2228 2212
2252 2236 2248 2232 2244 2256 2240
2280 2264 2276 2260 2272 2284 2268
2292 2288 2296
2320 2304 2316 2328 2312 2324 2308
2348 2332 2344 2356 2340 2352 2336
2376 2360 2372 2384 2368 2380 2364
2404 2388 2400 2412 2396 2408 2392

From the table above, how many times does February 29 (Leap Day) fall on each day of the week in 400 years in the Gregorian calendar? GeoffreyT2000 (talk, contribs) 04:47, 20 September 2016 (UTC)[reply]

I think a useful reference is the article Dominical letter, which lists the frequency of each configuration of years.
In other words, the first column of the table refers to years which has a February 29 falling on Sunday. This corresponds to a leap year starting on Thursday, which corresponds to the double dominical letter DC. There are 13 such years in the 400 year cycle, as per the quoted article. Those correspond on your table to the thirteen years from 2004 to 2376, for instance. Frequency for the other colums are: Monday, CB, 15; Tuesday, BA, 13; Wednesday, AG, 15; Thursday, GF, 13; Friday, FE, 14; Saturday, ED, 14.
All in all, there are 97 leap years on the cycle. Because of the fact that this number is not divisible by 7, and that certain leap Julian years are ommited in the Gregorian cycle, one has a different frequency for each column. Pallida  Mors 12:25, 20 September 2016 (UTC)[reply]
Correction: The reason for the different frequencies is not that 97 is not divisible by 7. It's that the total number of days in the 400-year cycle, namely 146097, is divisible by 7. The 400-year cycle is exactly 20871 weeks, so it starts on the same day of the week every time. January 1, 2000 was a Saturday, and if we're still using the same calendar, January 1, 2400 will also be a Saturday.
That's what allows the variations to accumulate. If the number of days in the cycle were not divisible by 7, because 7 is a prime number, the differences in frequencies would disappear on the average, in the limit as the number of cycles goes to infinity. --Trovatore (talk) 18:21, 22 September 2016 (UTC)[reply]
Every simple calendar, such as the Julian and the Gregorian, has a period; that is, there is a cycle of years after which the cycle of days of the week repeat exactly in the same way. Of course such cycles have an entire number of weeks (that's the only way it could work such that the cycle start in the same day of the week).
So, does the fact that the total number of days in the cycle is divisible by 7 imply that the frequency of years falling on each column is different? No. the Julian calendar has a cycle of 700 years, after which every century repeats the exact configuration of dominical letters [indeed, there is a small cycle of 28 years after which the same configuration appears]. If we build the corresponding frequencies for each day of the week on the Julian calendar, we will find that there are 175 leap years over the cycle. Of these, exactly one seventh (25) correspond to leap years starting on each day of the week. Notice that the frequency is the same for each category, which derives from the fact that on the Julian calendar, the number of leap years is a multiple of 7 (175) and there is no jump or miss of leap years. On the Gregorian calendar, on the other hand, the number of leap years (or common years, for the sake) is not a multiple of 7; hence, there is no way of distributing 97 years evenly on seven clases. Pallida  Mors 10:34, 25 September 2016 (UTC)[reply]

General definition of addition and multiplication

[edit]

I have been trying to come up with general definitions of these two operations, without much success. This is what I have come up with.

Addition is an operation under which a set form an abelian group.

Multiplication distributes over addition (so multiplication cannot be defined without addition).

I'm not entirely happy with these definitions. The set forms an abelian group under multiplication, yet would satisfy my definition of addition. Can we do better?--Leon (talk) 07:21, 20 September 2016 (UTC)[reply]

I'm not really sure what you are asking. An abelian group is the typical way that the concept of addition is generalized. You seem dissatisfied with that, but it is unclear to me what additional property you think should be present. It may be worth noting that is isomorphic to under the function and so in a sense addition and multiplication have the same structure. Dragons flight (talk) 08:00, 20 September 2016 (UTC)[reply]

(ec) I think you're looking for something that doesn't really exist. There are the concrete operations of addition and multiplication in the basic particular structures that we all know and love — the naturals, the rationals, the reals, the complex numbers, the matrices, the ordinals, the Clifford algebras. There are certain commonalities: Operations called "addition" and "multiplication" are usually, but not always, associative. An operation called "addition" is usually, but not always, commutative. An operation called "multiplication" usually distributes over one called "addition" if there is one. But I don't believe you're going to find any abstract characterization of what addition and multiplication are in general. --Trovatore (talk) 08:08, 20 September 2016 (UTC)[reply]

Convert floating point to alphanumeric

[edit]

Hi can someone help me with a formula to convert floating point (precision 5) to alphanumeric (length 5, upper and lower case), and then BACK to floating point without losing precision. It's for some software I am trying to write. My floating point number is for example 74.00594 and I need it represented in at most 5 alphanumeric characters. The number will not be larger than 360. Alphanumeric can include 0..9, A..Z and a..z. Is this possible or do I need more characters to mathematically represent a precision 5 number? Thank you. Sandman1142 (talk) 09:38, 20 September 2016 (UTC)[reply]

Yes, you can do it. In general, with N symbols, D digits can represent numbers 0 to ND - 1. In this case 625 - 1 = 916132831, which means you can represent 0.00000 to 9161.32831 if you insist in five decimal place precision. I don't have time to write out the algorithm, but the general theory is that a number written with five digits "abcde" is equal to . In terms of writing the algorithm, you might get a faster response at the computer reference desk. Dragons flight (talk) 10:03, 20 September 2016 (UTC)[reply]
Brilliant, thanks! I can work out the algorithm from there. Bow to the gods of maths! Sandman1142 (talk) 11:03, 20 September 2016 (UTC)[reply]
Let me just drop the (somewhat) helpful link: radix. TigraanClick here to contact me 11:32, 20 September 2016 (UTC)[reply]
Yes after that I realized I just have to write a base 10 to base 62 converter and back. It got complicated as my float can be negative, but I got it working. Live and learn. Thanks again guys. Sandman1142 (talk) 13:33, 20 September 2016 (UTC)[reply]
You have me curious, Sandman. Why do you need to do this ? If the intent is to encode it to make it less readable, perhaps the excess capacity could be used to further obscure it. One simple method would be to randomly pick a multiple of 360 to add to the number each time you encode, keeping it less than the max (so 8801), and then subtract 360 until you get down to the 0-360 range when decoding. Of course, we could come up with a better encoding method, if this is really your intent.StuRat (talk) 17:15, 20 September 2016 (UTC)[reply]
I would prefer not this discuss this openly, StuRat. You are welcome to contact me via my contact details. Sandman1142 (talk) 10:16, 21 September 2016 (UTC)[reply]