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
TODAYS ATTENDANCE QUESTION: Why do you think it is important to be able to measure using a ruler in Technology &amp; Engineering
Vaselesa [24]

Answer:

Because it takes precision to a lot of things in tech and Eng. We need to measure all kinds of things, like wood, metal/etc. for computers and things that we use everyday, Because our world goes around being precise about things that we need everyday, like tables and things.

Explanation:

3 0
3 years ago
On laptops with a smart card reader installed, where is the smart card reader usually located?
dem82 [27]
Plenty of space in the palm rest
4 0
3 years ago
Which option describes wearable technology? A. the incorporation of technology into objects we use regularly B. rugged technolog
vichka [17]

The correct answer is

A.  the incorporation of technology into objects we use regularly

#Platogang

8 0
3 years ago
. Why use a sensitivity analysis?
Natali [406]

Answer:

 Sensitivity analysis is the method in which it basically predict the final outcome of the decision. It analysis each variable individually and identify the dependency of the output value on the particular value of the input.  

The advantage of the sensitivity analysis is that it reduce the overall risk of the particular strategy and also impact of the system.

It basically work on the basic principle that firstly changed the structure and model and then observe the particular behavior of the model.

7 0
3 years ago
When the primary key of one relation is placed in a second relation to represent a relationship, the attribute in the second rel
s2008m [1.1K]
It is called a foreign key
6 0
3 years ago
Other questions:
  • Why has unicode become the standard way of converting binary to text
    7·1 answer
  • Write a copy constructor for carcounter that assigns origcarcounter.carcount to the constructed object's carcount. sample output
    15·2 answers
  • What is blogging
    15·2 answers
  • Which of the following does not make a good analysis class? (Points : 6) its name reflects its intent
    13·1 answer
  • "You have installed a point-to-point connection using wireless bridges and Omni directional antennas between two buildings. The
    8·1 answer
  • Implement a function called merge that does the following in C#:
    7·1 answer
  • Robert's got a quick hand
    8·2 answers
  • Please help me. Adnan also wants to add a photograph of a bridge. It is on another PowerPoint presentation that is open in a dif
    11·1 answer
  • The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?
    6·2 answers
  • Explain how the CPU processes data instructions.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!