Lets take a logical / mathematical approach
Assuming the ant' current position is 7, we'll count the probability of reaching 10.
- After 1st move, total options for its current position will be 2 -> 6
or 8 (it can go L/R from 7).
- After 2nd move, total options for its current position will be 4 ->
(5,7) or (7,9)
- After 3rd move, total options for its current position will be 8 ->
(4,6) or (6,8) or (6,8) or (8,10)
In above all possible combinations - the ant, in 1 scenario out of 8, reached 10 from 7.
P(E) = n(E)/n(S) = 1/8
Similarly, probability of moving to 0 from 7 = 1/128
(Previous explanation)
Probability (p) of a move at any particular side (L/R) = 1/2
p of next move, at any particular side = 1/2 .... and so on ...
from 7 to 10 - it needs three moves - and as these events are mutually exclusive -> probability = 1/2 * 1/2 * 1/2 = 1/8 (or 0.125)
from 7 to 0 - probability = 1/2*1/2*1/2*1/2*1/2*1/2*1/2 = 1/128 (or 0.0078125)
EDIT - I am clarifying a bit on the doubt raised by @xnor:
One remote possibility - the ant can go to 8 in first move, return back to 7 in second move - which will make it move in SHM (Simple Harmonic Motion) and thus even after a million moves - it would be be still at 7.
That's where the Probability comes into picture. Probability NEVER guarantees that an event will occur. e.g. In the dice game, it is entirely possible that user can keep throwing dice again and again for an hour - but he doesn't get a 6 (or any number for that matter) in first 100 throws ........ probability of that will be (5/6)(5/6)(5/6)... (total 100 times) = 0.0000000100622
As the selection of direction of move is mutually exclusive (.. left (-1) or right (+1), with 'equal chance'..), calculation will be as follows:
- In first move (from 7), it may go left or right (towards 10).
chances of moving towards 10 = 1/2 (50%)
- In second move (from 8), it may go left or right (towards 10).
chances of moving towards 10 = 1/2 (again 50%)
- In third move (from 9), it may go left or right (towards 10).
chances of moving towards 10 = 1/2 (again 50%)
Here we just calculate the odds of achieving the result. THIS IS HOW PROBABILITY WORKS. On negative/impractical side, its entirely possible that ant keep moving left/right whole of its life and never reach a honey point.
for total probability of reaching to point - we will multiply all three ...
total probability = 1/8 = 0.125
Means for moves made, chances of not reaching honey point (10) are 124 out of 125, chances of reaching honey point is 1 out of 125 (Note - this works on basis of Permutations and Combinations - you can get it verified by a maths professor).