1

The rule is similar to spider solitaire but simpler.

There are n cards, each with a unique number from 1 to n. The cards are drawn one by one, and the first card is placed directly on the table. After the second card is compared with the value of the card on the table, if the value of the card drawn is relatively large, it will cover the card on the table. (Otherwise will be discarded)Find out the expectation value of how many cards are on the table after the above operations are completed.

I think there is a recurrence formula E(n)=1+k=0n1E(k)n while E(0)=1,E(1)=1 but I stuck here and don't know how to do the next step. Maybe there is another way to solve the problem.

Can anyone help me?

5
  • Necessary detail is how many possible numbers are there on the card? Do you assume the regular 13? And does suit matter - are all the cards of a unique value? – Idiotic Shrike Jul 14 at 7:57
  • 1
    They are from 1 to n and yes, unique. I edited the question. Thanks. @IdioticShrike – musk Jul 14 at 8:06
  • Just to confirm, you draw cards and if they're larger than the one in the table you put them in the table, and if they're smaller you don't? – AnilCh Jul 14 at 8:17
  • 1
    If they're smaller they will be discarded. Only larger ones can be put in the table. @AnilCh – musk Jul 14 at 8:20
  • Then try to prove with induction that E(n)=E(n1)+1/n. – AnilCh Jul 14 at 8:29
1

Let's prove by induction that E(n)=E(n1)+1/n, E(1)=1.

For n=1 and even n=2 we have the result, so let's assume we've proved it to n1. The expected number of the cards above the table are exactly E(n1) when you throw the first n1 cards. The last card has a 1/n chance of being larger than all the previous ones, in which case we would have 1 card added, and (n1)/n chance of not being the largest. Multiplying each case with the corresponding probability, we have:

E(n)=E(n1)n1n+(E(n1)+1)1n=E(n1)+1n.

So E(n)=i=1n1i.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.