48.0k views
2 votes
You are renting a limousine that charges certain rates to visit each of the following cities. You need to visit each city once and you need to start in Athens and end in Athens. Use the "Brute Force" Algorithm to find the cheapest route to visit each city and return home again to Athens.

A. B. C. D.

You are renting a limousine that charges certain rates to visit each of the following-example-1
User Shahalpk
by
5.1k points

2 Answers

4 votes

Answer:

the answer is Athens-Buford-Cu-Dacul-Athens

Explanation:

just took the quiz

User Greatromul
by
5.6k points
5 votes

Answer:

Way 3 and 4

Explanation:

The Algorithm of Brute Force

Let A is Athens,

Let B is Buford,

Let C is Cuming,

Let D is Dacula

Use the "Brute Force" Algorithm to find the cheapest route to visit each city and return home again to Athens, we can see that there are 6 ways to visit each city and return home again to Athens.

Way 1: A→C→D→B→A = 50 + 30 + 70 + 70 = $220

Way 2: A→D→B→C→A = 60 + 70 + 25 + 50 = $205

Way 3: A→D→C→B→A = 60 + 30 + 25 + 70 = $185

Way 4: A→B→C→D→A = 70 + 25 + 30 + 60 = $185

Way 5: A→B→D→C→A = 70 + 70 + 30 + 50 = $220

Way 6: A→C→B→D→A = 50 + 25 + 70 + 60 = $205

Way 3 and 4 are the cheapest so we choose them.

User Xinqiu
by
5.2k points