Answered step by step
Verified Expert Solution
Question
1 Approved Answer
INDR 2 2 0 : Introduction to Computing for Operations Research Homework 5 : The Non - attacking Knights Problem Deadline: May 2 7 ,
INDR : Introduction to Computing for Operations Research
Homework : The Nonattacking Knights Problem
Deadline: May : PM
In this homework, you will implement a Python script that solves the nonattacking knights
problem using CPLEX. The task is to find the maximum number of knights that can be placed
on an chessboard such that no knight attack some other knight. The decision variables
can be formulated as
The integer linear programming formulation of this problem becomes
maximize
subject : where and are attacking locations
dots,;dots,
An example of the nonattacking knights problem with a chessboard can be given as
maximize
subject :
An optimum solution of the example problem with a chessboard is as follows:
An example of the nonattacking knights problem with a chessboard can be given as
subject :
An optimum solution of the example problem with a chessboard is as follows:
Implement your algorithm to solve the nonattacking knights problem in a single interactive
Python notebook using Azure Lab Services. Your notebook should include at least the following
function definition that takes the number of rows and columns as parameters and returns the
solution found.
What to submit: You are provided with a template file named as hwipynb,
where should be replaced with your digit student number. You are allowed to change
the template file between the following lines.
# your implementation starts below
# your implementation ends above
You need to submit your source code in a single file py file that you will
download from Azure Lab Services by following "File" "Save and Export Notebook As
"Executable Script" menu items
How to submit: Submit the file you edited to Blackboard by following the exact style
mentioned. Submissions that do not follow these guidelines will not be graded.
Late submission policy: Late submissions will not be graded.
Cheating policy: Very similar submissions will not be graded.
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