Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are part of a team building a west - east highway that runs through an ecological preserve that cannot be avoided. You want to
You are part of a team building a westeast highway that runs through an ecological
preserve that cannot be avoided. You want to build the highway so it disturbs the least
number of endangered species. Ecologists have mapped the territory and determined
the number of endangered species for every cell in a grid that is columns westtoeast
and rows northtosouth. Your job is to determine a path for the highway that disturbs
the minimum number of species.
The highway can begin in any of the rows on the west side of the preserve and can end
in any of the rows on the east side of the preserve. The highway must always move
east but at each step it can move to the cell immediately east, the cell to the northeast,
or the cell to the southeast.
This is an example preserve with west on the left and east on the right. This example has
columns and rows. The number in each cell is the number of endangered species
that live in that cell.
a State this problem with formal input and output conditions.
b Let express the minimum number of species that will be disturbed by
a highway that ends in cell where and are indexes of a column or row
respectively Show a selfreduction from this problem to its subproblems.
c State a dynamic programming algorithm in pseudocode that computes
using the selfreduction from above.
d Describe how you can recover the path the highway should take to disturb the
fewest endangered species.
e What is the worst case time and space complexity of your algorithm?
f Use your algorithm to find the minimum cost highway of the example input. Make
sure to show your matrix and highlight the path of the minimum cost highway.
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