Monday 28 December 2015

2015 summary


A summary of the posts issued in 2015. I hope you enjoyed them all.
First of all, I want to thank you for being there one more year.

In this 12 months we have practised some new mathematical issues. I hope you have enjoyed them.

Here you have a list of the posts of this year 2015:

  • Flavius Josephus and the puisi-nanoq game.

    We started the year in Greenland, among seals and bears, with a puzzle about modular arithmetic in which we discovered the Flavius Josephus problem.


  • A galactic prize.

    Later we traveled to the far west, to try to build enormous numbers with a few figures. This entry was rewarded with the first prize of the mathematical Spanish contest "Edición 6.2 Número Pi" del Carnaval de Matemáticas.


  • The awkward question.

    We went to Guanzhong, in China, where we learnt some mathematical methods to ask questions about awkward issues.


  • Sabotage in the stores.

    We returned to Madrid, to face a problem of simplification.


  • Spirals and roulettes.

    And to close the season, we take a quick look at the spirals and helices at Monaco.

I hope that next year you'll also visit my blog. And that you will enjoy my new issues. Thank you very much. I wish you a happy 2016!





Sunday 20 December 2015

Spirals and roulettes


Joe Vitruvius is going to cellebrate a relaxing and cheap New Year's Eve in Monaco.

The end of the year wouldn't be the same without the confettis, such spirals that become helices when we launch them to the air. There are thousands of examples of mathematical curves all around us that we hardly notice: Archimedes spirals, logarithmic spirals, spirals of Fermat... if we talk about two dimensions. And cylindrical, conical, spherical helices... if we think in three dimensions. Before midnight, several of these curves will get in the path of Joe Vitruvius.

(This post participates on the 130th edition of the Carnival de Mathematics, hosted by the blog Bit-player.)

FIRST HALF

If balls are not found, they should play a bridge game, for instance. The teams of AS Monaco and Las Vegas Mobsters are going to play a charity match on New Year's Eve, for helping the victims of Monte Carlo method.

Players jump into the pitch to start the training session before the match, when the delegate of the club realizes that there are no balls.

The club's kit man has gone off on holidays, so the delegate is about to pick up the keys of the material store from his office, but instead of keys, he finds a Christmas album hanging on the hanger. He tries to telephone him, but there is no way to contact the kit man.

He's a person who likes mind traps, so the disk may represent not only his New Year's greeting to his peers, but also some kind of clue to find the keys.

It seems to me that this kit man is very strange. Couldn't he have written a Christmas card, like everybody? Joe Vitruvius has come to the stadium to watch the game, so the chairman invites him to go down with him to the locker room to see if they can solve the problem.

- Wow, an album of U2! New Year's Day! What a beautiful song to celebrate the New Year!

- Yes, but it would be even more beautiful if it was a key. We can't open the door of the room where we store the balls, with this disk.

- And what do you want me to do? It would be better to call a locksmith.

- Yes, but today is New Year's Eve, and there is no open shop. We will not find any locksmith who wants to come to unlock the door before the time of the start of the match is over.

- I know nothing about how to open locked doors...

- But you know a lot about mind puzzles. And we are convinced that the disk is one of them. In addition, the kit man loves Maths, so we're sure that the album must represent a mathematical clue.


I calculate, therefore I am


SECOND HALF


It was very lucky that they still keep an old gadget. - Have you tried to play the disk just to see if it includes any recorded message indicating the place where he has left keys?

- Luckily we still have an old record player in the office. We played the album, and the only we heard is the song. It's very strange that he used a vinyl record, instead of something more modern such as a CD or a digital format.

- Maybe this is the clue.

- Oh, yes?

- Yes, it's possible. Do you know how a vinyl record is recorded?

- Not entirely.

I was never able to remove the lints clinged to the disk because of the static electricity. - Unlike compact disks, the information in vinyl disks is recorded in a single track. It's a spiral track, that a needle reads moving from the edge of disk to its center.

- So it's only one single groove, right?

- In fact, this type of curve has a special name in Mathematics. It's called Archimedean spiral, as this ancient wise Greek man described it in his treatises.

