2024 Euclid · Question 9
Problem outline
A walk starts at and takes steps, each or , finishing at . Write for the number of changes of direction. (a) Count the walks with . (b) For , count those with even . (c) For how many attainable integer pairs with and do exactly half of the walks have even ?
Show answer and methods 1 methods
Answer
(a) . (b) . (c) .
Method 1 Read the parity from the first and last steps
(a) If steps are positive and negative, then and . Here . Choose the two negative positions in ways.
(b) Every direction change reverses the current sign, so an even number of changes means the two end signs agree. Here . With positive endpoints the middle seven slots contain three negatives, giving . With negative endpoints they contain one negative, giving more, for .
(c) For , a uniformly chosen ordering of the signs gives opposite endpoints with probability by sampling two positions without replacement. Equal and opposite endpoints are equally likely exactly when . But , so the condition is .
For no walk changes direction and the condition fails. For every , the number has the same parity as and is at least , so the endpoint is attainable. Since , exactly pairs qualify.
Source and attribution
The outline and worked methods on this page were prepared for DR.WANG Mathematics.
Original question (external)