Sunday, 22 December 2013

Magic 2014

The turn of the year gives us an excellent excuse to go over various mathematical properties of natural numbers, making a comparison between the numbers 13 and 14. With this story, Matifutbol wishes you a Merry Christmas and hopes that 2014 will be a magical year for you.
(This post participates on the Edición 4.12310562 del Carnaval de Matemáticas, cuyo anfitrión es el blog

This time, Matifutbol has brought together some of the best football players to wish you a Happy 2014!

I hope you'll have a great new year, and that all your math operations will be good for you!

Thank you very much, but.... have you noticed that there are 13 players on your card? What a bad luck! Also, as year 2014 is coming, I think you should have invited 14 players for the photo.

Well, I can't see why number 13 has to mean bad luck. In any case, we can easily modify the card.

Yes? How? It will be difficult to gather them back to take a new picture with one more player...

There's a way to do it without putting them together again, using a translational move.

Can you imagine how?


Well, I can't imagine how to solve it...

In fact, there's nothing to solve. Number 13 is just a normal number, like any other.

Yes, but it's said to bring back luck. There must be something bad in it...

The truth is that this is something that comes from old times. Actually, it's a superstition that comes from the times of our ancestors, who worshiped the forces of nature.

Has nature anything to do with number 13?

Yes, a lot, especially the Moon. Our ancestors discovered that there were years with 12 new moons, and years with 13 moons. Actually, the average is 12.41 new moons per year. Before we set calendars with 12 months, we used calendar with 13 months, one of which was shorter than the others.

This incomplete thirteenth moon, which caused an atypical month, with fewer days than the rest, gave more headaches than benefits to the shamans who had to handle the calendar to set their rituals and festivals, so they finally ended up by 'hating' this number.

That's how all started?

This explanation is very likely, because almost all ancient cultures and civilizations throughout the world share some background on this issue.

Thus, 13 is considered a damned number by the ancient Persians, where number 13 was identified with chaos. Zoroaster also identifies it with the devil, and in Norse mythology the god Loki, Lord of the lies, appears as the 13th god assistant to a fateful dinner (dinners and number 13 tend to be closely related).

Egyptians also reserved number 13 for the last stage of life, the death. This is also taken by Tarot, that also assigns the death card to this number.

And in Christianity we find numerous references. From the thirteenth guest at the Last Supper of Jesus Christ (Judas Iscariot), the man who betrayed him, to the thirteenth chapter of Apocalypsis, in which the coming of Antichrist is predicted.

In any case, we could find an endless number of negative references regarding any number you want. But clearly there's something special about this number 13 that makes us to fix more attention on it than on others.

Yes, it's true that many people has some superstitious misgivings about this number.

And some people even take it to the extreme. We talk about triskaidekaphobia, which consists of the extreme and irrational fear to the number 13. Thus, due to this phobia, we can find countries where there's no 13th floor in buildings, hotels with 13th floor used for service tasks, streets without number 13, airplanes without seats row number 13, or athletes who avoid wearing this number on their backs. In other cases, 13th floor is replaced by 12 bis, for example, and there are also computer programs that hop from version 12 to 14.

But all these issues are completely contrary to Mathematics, aren't they?

Yes, they are, but not at all. Numerology (which is the set of beliefs or traditions that aims to stablish a mystical relationship between numbers and living things, physical and spiritual forces) has always evolved in parallel with the development of Mathematics.

Actually, a famous mathematician as Pythagoras, developed in his time (V century BC) a whole study on the relationship between numbers and the laws of nature. And also scholars of Kabbalah studied such relations, or Eastern cultures, that assign to numbers certain properties and meanings.

But regardless of this, number 13, only for mathematical purposes, it's also a very interesting number.

13 is a prime number, that is, it's only divisible by one and itself. It's also the first emirp number, ie, if we write it backwards, 31, we have another prime number.

Moreover, it's one of the terms of the Fibonacci sequence, in which each number is obtained by adding the previous two:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

It belongs to a Pythagorean triple: 5, 12, 13. This means that they are 3 positive integers that satisfy the condition that a2+b2=c2, that is, that can be associated with the lenghts of the two legs/catheti and the hypotenuse of a right triangle. Moreover, it's a primitive Pythagorean triple, ie, the greatest common divisor of the 3 numbers is 1.

Also, there are only 13 Archimedean solids (excluding isomorphic forms). And 13 were the number of books Euclid wrote about Mathematics: 'The Elements'.

With numbers 5 and 563, 13 is one of the 3 known Wilson primes, ie, that satisfies the property that 132 divides (13-1)! + 1.

13 is a happy number, as you can see on this link. It's the third ordered Bell number or Fubini number (related to combinatorial). And we could add more properties.

And is this important? What good is it to be a prime number or to belong to the Fibonacci sequence, for example?

Prime numbers have recently become important in the issue of documental encryption. Plus they're considered as the foundation over which all other natural numbers are constructed.

And Fibonacci sequence, in which each term is the sum of the previous two, is found in many places in nature: in the reproductive rates of animals or viruses, in the distribution of leaves around the stem of the plants for better use of the sun light, in pinapples, in sunflowers seeds, in daisies seeds, in arms of spiral galaxies and hurricanes, in equinodermos bodies, or in the family tree of bees .... It has also many applications in computing and games theory. And in addition, any natural number can be written as the sum of a limited number of terms in the Fibonacci sequence, each one different from the others.

But this will also happen with any number, such as number 14.

Don't believe so. Unlike number 13, which seems to be a rather unique number in mattematical terms, number 14 has some peculiarities hardly worth mentioning.

It's a square pyramidal number, that is, it's the result of the sum of the first 3 square numbers:

14 = 12+22+32

If we visualize these squares as layeres of spheres placed one above the other, this number represents a pyramid with a square base.

Number 14 is a discrete semiprime or biprime numberbecause it’s a natural number which is the result of the product of two prime numbers 14=2*7.

It's a Catalan number (related to combinatorial problems), it's a open meandric number (related to intersections of curves and lines), it's a Pell-Lucas number (belongs to a sequence of numbers related to the approximation by rational numbers to the square root of 2), and it’s the maximum number of electrons that can fit in the f atomic sublevel.

All these are important features, but less relevant and practical than number 13’s properties.

So it’s seems that calling 13 players, not 14, has been a good idea. But, what can you tell me numbers 2013 and 2014?

They're both sphenic numbers, ie, they are the product of 3 distinct prime factors

2013=3*11*61 and 2014=2*19*53

But 2013 is also the sum of three consecutive sphenic numbers:

2013 = 665 (5*7*19) + 670 (2*5*67) + 678 (2*3*113)

Both have 8 divisors: 1, 3, 11, 33, 61, 183, 671, 2013 and 1, 2, 19, 38, 53, 106, 1007, 2014.

And none of them is neither a Fibonacci number, nor a Bell, Catalan, factorial, regular prime, or perfect number.

Regarding to happiness, we can say that number 2013 ís a happy number, while 2014 is not.

So there’s not much difference between the 2 numbers... However, I still think I don’t like the card with only 13 players.

For they have all gone to their homes, and it will be hard to bring them all together again, I propose an exercise of translation.

What's that of translation?

It’s a process by which each point of the plane is shifted to another point at a distance. It’s a direct move with no change in direction, ie, all moved objects maintain their shape, orientation and size, so that the translated images are identical to the initial figures.

Okay, but I don’t know what are you going to achieve with a simple movement of the players.

I’m not changing only their places, but I 'm going to do something else. Do you want to see it?

Yes, I want to see what you do with the players. So I click the video.

That’s a really funny way to convert the 13 players in 14, but now some of them are not recognizable...

Yes, but the important thing is that the message itself has remained the same: Matifutbol wishes you a Happy new year 2014!

Si te gustó esta historia, puedes votar por ella en menéame y divoblogger. Muchas gracias.

Sunday, 24 November 2013

The amazing case of the extra car.

The sponsor of the Football World Championship 2015 in Canada is going to give away some gifts to the best scorers. But a last minute change in the number of gifts creates a curious change in their apportionment.

The Football World Championship 2015 in Canada has finished.

It's the closing ceremony and some awards are going to be delivered between the winners of the various categories.

In the section of best scorers, first 3 qualified players are:

1.- Yuki Ogimi, Japanese footballer, with 12 goals.

2.- Lotta Schelin, Swedish player, also with 12 goals.

3.- Christine Sinclair, forward and captain of the Canadian team, with 4 goals.

There's a draw to 12 goals in the first place. Tha Japanese Ogimi is the winner because she has made more goal assists.

Second place, also with 12 goals, but less assits than Ogimi, is for Swedish player Schelin.

And the third scorer is Sinclair, the Canadian player, with 4 goals.

The Championship sponsor, Yukon Cars has decided to give away 40 cars.
They'll give a car to the president of the Organizing Committee, another one to President of the Referees’ Committee, and the 38 remaining cars will be apportioned among the 3 top scorers in proportion to the goals scored by each one.

At the last minute, President of the Organizing Committee decides to reject his gift because he has just been appointed CEO of Manitoba Motors, a direct competitor of Yukon Cars.

Thus, his car will join the other 38 to be distributed among the 3 best scorers.

These news are greeted with joy by all players. Well, all except for Christine Sinclair, who is, in addition to good footballer, a fond of Mathematics.

Why do you think Christine didn't like this late change?

In a few days we will post the solution. Meanwhile, you can think about what's happening. We encourage you to give us your solution by writing below a comment, or just entering its event page on facebook or on google+.

Thank you very much.


Apparently it's no sense she's sad because there's one more car to apportion, right?

First of all, it seems that if the sponsor is giving away one more car, this shouldn't harm anyone, on the contrary, someone will benefit because of it.

Moreover, as that the top 2 scorers are tied in goals, and the extra car can't be distributed between both players in a fair way, it seems logical that Christine will be who gets the extra car.

Nevertheless, Christine Sinclair is right to be worried.

Why? Hasn't she got enough parking space for so many cars?

No, that's not the problem. Actually, she's going to offer all the cars she gets among her teammates, who have helped her to score these goals.

Perhaps, like the president of the Organizing Committee, she has either a family meber or a friend who works in Manitoba Motors, the rival brand?

No, not really. In addition, she loves cars manufactured by Yukon Cars.

Then I don't understand...

Let's see the first gifts allocation to the three players, when the sponsor was going to apportion 38 cars.

We see that Ogimi and Schelin should have received 16.2857 cars (mathematicians would refer to a 'quota' of 16.2857) and Sinclair should have got 5.4286 cars. As far as it's not possible to divide a carwe determine that the Japanese and the Swedish will get 16 cars, and Christine will get 5 cars (which corresponds to the 'integer part' of their quotas). So far we've distributed 16+16+5 = 37 cars. And the remainig car belongs to Christine, because she's the player whose fractional part is the largest and closest to next unit.

I didn't understand very well this last deal...

Well, Ogimi and Schelin, in addition to their 16 cars, should have got 0.2857 additional cars, while Christine should have received 0.4286 more cars. So Christine is more entitled to take the remaining car than the other two players. This way of apportionment is called in mathematical terms as the ‘largest remainder method’ or ‘Hamilton's method.

Now I see it more clearly.

Let's see what happens when the sponsor decides to give away one more car.

Now we see that the first 2 players are given 16 cars, and Christine receives 5 cars. With the two remaing cars, we'll use the same method as before.

Ogimi and Schelin should get 0.7143 more cars, while Sinclair should get only 0.5714 more cars. Therefore, the 2 remaining cars are now assigned to each of the first 2 scorers, because their fractional parts are larger.

So now we give 17 cars to Ogimi, another 17 to Schelin, and only 5 cars to Christine, don't we?

That's right. It turns out that increasing one gift, not only Christine doesn't get one more car, but she loses one of hers.

But this question will be very unusual, right?

You shouldn't think so. Actually, this issue has received special attention from mathematicians, who call it by the name of Alabama Paradox.

Why this name?

Map from the Nations Online Project
This mathematical paradox was detected for the first time in the United States House of Representatives. In it, the number of each state's seats are redistributed every 10 years, regarding on their population growths.

After the 1880 census, a study was made on a possible extension of the number of seats in the House. In this study it was found that the state of Alabama would have got 8 seats in a chamber of 299 representatives, but only 7 with a House size of 300.

And is there any method of proportional apportionment in which these paradoxes do not occur?

Lots of mathematicians have tried to give a solution as fair as possible to the issue of allocation of seats after a vote, but they haven't achieved a perfect method.

Thus, numerous ways have been created to assign seats based on the votes cast, like the Hamilton's method we've seen here.

We've got some divisor methods, such al Jefferson's method (also known as d’Hondt method), Webster's method (method of odd numbers or Sainte-Laguë's method), Huntington-Hill's method, Dean's method, Adams' method, or the Danish method, among others.

