Computers and Technology
Computers and Technology, 05.12.2019 00:31, SithLeo

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:50, brennarfa
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
image
Computers and Technology, 22.06.2019 19:10, kaiya789
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
image
Computers and Technology, 23.06.2019 08:00, Buddy01
Match the items with their respective descriptions.
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, med69
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a. an advanced knowledge of physics and math b. an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
Do you know the correct answer?
Describe an efficient algorithm that, given a set {x1, } of points on the real line, determines the...

Questions in other subjects:

Konu
Social Studies, 16.04.2020 19:37