Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You're in charge of setting up some gold mining infrastructure within an underground cave system. The cave system can be modeled as a directed tree.
You're in charge of setting up some gold mining infrastructure within an underground cave system. The cave system can be modeled as a directed tree. It consists of N chambers. The root is the entrance to the cave system, the chamber s. Each chamber is connected to at most 3 subtrees (a ternary rooted tree!). The quantity of gold in each chamber u is denoted by a function g(u). To mine for gold and bring it up to the entrance, you need to place conveyor belts in the corridors connecting the cave chambers. You have a limited number of L conveyor belts, L = O(N). If you place a conveyor belt in a corridor connecting u to v, then it can carry gold from v to u towards the entrance. You can mine all the gold from all of the chambers that can reach the entrance through a path of conveyor belts. The following is an example with three belts, and two different solutions. Here, the root has value 0 associated with it. Here, the first solution has a better value than the second solution. 11 8 08:0 OS: 0 8:0 1 3 2 3 2 3 1 2 1 4 5 6 7 8 4 5 6 7 8 7 4 5 6 7 8 7 Give a dynamic programming algorithm that determines the optimal way to place the L conveyor belts in order to mine the largest amount of gold
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