GATE 2018 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2018

65 questions

MCQ 41 · NAT 241-mark 30 · 2-mark 35

Questions 56–60 of 65

Q56Heap Tree2 marksNAT
The number of possible min-heaps containing each value from {1, 2, 3, 4, 5, 6, 7} exactly once is _____.

Q57Minimum Spanning Tree2 marksNAT
Consider the following undirected graph G:
4 x 1 3 4 5 4
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 ______.

Q58Greedy Technique2 marksNAT
Consider the weights and values of items listed below. Note that there is only one unit of each item.
Item number Weight (in Kgs) Value (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 VoptV_{opt}. 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 VgreedyV_{greedy}.
The value of VoptV_{opt}-VgreedyV_{greedy} is ____________.

Q59Boolean Algebra2 marksNAT
Consider the minterm list form of a Boolean function F given below.
F(P,Q,R,S)=∑m(0,2,5,7,9,11)+d(3,8,10,12,14)F(P,Q,R,S)=\sum m(0,2,5,7,9,11)+d(3,8,10,12,14)
Here, m denotes a minterm and d denotes a don't care term. The number of essential prime implicants of the function F is ______.

Q60Pipeline Processor2 marksNAT
The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback (WB). The IF, ID, OF and WB stages take 1 clock cycle each for every instruction. Consider a sequence of 100 instructions. In the PO stage, 40 instructions take 3 clock cycles each, 35 instructions take 2 clock cycles each, and the remaining 25 instructions take 1 clock cycle each. Assume that there are no data hazards and no control hazards.
The number of clock cycles required for completion of execution of the sequence of instructions is ______.