Say a $8 \times 8$ chessboard as per picture.

A position is represented here by co-ordinates $(x,y)$.
A move is aslo considered as valid, where the Knight lands outside the chessboard [ For eg. from $(3,2)$ towards $(3,1)$ but ends up outside chess-board. ]
But once outside, it can't come back.
Question:
Knight starts from $(0,0)$. What is the Probability that a Knight stays on chessboard after N hops?
Expected Solution:
I don't want exact result like $ \frac{12}{64} $ but need your help on
a. the thought/procedure/methodology to find it with
b. A concluding formulae in terms of permutation/combination,
Well my thought:
After $(N-1)$th move, if the Kngiht is between $(x,y)$ where $3 \le x \le 6$ and $3 \le y \le 6$ then next move i.e $n$th move must ensure the knight will be within chessboard. Might be my thought is entirely wrong as it tries to find "must be within chessboard"
In any $5 \times 5$ sub part with Knight in middle, it has $8$ possible moves. If initial position is $(0,0)$ out of those $8$ it has choice of $2$ only satisfying "within chessboard" constraint. Next move I am lost! Please help me think .
Why cant we treat it like:
a. The question is valid only if N-1 moves already done with the Knight on board. b. Now to find Nth move s.t Knight hops out of board - say probability P(out) c. 1 - P(out) now gives the answer{ In Case b above we can use some stats like the following:
Legal moves -> L Illegal moves -> I 1. for 16 positions enclosed by {3c - 3f - 6c -6f} : 16 x 8 L 2. for each 4 positions {2b,2g,7b,7g} : 4L, 4I => 16L , 16I 3. for each 16 positions {7c-7f , 2c-2f, 3b-6b, 3g-6g } : 6L,2I => 96L,32I 4. for each 4 corners: 2L,6I => 8L, 24I 5. for each 8 positions {7a,8b , 8g,7h , 2h,1g , 1b,2a} : 3L,5I => 24L,40I 6. for each 16 positions {3a-6a , 3h-6h, 8c-8f, 1c-1f } : 4L,4I => 64L,64I}
The problem is a Markov chain, and we can attack it with linear algebra!
First, we can simplify the problem by exploiting the symmetry of both the knight's movement and the chessboard. Let's add the following rule:
In other words, the legal positions are 1a, 1b, 1c, 1d, 2b, 2c, 2d, 3c, 3d, and 4d. You can visualize these positions as occupying one of the $8$ triangles in this diagram:
Now, there are $11$ positions that the knight can occupy after a move: the $10$ positions just named, and $1$ position representing not-on-the-board. For $i,j\in[1,11]$, let $P_{i,j}$ be the probability of transitioning from $i$ to $j$. There are $11\times11=121$ probabilities to calculate, and I suspect that this part must be done by hand.
Now we have an $11\times11$ square matrix $P$. For all $n$, the matrix power $P^n$ is the transition matrix for $n$ moves! So, let's arbitrarily index the initial square as $i=1$ and the off-the-board position as $j=11$. Then the probability of leaving the board after $n$ moves is $(P^n)_{1,11}$, and the probability of staying on the board is: $$1-(P^n)_{1,11}$$ That's as far as I can take you. You could express this formula more explicitly by calculating $P$ and then finding its Jordan normal form. Then you'll have a formula for the powers $P^n$, and you can pull out whatever matrix element you want. If you've seen the explicit formula for the Fibonacci numbers, it's the same principle, but with a larger matrix!
Edit: You've commented that if the knight is in the center of the board, then it can't exit the board in $1$ move. This is a useful obvservation. If we index positions 3c, 3d, and 4d as $i=8,9,10$, then it tells us that $P_{8,11}=P_{9,11}=P_{10,11}=0$. So you see, the matrix $P$ can represent pretty much everything we know about the problem.
Another example of reading information from $P$: You have a rule that if the knight leaves the board, it can't come back. This translates to the statement that $P_{11,11}=1$, and for all $j<11$, $P_{11,j}=0$. Between this paragraph and the previous paragraph, we already know $14$ matrix elements. There are just $107$ more to calculate...
Edit 2: Another example. You commented that from the initial position, only $2$ out of $8$ possible moves stay on the board. That tells us that $P_{1,11}=3/4$. The knight can stay on the board by moving to 2c or 3b. In my scheme, 3b gets reflected back to 2c. So if we index 2c as $j=6$, then $P_{1,6}=1/4$. For all other $j$ besides $6$ and $11$, we have $P_{1,j}=0$. That's another $11$ matrix elements calculated; $96$ to go...