In these systems we can find several paradoxes: Alabama paradox, the population paradox, or the new states paradox. That means that every method generates some bias or favoritism to some population vs. other.

And we also have preferential voting systems, among which we have the simple or relative majority, the second round, the Borda count, the Condorcet method, the single transferable vote, or the 'approval voting'.

But they are also imperfect. We can remember our story about the Arrow paradox, for example.

But some methods are better than others, right?

Yes, Webster's method (also called Sainte-Laguë`s method or method of odd divisors) seems to be the one which produces minor injustices, but it's not the most used. That's because there uses to be a political will to prioritize the good governance instead of the strictly proportional representativeness of the Parliaments, and to benefit the major parties, or such sort of things.

Now that we've seen all the problems of the distribution, as in our case, Christine did have reason to worry about when she heard they would deliver a car more...

No doubt, she would have previously read any of these great links: 'The Constitution and Paradoxes', 'Apportionment: The Alabama Paradox' o 'Apportionment and rounding schemes'. 

And regarding on these issues of fair divisions, voting and paradoxes, surely Christine have also read some of our stories: And now, who should kick the penalty?The problem of the fair division, or The golden goalkeeper.

So, should Christine ask for an apportionment based on Sainte-Laguë method?

Well, despite being the method that produces less distortions, in this particular case, its application would cause an additional problem, as Tom (C.M.) Thomson discovered (many thanks for the comment). While it's also true that Christine may benefit from the use of that method.


