ALGORITHMS |Gate-2018| Previous Year Questions| Set-3

previous year question of ALGORITHMS gate 1993

ALGORITHMS |Gate-2018|

1. Consider the following undirected graph G:

Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is _________. [GATE – 2018]

a. 4
b. 5
c. 6
d. 7

Answer : a)


2. Consider the weights and values of items listed below. Note that there is only one unit of each item.

Item NumberWeight (in kg)Values (in rupees)
11060
2728
3420
4224

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. [GATE – 2018]

The value of Vopt − Vgreedy is ______ .

a. 16
b. 17
c. 18
d. 19

Answer : a)
ALGORITHMS |Gate-2018|


OS – GATE Previous Year Questions
DS – GATE Previous Year Questions


Back to GATE-HOME


Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *