Computers and Technology

Suppose we have a number of events mi. Each event starts at time si and finishes at time ei, where 0 <= si <= e. We represent the event mi with the closed interval [si, ei]. Our goal is to construct a maximum size set of events, where no two events in the set overlap (note that two events mi and mj where mi = [., x] and mj = [x, .] are not considered to overlap). Suppose the following intervals are provided.

Event Index Interval
A [1,4]
B [2,3]
C [3,6]
D [5, 9]
E [7,11]

Required:
a. Give the optimal set of events for this example set of intervals.
b. Consider the following greedy approach: at each step, select the event with the earliest starting time that does not conflict with any event already in our set. Show that this approach is not optimal by providing the greedy solution generated by this approach for the above example intervals.
c. Consider a second greedy approach: first order the events by length. Then, at each step, select the event with the shortest length that does not conflict with any event already in our set. While this approach generates the optimal set for the above example, it is not guaranteed to do so for this problem generally. Give a set of 5 intervals for which this second greedy approach fails to generate the optimal solution. Explicitly state both the optimal solution and the solution generated by this approach for your example.
d. State a greedy approach to this problem that always finds the optimal solution.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 03:00, SiegeHatake4534
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
image
Computers and Technology, 24.06.2019 08:00, qveenvslayin
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
image
Computers and Technology, 24.06.2019 10:30, johngayden46
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
image
Computers and Technology, 24.06.2019 18:20, seema12
7. design a circuit with three inputs (x, y, and z) representing the bits in a binary number, and three outputs (a, b, and c) also representing bits in a binary number. when the input is 1, 2, or 3, the binary output should be one lesser than the input. when the input is 4, 5, or 6, the binary output should be one greater than the input. when the input is 0, the output is 0, and when the input is 7, the output is 7. show your truth table, all computations for simplification, and the final circuit.
Answers: 2
Do you know the correct answer?
Suppose we have a number of events mi. Each event starts at time si and finishes at time ei, where 0...

Questions in other subjects:

Konu
Social Studies, 22.04.2021 19:00
Konu
Mathematics, 22.04.2021 19:10