Question 1197385
.
<pre>

Let E denotes one step horizontally in (+) direction (East)
    W denotes one step horizontally in (-) direction (West)
    N denotes one step vertically   in (+) direction (North)
    S denotes one step vertically   in (-) direction (South).


We will denote each path as a sequence of letters E, W, N, S.


To get from A to B in 5 steps, the path must contain 5 letters; equal number of E and W letters;
                        in addition, the number of N letters must be 1 more than the number of S letters.


So, all good paths must fall into one of these DISJOINT categories


    (1) no E,W at all; there are only all distinguishable permutations of 3N and 2S.
                       the number of such arrangements is  {{{5!/(2!*3!)}}} = {{{120/12}}} = 10. 


    (2) one E compensated by one W, in any order; the rest are 2N and 1S in any arrangement.
                       the total number of such arrangements is {{{5!/(1!*1*2!*1!)}}} = {{{120/2}}} = 60.


    (3) two E compensated by two W, in any order; and only one N; no S
                       the total number of such artranjements is {{{5!/(2!*2!)}}} = {{{120/4}}} = 30.


Thus, there are 10 + 60 + 30 = 100 good arrangements (paths leading from A to B).


The total number of all possible paths of the length 5 is {{{4^5}}} = 1024: any of 4 letters in each of 5 positions, independently.


So the probability is  P = {{{100/1024}}} = {{{25/256}}} = 0.09766  (rounded).    <U>ANSWER</U>
</pre>

Solved.


--------------


Nice contest/entertainment problem of a Math Olympiad or Math Circle level.



As a pre-requisite, you must know everything about distinguishable permutations.


About it, &nbsp;read the lesson

&nbsp;&nbsp;&nbsp;&nbsp;- <A HREF =https://www.algebra.com/algebra/homework/Permutations/Arranging-elements-of-sets-containing-undistinguishable-elements.lesson>Arranging elements of sets containing indistinguishable elements</A> 

in this site.



/////////////



In this post, the diagram attached by the visitor at the end, 
DOES NOT correspond to the wording part of the problem - it creates misunderstanding.


In this problem, much wider lattice should be considered - otherwise, the probabilities 
would not be all equal to 1/4 for moving one step from each current point.