GATE Solved Paper 2017-19 - GATE 2017 Shift 2

36. Consider a binary code that consists of only four valid code words as given below:
00000,01011,10101,11110
Let the minimum Hamming distance of the code be p and the maximum number of erroneous bits that can be corrected by the code be q.
Then the values of p and q are

  • Option : A
  • Explanation :
    Given:
    code1 00000
    code2 01011
    code3 10101
    code4 11110
    Hamming distance between code 1 and code 2 is 3
    Hamming distance between code 1 and code 3 is 3
    Hamming distance between code 1 and code 4 is 4
    Hamming distance between code 2 and code 3 is 4
    Hamming distance between code 2 and code 4 is 3
    Hamming distance between code 3 and code 4 is 3
    So, as per Hamming code, minimum Hamming distance of all code words is considered as Hamming distance i.e., 3 (p).
    Now, the max number of erroneous bits that can be corrected by the Hamming code is 2d + 1
    So,
    So option A is correct.
Cancel reply
Cancel reply

37. A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:

Which of the following best describes current state of the system ?

  • Option : B
  • Explanation :
    PIDCurrent allocationMax NeedAvailableNeeded
    P13320
    P216-5
    P335-2
         
    Hence, system is in safe state , because P1 and P3 anyone can execute first and after them P2 can be executed, no deadlocked option B is correct.
Cancel reply
Cancel reply

38. Two transactions T1 and T2 are given as:
T1: r1(X)w1(X)r1(Y)w1(Y)
T2 : r2(Y)w2(Y)r2(Z)w2(Z)
where ri(V) denotes a read operation by transaction Ti on a variable V and wi(V) denotes a write operation by transaction Ti on a variable V. The total number of conflict serializable schedules that can be formed by T1 and T2 is ______

  • Option : A
  • Explanation :
    Conflict conditions RW WR WW
    ∴ 5 conflicts
    T1 - T2
    a  b  c  d 
    r1(X) w1(X) r1(Y) w1(Y)
    r2(Y) w2(Y) r2(Z) r2(Z)
    1  2  3  4 
    Constraints:
    a<b<c<d
    1<2<3<4
    d<1 (or) 2<c
    only 1 way
    Total = 70 - (12 + 5) = 53
    Therefore total no of, 53 + 1 = 54
Cancel reply
Cancel reply

39. If w, x, y, z are Boolean variables, then which one of the following is INCORRECT?

  • Option : C
  • Explanation :
    A)LHS: wx + w(x + y) + x(x+y) = x + wy
    RHS
    ⇒ wx + wx + wy + x + xy
    ⇒ wx + wy + x + xy [∵ xx = x]
    ⇒ x(w+y+1) + wy [∵1 + x = 1]
    ⇒ x + wy
    ⇒ L.H.S = R.H.S

    L.H.S ≠ R.H.S
    D) L.H.S.:(w + y)(wxy + wyz) = wxy + wyz
    (w + y)(wxy + wyz)
    wxy + wyz + wxy + wyz
    wxy + wyz
    L.H.S = R.H.S
Cancel reply
Cancel reply

40. Consider the following C Program.


 Note – Numerical Type question

  • Option : A
  • Explanation :
    Assume starting address of string is 100 to make the whole expression is easy to understand.

    Note: Whenever we have characters in the arithmetic expressions, we can replace those with their ASCII values
    strlen (100 + x + 11 - x - 1)[assume x has the ASCII value of I]
    ⇒Strlen(110)
    is printed
    It gives address of second last character in the string. So it prints length 2.
Cancel reply
Cancel reply