Well, this method is used as follows :

We add up the goals scored by each player, and we calculate the quotients resulting from dividing the number of goals by the successive odd numbers. And we'll give the cars according to the highest resulting quotients.

Let's see how the 38th and 39th cars would be assigned, according to the following table:

The cars would be assigned to the players depending on the highest quotients: 12 - 12 - 4 - 4 - 4 - 2.4 - 2.4 - 1.714 - 1.714 - 1.333 - 1.333 - 1.333 - 1.091 - 1.091 - etc...

As you can see, the first 37 are easily given out (yellow cells). But with cars 38th and 39th we have a serious problem, since the three players are equally entitled to the cars, as they've got the same next quotient: 0.364.

Obviously, there should be some kind of rule to break ties. But if there's no fixed rule, the remaining 2 cars should be delivered by lot, so Christine would have a 2/3 chance of getting the 6th car for her.

Then, no doubt, Christine should ask for this method to be used! 

Thursday, 24 October 2013

Breakfast at Les Deux Magots

Zlatan Ibrahimovic intrigued by the friendship paradox
(This entry participates on the 104th edition of the Carnival of Mathematics hosted by Math-Frolic!)

Zlatan Ibrahimovic is sad, very sad. This is because he thinks he has few friends among his teammates. 

When he takes a look at his companions, he realizes that most of his friends have more friends than him. And not only in the pitch or in the locker room, but they also have more followers and friends in social networks (Facebook , Twitter, Linkedin, Google+...). 

