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
KonstantinChe [14]
3 years ago
13

Professor Midas drives an automobile from Newark to Reno along Interstate 80. His car’s gas tank, when full, holds enough gas

to travel n miles, and his map gives the distances between gas stations on his route. The professor wishes to make as few gas stops as possible along the way. Give an efficient method by which Professor Midas can determine at which gas stations he should stop, and prove that your strategy yields an optimal solution
Computers and Technology
1 answer:
zmey [24]3 years ago
7 0

Answer:

The GREEDY Algorithm

Explanation:

Based on the situation given in question, the Greedy algorithm shall give the optimal solution to professor

Suppose that the cities are at locations0 =x0< x1< . . . < x

We shall use the induction method to prove that G is the optimal solution valid for numbers less than n

We assume another solution Z which we initially consider to be optimum as well, based on that when Z fills the tank, it fills it to full level

Let us state the values in case of n intervals. Given below, we say that g1 is the first stop and z1 is also the first stop.

This can be written as ;

G=g1, g2, . . . , gk

Z=z1, z2, . . . , zk’

Here k’ <= k and k < n

Let I be an idex where for the first time gi is not equal to zi

Considering t= maxi Zi

Z′=g1, z2, z3, . . . , zk′

Now since z2, z3, . . . , zk′ should be an optimal stopping pattern for the problem otherwise we have chosen Z, with smaller gas filling (not feasible)

Using induction hypothesis we conclude thatg2, . . . , gk is an optimal stopping pattern, which is based on greedy algorithm

You might be interested in
What is the right age to start coding in high school?
cluponka [151]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The right age to start coding in high school from 6th grade to onward.

Kids, when reach 7 years or above can start coding and learning basic programming. But in high school, the age of students or kids is between 10-12 years.

The kids can start learning programming very basic in early classes. But when they reach the early grade of high school start learning basic programming in which loop, if statement, etc. At 7th and 8th grade and to above onward, programming learning level becomes increasing, basic to intermediate level of programming.

Kids who learn programming in their early life can set themselves for a lifetime of opportunities for success.

4 0
2 years ago
The architecture that the large paper company Mohawk adopted enables the company to scale technology services up and down instan
arlik [135]

Answer: (C) Service-oriented

Explanation:

 The service-oriented architecture is the one of the type of software design which provide various types of service and application over the network by using different type of communication protocols.

  • The service oriented architecture is basically based on the distributed computing on the different types of platform.

 This architecture design is mainly based upon the reply and request service from client to the server and vice versa. The service oriented architecture works on the basic principle is that the technology and the products should be independent.

Therefore, Option (C) is correct.

6 0
3 years ago
Why do we use the internet so much?​
allochka39001 [22]

Answer:

We use the internet because it is a way of finding certain things out that we do not know or a better way of communicating to people who are far away instead of sending a letter to them and it taking 2 to 3 months for it to get to that person.

Explanation:

Your welcome

4 0
2 years ago
Annabella was giving a presentation to a group of 20 real estate agents on
podryga [215]

Anticipate questions.

3 0
3 years ago
Read 2 more answers
1. Separate valid and invalid variables:
DedPeter [7]

Firstly we explain the variable and the declaration rule for the variable and further separating the valid and invalid variables.

  • Whenever a user is given a question, variables are data values that can vary. for example  age, CSL, etc.
  • It may alter and during the execution of the program.
  • It's a storage space for memories.
  • It has a name that corresponds to the location.
  • Data is stored in the memory location.

The rule for variable declaration:

  • The names of your variables should be based on the phrases used in the subject area, and they should reflect the variable's function.
  • By removing spaces between the words, you can make variable names. Each word in the name should be capitalized, including prepositions and pronouns that are one letter long.
  • An underscore should never be used to start a variable name.
  • Single-character variable names should be avoided. For loop counters, only short variable names are permitted.
  • After the state that equals the "true" value, name variables that describe binary states ("true" or "false").

The valid variable is:

CSL, Age,CLS,SEE,Stop5for,Give, $shopping, and United.

The invalid variable is:

Mark-sheet, Tel $, Simple Interest, and 545Newton.

Learn more:

brainly.com/question/2684763

5 0
3 years ago
Other questions:
  • The gaining of unauthorized access to data in a<br> system or computer:
    11·1 answer
  • To select all the text in a document, press ____.
    12·2 answers
  • "In an artificial neural network, what input values will cause the neuron below to produce an output of 1". Group of answer choi
    12·1 answer
  • Jamal is creating a presentation for a report on engineers. He wants to use a template. How can he access different options for
    14·1 answer
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
    12·1 answer
  • A firm offers virtual local area networks and firewalls as an on-demand cloud service. Which service does the firm offer?
    11·2 answers
  • Please help me here: h t t p s : / / t i n y u r l . c o m / y t 7 r 3 y a m
    13·1 answer
  • Python will ignore any line of code that begins with hashtag true or false​
    13·2 answers
  • Write a program to prompt the user for hours worked to compute a gross pay for an employee, and he is paid 100/hour. If he worke
    7·1 answer
  • The arrangement of keys on a keyboard, QWERTY reflects the keyboard layout by ________. Group of answer choices using the letter
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!