Answer:
The answer is 1/n
Step-by-step explanation:
First number = Alice's number
Second Number = Bob's Number
There are already 2 good answers if the first number is AT LEAST 1 greater than the second.
However, what if the first number is EXACTLY 1 greater than the second?
I will assume the first number is removed from the array after being selected.
If the first number is 1, then it is impossible, because the second number cannot be less than 1.
If the first number is 2, then the second number could be 1, which has a probability of 1/(n-1)
If the first number is 3, then the second number could be 2, which has a probability of 1/(n-1)
etc…
There is a 1/n probability of each first number selected, so the answer would be:
0*1/n+1/n*1/(n−1)+1/n*1/(n−1)+⋯+1/n*1/(n−1)
There are n terms in that series.
That gives us:
0+1/n(n−1)+1/n(n−1)+⋯+1/n(n−1)
There are n-1 of those identical terms, because 1 of the terms is 0.
(n−1)/n(n−1)=1/n
So the answer is 1/n.