GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Six tasks have (processing time, deadline): (3,6), (2,8), (4,9), (1,5), (5,15), (2,10). They run one after another on a single machine starting at time 0, and lateness = completion time − deadline. The minimum possible value of the maximum lateness over all orders is:
- A. 3
- B. 4
- C. 2
- D. 1
Correct answer: C. 2
Earliest-deadline-first is optimal for minimising maximum lateness (exchange argument): the order by deadline 5, 6, 8, 9, 10, 15 gives completion times 1, 4, 6, 10, 12, 17 and lateness −4, −2, −2, 1, 2, 2, maximum 2. Shortest-processing-time order gives 3.
More Algorithms questions
- In how many ways can 12 be written as an ordered sum of parts from {1, 2, 3} such that no two adjacent parts are equal (e.g. 1+2+1+3+… is…
- Which of the following statements about dynamic programming problems is/are correct? I. The LCS of two strings can be computed in O(mn)…
- Ten houses stand in a CIRCLE with values 6, 2, 9, 4, 3, 8, 1, 7, 5, 10 (the first and last houses are neighbours). No two neighbouring…
- Among all full parenthesisations of the product A₁A₂A₃A₄A₅A₆A₇, how many contain the product (A₃A₄) as one of their sub-products?
- X = ABCBDAB and Y = BDCABA have longest common subsequences of length 4. How many DIFFERENT strings are shortest common supersequences of…
- The fractional knapsack greedy algorithm (taking items by value/weight ratio, the last one fractionally) is run on capacity 26 and items…