Computer scienceAlgorithms and Data StructuresAlgorithmsGraph algorithmsShortest path algorithms

Shortest path problem

Bunny path

Report a typo

Charlie and Eve recently studied the shortest path problem. They have decided to play a game, in which every player has a bunny. Before the game starts, players set the playground: they randomly draw small houses for the bunnies to rest and one-way streets between them. Each street has a cost, representing the average energy spent by the bunnies. It mainly depends on what is found in the houses: if empty, the cost is equal to the distance between the houses, otherwise, the cost may be negative, depending on how much food is found there. Their goal is to reach the carrot house. Players simultaneously choose their paths: the bunny who has spent less energy to reach the carrot house wins. This is what the playground for this round looks like:

Weighted graph and shortest path problem

Assuming that the players always choose the shortest path possible, which one will win the game? What will be the cost of this path?

Answer format example: Eve 12

If no shortest path exists, type INF.

Enter a short text
___

Create a free account to access the full topic