subject

Dynamic Programming You are part of a team building a west-east 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 n columns east-to-west and m rows north-to-south. 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 m rows on the west side of the preserve and can end in any of the m 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 north-east, or the cell to the south-east. On the next page is an example preserve with west on the left and east on the right. This example has 8 columns and 8 rows. The number in each cell is the number of endangered species that live in that cell. a) Let Mi, j) express the minimum number of species that will be disturbed by a highway that ends in cell (i, j). Show a self-reduction from this problem to its sub-problems.
b) State a dynamic programming algorithm in pseudocode that solves this problem using the self-reduction from above. You do not need to give code for recovering the solution.
c) What is the worst case runtime of your algorithm?
d) Use your algorithm to find the minimum cost highway of the example input. 7 0 4 7 3 2 14 5 4 14 5 3 6 6 4 6 12 2 2 5 7 4 6 5 25 25 9 21 8 8 8 6 23 3 12 2 12 5 3 5 4 3 1 4 2 15 7 12 3 4 2 9 3 4 3 7 5 2 4 7 12 18 1 10 Fill in this grid using your algorithm and then indicate the minimum cost highway.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:00
1. you have a small business that is divided into 3 departments: accounting, sales, and administration. these departments have the following number of devices (computers, printers, etc.): accounting-31, sales-28, and administration-13. using a class c private network, subnet the network so that each department will have their own subnet. you must show/explain how you arrived at your conclusion and also show the following: all available device addresses for each department, the broadcast address for each department, and the network address for each department. also, determine how many "wasted" (not usable) addresses resulted from your subnetting (enumerate them).
Answers: 3
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
question
Computers and Technology, 24.06.2019 12:50
Write a new lc-3 trap subroutine (i.e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i.e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e.g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e.g. b0000 0000 0000 0111 =
Answers: 3
question
Computers and Technology, 24.06.2019 18:20
7. design a circuit with three inputs (x, y, and z) representing the bits in a binary number, and three outputs (a, b, and c) also representing bits in a binary number. when the input is 1, 2, or 3, the binary output should be one lesser than the input. when the input is 4, 5, or 6, the binary output should be one greater than the input. when the input is 0, the output is 0, and when the input is 7, the output is 7. show your truth table, all computations for simplification, and the final circuit.
Answers: 2
You know the right answer?
Dynamic Programming You are part of a team building a west-east highway that runs through an ecologi...
Questions
question
English, 15.11.2020 07:20
question
English, 15.11.2020 07:20
question
Mathematics, 15.11.2020 07:20
question
Mathematics, 15.11.2020 07:20
question
Mathematics, 15.11.2020 07:20
question
Mathematics, 15.11.2020 07:20
Questions on the website: 13722363