This year’s cup final will be between two arc-rivals of the country; it is both a final and a derby game. Supporters of both sides are waiting anxiously for the game. Though, Steve has no interest in this game. His team was eliminated in the semi-finals.

Two of Steve’s close friends, Jack and Patrick, have been arguing over the final for the past two weeks. Jack thinks his team FC Ravens will be the winner as Patrick thinks his team AC Bolognese will be victorious. Meanwhile, Steve is thinking about what to eat at supper.

Jack

“We haven’t lost to them in years. The cup is 90% ours. But, this is football; anything is possible. Well, that makes 10% anyway. Yeah, I am pretty sure of my team. If you want, let’s bet on it!”

Patrick

“We are the best team of the season. Plus, our striker scored 69 goals in 27 games. The cup is 75% ours. But, we have been unlucky against them. Which is why I am giving them 25%. Steve, I can bet on it right this second!”

Smart Steve

Steve is aware of the fact that either of these teams will be victorious as this is a cup final and there is no chance for a tie.

He would like to take advantage of his friends’ blindness. Steve would like to set such conditions for the bets such that he would profit whatever the result is.

What would you do if you were in Steve’s situation?

Some people talk about how useless mathematics is. Maybe not all but most of these people lack the ability to understand probability of events, and they don’t even have any clue on how much damage they get because of that. Oddly enough whomever you ask, people will tell you how confident they are about probability.

One of the greatest examples for this is a casino game called roulette. If you have been to a casino before, you already know what I am going to talk about. For those who have no idea what roulette is, it is a gambling game in which a ball is dropped on to a revolving wheel with numbered compartments, the players betting on the number at which the ball comes to rest. Numbers on the wheel are between 0 and 36. Out of 37 numbers; 18 of them are colored in red, another 18 are black and only 1 of them (zero) is neither.

In roulette one of the things you can gamble is color of the number. You can choose either red or black. It is not that hard to realize that the probability of red or black number winning the round is equal to each other and it is 18/37.

Q: Let’s say you are sitting on a roulette table and you observe that the last eight winners were all red. What would you bet on the next round: Red or black?

I asked ten of my friends and got these answers: 2 reds, 6 blacks and 2 “whatever”. Strange thing is nine of them said (without me asking them) that they know the probability is same in each round. It means that their choices were made instinctly, not mathematically.

The answer should be “whatever” as the probabilities stay the same in each round. Previous rounds have no effect on the next round. Except your psychology…

Warning: Gambling is the mother of all evil. Don’t do it!

“Are you a gambler?”

It is a multiplayer game. For “Are you a gambler?”, all you need is a standard dice.

Rules:

Players roll the dice in turns.

Outcomes of the rolls are added together. Goal is to be the first player who passes 50.

Whenever a player rolls 6, round ends for that player. Player also loses all the points he/she got in that round.

Players can stop their round whenever you want; as long as they don’t roll 6.

For instance if player A rolls 4 in the first round, he/she will get to choose one of the following two options: Roll the dice for the second time or end the round and add earned points (4 in this case) to his/her total. Let’s say player A decided to roll the dice second time and got 5. Again there will be two options for player A: Roll the dice for the third time or end the round and add (4+5=9 in this case) earned points to his/her total.

What to learn from all this?

There is only one number you avoid to roll and that is 6. This means whenever you roll the dice there is 5/6 = 0,833… (in other words 83%) chance that you will survive your round. Surviving two rolls consecutively has (5/6)*(5/6) = 0,694… probability. It means your chances have dropped to below 70% just after two rolls.

Imagine that you rolled a dice for 10 times. The probability of getting a 6 gets higher. (Almost 60%)

Although if one takes each roll individually probability of avoiding 6 never changes: 5/6. When you consider cases individually, you miss the bigger picture.

Unlikely events turn into most likely events within time. For instance getting a 6 after 100 rolls is almost certain:

99,99999879% you will get a 6.

Conclusion: If you roll a dice 100 times, it is almost certain that you will get a 6. But if you take a look at each roll, probability of getting a 6 is always 1/6. This is why unlikely event becomes the most likely event within time.