Awesome continental breakfastHe has proposed himself the firm intention to change this situation, and he's looking for someone to give him advice on how to make more friends. So he meets with Thiago Silva at Les Deux Magots to have breakfast and talk about it.

Restaurant Les Deux Magots, Paris.It 's a lovely day in Paris, so Zlatan and Thiago sit outside to have a nice breakfast. Zlatan exposes the problem to Thiago:

My friends seem so much more popular than me. I've noticed that they've got more friends, and I'd like to do anything to have so many friends as them. 

Thiago Silva talks as follows:

You shouldn’t worry about what you’re saying. It's very common, it's not your fault, it's just Maths

Do you think that it’s also the fault of Mathematics? Think a moment, and pass to see the solution in the second half.


Thiago Silva about to explain to Ibra the friendship paradox.
Well, as Thiago Silva says, it’s a simple mathematical problem, and not otherwise. Let's see how Thiago explains it to Ibra:

Do you know the friendship paradox?  According to it, your friends have more chances of having more friends than you do...

Well, once I heard that people usually are more likely to be friends with those people who have many friends than with those with few friends ...

Yes, that’s what Satoshi Kanazawa psychologist said: people use to establish friendship more often with people who have many friends that with those which have few. Although it doesn’t match exactly with this problem; we should rather look at the studies of Feld sociologist.

