GATE Computer ScienceHardGATE CS (PYQ pattern)
Six jobs have (processing time, weight): (4,3), (2,5), (7,2), (3,6), (5,4), (1,1). A single machine runs them one at a time without gaps. The minimum possible value of Σ weight × completion time is:
- A. 186
- B. 189
- C. 179
- D. 183
Correct answer: C. 179
Smith's rule orders jobs by non-decreasing p/w (exchange argument) and gives 179, equal to the brute-force minimum over all 720 orders. Shortest-processing-time order gives 186 and highest-weight-first gives 189.
More Algorithms questions
- How many non-empty subsets of {3, 5, 6, 7, 9, 11, 13, 14} have an element sum divisible by 10?
- A cyclic binary string of length 12 is written around a circle, so position 12 is followed by position 1. How many of the 2¹² strings…
- What is the maximum possible sum of a non-empty contiguous circular subarray of A = [6, −4, −7, 5, 3, −2, 8, −6, 4, −1] (the array is…
- A 6 × 6 grid is given row by row, where # is a blocked cell: row1 "....#.", row2 "..#...", row3 ".#..#.", row4 "....#.", row5 "#....."…
- Twelve meetings occupy CLOSED time intervals [1,5], [2,6], [5,9], [6,7], [4,8], [7,11], [8,12], [3,10], [9,13], [10,14], [12,15], [13,16]…
- The length of the longest bitonic subsequence (strictly increasing and then strictly decreasing; either part may be empty-length-1) of [4…