- Were there music albums in those days?

- No. Archimedes used this spiral for his studies of squaring the circle.

- And has it got any other uses?

- Of course. It has multiple applications. It's used in the mechanisms of air conditioning, in certain tests for the diagnosis of neurological diseases, to calculate the concentrations of bacteria, or for really important issues such as counting the meters of toilet paper on a roll, for example.

- I see. I imagine that the formulas used for its description will be very complex, right?

- It depends. If we define it with polar coordinates (r,θ), the expression we have is very simple:

r = a + b·θ

- It's true, it seems simple, but I don't understand anything.

A spiral thanks to the El Zombie de Shcröndiger.
- The formula says that the distance (r) of each point of the curve from the origin, depends on the turns (θ) and on a coefficient (b). The larger this coefficient is, the greater the distance between the turns of the spiral.

- Well, it was not that complicated. But I think we are giving around the bush like in an Archimedean spiral, without actually any conclusion.

- Well, I think we should search for somewhere in the stadium where we can find another spiral of Archimedes.

- Hmmm. I don't know.

- I think that, at the entrance, I saw a magnificent Christmas tree. I've noticed the lights arrangement, and I saw that they formed a perfect spiral of Archimedes.

- Oh, yes?

- Well, not exactly. It would be rather a conical helix, as it is a continuous curve which develops in three dimensions. But if we look at the tree from above, and project the helix in only two dimensions, we would see that the lights are arranged according to an Archimedean spiral.

An amazing zenital picture of the stadium. But I can't distinguish anything.Now we can see perfectly the amazing Arquimedean spiral formed by the lights, and the numbered balls.

- Who put up this tree?

- The kit man.

- Well, we're approaching the solution.

- But where can he have hidden the keys? Hanging from a branch?