Is this Feld the one who discovered the friendship paradox?

Yes. Indeed, Feld’s frienshid paradox is a property of Graph Theory, by which it’s established that it’s likely that our friends have more friends than we have...

List of the 11 lineup players of the Paris Saint Germain team.How is it possible?

Thiago picks up a notebook and begins to put on paper all the team’s friendship relations.

Let's see it graphically. We’ll write in this paper the 11 lineup players (list on the right).
Now, we'll identify the players with a blue circle (vertices), and we'll write inside them their numbers. We'll connect with a red line (edges) the circles of those who are friends.

Beside each player we'll write in lilac a figure representing the number of friends he has (just counting the number of red lines from his circle). That way we can see graphically all existing friendship relations on the team.

As you can see, you are the blue circle with number 10 inside it. There’re 3 red lines connecting your circle with your 3 friends: Pastore (27), Lucas (29) and Lavezzi (22). That’s why I wrote a lilac color number 3 beside your circle, because you’ve got 3 friends.

Graph of the friendship relations among the players.

Now we’re going to build a table from this graph. In the line corresponding to each player we’ll write the total of friends of each player’s friends in the cells where his row crosses with his friends' columns. In the table beside, in the first column we’ll put the amount of friends each player has. In the second one we’ll add up all his friends’ friends. And in the third one we’ll calculate the friends average of his friends, by dividing the sum of the friends of the friends by the number of friends.

Table of the friendship relations among the players.

Let's go first with you, Ibra. You're number 10. Look at row 10: you've got 3 friends: Lavezzi (22), Lucas (29) and Pastore (27). Lavezzi (22) has 3 friends, so we've written a 3 in the cell where your row (10) meets his column (22). Lucas (29) has got 7 friends, so we write a 7 in the cell where your row (10) crosses with his column (29). And Pastore (27) has got 2 friends, so we've written a 2 in the correspondent cell.

We’ll do it that way with all the players, and now we fix our attention to the table on the right.

If we pay our attention to how many players have more friends than the average of their friends, we get, surprisingly, that only 3 of them (23, 2 y 29, in red color) have more friends than the average of their friends (number on third column is greater than number on first column), and the remaining 8 have fewer friends. And as we can see, the total average of the friends  

42 / 11 = 3.82 

is much lower than the total average of the friends of the friends.

182 / 42 = 4.33

Why does this happen?

This has to do with the properties of the geometric mean and the statistical variance. Let's take another paper, and we’ll focus only on the friendship relations among the 4 defenders.

Graph of the friendship relations among the defenders.

We notice that Van der Wiel (23) has got 2 friends, Jallet (26) has 2 friends, Maxwell (17) has got only 1 friend, and I, Thiago (2), have got 3 friends.

We calculate the friends average of the defenders: (3+2+2+1)/4 = 2. We can see that defenders have 2 friends each one by average.

Table of the friendship relations among the defenders.

Now we’ll calculate the friends mean of the defenders’ friends. Van der Wiel (23) has 2 friends, who have 2 and 3 friends, respectively. Jallet (26) has got 2 friends, who have 2 and 3 friends. Maxwell (17) has one friend, who has 3 friends. And I (2) have got three friends, with 2, 2 and 1 friend, respectively.

Thus, we’ve got the following data:

2, 3, 2, 3, 2, 2, 1, 3. 

We sort them like this:

3, 3, 3, 2, 2, 2, 2, 1

And we calculate their average:

(3+3+3 + 2+2 + 2+2 + 1) / 8 = 
(3·3 + 2·2 + 2·2 + 1·1) / 8 =
(32 + 22 + 22 + 12) / 8 = 

We see how, in a seemingly amazing way, the friends average of defenders’ friends rises up to 2.25, higher than the friends average of defenders we calculated before, which was 2.

That’s true. And always happens the same?

Yes, always. Unless everyone has the same number of friends. In that case the two means are identical.

