1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
wolverine [178]
2 years ago
6

Professor Gekko has always dreamed of inline skating across North Dakota. He plans to cross the state on highway U.S. 2, which r

uns from Grand Forks, on the eastern border with Minnesota, to Williston, near the western border with Montana. The professor can carry two liters of water, and he can skate m miles before running out of water. (Because North Dakota is relatively flat, the professor does not have to worry about drinking water at a greater rate on uphill sections than on flat or downhill sections.) The professor will start in Grand Forks with two full liters of water. His official North Dakota state map shows all the places along U.S. 2 at which he can refill his water and the distances between these locations. The professor’s goal is to minimize the number of water stops along his route across the state.
a. Give an efficient algorithm by which he can determine which water stops he should make.

b. Prove that your strategy yields an optimal solution, and give its
Computers and Technology
1 answer:
geniusboy [140]2 years ago
8 0

The efficient algorithm by which he can determine which water stops he should make; <em>has been determined below and the strategy which is the greedy strategy has been proven to yield an optimal solution.</em>

<em />

To solve this question optimally, we will make use of the greedy solution.

In this method, we will maximize the distance that can be covered from a particular point in such a way that there must be a place where water can be gotten before a run out is experienced.

Now, the first point at which there will be a stop should be located at a point that is farthest from the starting position and is also made to be ≤ m miles from the starting position.

Now, this this situation is one that shows optimal substructure and since our  first stopping point will be made to be at p, it means that we are solving the sub-question with the assumption that our starting point is at p.

When we combine the two stated plans above, we will arrive at an optimal solution for the normal reasons via cut and paste.

B) Now we need to show that the greedy approach earlier used produce a first stopping point which is contained in the optimal solution.

Let O represent any optimal solution whereby the professor stops at positions o₁, o₂, o₃....oₙ.

Let h₁ represent the farthest stopping point that is reachable from the starting point. Then we can replace o₁ by h₂ to generate a modified solution H since o₁ - o₂ < o₂ - h₁.

Finally, we can really make it to the positions in H without having to run out of water and since H has the same number of stops, we can conclude that h₁   is contained in one of optimal solution.

Therefore our strategy which is the greedy strategy has been proven to work.

Read more about algorithms at; brainly.com/question/24793921

You might be interested in
using a timer to generate a random number, develop a program that displays random numbers between 1 and 47 (or whatever) for you
mestny [16]

Answer:

Explanation:

The following code is written in Python. It creates a variable that detects the current time. Then it loops through a range of numbers and chooses the last random number after 2 seconds. Finally, it prints that number to the screen. This function can be called countless times depending on the number of state lottery numbers needed.

import random

import time

start_time = time.time()

while time.time() - start_time < 2:

   lottery_number = random.randint(0, 48)

print(lottery_number)

3 0
3 years ago
Joe, a user, has just installed his first home wireless router. Which of the following tasks should be considered to help secure
MakcuM [25]

Answer:

Update the unit firmware.

Explanation:

Updating unit firmware means update the information related to the network that is newly installed on the wireless router. The purpose of this change is to update the devices with new network alterations to work with efficiency and better security. As things are updating on daily basis, so the manufacturer makes the devices, reprogram able to meet the requirement of the future by updating the program in firmware unit. By updating device means this will be to fix the bugs that can be occur in modern era. This will make the device more secure.

5 0
3 years ago
What's the purpose of IP
Slav-nsk [51]

Thank you for this question. The answer is that an Ip adress stands fo Internet Protocol which acts like a home adress. Bascily it helps you find a node in a network as the IP adress is made of letters and numbers separated by a full stop. I hope you are happy

4 0
3 years ago
Read 2 more answers
Which is an example of correct HTML?
liubo4ka [24]

Answer:

An HTML tag is a special word or letter surrounded by angle brackets, &lt​; and &gt;. You use tags to create HTML elements , such as ...

Explanation:

3 0
2 years ago
To employ an access key, press and hold down the ____ key as you tap the access key.
Veronika [31]
To employ an access key, press and hold down the Alt key as you tap the access key.
4 0
2 years ago
Other questions:
  • If you were to conduct an Internet search on vegetarian restaurants, which of the following searches would be the best
    7·1 answer
  • One random part of Chess is whether the white side or the black side moves first? A. True B. False
    10·2 answers
  • The button for adding a picture to a spreadsheet is found in the
    15·1 answer
  • Which of the following should NOT be done to keep people from slipping on floors? A) Have the proper absorbents in an easy-to-fi
    12·2 answers
  • What does a wholesaler do?
    12·1 answer
  • 1. What makes discrimination different from harassment? (Don't give me definitions.)
    5·1 answer
  • A type of storage which holds data on a permanent basis for later use<br><br><br><br> Help please
    8·1 answer
  • 1.
    7·1 answer
  • You are purchasing a new printer. Which of the following is the most important requirement?
    5·1 answer
  • Paragraph on uses of computer 100 words plss​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!