a) The answer is NO.
On the left we have the board from the problem, on the right we have the same board, but with remainders of the values from the board instead of the values themselves.
We will denote field
i for a field with number
i written on it in the right table. Let's assume that we can visit all of the fields. That means that at some point we will visit a field
i. Obviously, when using the first type of move, we can visit any other field
1 which hasn't yet been visited. Also, it is easy to notice, that for field
1, the reflection of that field is also a field
1. That means that both types of moves lead to another field
1. Also, in the same fashion we conclude that for each step, if the figure is on the field
1, then in the step after (if that wasn't the last one) and in the step before (if that wasn't the first one) should be field
1.
Now we conclude that the first visited field
1 must be the field visited in the first step. Same way we conclude that the last visited field
1 must be the field visited in the last step. But, we know that all of fields
1 are visited consecutively, in exactly
8 moves (because there are
8 fields
1), while there are exactly
16 moves that we have to make. This leads to contradiction.
b) The answer is YES.
We can move from any field to another with the same number written on the field in the right table by using the second move.
One idea to visit all the fields is the following:
* find the
4 pairs of the fields of types field
i and field
j, such that all
8 fields are different, in each pair
i=j, those two fields in one pair are symmetric, and the second member of the
n-th pair has the same value on the right board as the first member of the
(n+1)-th pair. Also, we want that all the values of the right table are mentioned through members of those pairs. For example:
((2,2),(4,4)),((1,4),(5,2)),((3,5),(3,1)),((2,1),(4,5))* Now, the algorithm is: after second member of
n-th pair and before the first member of the
(n+1)-th pair visit all fields by using the first step. Of course, before first pair and after fourth pair move in similar way. Jump from the first member of the pair to the second member of the pair by using second step.
This is one of the ways to do it: We start with the field
(3,3). Then we visit all of the field
3, using the first move, in any way as long as the last visited field is
(2,2). Then, using the second move, we visit the field
(4,4). Again, using the first move we visit all fields
2 in any way as long as the last visited field is
(1,4). Using the second move we visit the field
(5,2). Then, using the first move we visit all fields
4 in any way as long as the last visited field
(3,5). In same fashion, using the second move we visit the field
(4,5) using the second move. We conclude by visiting all fields
1 in any way.