subject

Describe an efficient algorithm that, given a set {x1, } of points on the real line, determines the smallest set of unit-length closed intervals that contains all of the given points. (a unit length interval just means any closed interval with length 1. i. e., an interval [a, b] where b − a = 1.)
a. briefly describe a greedy algorithm for the unit length interval problem.
b. state and prove a "swapping lemma" for your greedy algorithm.
c. write a proof that uses your swapping lemma to show that your greedy algorithm does indeed produce a set of intervals that contain all of the points {x1, } with the fewest number of intervals.
note: you must show that no smaller set of intervals exists that contain all of the points. do not appeal to any general principles. you must incorporate your swapping lemma above in the proof.
argue that your algorithm is correct.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
You know the right answer?
Describe an efficient algorithm that, given a set {x1, } of points on the real line, determines the...
Questions