Question
Find a network flow solution for the following: You want to place knights on an n n chessboard. The chessboard has n2 positions from (0;
Find a network flow solution for the following:
You want to place knights on an n n chessboard. The chessboard has n2 positions from (0; 0) to
(n 1;n 1). A knight at position (x;y) is able to attack up to eight different positions: (x + 2;y + 1),
(x + 2;y 1), (x + 1;y + 2), (x + 1;y 2), (x 1;y + 2), (x 1;y 2), (x 2;y + 1), and (x 2;y 1)for
each position that lies on the board, of course. Moreover, some positions are blocked so that you
cannot place knights on them. Given n and a list of all blocked positions, find a way to place as
many knights as possible on the chessboard so that the placed knights cannot attack each other.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started