A person takes a step forward or backward, then number of ways the person takes total of 7 steps, but moves just one step away from initial position is ______
Answers
Given :
Total 7 steps,
Have to stop at one step away from initial position.
To find :
Number of ways to move according to given condition.
Solution:
For a 1dimensional walk along the x-axis with 2n−1 steps (odd steps), where he can only move +1 or −1 each step .
With an odd number of steps he will end in an odd position.
For ending at, position (2m−1), he must take (n+m−1) forward steps and (n−m) backward steps (such that the sum of number of steps is 2n−1 and the difference is 2m−1)).
The number of ways of doing this is according to combination relation,
where a = total elements
r = choosen elements
So, out of 2n-1 steps , we will choose only n+m-1 steps
so,
For placing himself at one step away
he can be 1 step behind or next to the starting place,
so, Total ways can be,
So values of 2m-1 can be +1 and -1.
So values of m = 1 and 0.
It is given that total number of steps (2n-1) = 7,
so n = 4.
Putting the values of n and m,
For +1 position, n = 4, m =1
Number of ways:
For -1 position, n = 4, m = -1
Number of ways :
So,
Total number of ways = 35 + 84 = 119