Then I ask you: When do you stop rolling while playing “Are you a gambler?”?

One wonders…

Let’s change “Are you a gambler?” a bit. Assume that:

You don’t have to avoid 6 anymore.

Whenever a player hits the total of 5, 10, 15, 20, 25, 30, 35, 40 or 45, player loses all of his/her points.

What kind of strategy would you use? What do you think is different from the original game?

Youngest ones will approve this: It is usually youngest kid’s duty to run errands for home. This is why I was the minister of errands until I left home for college. Walking to our local market covered most of my daily duties. On an average day I was walking towards the market more than a few times. On top of that, my school was about 20 meters away from that market. I memorized every centimeter square of that street while growing up.

Actually I wasn’t bothered with this as I was able to create games in any kind of situation in my childhood. For example as I was walking down that street I dribbled with stones. I pretended that every little round stone is a foot ball and I was the famous French footballer Zinedine Zidane.

My favorite game was something I called “walking the line” which I still play by myself.

Walking the Line

In my old neighborhood, floor was tiled with these stones:

In the game of walking the line, goal is to step inside the boundaries of those stones. For every step that crossed the boundary I get -1 score as for each of the successful steps that landed inside the boundaries of the stone I got +1.

Q: Pick any step during a walk. What is the probability of that step being a successful one?

Assumptions:

Assume that the shape of the foot is a rectangle.

Let the foot has sizes 30×6 cm.

Assume that the shape of the stone tiling is a square.

Let the square has size 60×60 cm.

Assume that foot always has the same direction when it lands on the square:

In order to take a successful step, foot can touch the boundary but never cross it. This actually means that the center of the foot (or the rectangle) must be inside a specific area.

Center of the rectangle.

Let’s assume that the top of the rectangle touches the top side of the square. In this case rectangle’s center would be exactly 15 cm away from the side of the square:

If this distance is less than 15 cm, it means that the rectangle crosses the boundary of the square:

Although, when this distance is between 15 and 45 cm, rectangle is considered to be inside the boundary of the square:

One can conclude the same for the lower side of the square.

It is also possible to observe that when the distance between the center of the rectangle and the boundary of the square is less than 3 cm, rectangle crosses the boundary of the square:

Although, when this distance is between 3 and 57 cm, one can know that rectangle is inside the square:

Conclusion

Thus, the probability of taking a random step that is successful (inside the boundary of the square) on a squared-tiling, foot’s/rectangle’s center must be inside the following area S:

Area of the square: 60*60 = 3600 cm^{2}.

Area of S: 54*30 = 1620 cm^{2}.

Probability of taking a successful step on a square:

1620/3600 = 0,45.

This means that for the given measurements it is possible to take a step that will not exceed the boundary of the squared-tiling 45% of the time.

One wonders…

Take a coin and a chess board. Flip the coin on the board. What is the probability of this coin landing inside one of the squares on the chess board?

What are the sizes of the coin and the square when there is more than 50% chance of winning?

Certain days of the week (okay; at least six days a week) I visit a specific coffee shop. Almost all the baristas know what I drink because of my frequent visits… Or do they?

My preferences change every six months. In the period of October-March, I only drink either latte or filter coffee, while in the period of April-September I prefer iced latte or berry.

October-March: In case I drink latte today, there are 80% of chances that I will be drinking latte in the next day. If I drink filter coffee today, chances of me drinking filter coffee tomorrow are 60%.

April-September: If I drink iced latte today, tomorrow I will be drinking iced latte with %80 of probability. For berry that probability is 90%.

Diagram of my coffee selections in October-March period.

Question: If I drank filter coffee this morning, what are the chances that I will drink a latte 2 days later? (We are in February.)

This question resides one of the most crucial findings of mathematics with itself: Markov Chain.

A Markov Chain example. I will be explaining what it is in details inside the article.

It is clear to see that there are two different possibilities to drink latte two days from now. Sum of their probabilities will give us our answer:

Probability of drinking filter coffee (0,6) the next day, and latte (0,4) two days later: 0,6*0,4 = 0,24.

