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 topleft 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 topleft corner to the bottomright corner while maximizing the number of keys owned in the bottomright corner. Let 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 solve the following instance.
Use gurobi.py code when coding. The optimal solution is equal to with path:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
