Toriel is planning to create a game with prize. In this game, there are N players and N boxes each containing a piece of paper with a player's name written on it. Each player has a unique name and each box contains a different name. There are at most 1000 players playing.
Then, each player takes 1 box at random such that every player gets a different box. The more players get a box containing their name, the bigger the prize is. To prepare the prize, Toriel needs your help to calculate the expected number of player to get their own name
It's a spoj problem here http://www.spoj.com/problems/BLLUCK/
i think expected number of players who would get their own name is one
As exp=1*(1/n)+1*(n-1/n)(1/n-1)+1(n-1/n)(n-2/n-1)(1/n-2) .......... which makes it one
above form is because of following argument consider second player : probability of second player getting it's own name is p(first player not selecting second player's (name) card)*p(getting it's own card from remaining cards) and this is extended to every player
The problem is it's not convincing enough ... Is this the correct expected value ? if not what is expected value and how to arrive at it...
thanks in advance