Question 11
p[1]=1, p[2]=5, p[3]=8, p[4]=9, p[5]=10, p[6]=17, p[7]=18Which of the following statements is/are correct about R7?
Question 12
Question 13
Consider a graph G=(V, E), where V = { v1,v2,…,v100 }, E={ (vi, vj) ∣ 1≤ i < j ≤ 100} and weight of the edge (vi, vj) is ∣i–j∣. The weight of minimum spanning tree of G is ________. Note - This question was Numerical Type.
Question 14
Consider a job scheduling problem with 4 jobs J1, J2, J3, J4 and with corresponding deadlines: ( d1, d2, d3, d4) = (4, 2, 4, 2). Which of the following is not a feasible schedule without violating any job schedule?
Question 15
Consider the weights and values of items listed below. Note that there is only one unit of each item.
[caption width="800"]Question[/caption]
The task is to pick a subset of these items such that their total weight is no more than 11 Kgs and their total value is maximized. Moreover, no item may be split. The total value of items picked by an optimal algorithm is denoted by Vopt. A greedy algorithm sorts the items by their value-to-weight ratios in descending order and packs them greedily, starting from the first item in the ordered list. The total value of items picked by the greedy algorithm is denoted by Vgreedy. The value of Vopt − Vgreedy is ______ .
Question 16
Question 17
Question 19
What is the time complexity of the greedy algorithm for the coin change problem?
There are 20 questions to complete.