subject

You are in a rectangular maze organized in the form of M N cells/locations. You are starting at the upper left corner (grid location: (1; 1)) and you want to go to the lower right corner (grid location: (M;N)). From any location, you can move either to the right or to the bottom, or go diagonal. I. e., from (i; j) you can move to (i; j + 1) or (i + 1; j) or to (i+1; j +1). Cost of moving right or down is 2, while the cost of moving diagonally is 3. The grid has several cells that contain diamonds of whose value lies between 1 and 10. I. e, if you land in such cells you earn an amount that is equal to the value of the diamond in the cell. Your objective is to go from the start corner to the destination corner. Your prot along a path is the total value of the diamonds you picked minus the sum of the all the costs incurred along the path. Your goal is to nd a path that maximizes the prot. Write a dynamic programming algorithm to address the problem. Your algorithm must take a 2-d array representing the maze as input and outputs the maximum possible prot. Your algorithm need not output the path that gives the maximum possible prot. First write the recurrence relation to capture the maximum prot, explain the correctness of the recurrence relation. Design an algorithm based on the recurrence relation. State and derive the time bound of the algorithm. Your algorithm should not use recursion

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
What’s the process of observing someone actually working in a career that interests you?
Answers: 1
question
Computers and Technology, 22.06.2019 10:40
When running anti-virus software , what could be a reason where recipitent is not guaranteed that data being streamed will not get interrupted?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
This is not a factor that you should use to determine the content of your presentation. your audience your goals your purpose your technology
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
You know the right answer?
You are in a rectangular maze organized in the form of M N cells/locations. You are starting at the...
Questions
question
Biology, 05.07.2019 03:00
question
Mathematics, 05.07.2019 03:00
question
Mathematics, 05.07.2019 03:00
question
History, 05.07.2019 03:00
Questions on the website: 13722360