Question: 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]
Use gurobi.py code when coding. The optimal solution is equal to 13 with path:
(1,1),(2,1),(3,1),(4,1),(4,2),(4,3)
 You've found a map to a treasure hidden within a mysterious

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!