The robot arm dilemma is a mathematical riddle about probability that I devised. It’s called this because I use the example of a robotic arm to siege it. But there are a thousand ways to explain this riddle, which makes us think it’s a lot more around us than we think.
I apologize for any errors of English but I am Italian and I translated the text with the translator
Anyway, the riddle says,
"consider a list of n elements, which contains the numbers from 1 to n (it is not necessary to place them in ascending order, but it is more convenient to imagine it. potentially they could be in random positions).
This list is literally written on paper as a shopping list. Also imagine a robotic arm holding a pen. He chooses a random number between 1 and n, approaches the number he has randomly chosen and deletes it from the list with the pen (he makes a mark to erase it). At the same time he increments a variable s (initialized at the beginning to 0) every time he uses the pen to delete a number from the list. When it has finished deleting the first number it starts again by choosing another number and so on until all the numbers are deleted from the list, and at the end it returns the variable s as a result. If the robotic arm chooses a random number between 1 and n excluding those that have already come out then of course s = n. But the riddle turns to this point: when choosing a random number does not exclude those already out, so they may come out numbers that have already come out and make a double pen mark, but meanwhile s increases anyway.
Now the question is: knowing n what is the most probably value s will have? which means what’s the number of pen marks he’s most likely to give?"
As I said before we could re range this problem in something very practical such as: "Listening to a playlist of n songs with random playback, how many songs will I most likely have to listen to to make sure I listened to all the songs on the playlist?" or, for example, you could make an analogy with a bag of marbles or a deck of cards.