Wikipedia:Reference desk/Mathematics
Welcome to the mathematics reference desk.

Choose a topic:
See also:

November 11Edit
Four consecutive years with two Friday the 13ths eachEdit
The years 2017, 2018, 2019, and 2020 are four consecutive years with two Friday the 13ths each (Jan 13 and Oct 13, Apr 13 and Jul 13, Sep 13 and Dec 13, and Mar 13 and Nov 13 respectively). Is it true that any four consecutive years with two Friday the 13ths each in either the Julian calendar or the Gregorian calendar must end with a leap year starting on Wednesday (or equivalently, with one exception in each 400year period, consist of the next four consecutive years following a leap year starting on Friday)? If so, then it follows that the table below is complete.
Instances between 2000 and 2400  

Jan 13, Oct 13  Apr 13, Jul 13  Sep 13, Dec 13  Mar 13, Nov 13 
2017  2018  2019  2020 
2045  2046  2047  2048 
2073  2074  2075  2076 
2113  2114  2115  2116 
2141  2142  2143  2144 
2169  2170  2171  2172 
2209  2210  2211  2212 
2237  2238  2239  2240 
2265  2266  2267  2268 
2293  2294  2295  2296 
2305  2306  2307  2308 
2333  2334  2335  2336 
2361  2362  2363  2364 
2389  2390  2391  2392 
The exception is the year 2196. Adding 4 years to 2196 gives the nonleap century 2200, which has a Friday the 13th in June. Hence, the years 2197, 2198, 2199, and 2200 are not included in the above table. GeoffreyT2000 (talk) 06:39, 11 November 2019 (UTC)
 I think that you are probably right. Bubba73 ^{You talkin' to me?} 16:03, 11 November 2019 (UTC)
November 13Edit
Does the Mandelbrot set zoom have any limits?Edit
Dear Ladies and Gentlemen
My question is about the Mandelbrot set zoom which has become popular on internet video websites such as YouTube. Do these zooms have any limits or are they similar like a visual representation of a basically limitless potential? Are there theoretical limits as far as dimensions go? I beg your utmost pardon for my crude English, but foreign languages have never been my strength.
With kind regards2A02:120B:C3E7:E650:18C8:AAB0:523A:9250 (talk) 01:17, 13 November 2019 (UTC)
 The scale of an accurate zoom is limited by the arithmetic precision of the computer you're using; but if you mean whether there is a scale beyond which the Mset's boundary does not show fractal detail, then no. —Tamfang (talk) 01:44, 13 November 2019 (UTC)
 Your English is better than many native speakers. :) SinisterLefty (talk) 01:48, 13 November 2019 (UTC)
 Slight amendment to Tamfang's answer, for the really deep zooms you see on YouTube you need Multipleprecision arithmetic to get the hundreds of digits of accuracy used. For normal exploration though, the arithmetic precision of a typical modern computer is fine. RDBury (talk) 01:43, 14 November 2019 (UTC)
 Question, can you do like Google Maps and recalculate at each new zoom level ? Or doesn't that approach work with fractals ? SinisterLefty (talk) 03:10, 14 November 2019 (UTC)
 I'm not sure if you got the full implication of my Q. If you zoom in 1000x, a million X, a billion X, a trillion X, etc., and find a scene that is exactly identical to the original configuration, couldn't you then just reset to the original configuration, and zoom in from there, instead of from the 1000x point, etc. ? This would theoretically allow you to simulate zooming in infinitely, with no concern over hitting computational limits. SinisterLefty (talk) 19:27, 15 November 2019 (UTC)
 One of the interesting things about the Mandelbrot set is that no two configurations are the same. You may find "copies" of the set within the original, but there will be differences. For one thing, the copy will be attached to the main body by a thin strand while the main set has no such strand. Also, the copy will have decorations attached to it and the end of each antenna tip, and these decorations are different on each copy. If you look at a copy within a copy then you get two layers of decorations. With many fractals, specifically selfsimilar ones, you can do the infinite zoom thing you're describing, and if you look at the article for one of them then there's a good chance someone has done that and turned it into an animated GIF. (See e.g. Koch snowflake third picture down on the right.) The thing is, while the Mandelbrot set is often called a fractal, it's not actually a fractal according to the mathematical definition. While fractals keep the same level of complexity no matter how far you zoom in, the Mandelbrot set actually gets more complicated the deeper you zoom in. This isn't usually apparent in really deep zooms because the level of detail needed to see it is smaller that a typical screen resolution, or the human eye for that matter. I hope that answers your question; you mentioned Google Maps and that was confusing me. Last time I checked Google maps doesn't do infinite zooms. RDBury (talk) 23:58, 16 November 2019 (UTC)
 @RDBury: "Not actually a fractal according to the mathematical definition." The only precise mathematical definition I know for "fractal" is Mandelbrot's original one, namely that the Hausdorff dimension exceeds the topological dimension, and I believe that does hold for the boundary of the Mandelbrot set (it doesn't hold for the set itself, which has Hausdorff dimension and topological dimension both equal to 2).
 Our fractal article says that Mandelbrot originally came to find that definition too restrictive, but does not offer any precise alternative definition. In any case, if the boundary satisfies the original definition, then it obviously satisfies any less "restrictive" one.
 That said, looking into this led me to the multifractal article, which is interesting, so thanks for that. Trovatore (talk) 01:26, 18 November 2019 (UTC)
 Thanks for the explanation. The point I was trying to make with the comparison with Google Maps is that it doesn't just zoom in, you actually get different maps at different zoom levels. If they attempted to render the entire planet at the finest level of detail, it would no doubt take out their servers, but by only displaying the level of detail appropriate for each zoom level, they achieve acceptable performance while zooming. So, even if not selfsimilar, perhaps that part does apply to the Mandelbrot set. SinisterLefty (talk) 03:11, 17 November 2019 (UTC)
 One of the interesting things about the Mandelbrot set is that no two configurations are the same. You may find "copies" of the set within the original, but there will be differences. For one thing, the copy will be attached to the main body by a thin strand while the main set has no such strand. Also, the copy will have decorations attached to it and the end of each antenna tip, and these decorations are different on each copy. If you look at a copy within a copy then you get two layers of decorations. With many fractals, specifically selfsimilar ones, you can do the infinite zoom thing you're describing, and if you look at the article for one of them then there's a good chance someone has done that and turned it into an animated GIF. (See e.g. Koch snowflake third picture down on the right.) The thing is, while the Mandelbrot set is often called a fractal, it's not actually a fractal according to the mathematical definition. While fractals keep the same level of complexity no matter how far you zoom in, the Mandelbrot set actually gets more complicated the deeper you zoom in. This isn't usually apparent in really deep zooms because the level of detail needed to see it is smaller that a typical screen resolution, or the human eye for that matter. I hope that answers your question; you mentioned Google Maps and that was confusing me. Last time I checked Google maps doesn't do infinite zooms. RDBury (talk) 23:58, 16 November 2019 (UTC)
 For maps, I don't think it would "take out the servers". It only takes a certain amount of data to generate the maps. Now, if you could zoom in that much in Google Earth, then you're right  that would take an enormous amount of data. But for the Mandelbrot set, you don't have to store much data  just do a lot of calculations. This is sort of a space–time tradeoff tradeoff. So zooming in Google Earth would ultimately be limited by the amount of data stored. The entire Mandlebrot set isn't stored on the computers, but it is calculated as needed. Bubba73 ^{You talkin' to me?} 03:35, 17 November 2019 (UTC)
 Let me try again to specify what I mean. If you had a model of the universe, with every atom recorded with it's position, we would neither be able to store that nor display it all at once. Now let's say that this model of the universe has a variable level of detail. It may have the position of every galaxy, but only has the individual stars noted for the Milky Way, and only the description of the planets, moons, asteroids, comets, etc., noted for our solar system. Then, only Earth would have all the land forms noted, let's say just the US has the cities stored, and only Los Angeles has street level details. Within that only UCLA has individual buildings described, and the biology lab has the equipment listed. A particular piece of equipment has each Petri Dish listed, and for one, each bacterial colony is described in full detail, with one particular bacterium described down to the atom. So, we could now zoom in from the universe to an atom of that bacterium. So, then, could we do something similar with the Mandelbrot set, to discard all calculation outside the border we are interested in, and also at lower and higher zoom levels than we are interested in, and use the full computing power of the computer solely to render than particular screen's worth ? SinisterLefty (talk) 04:12, 17 November 2019 (UTC)
 Oh, yes. When doing the Mandelbrot set, you only have to do the calculations for the area you want to display. Map each pixel in the display to the corresponding complex number, and do the calculations for that number. You can ignore everything else. Bubba73 ^{You talkin' to me?} 04:48, 17 November 2019 (UTC)
 I mentioned storing the data for the Mandelbrot set. In a sense, the equation encodes everything there is about the set  you just have to do calculations to get it out. Bubba73 ^{You talkin' to me?} 23:23, 17 November 2019 (UTC)
 Oh, yes. When doing the Mandelbrot set, you only have to do the calculations for the area you want to display. Map each pixel in the display to the corresponding complex number, and do the calculations for that number. You can ignore everything else. Bubba73 ^{You talkin' to me?} 04:48, 17 November 2019 (UTC)
 Let me try again to specify what I mean. If you had a model of the universe, with every atom recorded with it's position, we would neither be able to store that nor display it all at once. Now let's say that this model of the universe has a variable level of detail. It may have the position of every galaxy, but only has the individual stars noted for the Milky Way, and only the description of the planets, moons, asteroids, comets, etc., noted for our solar system. Then, only Earth would have all the land forms noted, let's say just the US has the cities stored, and only Los Angeles has street level details. Within that only UCLA has individual buildings described, and the biology lab has the equipment listed. A particular piece of equipment has each Petri Dish listed, and for one, each bacterial colony is described in full detail, with one particular bacterium described down to the atom. So, we could now zoom in from the universe to an atom of that bacterium. So, then, could we do something similar with the Mandelbrot set, to discard all calculation outside the border we are interested in, and also at lower and higher zoom levels than we are interested in, and use the full computing power of the computer solely to render than particular screen's worth ? SinisterLefty (talk) 04:12, 17 November 2019 (UTC)
 There are no limits on the Mandelbot set  it goes on forever. Computers are limited in what they can compute, however. Bubba73 ^{You talkin' to me?} 02:28, 14 November 2019 (UTC)
November 14Edit
Drought ReliefEdit
In South Africa currently there are droughts in the West and flooding in the East. Please would you assist with the following calculations. How much would it cost to alleviate the problem. Mt idea is to truck water from the flooded parts to the droughtstricken parts. I have gained the following statistics. An average farm needs 55 L of water per head of cattle per day (maximum, mother with calf). The cost of petrol in South Africa is currently R13.79 per L. The minimum wage to pay the drivers is R20.00 per hour. The drive could be up to 15 hours per truck. The distance would be up to 1,500 km. a water truck capacity is about 43,900 L. The water would not need to be sanitised as it will be watering crops, theoretically. So, we pay X number of people to pump water and fill the trucks. This takes Y amount of time. We then truck water from the far east to the far west. Please calculate cost. Thanks. Anton 81.131.40.58 (talk) 10:45, 14 November 2019 (UTC)
 Some other factors to consider:
 The cost of the return trips. If there was something else they could ship the other way, without having to clean out the tanks, that would defray this cost.
 Acquisition of the trucks. If they are even available, you would need to buy them or rent them. Quite possibly you also would need to ship them to South Africa.
 The wear and tear on the truck, in the form of maintenance, towing, etc., that will be required.
 If the trucks last hauled something toxic, they will need to be washed out. This may require detergent, depending on the substance hauled.
 The time delay. By the time you organize everything, the floods and/or drought could be over. SinisterLefty (talk) 10:56, 14 November 2019 (UTC)
The drought has been ongoing for 5 years now. Let us assume I can source a donation of trucks for the time required, so rent free. The trucks are already in South Africa, so no need to ship them there. Cleaning, I would expect 20% of the trucks to need deep cleaning with detergent. let us assume 1 day per truck plus to men at minimum wage plus detergent we will get donated free of cost. Wear and tear is also not a concern as I will source these from a donation or rent free use for the needed period of time. Time delay? I specialise in getting things done in a timely manner. I just want the rough calculation and formulae used so that as and when other factors need to be included I can add these in. Thanks for your help. Anton 81.131.40.58 (talk) 11:53, 14 November 2019 (UTC)
 Pretty sure what you need is a spreadsheet, the calculations aren't difficult but a spreadsheet will help organize all the data being used. One variable you didn't specify was truck mileage, I'm going to assume 5km/L. Putting all this into a spreadsheet of my own I get:
Desc Value Units Water needed 55 L/day/head Distance 1500 km Truck mileage 5 km/L Fuel per round trip 600 L Fuel cost 13.79 R/L Fuel cost per round trip 8274 R Driver Pay 20 R/H Drive time 15 H Driver cost per round trip 600 R Total cost per round trip 8,874 R Truck Capacity 43,900 L Trips Needed 0.00125284738 /day/head Total cost 11.11776765 R/day/head
 I used Google Sheets in this case because it's free, doesn't require download, and does the job. RDBury (talk) 13:50, 14 November 2019 (UTC)
 Thank you so much for this. I have used your spreadsheet idea and have rounded off the figures to the highest round figure. Please would someone check my calculations, but I expect that with 150,000 km2 of farmland in the Northern Cape and 10 km2 watered per trip with 3,500 L needed per km2 of farmland, we would need 12,000 trips at a cost of R20,000.00 each resulting in a cost of £250,000,000.00 per week. So with an estimated 1bn per month we can resolve the drought issue. This being in South African Rands we can divide by 17 for a UK exchange rate and say that this could be resolved with £58,823,529.41 per month. Kindly clarify or confirm. Thank you Anton 81.131.40.58 (talk) 15:06, 14 November 2019 (UTC)
 Was the cost of the return trips included ? Also, 3500 L per km^{2} seems extremely low. That's only .0035 L per m^{2}. (A km^{2} contains (1000 m)^{2} = 1000^{2} m^{2}, or one million m^{2}.) SinisterLefty (talk) 16:46, 14 November 2019 (UTC)
 Truck maintenance and amortization is expensive, you'll probably have to double the fuel costs or more (and I think 20 L/100 km is fairly low for a tanker semi, especially as old as African trucks probably are). You also need to filter flood waters, as they're disgusting. Tho you could get rid of the 2nd problem by building some dams and carting off excess water from accumulation lakes. 93.136.94.213 (talk) 07:15, 17 November 2019 (UTC)
Clarification on https://en.wikipedia.org/wiki/Evolutionarily_stable_strategyEdit
How does "Harm Thy Neighbor game" and "Harm Everyone game" work? On "Harm Thy Neighbor, how is it that (A,A) is considered to be a Nash Equilibrium? Both payoffs for Column player are the same, so the chance that the column player will choose either A or B when row player chooses A is 1/2. Analyzing it using IESDS ( Iterated Elimination of Strictly Dominated Strategies) will yield (B,B) as a Nash Equilibrium. Analyzing it using Maximin will still yield (B,B).120.29.85.245 (talk) 18:46, 14 November 2019 (UTC)
 Neither player has an incentive to switch away from (A,A) in isolation. This is the definition of a Nash Equilibrium.101.100.158.248 (talk) 08:38, 16 November 2019 (UTC)
 Yes, Nash equilibrium is in essence an unimprovable strategy against another player playing this equilibrium strategy. It says nothing about being unimprovable against players who choose to play some other strategy, which is what I gather the point of ESS is. 93.136.94.213 (talk) 07:08, 17 November 2019 (UTC)
 An ESS is a populationlevel concept: it shows what happens if a population of players using one strategy are (for example) invaded by players using another strategy. The strategies themselves may be Nash Equilibria, although this is not required. The idea is to capture whether a given strategy is stable to random "mutations" in the available/chosen strategies: for example, a society where every player is 100% altruistic to the player to his immediate right works great so long as everyone keeps playing it; however, if one player decides to be 100% selfish, he can wreak havoc on everyone else. OldTimeNESter (talk) 16:25, 18 November 2019 (UTC)
 Yes, Nash equilibrium is in essence an unimprovable strategy against another player playing this equilibrium strategy. It says nothing about being unimprovable against players who choose to play some other strategy, which is what I gather the point of ESS is. 93.136.94.213 (talk) 07:08, 17 November 2019 (UTC)
November 15Edit
linear algebra: the adjoint operator of the inner product of integralEdit
Given f and g polynomial functions R>R with the height degree 1, and T(bx+a)=ax+b and the inner product integral(f,g).
find T*.
I thought that I should just take the transpose matrix of T but it seems an incorrect answer. Why? I thought that on R T* must be the transpose — Preceding unsigned comment added by 77.127.109.73 (talk) 20:17, 15 November 2019 (UTC)
 A hint (although it's been a while and I'm a bit rusty with this stuff, so take it with a grain of salt): Using the transpose will only work if you've written the matrix of your linear map with respect to an orthonormal basis. So if you wrote the matrix of T with respect to, say, the basis that won't necessarily work. Try to apply GramSchmidt to get an orthonormal basis first. –Deacon Vorbis (carbon • videos) 20:54, 15 November 2019 (UTC)
 Alternatively (if you don't know that stuff), you can still work with the above basis directly, which is easy enough for a 2dimensional vector space, although will get worse in higher dimensions. You haven't told us what interval the inner product is with respect to, so I'm just going to assume here; you can adjust if needed. You want to find out what does to each basis vector, and you can find that out by testing against the inner product with each basis vector. So
 Likewise, If you write as, say, then you find that Do the same for and you'll have a system of two equations in two unknowns. Solve it, and you know what is. Then just repeat for and you'll have all you need. –Deacon Vorbis (carbon • videos) 21:15, 15 November 2019 (UTC)
 Say the inner product integral is , and put :
 for integer . For and we have . That is, in the basis the inner product on these linear polynomials is represented by the matrix
 The operator has the matrix
 We have, wrto the scalar product or
 whence the transpose of T (wrto the inner product integral) is represented in the scalar product of by
 So the final expression for the transpose is
 — Preceding unsigned comment added by PMajer (talk • contribs) 11:17, 17 November 2019 (UTC)
 There are a few problems here. You keep referring to the "transpose", but you seem to mean the adjoint. The whole confusion in the first place was why you couldn't simply use the transpose of T (because the basis wasn't orthonormal). You're also using measure notation in your integrals, while the question is elementary enough that it's very possible (even likely) that the OP has no idea what that is. You also sneakily make the claim that This is true, but only because T is symmetric (wrt the standard basis); any other operator and you would have had to use the transpose of T instead. –Deacon Vorbis (carbon • videos) 15:01, 17 November 2019 (UTC)
 Yes there are a few problem here. pma 22:40, 17 November 2019 (UTC)
 ...mainly comprehension problems though. Some comments may help: A) The OP did not specify what is their inner integral product, nor an interval: I wished to point out that the choice of a measure is not relevant for the answer. On this issue: B) I used to answer questions here since 2008 for several years on a daily basis; from my experience it is better to wait for a request of further details from the OP or anybody else, rather than giving a 100% complete treatise including all related subjects C) Yes, the question is elementary, but I'd like to show the right way to solve these issues, if the OP or anybody else is interested (and who is not interested is welcome as well, of course) C) Yes, I mean the (real, Hilbert) transpose. You do not need an orthonormal basis to define a transpose, it is defined by means of a scalar product. D) Unfortunately, language and notations are not uniform in this topic, possibly because it is used in all fields of mathematics; in my experience of professional mathematician I can tell you that "adjoint" and "transpose" are very often used as synonymous; this is also confirmed by the wiki article btw. pma 13:09, 18 November 2019 (UTC)
November 17Edit
MatchDragons and Math. (should have been Merge Dragons)Edit
In the game Matchdragons, the standard merge is 3 objects of tier K gives 1 object of tier K+1. This makes the number of Tier 1 objects to make a Tier N object easy to calculate, 3^(N+1). *BUT* for most objects, the game allows you to be more efficient, also allowing 5 objects of tier K to be combined to make 2 objects of tier K+1. This means for example, that making something of Tier 3 only takes 8(=5+3) Tier 1 objects and making something of tier 4 takes 23 (4*5+3). If the tiers go high enough, the number should get close to 2.5^N, but I'm not sure it ever gets that efficient. Is there any good way beyond trial and error to get the number needed for each tier?Naraht (talk) 19:09, 17 November 2019 (UTC)
 @Naraht: It's easier to ask the more general question, "Given N and M, how many Tier 1 objects do I need to make M Tier N objects?" This can be seen as a generalization of the coin problem and the following greedy algorithm should work in this case (and this case only): if f(N, M) denotes the solution to the problem, then for even M and otherwise, with the base case being , which should yield an dynamic programming algorithm for the problem. It won't ever be exactly in nontrivial cases unless you ask for two, rather than one, member of the topmost level.Jasper Deng (talk) 19:40, 17 November 2019 (UTC)
 Err, unless I'm missing something, it only takes 20 tier1 items to make a tier4 item, not 23. Combining them all gives 8 tier2s, which as noted above, gives a tier4. In fact, if it takes n for a tiern, then it'll simply take for an n + 1tier. So you get a sequence of 1,3,8,20,50,125,313,783,1958,... Although I do wonder what proportion of these terms are even vs. odd. –Deacon Vorbis (carbon • videos) 19:48, 17 November 2019 (UTC)
 (edit conflict) @Naraht: You can actually make something of tier 4 with only 20: make 8 tier 2 objects with them, use these to make two tier 3 objects using the fivefortwo rule and the remaining three to make another tier 3 object, for a total of 3 tier 3 objects, then combine those into one tier 4 object. I don't know how you got 23. I've implemented it as a simple Python program:
def matchDragons(N, M = 1):
assert isinstance(N, int) and isinstance(M, int) and (N > 0) and (M > 0), "N and M must be positive integers"
if N == 1:
return M
if M % 2 == 0:
return matchDragons(N  1, 5*(M//2))
else:
return matchDragons(N  1, 5*((M  1)//2) + 3)
Jasper Deng (talk) 19:49, 17 November 2019 (UTC)
 @Deacon Vorbis: You forgot a term. My program outputs 1, 3, 8, 20, 50, 125, 313, 783.Jasper Deng (talk) 19:52, 17 November 2019 (UTC)
 Fixed . –Deacon Vorbis (carbon • videos) 19:57, 17 November 2019 (UTC)
 @Deacon Vorbis: Regarding parity: my program empirically suggests that it's about 5050 odd and even, never more than about 1% away from 5050 for N = 1000 or more or so, but a theoretical reason why doesn't come to my mind immediately.Jasper Deng (talk) 20:12, 17 November 2019 (UTC)
 I now wonder if it's possible to use something similar to exponentiation by repeated squaring to reduce the runtime to using Deacon's formula. Having to take the ceiling each time is annoying though.Jasper Deng (talk) 21:06, 17 November 2019 (UTC)
 Yet another observation: while is unattainable exactly, for large N, the answer to this problem is much closer to that than (For , is about . but both of the others are about ). This is to be expected because you will make at most one item of a given tier using three of the tier below, as opposed to the twoforfive rule which dominates for large N.Jasper Deng (talk) 21:12, 17 November 2019 (UTC)
 Extending 1, 3, 8, 20, 50, 125, 313, 783, 1958, ..., I get the approximation 1.283256 × 2.5^{n}. There's probably not a simple formula since the evens vs. odds seem statistically random. The 1.283256 constant is the sum of an infinite series of the form 1+∑e_{n}.5×2.5^{−n} where e_{n} is 0 or 1 depending on whether the previous term in the sequence is even or odd. So the series converges but it seems impossible to determine its exact value without computing all the terms in the sequence. RDBury (talk) 03:46, 18 November 2019 (UTC)
 PS. I've never heard of this game, but I did find some links to Merge Dragon, are they related? RDBury (talk) 03:50, 18 November 2019 (UTC)
 Yet another observation: while is unattainable exactly, for large N, the answer to this problem is much closer to that than (For , is about . but both of the others are about ). This is to be expected because you will make at most one item of a given tier using three of the tier below, as opposed to the twoforfive rule which dominates for large N.Jasper Deng (talk) 21:12, 17 November 2019 (UTC)
 @Deacon Vorbis: You forgot a term. My program outputs 1, 3, 8, 20, 50, 125, 313, 783.Jasper Deng (talk) 19:52, 17 November 2019 (UTC)