Question

Suppose you are going from city A to city B. You have downloaded a map that...


Suppose you are going from city A to city B. You have downloaded a map that contains the distances in miles between all the petrol stations in your route. You know that car's petrol tank can hold petrol for n miles. Suppose you stop at every petrol station. Does it gives the best solution? If not, give the best solution.
0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

Stopping at every petrol station doesn't give a best solution.

The Best solution according to me is:

Initially,we must go the petrol station nearest to us in the city A and we should fill the petrol tank to full so that the car can move upto n miles.Since,we have downloaded a map that contains distance in miles between all the petrol stations in our route and we know that our car can travel upto next 'n' miles.Therefore,we can go to the petrol station after 'n' miles in our route by following the downloaded route map rather than stopping at every petrol station and filling the petrol tank.The best way is to stop at the petrol station after travelling 'n' miles,refill the petrol tank again to full and this process continues untill we reach city B.

If the distance between city A and city B is less than 'n' miles,then number of petrol stations at which we fill the tank is 1.This is the best case.

Add a comment
Know the answer?
Add Answer to:
Suppose you are going from city A to city B. You have downloaded a map that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • There are N sites that need protection (number them 1 to N). Someone is going to pick one of them to attack, and you must pick one to protect. Suppose that the attacker is going to attack site i with probability qi. You plan on selecting a site to protect

    There are N sites that need protection (number them 1 to N). Someone is going to pick one of them to attack, and you must pick one to protect. Suppose that the attacker is going to attack site i with probability qi. You plan on selecting a site to protect, with probability pi of selecting site i. If you select the same site to protect that the attacker chooses to attack, you successfully defend that site. The choice of {qi}...

  • 3-The population in the city of Houston from 1900 to 2010 is given below: Year Population...

    3-The population in the city of Houston from 1900 to 2010 is given below: Year Population 1900 44,633 1910 78,800 1920 138,276 1930 292,352 1940 384,514 1950 596,163 1960 938,219 1970 1,233,505 1980 1,595,138 1990 1,631,766 2000 1,953,631 2010 2,100,263 a. Give a scatter-plot and residual plot of the data. b. Based on the graphs in part a, propose a model for the data. Show me evidence to support your conclusion. Go through all necessary steps to construct a model...

  • Please fill in the YOUR CODE HERE blocks for trainLine.cpp and provide a sample output. The...

    Please fill in the YOUR CODE HERE blocks for trainLine.cpp and provide a sample output. The other answers to this question are incorrect and do not complie so please do not copy/paste from them. Four trains of varying speeds run north-and-south on their own tracks. They visit different the two stations at either end: northTerminal after going north and southTerminal after going south. Because each train runs on its own track, they will not collide on the tracks. However, both...

  • 1. In this exercise, you will analyze the supply-demand equilibrium of a city under some special...

    1. In this exercise, you will analyze the supply-demand equilibrium of a city under some special simplifying assumptions about land use. The assumptions are: • all dwellings are situated within apartment complexes, • all dwellings must contain exactly 1,500 square feet of floor space, re- gardless of location, and • apartment complexes must contain exactly 15,000 square feet of floor space per square block of land area. These land-use restrictions, which are imposed by a zoning authority, mean that dwelling...

  • In this exercise, you will analyze the supply-demand equilibrium of a city under some special simplifying...

    In this exercise, you will analyze the supply-demand equilibrium of a city under some special simplifying assumptions about land-use. The assumptions are: (i) all dwellings must contain exactly 1500 square feet of floor space, regardless of location, and (ii) apartment complexes must contain exactly 15,000 square feet of floor space per square block of land area. These land-use restrictions, which are imposed by a zoning authority, mean that dwelling sizes and building heights do not vary with distance to the...

  • How can I get started in this program for this DelivC?

    SpecificationStart with your Java program "prog340" which implements Deliverables A and B.This assignment is based on the definition of the Traveling Salesperson Problem (the TSP): Given a set of cities, you want to find the shortest route that visits every city and ends up back at the original starting city. For the purposes of this problem, every city will be directly reachable from every other city (think flying from city to city).Your goal is to use a non-genetic local search...

  • I have an Assignment of Marketing Research on Climate Change. Where i have to take an...

    I have an Assignment of Marketing Research on Climate Change. Where i have to take an interview of an industry professional, which is done. I have all answer what he said, now i just need to analysis all answer into sub category which are as follow: - 1. Level of Concern of Professionals 2. Impacts on Industry 3. Awareness of Millennials' Knowledge 4. Attitudes Among Millennials If you think any other category could be included please add it. i have...

  • A) Analyze the need for managing change in the case attached. B) How would you distribute...

    A) Analyze the need for managing change in the case attached. B) How would you distribute change roles you would consider if you were a decision maker in the project? Note: Not more than 100 Words. Complexities of Large-Scale Technology Project Failure: A Forensic Analysis of the Seattle Popular Monorail Authority Introduction History shows that large scale innovative technology projects, financed with public funds, are fraught with dangers and often fail to deliver the product or the results promised at...

  • Chapter 12 Patlent Teaching 105 Part 3. Review Questions Circle the correct answer(s). In some questions,...

    Chapter 12 Patlent Teaching 105 Part 3. Review Questions Circle the correct answer(s). In some questions, more than one answer is correct. Select all that apply 13. Which of the following is the best rationale for nurses 19. Tell the patient to wait until you harve fin ished teaching before asking questions. Adults learn best when they understand the relevance of the information presented Do not assume an interpreter will be needed. Always ask the patient if he or she...

  • How do you feel about airlines mining your in flight data? Is this any different from companies mining your credit...

    How do you feel about airlines mining your in flight data? Is this any different from companies mining your credit card purchases or web surfing? IDENTIFYING MARKET NICHES IN THE AGE OF BIG DATA With the amount od data avallable to companies dou questions can be answered, authors wll need bling every year, nee sources of data, and innova- tions in data collection, possibilities foe marketers to on the large publishing houses signing deals with dentify market niches and finely...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT