# The Robotic arm Dilemma

## Recommended Posts

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.

##### Share on other sites

• 3 months later...

For $n$ random numbers, $P(all \space numbers \space deleted) > 0 \iff s \geq n$

Edited by Agent Smith
##### Share on other sites

Quite possibly it's more correct to say $s < n \iff P(all \space numbers \space deleted) = 0$

##### Share on other sites

On 10/24/2023 at 3:07 PM, giorgi_lamp23 said:

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.

What is the most likely value of s when all of the list has been selected at least once?

At which value of s will it be more likely than not that all of the list has been selected?

The answer to the first question is seems necessarily lower than the answer to the second. Do you see why? I don't see an obvious way to derive either value right away.

Edited by Halc

## Create an account

Register a new account