An archived instance of a Discrete forum

Counting kings

mark

(10 pts)

In this problem, you’re going to modified the code in this Observable notebook to compute the number ways non-attacking kings can be placed on an m\times n board. To get your precise problem statement, choose your name from the following list:

ssatterw

I was asked to find the number of 9×6 chessboard and used this computation

board_cnt = math.multiply(
math.ones(21),
math.pow(math.matrix(kings_matrix(6)), 8),
math.ones(21)
)

to get board_cnt = 61643709

bking4

How many ways are there to place non-attacking Kings on a chessboard of dimensions 5 \times 9?

board_cnt = 4005785

board_cnt = math.multiply(
  math.ones(89),
  math.pow(math.matrix(kings_matrix(9)), 4),
  math.ones(89)
)

The result is 4005785.

audrey

I was asked to find the number of 3 \times 4 boards. So I computed as follows:

board_cnt = math.multiply(
  math.ones(8),
  math.pow(math.matrix(kings_matrix(4)), 2),
  math.ones(8)
)

That works out to be 93.

hzoppoth

For a 7 x 6 chessboard,

board_cnt = math.multiply(
  math.ones(21),
  math.pow(math.matrix(kings_matrix(6)), 6),
  math.ones(21)
)

board_cnt = 1382259

gavin

I was asked to find the number of 6 \times 9 boards. So I computed as follows:

board_cnt = math.multiply(
  math.ones(89),
  math.pow(math.matrix(kings_matrix(9)), 5),
  math.ones(89)
)

Thant works out to be 61643709.

jmille18

I was asked to find the number of 8 x 7 boards. So I computed as follows:

board_cnt = math.multiply(
math.ones(55),
math.pow(math.matrix(kings_matrix(8)), 6),
math.ones(55)
)

That works out to be 113555791

jnarehoo

I was asked to find the number of ways to place non-attacking kings on an 8 X 5 board. I used the code below

board_cnt = math.multiply(
  math.ones(13),
  math.pow(math.matrix(kings_matrix(5)), 7),
  math.ones(13)
)

The number of ways to do this is 795,611.

jcoumarb

I was asked to find the number 7 \times 9 boards So I computed

board_cnt = math.multiply(
  math.ones(89),
  math.pow(math.matrix(kings_matrix(9)), 6),
  math.ones(89)
)

Which works out to be 1,029,574,631 different boards

nfourie

I was asked to find the number for 8 \times 9 boards. I did it as follows:

board_cnt = math.multiply(
math.ones(89),
math.pow(math.matrix(kings_matrix(9)), 7),
math.ones(89)
)

Which equals: 16484061769

asword

I was asked to find the number of 5×6 boards. So I computed as follows:

board_cnt = math.multiply(
  math.ones(21),
  math.pow(math.matrix(kings_matrix(6)), 4),
  math.ones(21)
)

That works out to be 31387

jtweeten

My board is 7x8.
The amount of different king placements on my board is 113,555,791.

board_cnt = math.multiply(
  math.ones(55),
  math.pow(math.matrix(kings_matrix(8)), 6),
  math.ones(55)
)
wcshamblin

There are 16484061769 ways to put non-attacking kings on a 8 \times 9 board.

This is generated with the following code:

board_cnt = math.multiply(
  math.ones(fibonacci(8 + 2)),
  math.pow(math.matrix(kings_matrix(8)), 8),
  math.ones(fibonacci(8 + 2))
)
papplega

I had to find the number of 9 \times 5 boards. I computed

board_cnt = math.multiply(
  math.ones(13),
  math.pow(math.matrix(kings_matrix(5)), 8),
  math.ones(13)
)

board_cnt = 4005785

tfields

I was asked to find the number of 9×7 chessboard and used this computation:

board_cnt = math.multiply(
math.ones(34),
math.pow(math.matrix(kings_matrix(7)), 8),
math.ones(34)
)

to get board_cnt = 1029574631

asmith42

I was asked to find the number of 5 x 7 boards. So I computed as follows:

board_cnt = math.multiply(
  math.ones(34),
  math.pow(math.matrix(kings_matrix(7)), 4),
  math.ones(34)
)

That works out to be 159651.

csabb

I was asked to find the number of 6 x 5 boards. So I computed as follows:

board_cnt = math.multiply(
  math.ones(13),
  math.pow(math.matrix(kings_matrix(5)), 5),
  math.ones(13)
)

That works out to be 31387.

jbrandy1

I was asked to find the number of 7 \times 7 boards. So I computed as follows:

board_cnt = math.multiply(
math.ones(34),
math.pow(math.matrix(kings_matrix(7)), 6),
math.ones(34)
)

That works out to be 12727570.

jfennimo

I was asked to solve the Kings Problem based on the dimensions 8 × 6. I used the following code to solve this:

board_cnt = math.multiply(
  math.ones(21),
  math.pow(math.matrix(kings_matrix(6)), 7),
  math.ones(21)
)

The total number of different King placements is 9,167,119.

mark