PREVIOUS YEAR SOLVED PAPERS - GATE 2017 Shift 1

51. Consider the language L given by the regular expression (a+b)*b(a+b) over the alphabet {a, b}. The smallest number of states needed in a deterministic finite-state automation (DFA) accepting L is ______.

  • Option : A
  • Explanation :
    The regular expression can be described as “All strings over {a, b} ending with “ba” or “bb”. The minimal DFA accepting L is having 4 states:
Cancel reply

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


Cancel reply

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


52. Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache 0.1, the L2 cache experiences, on average, 7 misses per 1000 instructions. The miss rate of L2 expressed correct to two decimal places is _____.

  • Option : A
  • Explanation :
    Number of memory access in 1000 instructions = 1.4 x 1000
    = 1,400
    ∴ Miss rate = 7/(1400 x 0.1) = 0.05
Cancel reply

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


Cancel reply

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


53. Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:

ProcessArrival timeBurst time
P107
P233
P355
P462
If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is _______ milliseconds.


Note: Numerical Type question.

  • Option : C
  • Explanation :

    Turn Around Time
    P1 = 12-0 = 12
    P2 = 6-3 = 3
    P3 = 17-5 = 12
    P4 = 8 - 6 = 2
    Waiting Time
    P1 = 12-7 = 5
    P2 = 3-3 = 0
    P3 = 12-5 = 7
    P4 = 2 - 2 = 0
    Average Waiting time = (7+0+5+0)/4 = 3.0
    Therefore, option C is correct
Cancel reply

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


Cancel reply

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


54. Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below.  

EMP
EmpIdEmp NameDept Name
1.XYAAA
2.XYBAA
3.XYCAA
4.XYDAA
5.XYEAB
6.XYFAB
7.XYGAB
8.XYHAC
9.XYIAC
10.XYJAC
11.XYKAD
12.XYLAD
13.XYMAE
SELECT AVG (EC.Num)
FROM EC
WHERE(DeptName, Num)IN
 (SELECT DeptName, COUNT(EmpId)AS
     EC(DeptName,Num)
 FROMEMP
 GROUP BY DeptName)
The output of executing the SQL query is _____.

Note – Numerical Type question

  • Option : A
  • Explanation :
    EC 
    Dept NameNum
    AA4
    AB3
    AC3
    AD2
    AE1
      
    Avg(NUM) = 13/5 = 2.6
Cancel reply

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


Cancel reply

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


55. Let T be a tree with 10 vertices. The sum of the degrees of all the vertices in T is _____.

  • Option : C
  • Explanation :
    Given, v= Total vertices = 10
    e = v – 1 =9
    Degree = 2 * e = 18
    Therefore, option C is correct
Cancel reply

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


Cancel reply

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


Related Quiz.
GATE 2017 Shift 1