And why is this happening?

I suppose you've noticed that, when I calculated the mean of friends of friends, I rearranged the data we had in a special order.

2, 3, 2, 3, 2, 2, 1, 3   →   3, 3, 3, 2, 2, 2, 2, 1

Yes, I've noticed it. Why did you do that?

I did it this way so you realized the following question: people who have many friends are incorporated many times within the sum, in fact, so many times as friends they have (3 times number 3), while people who have few friends are included less times (1 time number 1). This means that those players who have more friends have also more weigh in the average (3+3+3+2+2+2+2+1), so that the overall mean tends up.

However, in the friends mean, we add only once each number (3+2+2+1), that is, all people have the same weight, both those who have many friends as those who have few.

I think now I understand it, but I’m not sure that one average has to be larger than the other one for that reason.

Well, then let's go to the mathematical proof.

Let's call xi the number of friends player i has, and μ the friends mean of a n-players team, which will be equal to:
Arithmetic mean formula.

Now let's see how we calculate the friends average of the friends. We’ve seen on the example about the defenders that the sum of the friends of friends corresponds to ∑(xi2), and we know that the amount of friendship relations is ∑xi. So the friends mean of the friends, which we name μ' will be:
Formula of the arithmetic mean of the friends of the friends.
Now we need to check if μ is greater than, lesser than, or equal to μ'.

For proving this, we’ll use the formula of the statistical variance (σ2) of a discrete random variable. We know that:
Formula of the statistical variance.
It follows like:
We divide both terms by ∑(xi), and we get:
Comparison between the friends average and the friends average of the friends.
Comparison between the friends average and the friends average of the friends.
In other words: μ' = μ plus a value greater or equal to zero, because both the statistical variance and the friends average are always non-negative.

Therefore, in a group, the friends average of friends will always be greater than or equal to the average of friends.
Comparison between the friends average and the friends average of the friends.
Well, with this mathematical demonstration, you definitely convinced me. And beyond the fact that people to not be depressed by having fewer friends than their friends, have all these studies other applications?

Well, this paradox has many applications in many other areas of life. For example, it's used for the control of diseases. Thereby, our club does blood tests to some players to detect any contagious illness and prevent it. Every month they pick 5 players randomly, and does some clinical tests to them. Can you imagine a better way of improving this monitoring task?

I think that...

No doubt they should pick 5 players randomly, and then ask them each choose a friend. We know these friends of friends have a friends average higher than the initially chosen players, so they’ll also have a much higher chance of being infected, because as they have more friends they are more exposed to infection. This way we get a sample of players more significant than randomly selected.

That's what I was thinking. 

That’s the way most schools, hospitals or residential homes use to do their sanitary controls. Other application is for people who go to a gym and lose heart because they see that most people are in better shape than them... This doesn’t happen to us, right Ibra? In this case they should realize that when they take a look at the people who are at the gym, they are extracting a biased sample, since it’s likely that people they see are those who spend more hours there, and consequently are in better physical condition.

We can also apply this paradox to other things. That way, it’s a very useful technique for children who collect photocards of players like us. They may apply the friendship paradox to complete their albums in a better way. Usually, they try to change their repeated cards among his friends. But they almost never achieve to complete their albums.

Football players photocards.

Changing football players photocards.It would be better than they approach a few children randomly selected, and ask them to submit to their friends, because then they’ll meet the most popular children of the school, who have more contacts and are more likely to have those missing stickers. Even though they should take care of not becoming infected of any contagious illness by them…

And you can also understand why, when we go in vacation to the beach, we find that it's usually crowded. What about those empty beaches in the brochures? Once again, it’s very likely that the beach we go is full of people, and not completely deserted, because of this paradox.

So I shouldn’t worry about having so few friends, right?

Not at all. You can see that it happens everywhere. Not only in the Paris Saint Germain, but in all teams: Real Madrid, AC Milan, Manchester United, L.A. Galaxy, Santos, FC Barcelona... And it happens to most players: Cristiano Ronaldo, Neymar, Falcao, Messi ...

Oh, really…? -Ibra asked flashing a shy smile-. I think after these explanations, and as far as it’s lunch time, I should invite you to have lunch at a restaurant a know...

Restaurant in Paris.