Jin Song and Jin Hui are brother and sister. They go to same university. Jin Song is a member of ICPC training club and Jin Hui is a member of English club.
Today is Jin Hui’s 17th birthday and it is also the first birthday at university. So, as a good brother, Jin Song prepared an amazing present for his pretty younger sister. But, the mischievous sister went university before he gets up, so he decided to go to the English club and give his birthday present to her.
Jin Hui is a very clever girl, so she thought that her brother will surely come to see her and decided to prepare a funny trick for him. She has n fellows at the English club, and they all agreed with her idea.
First, she asked her fellows to wear same uniform and thick glasses just like as her so that the n+1 girls look like the same. By doing so, Jin Song will get confused and try to find his sister. The trick goes as follow:
Step 1: He randomly and uniformly chooses a girl i who wasn’t asked yet and asks to her “Are you my sister?”.
Step 2: If the current girl i is Jin Hui(that is, i = 0), she will immediately end this trick.
Else, girl i will say that Jin Hui is the girl pi.
∙ If pi = i (hence, she says that she is Jin Hui) or Jin Song had already asked the girl pi, he will notice that they told him a lie and go to Step 1.
∙Else, he will ask to girl pi and go to Step 2.
Jin Song wants to meet his younger sister as soon as possible, and he wants to know how long it will take to meet his pretty younger sister.
So, your task is to work out the expected value of the number of girls Jin Song will meet before the trick ends (including his younger sister).
Two ways are considered different if and only if the sequence of asked girls is different. In other words, there is at least one number k, the girls he met in k-th turn are different.
Today is Jin Hui’s 17th birthday and it is also the first birthday at university. So, as a good brother, Jin Song prepared an amazing present for his pretty younger sister. But, the mischievous sister went university before he gets up, so he decided to go to the English club and give his birthday present to her.
Jin Hui is a very clever girl, so she thought that her brother will surely come to see her and decided to prepare a funny trick for him. She has n fellows at the English club, and they all agreed with her idea.
First, she asked her fellows to wear same uniform and thick glasses just like as her so that the n+1 girls look like the same. By doing so, Jin Song will get confused and try to find his sister. The trick goes as follow:
Step 1: He randomly and uniformly chooses a girl i who wasn’t asked yet and asks to her “Are you my sister?”.
Step 2: If the current girl i is Jin Hui(that is, i = 0), she will immediately end this trick.
Else, girl i will say that Jin Hui is the girl pi.
∙ If pi = i (hence, she says that she is Jin Hui) or Jin Song had already asked the girl pi, he will notice that they told him a lie and go to Step 1.
∙Else, he will ask to girl pi and go to Step 2.
Jin Song wants to meet his younger sister as soon as possible, and he wants to know how long it will take to meet his pretty younger sister.
So, your task is to work out the expected value of the number of girls Jin Song will meet before the trick ends (including his younger sister).
Two ways are considered different if and only if the sequence of asked girls is different. In other words, there is at least one number k, the girls he met in k-th turn are different.