(2+2+4+4) In this problem we consider the movement of the knight in a game of
chess. If you are unfamiliar with this, please see the reference material for this problem,
Figure 10.6.5. The knight we are considering is on the standard 8 imes 8 chessboard. We
use the standard notation to references the spaces on this board.
For example, a knight located at d4 can move to any of the spaces, c2, e2, f3, b3, b5,
f5, c6, e6.
We may make a graph as follows. The vertices of this graph correspond to the 64
spaces on the chessboard. Two vertices are connected whenever a knight on one space
may move to the other space. For example we see that there is an edge between d4
and c2. Use this graph to answer the following questions.
(a) Use Matlab to make a vertex matrix for this problem. Discuss how you made
your matrix in Matlab. How do you know your matrix is correct?
When you hand in this matrix, give it the name knight and name your file
Q3a.mat. Please be sure to do this exactly as described, otherwise the program
which tests your matrix will not be able to execute and you will be given no credit.
(See Lab 2 for details.)
(b) Can a knight that begins on b1, after a series of moves, end on c1? If so, what is
the minimum number of moves that this would take? Explain.
(c) For a knight that begins on b1 is there any space on the board that it cannot
occupy after any series of moves?
More generally, for any starting position is there any position to which a knight
cannot move to from there?
(d) Let the distance between two spaces x,y on the board (relative to a knight's
travel) be the minimum number of moves for a knight to move from x to y.
Starting at b1, which space(s) is/are the "farthest away" from here?
More generally, what is the largest distance between any two spaces on the chess-
board for a knight?
3. (2+2+4+4) In this problem we consider the movement of the knqht in a game of chess. If you are unfamiliar with this, please see the reference material for this problem. Figure 10.6.5. The knight we are considering is on the standard 8 8 chessboard. We use the standard notation to references the spaces on this board.
1.
6
a6
b6 c6
de
g6
h6
5
a5 b5
c5
f5
g5 h5
a4
4
q4
nA
a3
b3
15
3
+
For example, a knight located at d4 can move to any of the spaces, c2,e2,f3, b3,b5 f5, c6, e6.
We may make a graph as follows. The vertices of this graph correspond to the 64 spaces on the chessboard. Two vertices are connected whenever a knight on one space may move to the other space. For example we see that there is an edge between d4 and c2. Use this graph to answer the following questions.
(a) Use Matlab to make a vertex matrix for this problem. Discuss how you made your matrix in Matlab. How do you know your matrix is correct? When you hand in this matrix, give it the name knight and name your file Q3a.mat. Please be sure to do this exactly as described, otherwise the program which tests your matrix will not be able to execute and you will be given no credit. (See Lab 2 for details.)
(b) Can a knight that begins on b1, after a series of moves, end on c1? If so, what is the minimum number of moves that this would take? Explain.
c) For a knight that begins on bl is there any space on the board that it cannot occupy after any series of moves? More generally, for any starting position is there any position to which a knight cannot move to from there?
(d) Let the distance between two spaces x, y on the board (relative to a knight's travel) be the minimum number of moves for a knight to move from to y Starting at b1, which space(s) is/are the farthest away" from here?
More generally, what is the largest distance between any two spaces on the chess. board for a knight?