Probability of drinking latter (0,4) the next day, and again latte (0,8) two days later: 0,4*0,8 = 0,32.

Probability of drinking latte two days from now: 0,24 + 0,32 = 0,56.

It means the chance is 56%.

One wonders…

Does it matter which day of February it is today?

Would it change the answer if you learn that I drank filter coffee yesterday? Please elaborate your answer.

If I drink iced latte on June 11th, what is the probability of me drinking berry on June 14th?

Driverless Cars

In case you make a simple web search you will see that there are thousands of pages of articles that question where flying cars are. A few generations including mine have been dreaming about flying cars whenever we were just kids. “Back to the Future” was one of the main reasons why we had such dreams. And it is not like we expect time travel. We just want flying cars!

It is 2019 and there are still no flying cars around. Technology developed as much as making driverless cars only. (Only?!)

Decision making systems are among the key technologies needed for building driverless cars. Because a self-driving car will make hundreds of decisions even if it travels short distances.

Gist of decision making systems is the Markov Chain I mentioned in the Serkan’s Coffee. A concept known as Markov Decision Process is the powerful tool that is being used for driverless cars.

Markov Decision Process (MDP): It is a mathematically formulation for decision and control problems with uncertain behavior.

Memory-less Probability

Markov Chain: If there is Markov Chain inside an event or system, future of that system depends only at the current state of the system; not to its past. And it is possible to predict the future of that system.

One of the examples of Markov Chain is Drunkard’s Walk. Reminder: A drunkard makes random decisions while he/she is trying to find his/her home. Assume that the drunkard had made these moves:

Drunkard’s next move will not depend on the previous moves he/she had made. This only depends on his/her current state and probabilities of the possible moves.

If drunkard will move from the point F, there are four possibilities and none of them depend on previous steps the drunkard took.

It goes the same for driverless cars: Decisions will not depend on the previous ones. For example if a driverless car is heading towards traffic lights its decision will depend on the color of the traffic light; not the left turn it made 200 meters behind.

Markov Chain was found more than 100 years ago and it is being used in economy, meteorology, biology, game theory and even modern technologies like driverless cars and voice recognition systems.

Mathematician Family

The person who gave Markov Chain its name is a Russian mathematician called Andrei Markov. His little brother, Vladimir Markov, was also internationally recognized mathematician. Vladimir died because of tuberculosis at the age of 25. Andrei’s son Andrei Markov Jr. was also a mathematician.

Politics and Andrei

Andrei Markov was involved with politics too. He was not in favor of Romanov dynasty which ruled Russia between 1613 and 1917. He showed his opposition with not participating in the 300^{th} year celebration of Romanov dynasty in 1913. Instead he celebrated 200^{th} year anniversary of the Law of Large Numbers! (I’ll get back to Law of Large Numbers later.)

It makes me really happy whenever I discover a fact in mathematics which has incredible depth even though it looks really simple and obvious in the begining. One of these facts is called pigeonhole principle. It is also known as Dirichlet’s box.

Dirichlet’s Box: German mathematician Lejeune Dirichlet first mentioned his pigeonhole principle in 1834. According to him if more than n objects are placed into n boxes, there will be at least one box that has more than one object.

Raising pigeons is a common tradition in most cities of Turkey. Mardin is one of the leading ones of those cities. Tumbler pigeons of Mardin are really famous.

Let’s say you met a guy who raises tumbler pigeons. He is so enthusiastic about his pigeons; he even built little houses for them. However, you counted the numbers of pigeons and little pigeon houses and you realized that there are more pigeons than pigeon houses. In this case you’ve come to the conclusion that at least one of the houses must have at least two pigeons. In other words, there are pigeons who are roommates.

For instance if you have 10 pigeon houses and 11 pigeons, whenever you put pigeons into their houses, one pigeon will always be left outside. And that pigeon will have to be a roommate to one of those 10 pigeons.

It doesn’t matter what kind of order is being used. In the end there will be a pigeon who will have to share his/her house with another pigeon.

This is the pigeonhole principle.

Game

Are you in a crowded room now? If not, go to a Starbucks and drink a coffee on me. Yes, you can send me the bill. We need crowd for this game.

