Question

King in N moves. In chess, a king can move one space in any of the...

King in N moves. In chess, a king can move one space in any of the 8 directions (2 vertical, 2 horizontal, 4 diagonals). Suppose our chessboard is infinite in every direction, and a king starts on a particular square. (a) How many different squares are possible locations for the king after N or fewer moves? (b) Answer the same question for a “crippled king” that can only move horizontally and vertically (no diagonal moves allowed). For both parts, show how you get your answer.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) Observe that, considering the present position, the king can move in any of the neighbour squares (even the diagonal ones). Hence in the 1st move, he can move in the 8 neighbouring squares. Now after that continuing this sequence, we can say that the king can be in a area surrounding a square of side (2N + 1) in N moves or lesser. Hence the number of different squares are possible locations for the king after N or fewer moves is (2N+1

b) In this case observe that from the current position, the crippled king's possible moves create a plus sign. Hence continuing like this, we can see that the possible locations till Nth move creates a square rotated 45o (though it would be a bit deformed) with width of the diagonal (2N + 1) units. Hence the number of different squares are possible locations for the crippled king after N or fewer moves is

(2N (2i + 1) (2N1)2((N 1) (N - 2)N) 1) i0

Add a comment
Know the answer?
Add Answer to:
King in N moves. In chess, a king can move one space in any of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Rooks can move any number of squares horizontally or vertically on a chess board. The n...

    Rooks can move any number of squares horizontally or vertically on a chess board. The n rooks problem is to arrange rooks on an n×n board in such a way that none of the rooks could bump into another by making any of its possible horizontal or vertical moves. For this problem, the variables are each column (labeled 0, 1, ... , n−1), the the domain consists of each possible row (also labeled 0, 1, ... ,n−1). In each column...

  • 4. Consider a rook chess piece that is only allowed to move up by one square...

    4. Consider a rook chess piece that is only allowed to move up by one square or to the right by one square. If we start it at the bottom left square of an 8 by 8 chessboard, how many different paths are there that the rook can take from the bottom left to the top right square?

  • You're given a chess board with dimension n x n. There's a king at the bottom...

    You're given a chess board with dimension n x n. There's a king at the bottom right square of the board marked with s. The king needs to reach the top left square marked with e. The rest of the squares are labeled either with an integer p (marking a point) or with x marking an obstacle. Note that the king can move up, left and up-left (diagonal) only. Find the maximum points the king can collect and the number...

  • Please write code in java You’re given a chess board with dimension n x n. There’s...

    Please write code in java You’re given a chess board with dimension n x n. There’s a king at the bottom right square of the board marked with s. The king needs to reach the top left square marked with e. The rest of the squares are labeled either with an integer p (marking a point) or with x marking an obstacle. Note that the king can move up, left and up-left (diagonal) only. Find the maximum points the king...

  • (a) Ame that at ench time step, the agent can move one unit either up, down, left or right, to th...

    I need the answer for part b,not a (a) Ame that at ench time step, the agent can move one unit either up, down, left or right, to the centre of an adjacent grid square: Oue admisible heuristic for this problem is the Straight-Line-Distance heuristic However, this is not the best heuristic Give the name of another adiesible beuristic which dominates the Straight- Line-Distance beuristic, and write the formula for it in the format b) Now assme that at each...

  • (a) Ame that at ench time step, the agent can move one unit either up, down, left or right, to th...

    (a) Ame that at ench time step, the agent can move one unit either up, down, left or right, to the centre of an adjacent grid square: Oue admisible heuristic for this problem is the Straight-Line-Distance heuristic However, this is not the best heuristic Give the name of another adiesible beuristic which dominates the Straight- Line-Distance beuristic, and write the formula for it in the format b) Now assme that at each time step, the agent can take one step...

  • NEED HELP WITH DISCRETE MATH: . Consider the following game. Alice and Bob have a an...

    NEED HELP WITH DISCRETE MATH: . Consider the following game. Alice and Bob have a an infinite quarter chessboard in front of them. The chessboard has a left edge and a bottom edge. There is one checker on some square the chessboard. The player whose turn it is can move the checker down any positive number of squares, or can move the check one column to the left, but anywhere in that column. The game ends when a player cannot...

  • I need help with my programming assignment. The language used should be java and the algorithm...

    I need help with my programming assignment. The language used should be java and the algorithm should use search trees so that you play against the computer and he chooses the best move. The tree should have all possibilities on the leaves and you could use recursion to so that it populates itself. The game can be a 3*3 board (no need the make it n*n). Please put comments so that I can understand it. Thanks The game of ‘Walls’...

  • CMPS 12B Introduction to Data Structures Programming Assignment 2 In this project, you will write...

    can i get some help with this program CMPS 12B Introduction to Data Structures Programming Assignment 2 In this project, you will write a Java program that uses recursion to find all solutions to the n-Queens problem, for 1 Sns 15. (Students who took CMPS 12A from me worked on an iterative, non-recursive approach to this same problem. You can see it at https://classes.soe.ucsc.edu/cmps012a/Spring l8/pa5.pdf.) Begin by reading the Wikipcdia article on the Eight Queens puzzle at: http://en.wikipedia.org/wiki/Eight queens_puzzle In...

  • For your Project, you will develop a simple battleship game. Battleship is a guessing game for...

    For your Project, you will develop a simple battleship game. Battleship is a guessing game for two players. It is played on four grids. Two grids (one for each player) are used to mark each players' fleets of ships (including battleships). The locations of the fleet (these first two grids) are concealed from the other player so that they do not know the locations of the opponent’s ships. Players alternate turns by ‘firing torpedoes’ at the other player's ships. The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT