## Introduction

In one of the job interviews, I was asked to answer a puzzling question. The question was simple; but yet intriguing and tricky.

Here is the question: You are going to play two teams for three rounds in total. You can not play one team twice in a row. You need to alternate. and in order to win the whole set, you need to win two consequent rounds. Not two rounds out of three rounds; but two consequent rounds. The two teams are not at the same level, and based on previous statistics, you know that you have better chance to win over one team compared to the other. Which team do you play first? The one that you have better chance to win? or the one that you have less chance to win?

Now, before we answer the question, let’s dig in a bit more. Let’s call these two teams: Team A and Team B. You need to play 3 rounds and you cannot play the same team twice in the row. So your only options are:

- Option 1: Team A, Team B, and Team A again (ABA), or
- Option 2: Team B, Team A, and Team B again (BAB).

Now let’s say is the probability that you win a game over team A and is the probability that you win over team B. Let’s also assume , which means you have smaller chance of winning over team B, it is harder for you to win over team B, and/or it is easier to win a game against team A.

So, which team do you choose to play first? Team A or Team B? If you start your rounds with Team A (i.e. Option 1) which you have more chance of wining or it is easier to win over and you will play that team twice. But if you choose Option 2, i.e. start playing with the team that you have less chance to win or it is harder for you to win, you have to play that team twice?

So which one do you choose? do you postpone playing with the stronger team and prefer to start with the easier task? Do you mistake the easy start as a seemingly easy path? Or do you face your challenge heads on?!

Well, you might have guessed, already. In this example, you have a better chance of winning the game, if you start with the stronger team that you have less chance to win over, even though, you end up playing that team twice.

Let’s compute the chances of winning for these two options. We are going to explain two methods (well, three methods, actually, but you can argue if the one of the methods is correct way or not).

## Computing The Chance Of Winning

### Analytic or closed form method

As mentioned, the game consist of three rounds, and you have to win two games consequently to win the whole game. Not 2 games out of 3, but 2 games consequently. So, the following are the cases that you will win the game:

Scenarios | Round 1 | Round 2 | Round 3 |

1 | win | win | loose |

2 | loose | win | win |

3 | win | win | win |

### Chance of winning the set if you choose to play team A first

Now let’s assume you start with Team A. Then the sequence of plays would be

Team A –> Team B –> Team A

In this case, your chance of winning if scenario 1 happens is, , recall that was the chance winning a game against team A and was the chance or probability winning a game against Team B.

Like wise you can compute the possibility of winning the set in each option as follows:

scenarios | Winning Probability |

1 (win-win-loose) | |

2 (loose-win-win) | |

3 (win-win-win) |

And your total chance would be the sum of these probabilities:

### Chance of winning the set if you choose to play team B first

Now let’s assume you start with Team B. Then the sequence of plays would be

Team B –> Team A –> Team B

Scenario | Winning Probability |

1 (win-win-loose) | |

2 (loose-win-win) | |

3 (win-win-win) |

And your total chance would be the sum of these probabilities:

### So which one has more chance?

Let’s subtract from , then we have:

Now we know that , , and , therefore, . This means that , which means .

There you have your answer! if you want higher chance of winning the whole game, you better start with the team that you have less chance of winning over, even though you end up playing with that team twice. Face the challenge!

## Could I answer this question differently?

Yes, of course. One way of guessing the solution without going into all these details is to understand what are the winning conditions. The winning condition is to win two games in a row. Not two games out of three; but two games in a row. So, whatever you do, you should not loose the second game or the game in the middle. Because if you loose that one, doesn’t matter what you do before or after (win or loose), you are not going to have two wins in a row any more. Hence, you want to maximize your chance of winning of the second/middle game, which means you want to play team A in the middle which you have a better chance of winning over.

This is another way to reason, why you should start with the stronger team, rather than with the easier team.

## How else can I answer this question?

If you don’t have time for the first method or you are too tired of coming up with the reasoning of the second method, there is another method that you can answer this question: Using Monte Carlo Simulation.

Here how you do it:

- You can randomly generate two probability between 0 and 1.
- Assign the higher number as and the lower number as .
- Now generate couple of thousands of games (the more the better) assuming A-B-A order and see how many of them do you win.
- Now Generate couple of thousands of games (the more the better) assuming B-A-B order and see how many of them do you win.
- Check which one was better: ABA or BAB.
- repeat Step 1 to 5 for couple of thousands of times (the more the better).

If you repeat the above procedure over and over, gradually you can see that overall B-A-B has higher chance of winning than A-B-A.