# GATE Solved Paper 2017-19 - GATE 2017 Shift 1

>>>>>>>>GATE 2017 Shift 1

• Option : D
• Explanation :
1) S → SS → aSbS → abS → abaSb → abab
2) S → aSb → aSaSb → aaaSb → aaab
3) S → SS → aSbS → abS → abaSb → abab → abbSaSa → abbaa
4) can't not drive

• Option : D
• Explanation : Given, DepId can be permitted to be NULL
I. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∀ v ∈ DEPT (t[DeptId] ≠ DeptId]))} : Gives empnames who donot belong to any department
II. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∃ v ∈ DEPT (t[DeptId] ≠ DeptId]))} : Gives empnames who donot belong to some department
III. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∃ v ∈ DEPT (t[DeptId] = DeptId]))}: Gives empnames who donot belong to same department
All of these queries are giving some results which are finite and thus all are safe expressions.
Therefore, option D is correct.

• Option : B
• Explanation :
Statement 1 is “TRUE”. Because there can be a case when page selected to be replaced is by FIFO policy.
Statement 2 is “FALSE”. Because LRU page replacement algorithm does not suffers from Belady’s Anomaly. Only FIFO page replacement algorithm suffers from Belady’s Anomaly.

• Option : B
• Explanation : Count in the function total is static.  i Count Table i 5 0 2 4 2 3(2+1) 3 3 5(3+2) 2 5 6(5+1) 1 6 7(6+1) = 23
Related Quiz.
GATE 2017 Shift 1