Look around now: There are at least 2 people who know the same number of person in that room/place.

Rules

There must be more than 2 people in the room.

Knowing someone is mutual. If Sean Connery is in the next table, unless he knows who you are too, you can’t count him as someone you know.

A person should know himself/herself. But, you should do it in your private time. In this game, you can’t count yourself as a person you know.

Example: A group of 5.

In such group, one person can know at most 4 people. (Everyone except him/herself) Also one person can know at least 0 (zero) person. Then we can conclude that in this group of 5, everyone can get to know either one of 0, 1, 2, 3, 4 number of person.

Although in this group if someone knows 0 (zero) number of person, then there can’t be such person who knows 4 people in the same group.

If e knows 0 (zero) number of person, then a can’t know 4 number of person.

This is why these 5 people can know 0, 1, 2, 3 or 1, 2, 3, 4 numbers of person. We can’t have 0 and 4 at the same group.

Thus, we should assign either one of these 4 numbers to 5 people. Can you see the pigeons?

a. 1, 2, 3, 4

First four people will get 1, 2, 3 and 4 respectively (It doesn’t have to be respectively though. You can use any order you’d like.). Fifth person is left without a number and must be assigned to either one of 1, 2, 3 or 4. No matter which number that person takes, there will be two people that know same number of person.

b. 0, 1, 2, 3

First four people will get 0, 1, 2 and 3 respectively. Fifth person is left without a number and will get either one of those four numbers. Hence there will be two people that have the same number.

One wonders…

Imagine a 5×5 chess board. Every square of the board has a chocolate placed on it. Every chocolate can only be put to an adjacent square on the board. (Two squares are adjacent if they share an edge.)

Chocolates can move to other squares as shown in the photos.

Assume that we moved every chocolate on the board. In the end, will there be exactly one chocolate in every square?

In 1987, Thomas M. Cover from Stanford University published an article which contained a bizarre result. Cover suggested the following question:

Player A and Player B will get into a competition.

Player A will be writing down distinct numbers on two pieces of papers, while Player B will be choosing one of the papers and will be reading the number written on it. Then Player B will have to decide if the bigger number is on his/her paper, or on the other one.

Naturally, Player B’s chance of finding the bigger number is 50%. In fact knowing one of the numbers has no use for his chance… or not?

Magic of Mathematics

Is there a strategy for Player B to use so that he/she will have more than 50% chance to win the game?

Although it sounds unlikely, there really is a strategy which Player B could use to win the game with a probability that is greater than 50%.

Strategy: Player B thinks of a number T on his/her mind. Every time Player B selects a paper, he/she uses T for comparison.

If T is greater than the selected number, Player B chooses the other paper.

If T is smaller than the selected number, Player B chooses the selected paper.

Theory

Let’s assume x and y are the numbers that are written on the papers. (x is greater than y) There are exactly three different scenarios for the game:

T is smaller than x and y. In this case Player B has exactly 50% chance of winning the game.

T is greater than both x and y. In this case Player B again has 50% chance of winning the game.

T is greater than y, less than x. In this case if Player B picks y, since T is greater than y, he/she will be choosing the other paper. And if Player B picks x, since T is less than x, he/she will be choosing the paper he/she picked. In both situations Player B wins the game which gives Player B a 100% chance of winning the game.

An Example

I will try to explain these three scenarios with an example.

Assume T is 80 and x and y are;

120 and 287,

1 and 2,

64 and 15000.

Solutions:

Player B picks either 120 or 287. Since both numbers are greater than T (which is 80), Player B sticks with the paper he/she picks. In this case probability of picking 287 is exactly 50%.

Player B picks either 1 or 2. Since both numbers are less than T, Player B claims the other paper has the greater number on it. In this case probability of picking 1 is again exactly 50%.

Player B picks either 64 or 15000. T is between these numbers. If Player B picks 64, since it is less than T, Player B would pick the other paper. If Player B picks 15000, since it is greater than T, Player B would claim that the paper he/she picked is the greater number. In both cases Player B wins, which gives him/her a probability of 100% for winning the game.