Monday, 19 August 2019
Fundamental Theorem of Arithmetic
It is obvious by construction that any natural number can be expressed as some product of primes. Now, if the Fundamental Theorem of Arithmetic is false, then there is another set of primes with the same product. We can divide out any prime that appears in both sets, so that we end up with two sets of primes with equal products and no primes in common. Take the largest prime P (looking over both sets). We need to show that P does not divide into the product of primes in the other set. We do this by induction, building up the product in the other set. We note that P does not divide into the first factor in the other set because that is prime. Then if P does not divide the product so far, we show that it won't divide that product multiplied by the next factor. Consider the current product modulo P, call this R (modulo P means "the remainder on dividing by P"). Now R > 0 because P does not divide the product so far. Clearly P divides PR. Now find the smallest number k > 0 for which P divides kR. We know that k < P. Then find the largest multiple of k that is less than P, sk say. Then P divides skR. But P also divides PR, so P divides (P-sk)R. But P-sk < k (otherwise sk wasn't the largest multiple), so k wasn't the smallest. So there is no such k, including in particular the next element in our product. Continuing this argument until we have reached the last element in the product, we have shown that P does not divide the other product of primes, so the theorem is true.
Wednesday, 22 October 2014
Some clever jokes
René Descartes walks into a bar. Bartender asks if he wants anything. … René says, “I think not,” then disappears.
Sixteen sodium atoms walk into a bar… followed by Batman. (it took me a while to get this one!)
An infinite number of mathematicians walk into a bar. The first orders a beer, the second orders half a beer, the third orders a quarter of a beer, and so on. … After the seventh order, the bartender pours two beers and says, “You fellas ought to know your limits.”
Pavlov is sitting at a bar, when all of the sudden the phone rings… Pavlov gasps, “Oh crap, I forgot to feed the dogs.”
Three logicians walk into a bar. The bartender asks, “Do all of you want a drink?”… The first logician says, “I don’t know.” The second logician says, “I don’t know.” The third logician says, “Yes!”
An MIT linguistics professor was lecturing his class the other day. “In English,” he said, “a double negative forms a positive. However, in some languages, such as Russian, a double negative remains a negative. … But there isn’t a single language, not one, in which a double positive can express a negative.” A voice from the back of the room piped up, “Yeah, right.”
I’m thinking about selling my theremin… I haven’t touched it in years.
What does the “B” in Benoit B. Mandelbrot stand for?… Benoit B. Mandelbrot.
What do you get when you cross a joke with a rhetorical question?
Thursday, 4 July 2013
Disastrous new "cycle facility"
In the mornings I cycle up this road and turn left off it in the distance, up a steep country lane. In the evenings I come down the steep lane, have plenty of time to look around, and turn right into the road. Nice and simple.
Now the cycle path shown on the left of the photo above has been built, it makes my journey MORE DANGEROUS, SLOWER and LESS PLEASANT, whether I use the path or not!
What happens when I use the path? I leave the road where the cycle path starts by slowing down (first hazard) and bumping obliquely up a badly dropped kerb (second hazard) onto the path:
On the path I have about a quarter of a mile of traffic-free cycling. This was quite pleasant for a couple of weeks, until rubbish started to appear on the path and the trees started to grow and hang down below face level (third hazard):
In the evening it is far worse. Instead of my right turn with plenty of space and time, I now have to slam the brakes on at the bottom of the hill (seventh hazard), turn hard right (eighth hazard), then hard left over a slippery bit of ridged concrete (ninth hazard), then hard right onto the cycle path for a few metres:
Sunday, 24 March 2013
Equality and insurance
Women young and old are being unfairly penalised in two recent examples of "gender equality". Apparently, European Union rules mean that insurance companies cannot discriminate by gender when setting premiums. This affects female drivers, especially young women, who have significantly lower risk than their male counterparts, and it affects life insurance premiums for women, who have longer life expectancy than men. In both cases, the insurance companies are no longer allowed to take these gender-based risk factors into account, which means that women effectively have to subsidise men. This is unfair, although it is being done in the name of gender equality.
I believe the EU are mistaken in this ruling because they misunderstand the raison d'être of insurance. Insurance spreads the cost of an event, be it a car accident or a premature death, so that the random few who suffer - accident victims or the families of people who die before their time - will be able to bear the cost. But it is reasonable that premiums should reflect the degree of risk and the expected payout, which is why we readily accept that we pay different car insurance premiums depending on our age, where we live and what type of car we drive. Why should gender not be on that list of factors, when there is a clearly demonstrable difference in risk between men and women? Because of a misguided notion of "equality" which simply does not apply to insurance. It does apply to other businesses, so hotels should not be allowed to discriminate against gay people, or pubs against soldiers, or shops against children (even if in some cases businesses can demonsrate increased risk of trouble, and therefore increased costs, from certain groups). The difference with insurance is that the calculation of risk is the basis of the whole business, and at the point of setting premiums, risk is risk regardless of its source.
In fact, I believe insurance companies should be allowed to go in the other direction and take into account anything which they consider to be a significant factor. Yes, anything, including race, religion, hair colour or shoe size. If governments wish to intervene, for example to subsidise a particular group which is more susceptible to certain diseases, then let them do so. That is the basis of the National Health Service, and it is a wonderful thing. And indeed, insurance companies too may wish to operate their own balancing mechanisms. But they should not be obliged to do so. They are making a business deal based on their best understanding of risk. Of course, it would be in everyone's interests for insurance companies and governments alike to do what they can to equalize risks downwards, for example by targeting safe driving and healthy living campaigns towards men. But they should not be forced to make women subsidise men!
Sunday, 2 December 2012
Olympic medal table - epilogue (more maths)
One problem with increasing the number of "medals" is that differences in the sizes of events begin to become more apparent. Coming tenth out of 100 participants is clearly more of an achievement than coming tenth out of ten! But setting that problem aside, what happens to my medal weighting system, which is based on an average of plausible weighting systems?
With three medals, one way of writing the relative scores that helps us see a pattern is as follows:
Gold = 1 + 1/2 + 1/3 = 11/6
Silver = 1/2 + 1/3 = 5/6
Bronze = 1/3 = 2/6
and in my original article I multiplied these all by 6 to get my whole-number points system 11, 5 and 2.
So if we had four medals, it would be
Gold = 1 + 1/2 + 1/3 + 1/4 = 25/12
Silver = 1/2 + 1/3 + 1/4 = 13/12
Bronze = 1/3 + 1/4 = 7/12
Iron = 1/4 = 3/12
so 25, 13, 7 and 3 points.
And with ten medals (I'll give up trying to rank metals by value!), leaving out the calculations, we end up with this rather unwieldy set of scores: 7381, 4861, 3601, 2761, 2131, 1627, 1207, 847, 532, 252.
It is tempting to think that the relative scores might tend to some kind of pattern as we keep adding medals. We could even ask ourselves what would happen if we had an infinite number of medals! The resulting "universal" scoring system could then be applied to real-world events by just using the top few scores from the list.
Unfortunately we get into problems with an infinite number of medals. The gold score would be
1 + 1/2 + 1/3 + 1/4 + 1/5 + ...
also written as
Mathematics is sometimes kind to us and allows us to calculate these infinite sums, but sadly this one doesn't work - there is no limit as you add more terms to the sum. You have to stop somewhere, like I did at 10 in the example above. Some insight into the finite sum can be gained by replacing the discrete sum by a continuous sum known as the integral, which in this case happens to have an easy solution. The right hand expression above can be replaced by
Then if we go back to our patterns to work out the scores for the other medals, we get
or, cutting out the working:
This gives a reasonable approximation given the arbitrary nature of all the original assumptions. It could probably be improved by tweaking the approximation of the discrete sum by the continuous integral (I just placed each term of the sum in the middle of one unit's worth of the integral). Oh, so it's probably not the last word after all...
Monday, 5 November 2012
Bonfire Night and Halloween
The Wikipedia article about Guy Fawkes Day, or as we more commonly call it, Bonfire Night, says "...another old celebration, Halloween, has lately increased in popularity, and according to some writers, may threaten the continued observance of 5 November." Halloween (sometimes spelt Hallowe'en to give us more of a clue that it is the eve of All Hallows' or All Saints' Day) is often seen as an American import that has grown massively in popularity in recent years. In my childhood hardly anyone carved pumpkins, held Halloween parties or did trick-or-treat, but now nearly all children will do those things. One thing that intrigues me given my evangelical Christian formative years is that Halloween seems to be an acceptable celebration in the much more strongly evangelical US, whereas in many of our churches it was (and still is to some extent) a no-no seen as having heavy pagan connotations, to be replaced if possible by a church-based festival with nary a witch or ghoul in sight. Perhaps there is as just much variety of opinion in America, and I should be wary of seeing attitudes there as quite so monolithic.
Anyway, going back to the Wikipedia comment, a few years ago I too thought that the much more commercial Halloween might displace our traditional English Bonfire Night. Thankfully, this does not seem to have happened. There is some mixing of the two, but by and large they now occupy different spaces. Halloween is for family and friends, though with quite a strong commercial input. Bonfire Night is much more village and town-based, with huge bonfires and spectacular firework displays. If Halloween has displaced anything, it might be the family fireworks "display" in which Dad (yes, usually Dad) got everyone to stand back while he lit a couple of rockets and a soggy Catherine wheel which always failed to rotate properly on its nail on the shed. This is a good thing; ten quid spent on tickets for a public display is much better value than the same spent on fireworks for the back garden, as well as being a lot safer. As for Halloween, I have no problem with the witches and scary stuff, but I do find it hard to see trick-or-treating in a favourable light, being as it is the demanding of money with menaces. So my vote goes for Bonfire Night - burning the effigy of a papist... oh, maybe I'm being a bit inconsistent here!
Saturday, 4 August 2012
Mike's Olympic medal table, end of 3 Aug 2012
Country |
G |
S |
B |
Score |
|
1 |
United States |
21 |
10 |
12 |
305 |
2 |
China |
20 |
13 |
9 |
303 |
3 |
United Kingdom |
8 |
6 |
8 |
134 |
4 |
France |
8 |
5 |
6 |
125 |
5 |
Korea |
9 |
2 |
5 |
119 |
6 |
Germany |
5 |
9 |
6 |
112 |
7 |
Russia |
3 |
12 |
8 |
109 |
8 |
Japan |
2 |
8 |
11 |
84 |
9 |
Italy |
4 |
5 |
3 |
75 |
10 |
Australia |
1 |
9 |
4 |
64 |
11 |
DPR Korea |
4 |
0 |
1 |
46 |
12 |
Kazakhstan |
4 |
0 |
0 |
44 |
13 |
New Zealand |
3 |
0 |
3 |
39 |
14 |
South Africa |
3 |
1 |
0 |
38 |
15 |
Romania |
1 |
4 |
2 |
35 |
16 |
Cuba |
2 |
2 |
1 |
34 |
17 |
Netherlands |
2 |
1 |
3 |
33 |
18 |
Hungary |
2 |
1 |
2 |
31 |
19 |
Ukraine |
2 |
0 |
4 |
30 |
20 |
Poland |
2 |
1 |
1 |
29 |
21 |
Brazil |
1 |
1 |
4 |
24 |
22 |
Belarus |
1 |
1 |
2 |
20 |
23 |
Canada |
0 |
2 |
5 |
20 |
24 |
Mexico |
0 |
3 |
1 |
17 |
25 |
Slovenia |
1 |
0 |
2 |
15 |
26 |
Colombia |
0 |
2 |
1 |
12 |
27 |
Spain |
0 |
2 |
1 |
12 |
28 |
Ethiopia |
1 |
0 |
0 |
11 |
29 |
Georgia |
1 |
0 |
0 |
11 |
30 |
Lithuania |
1 |
0 |
0 |
11 |
31 |
Venezuela |
1 |
0 |
0 |
11 |
32 |
Czech Republic |
0 |
2 |
0 |
10 |
33 |
Sweden |
0 |
2 |
0 |
10 |
34 |
Denmark |
0 |
1 |
2 |
9 |
35 |
Belgium |
0 |
1 |
1 |
7 |
36 |
Indonesia |
0 |
1 |
1 |
7 |
37 |
India |
0 |
1 |
1 |
7 |
38 |
Kenya |
0 |
1 |
1 |
7 |
39 |
Mongolia |
0 |
1 |
1 |
7 |
40 |
Norway |
0 |
1 |
1 |
7 |
41 |
Slovakia |
0 |
0 |
3 |
6 |
42 |
Croatia |
0 |
1 |
0 |
5 |
43 |
Egypt |
0 |
1 |
0 |
5 |
44 |
Thailand |
0 |
1 |
0 |
5 |
45 |
Chinese Taipei |
0 |
1 |
0 |
5 |
46 |
Azerbaijan |
0 |
0 |
1 |
2 |
47 |
Greece |
0 |
0 |
1 |
2 |
48 |
Hong Kong, China |
0 |
0 |
1 |
2 |
49 |
Iran |
0 |
0 |
1 |
2 |
50 |
Moldova |
0 |
0 |
1 |
2 |
51 |
Qatar |
0 |
0 |
1 |
2 |
52 |
Singapore |
0 |
0 |
1 |
2 |
53 |
Serbia |
0 |
0 |
1 |
2 |
54 |
Uzbekistan |
0 |
0 |
1 |
2 |