Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Consider a straight road with houses scattered very sparsely along it. You want to place cell phone base stations at certain points along the road, so that every house is within four miles of one of the base stations. Give a greedy algorithm that achieves this goal, using as few base stations as possible. Compute the worst-case run-time complexity of your algorithm and prove the optimality of the solution it gives. 
Assume that the road is a straight line with a western end and an eastern end. The input would be the distance of each house from the western end. A sample input would be: 

House number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
Distance 10 36 21 30 47 44 16 31 25 54 13 39 6 19 53 
The output should be the locations of the base stations. For this ex, you'll need 5 base stations. 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9116525

Have any Question?


Related Questions in Computer Engineering

Question squareroot write a function to determine the

Question : squareroot Write a function to determine the squareroot of a number. The squareroot of a number can be approximated by repeated calculation using the formula NG = 0.5(LG + N/LG) where NG stands for the next gu ...

Supposed datagrams are limited to 1600 bytes including

Supposed datagrams are limited to 1600 bytes (including header, with header size = 40) between host A and destination host B. Assuming a 20-byte IP header; further assume that the data is carried in TCP segments, with ea ...

Discuss the relationship between fundamental analysis and

Discuss the relationship between fundamental analysis and intrinsic value. Include real-world examples in your explanation.

We can sort a given set of n numbers by first building a

We can sort a given set of n numbers by first building a BST containing these numbers (using insertion operations on each element one by one), and then printing the numbers by an inorder traversal. What are the worst cas ...

What is a domain name in the context of internet what is

What is a domain name in the context of Internet? What is the procedure to get a domain name and link it to an Internet Protocol (IP) address? Use an example.

Explain some of the pitfalls to watch out for when working

Explain some of the pitfalls to watch out for when working with flat files.

Question suppose a prolog database exists that gives

Question : Suppose a Prolog database exists that gives information about the parts in an automobile engine. Predicates of big, small, and part-of are included. a. Write a query to find all small items that are part of ot ...

Wat type of malware do you think is the most destructive

What type of malware do you think is the most destructive : viruses, worms, trojan programs, spyware or adware.

Information systemsdirections answer the following if you

Information Systems Directions : Answer the following: If you were asked to develop a logical model of the registration system at a school, would it be better to use a top-down or bottom-up approach? Explain your reasoni ...

This is a chemistry question regarding physical and

This is a chemistry question regarding physical and chemical changes. The question is the following: You mix 3 liquids and the resulting solution becomes very hot. A short time later bubbles began to form. There is a che ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As