[ Probability theory (miscellaneous).
[ Integer lattices (miscellaneous).
[ Examples and counterexamples. Constructions ]
[ Classical combinatorics (miscellaneous). ]

A point exits from the origin on a line and makes $a$ steps of one unit to the right, $b$ steps of one unit to the left in some order, where $a > b$. The range of the point's walk is defined as the difference between the maximum and minimum coordinates of the point over the entire walk.

a) Find the greatest possible range of the walk.

b) Find the smallest possible range of the walk.

c) How many different sequences of movements of the point exist such that the range of the walk is the greatest possible?
b) At the end of its path, the point inevitably has a coordinate of $a$ b, regardless of the order of steps to the right and left. Therefore, the span cannot be less than $a-b$.

Such a span can be achieved, for example, as follows: the point moves right-left exactly $b$ times, and then $a-b$ times to the right.

a) Let the smallest coordinate of the point during the entire random walk be $x \leq 0$. Up to the moment $t$, when the point first reaches this position, it could not have been in points with coordinates greater than $x+b$. After moment $t$, it could not have been in points with coordinates greater than $x+a$. Therefore, the maximum span does not exceed $a$.

Such a span can be achieved, for example, if the point first makes $a$ steps to the right.

c) As seen from a), the maximum span is achieved if all steps to the right are made consecutively. The first step to the right can be the first, second, and so on up to the $(b+1)$-th step (first $b$ steps to the left, and then all steps to the right). Thus, there are a total of $b+1$ ways.

## Answer

a) $a$; b) $a-b$; c) $b+1$.