Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You've found a map to a treasure hidden within a mysterious grid. The grid is composed of locked cells, each has a specific number of

You've found a map to a treasure hidden within a mysterious grid. The grid is composed of locked cells, each has a specific number of keys to collect. You start at the top-left corner of the
grid with a certain number of keys. Each cell in the grid either gives you more keys or requires keys to move through. It means some cells might even take away keys!
You can only go right or down.
You can only visit one cell at a time.
Your goal is to navigate from the top-left corner to the bottom-right corner while maximizing the number of keys owned in the bottom-right corner. Let K be the matrix containing the number of keys you gain (or lose) when a cell is visited.
a) Formulate an Integer Programming Problem to solve the problem described above.
b) Using the model you have formulated in part a), solve the following instance.
K=[1-1210-12136-14]
Note: You have to use gurobi.py coding.
Also, the optimal solution should be equal to 13 with the path:
(1,1),(2,1),(3,1),(4,1),(4,2),(4,3)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. (6 pts) Suppose that

Answered: 1 week ago

Question

Which months of this year 5 Mondays ?

Answered: 1 week ago

Question

Define Leap year?

Answered: 1 week ago

Question

Prepare a short profile of Lucy Clifford ?

Answered: 1 week ago

Question

Prepare a short profile of Rosa parks?

Answered: 1 week ago

Question

here) and other areas you consider relevant.

Answered: 1 week ago