Menu

Rey Decided Find Kylo Ren Taking Millennium Falcon Doesn T Quite Know Yet Galaxy Far Far A Q43784620

Rey has decided to find Kylo Ren by taking the Millennium Falcon, but she doesnt quite know where he is yet. The galaxy farno fuel. For each 1 Sisn, the price of fuel on planet p; is fixed at fi galactic credits per unit of fuel. Because Han Solo wRey has decided to find Kylo Ren by taking the Millennium Falcon, but she doesn’t quite know where he is yet. The galaxy far far away where they live contains n planets (conveniently num- bered 1 through n) with m – 0(12) bidirectional interplanetary routes connecting them (ie, there may not be a direct route connecting two planets). For each possible route (PP), we know the amount of fuel cithe Millennium Falcon needs to traverse it; traveling within a planet consumes no fuel. For each 1 Sisn, the price of fuel on planet p; is fixed at fi galactic credits per unit of fuel. Because Han Solo was quite thrifty with his ship, he installed huge barrels of fuel in the cargo bay to store extra fuel and avoid needing to refuel on expensive planets. Therefore, the Millennium Falcon is able to carry any amount of fuel Rey wants at any moment during the trip, and she is also fine with visiting the same planet more than once on the trip if it saves money. Rey starts the trip without any fuel, so she must fuel up on the first planet. Design an algorithm to help Rey find a route that minimizes the total number of galactic credits she needs to spend on fuel in order to travel from her current planets to planeti. A route in this case consists of a sequence of planets (starting from s and ending at 1) together with the amount of fuel Rey should purchase on each planet (if any). Your algorithm should run in time that is polynomial in n. Prove both the correctness and running time of your algorithm. Hopefully Kylo will be on planet I. May the force be with you! Show transcribed image text Rey has decided to find Kylo Ren by taking the Millennium Falcon, but she doesn’t quite know where he is yet. The galaxy far far away where they live contains n planets (conveniently num- bered 1 through n) with m – 0(12) bidirectional interplanetary routes connecting them (ie, there may not be a direct route connecting two planets). For each possible route (PP), we know the amount of fuel cithe Millennium Falcon needs to traverse it; traveling within a planet consumes
no fuel. For each 1 Sisn, the price of fuel on planet p; is fixed at fi galactic credits per unit of fuel. Because Han Solo was quite thrifty with his ship, he installed huge barrels of fuel in the cargo bay to store extra fuel and avoid needing to refuel on expensive planets. Therefore, the Millennium Falcon is able to carry any amount of fuel Rey wants at any moment during the trip, and she is also fine with visiting the same planet more than once on the trip if it saves money. Rey starts the trip without any fuel, so she must fuel up on the first planet. Design an algorithm to help Rey find a route that minimizes the total number of galactic credits she needs to spend on fuel in order to travel from her current planets to planeti. A route in this case consists of a sequence of planets (starting from s and ending at 1) together with the amount of fuel Rey should purchase on each planet (if any). Your algorithm should run in time that is polynomial in n. Prove both the correctness and running time of your algorithm. Hopefully Kylo will be on planet I. May the force be with you!

Expert Answer


Answer to Rey has decided to find Kylo Ren by taking the Millennium Falcon, but she doesn’t quite know where he is yet. The galaxy…

OR