- I don`t think so. They may be within any of the balls that adorn the tree. If you look, at them, all have a number.

- Yes, but which ball will we choose? We have no time to break all the balls to see if we find the keys within any of them.

Place your bets, ladies and gentlemen! No more bets! - He hasn't left us more clues, except the disk with the Archimedean spiral. So we should focus in it. This spiral is also known by another name: Archimedean roulette...

- Ah! Now that you mention it, I remember that before he worked for our club, he was employed as a croupier at the Grand Casino. Perhaps there is some sort of relationship with the roulette you say.

- Certainly. The roulette is a game invented by the Mathematician Blaise Pascal, who established its rules on the 17th century. This rules haven't experienced any outstanding change since then. The most important new was introduced to include, among the 36 existing numbers, the red and black ones, an extra green number, zero, exclusive for the casino, which allows it to get some profits.

- Given that he worked as a croupier at the casino, perhaps we should then open the ball number 37.

- What an ugly number!

- There are no ugly numbers. For example, 37 is a fascinating number, because it's a prime number that is factor of all three-digit repdigit numbers.

- Repdigit numbers?

- Yes, numbers that are composed by repetition of the same figure: 111, 222, 333...

Number 37 was deserving a good tribute. - Ah! It's okay. Let's try with ball number 37.

- Correct: here are the keys! Go quickly to open the door and get the balls so that the match can be played.

- And we're going to the VIP box to open a few bottles to celebrate the resolution of the problem, and to wish all our followers a Happy New Year!



Thanks for joining my blog for another year. I wish you an extraordinary year 2016!





If you want to know more about the content of this post, you can also look at these amazing articles: From physics to online fun: The history of Roulette, Spirals, Arquimedean spiral, Polar and Cartesian Coordinates.


And don't forget to take a walk by the 130th Carnival of Mathematics. There you'll find lots of excellent math posts that you'll surely like too.

Monday 28 September 2015

Sabotage in the stores


Joe Vitruvius and Madrid nightlife

The method of simplifying consists on transforming one expression into another one simpler, more useful to work, or easier to memorize. We simplify fractions, polynomials, powers and radicals... It's a great Mathematical tool, but it can become a dangerous method if you don't use it properly.


(This post participates on the 127th edition of the Carnival de Mathematics, hosted by the blog Mathematics and Coding.)

FIRST HALF

Iker Casillas signs for PortoReal Madrid president feels anxious. He’s not able to balance the books of the sales in the stores.

After the signing of Iker Casillas for Porto, Florentino wants to clear the stock of the goalkeeper t-shirts as soon as possible.

To achieve this, he has instructed the two official stores. In the store closer to the Santiago Bernabeu stadium, they will sell 2 t-shirts for 20 € in total, while in the other store, the deal will be 3 t-shirts for 20 €.

In the first week, they have sold a total of 6,000 t-shirts, 3,000 in each store. In total, they have made 50,000 €.

But there are still many shirts to sell, so in the second week they have decided to change the offer.

If the previous week they sold 2 units for 20 euros and another 3 units for 20 euros, now both stores will sell batches of 5 t-shirts for 40 euros, and will get the same income for every 5 t-shirts.

Iker t-shirts on sale

During the second week, they have managed to sell the same number of shirts (6,000), also 3,000 in both stores, but the takings have dropped to 48,000 euros.

The club doesn’t understand why they have got less money. They think that maybe an employee of one of the stores has stolen some notes.

Cash register The fact is that there are still 6,000 Iker t-shirts to sell. This time it's been decided a different deal. They’ll sell batches of 3 units for 15 euros at the shop of the stadium, and batches of 2 units for 25 euros at the store of Gran Vía. Thus, for every 5 shirts they will get again a total of 40 euros.

Finally, they sold the remaining 6,000 shirts, 3,000 in each store again. But this time they get 52,500 euros.

Now the board of directors doesn't understand anything. It’s possible that the employee who stole 2,000 euros last week has returned them to the cash desk, or maybe the money was miscounted last week. But then, what about the extra 500 euros of the third week?

Undoubtedly, this is a mystery that only Joe Vitruvius can solve, so Florentino calls him to come and to solve the enigma.



I calculate, therefore I am


SECOND HALF



Joe Vitruvius with Florentino - Hi, Florentino, how are you?

- Well, we’ve got a small problem. We sold 18,000 t-shirts over the past few weeks. We have asked 40 € for every 5 shirts, so we should have entered 144,000 euros. And yet, we got 6,500 euros more.

- That's fine. With that extra money you can sign a new goalkeeper, right? Or you can also buy a next-generation fax...

- The thing is that during the last three weeks we have sold the same number of t-shirts and yet, every week we have cashed up a different amount of money.

- I see. Were all units sold at the same price?

- No. We have two stores, and each one had a different offer.

Shops at Gran Vía and near Santiago Bernabéu stadium

- Well, it may explain everything.

- No, because for every 5 t-shirts, the money extra we get in one store equals the money we lose in the other.
Batches of 5 Iker t-shirts

- Then it's clear. You've sold more t-shirts in the store where you have a better deal. That’s the difference.

- Not either. It turns out that despite the offer, we sold the same number of shirts in both shops. So the differences weren't because we sold more shirts in the cheapest store.

I think that there is an employee who wants to turn us crazy with this, perhaps a staunch supporter of Iker who didn’t like him to leave Real Madrid, or something like this. I would like to find the saboteur.

- Well, I think that such a person doesn’t exist. It's just a small mathematical paradox, because of the simplification on the calculus.

- Oh yeah? What is it about?

- Let’s see. We’ll start with the central week, in which both stores sold batches of 5 t-shirts for 40 euros. If 6,000 shirts were sold in total, we can say that 1,200 batches of 5 units were sold, or what is the same, you sold t-shirts for 8 euros, right?

Sales distribution between the two stores


- Yes, I think it's pretty clear.

- Now let's see what happened on the first week.

8 euros an Iker t-shirt - Then we also sold batches of 5 t-shirts for 40 euros. In the store close to the stadium we sold 2 t-shirts for 20 euros, and in Gran Vía we sold the remaining 3 shirts for 20 euros.

- There's the trap. In this case we can’t talk about batches of 5 shirts, since it’s not entirely true. You are wrongly simplifying the distribution of your sales.

- Why?

- In each store you sold 3,000 shirts, right?

- Certainly.

- In this case we can only speak of 1,000 batches of 5 t-shirts (sold at an average of 8 euros each unit). And a surplus of 1,000 t-shirts, which were sold in the store close to the Bernabeu stadium at 2 shirts for 20 euros, ie 10 euros per t-shirt.

Therefore, part of the t-shirts were sold at a higher price. That’s why you got an additional money during the first week.

Sales distribution between the two stores


- And if you look at the last week, we can see that a total of 1,000 batches of 5 t-shirts were sold for a total of 40 euros (at an average of 8 euros a t-shirt). And there were still 1,000 t-shirts in the store of Gran Vía, which were sold at 2 units for 25 €, ie 12.5 euros per shirt.

And that's why this week you got even more money.


Sales distribution between the two stores

- Now I understand everything. So there is no saboteur...

- Nope. The error was that you thought that the t-shirts were sold in batches of 5 units all the time, when it happened only one week.

- And has this ever happened elsewhere?

- Yes. The writer Malba Tahan, in his book 'The man who counted', writes a case just like this with some pineapple vendors. And Martin Gardner, on his book 'Aha! Gotcha. Paradoxes to puzzle and delight', shows a similar case which takes places in a music store.
Recreational Mathematics-OK, now I stay calmer. We'll have to see what we can do with the extra money we have got.

- Well, you can give the extra money to any philanthropic association. Or you can also buy some books of recreational mathematics, and give them to the children who come to the stadium, at the beginning of the next match. Surely you will increase the attendance to the stadium.

- We will think about it. Bye, Joe, and thank you very much for your help.

- Till next time, Florentino.




And don't forget to take a walk by the 127th Carnival of Mathematics. There you'll find lots of excellent math posts that you'll surely like too.


Thursday 4 June 2015

The awkward question


Joe Vitruvius and his new history in Guangzhou: The awkward question.

Sometimes it's quite difficult to get a truthful answer from people in surveys. Fortunately, some mathematical methods have been created to overcome the reluctance of people to answer some awkward questions.


(This post participates on the 123th edition of the Carnival de Mathematics, hosted by the blog Mathematical mystery tour.)

FIRST HALF

Semifinal of the Champions League AFC between Guangzhou Evergrande and Kashiwa Reysol.
Next week there's an interesting semifinal of the AFC 2015 Champions League between the Chinese Guangzhou Evergrande and the Korean Kashiwa Reysol.

Fabio Cannavaro, coach of the Chinese club, has noticed that, in the last weeks, the level of play of his team has dropped a lot.

Some people say that some players of Guangzhou go out partying at night, and that's why they don't perform well in training sessions and matches. But nobody has proved it's true.

The club has hired some private investigators to follow them, but for now the players have always got rid of the detectives' persecution.

Badge of the Chinese team Guangzhou Evergrande. A curious Spanglish word.

Fabio is worried about it, and doesn't know what to do. He has called them one by one to his office, and has directly asked each one if rumours are true. But none of them has accepted that goes out at night. And they didn't want to say how many colleagues use to do it.

Guangzhou Evergrande players posing for the press. I don't know why the two players on the left are crouching.
It seems clear that they have lied, and that they form a very close group, and that they don't want to betray each other. But Fabio needs to know whether the problem of the trips at night is widespread or not among the team.


Tonight, while dinning at a restaurant in Hong Kong, he has met Joe Vitruvius, who has come to the city to take part in a Conference of Mathematics. Fabio has commented him on his problem, and Joe thinks that he should call his players again to his office.

Hong Kong restaurant where Fabio Cannavaro meets Joe Vitruvius. What a coincidence!

- But they will answer the same again, Joe.

- Not necessarily. You can get some of them to tell the truth.

- Well, I don't see how. I don't want to threaten them, nor to offer them any kind of reward to betray their teammates.

- Well, there's a way to get them to tell the truth, without threaten nor rewarding them...

Fabio Cannavaro, coach of Guangzhou Evergrande, who is closing his eyes like if he already had Chinese eyes.Joe Vitruvius, after having lost his luggage at the airport.

Can you imagine how they will know what's happening with the players?




I calculate, therefore I am


SECOND HALF


Guangzhou Evergrande's football stadium is wonderful.
- Let's see, Fabio, which were the questions you did?

- First, I asked: Do you go out for party at night? And everyone told me 'no'.

And then I asked:  Do you know how many playmates like partying all night? And they answered me that none.

- Well, I think you should call them back one at a time and ask them the same questions.

- I don't understand, Joe. If I ask them the same questions, I will get the same answers.

- No, because now we've got a magical coin.

50 yuan Chinese coin. I think that Joe Vitruvius's coin is counterfeit.

- I've already told you that you won't be able to bribe them. And even less with a simple coin, no matter how pretty or magical it is.

- I'm sure this coin will help us to know the truth, Fabio. 

- I can't see how.

- It's very simple. We'll call them one by one to your office, and we'll propose this: we'll give them this coin, and we'll tell them to toss it secretly. 

If they get a panda bear, they must answer truthfully about whether if they go out on a spree or not.

But if they get the snake, they always have to answer that they do go out at night, regardless of the truth.

It's clear: with the tender panda they will tell the whole truth; with the evil serpent they will say in all cases they like to party. Easy, right?

They'll flip the coin again. If they get a panda, they must tell us the number of players they know going out by night, while if they get a snake, they can invent the amount, and tell any figure between 0 and 20.

We will never know, anyway, if each individual player has got a panda or a snake, that is, we won't know if he's lying or not, so those who has got a panda will have no fear of telling us the truth. Do you think they will accept this deal?

- I think so. It seems that the method doesn't compromise them.

- Here we go. Tell the first player to come in...

Fabio Cannavaro office at Guangzhou Evergrande stadium. I mean, its door.

- ...we've finally completed the survey, Joe!

- Well, now we can get a clear idea about what's happening on your team.

- Oh, yes? You'll have to explain it to me. We don't know if each player has lied or has answered truthfully.

Results of the survey carried out among the players. I hope you haven't been confused with the snake and the panda.
- Let's see the results of our survey. Regarding the first question, in which we directly asked if they go out or not, we have a total of 12 positive answers and 8 negative ones

We have a 50-50 chance of getting a panda or a snake, so the most likely is that half of the players have told the truth and half the players have lied.

This means that, about 10 players have said that they go partying at night because they have got the snake. And among the other 10 players who got the panda, and therefore had to say the truth, 2 have answered that they go out, and 8 have answered that they don't.

They are 2 from 10, that's it, a 20% probability, so in the total of 20 players of your squad, we could think that there will be only 4 players go on a spree at night.

- Yes, but if it happens to get 20 pandas by chance, then all the answers would be true, and I'd have a problem with 12 players.

Probability of getting a certain number of faces and tails when tossing a coin 20 times, even in the case that the coin is Chinese. - It's true. But look at this other table. If we calculate the probability of getting a certain number of pandas, when we toss a coin 20 times, we can see that, first, the most likely option is that we get 10 pandas, a 17.62% of the times.

And, on second place, we notice that the chance of getting 20 pandas is about a 0.0001%, that is, once every million times we do the test. In fact, there is a probability of almost 98% that we get 14 pandas at maximum.

By the way, it seems a little risky to draw conclussions from a sample of only 10 players. So we should analyze the answers to the second question, in order to check if our assumptions are correct.

Granny, why we have ordered the survey data? Just to study them better... - But here, Joe, we find the same problem. We don't know which data are true and which data are invented. In fact, we have a set of answers, quite diverse. Some have answered that no player goes out, and other have said that there are 20 revellers.

- We can work on it, Fabio. If we calculate the average of the answers we have, we get that 5.25 people like partying. But the coefficient of variation, which measures the data dispersion, is enormous. We should work hard with sample data to obtain more acceptable statistical values.

We know that about half of the responses are invented, and therefore only half of the data are reliable. So we should try to eliminate some data, to get a more realistic average.

- But, how can we separate right data from invented data? If the second answers were related to the first responses, we would know that the data from those who said that they don't go out are correct, but they tossed the coin again before answering the second questions, so we can't get any help from this point.

- That's true. I've made them flip the coin twice just in order to avoid they lie when answering the second question for those who have answered truthfully the first one and have answered that they don't party late at night, because therefore we know that they got the panda and are obliged to tell the truth.

Fortunately, in Statistics there are some methods to eliminate invalid data that can distort the average.

There are data that are not real. How can we remove them?

Some statisticians remove those values furthest from the average Average, distanced from it by a certain multiple of the standard deviation Standard deviation, and keep only the data in the interval Data interval around the average

In other cases, we can sort the data from the lowest to the highest, and remove the first and the fourth quartile, leaving only the data of the two central quartiles, closer to the median.

With either of these two options, we can see how the standard deviation drops down considerably to a somewhat more acceptable value.

Although in our case, as we only have 20 data, we must be cautious when removing some of them. By the way, we have 3 values that we can reject because they're impossible.

- And, which are they?

- If there are 8 people who say that they don't go out, it's impossible that there are 17 or 20 lively players. And there's no way that 0 players go partying because, in that case, all the players who have got the panda should have answered that they don't know anyone who goes out, and there should be several zeros, not only one, except in the very unlikely event that they got 20 snakes.

- Yes, once in a million times that we did the survey, right?

More conclusions on the survey. I promise this is the last table of the story. - OK. We could go on the process by eliminating those less likely results, the furthest from the median or the average. Even in that case we could get confused, because not all the players know what they playmates do at night.

You know that not all of them are friends of each other, and that they don't have fun all together. That way, if we eliminate, for example, the datum of 2, maybe this number has been provided by a person who was telling the truth, but it's also incorrect, because he only knows 2 people who do it, but there are much more.

As the sample we have is very small, perhaps the bias that we generate when performing a screening of the remaining data would be more prejudicial than beneficial, so we will simply make the average of the data we have so far.

- Then, at the end, which of the methods of data cleaning will be use?

- If we eliminate some data, we can see that the method with a lowest coefficient of variation is that of the central quartiles. Anyway, the average of all the methods is close to the value of 4. And this figure coincides with the result of the first question, so we can conclude that around 20% of your players goes out at night.

Therefore, you can be happy, Fabio. It's very likely that only 4 players like to go for partying!

- That's right, and this means that the poor performance can be combated with more physical and tactical sessions. Now, the last work is to convince the 4 merry players to control themselves until we have won the championship...

Chinese team players celebrating the championship. Tonight nobody will tell them not to go partying.
And, are you sure that this method we have employed is reliable?

- Of course. This ingenious method is attributed to Eduardo Cattani, an Argentinian professor of Mathematics and Statistics at the University of Massachusetts, as Adrián Paenza refers in his book “Matemática... ¿estás ahí?". Morevoer, Stanley L. Warner, an American mathematician, published in March of 1965 an article about randomized responses and survey techniques for eliminating evasive answer bias in the Journal of the American Statistical Association.

Clearly, there are certain questions on sensible iussues like drugs consumption, sexual behaviour, illegal or forbidden topics, violence, bullying, socially frowned conducts, etc., in which respondents use to reply with incorrect answers.

Joe Vitruvius in front of the Shangxiajiu pedestrian street, wondering if he'd rather dinner a hamburger or a spring roll. The one way to ensure the anonymity and the privacy, and therefore to win the confidence of the respondents, is using these techniques of randomized answers, although they don't always work, sometimes because respondents just don't understand the mechanism, sometimes because they don't trust in all the procedure, and sometimes because, despite everything, they don't respond truthfully.

In our case, as we have done two questions on the same matter, we can be more sure of the result of our enquiry.

- Great, Joe. Many thanks for all. Have a good time in China!

- Sure, Now, I go for a walk through the center of Guangzhou (Canton) to see if I meet any of my Chinese friends or perhaps one of your players.

I hope you have good luck on your next matches, Fabio. Bye!






Below this lines  you will find other links, for if you liked this story and you want to share it with your friends.

And don't forget to take a walk by the 123th Carnival of Mathematics. There you'll find lots of excellent math posts that you'll surely like too.