Ans .

C


  • Explanation :

    We Completely forgot our friend's birthday and we just don't know how to make it up to him.





  • Ans .

    C


  • Explanation :

    personnel mean a body of persons employed in an organization or place of work.





  • Ans .

    C


  • Explanation :

    (I) is sufficient. We can determine total weight of 10 poles as 10 * 4 * 5 = 200 Kg
    (II) is also sufficient, we can determine the weight.
    Let x be the weight of 1 pole.
    10*x - 2*x = 160 Kg
    x = 20 Kg
    10x = 200 Kg





  • Ans .

    C


  • Explanation :

    f(x) = 1 - |x|
    f(0) = 1
    f(1) = f(-1) = 0
    f(0.5) = f(-0.5) = 0.5
    The maximum is attained at x = 0, and the maximum value is 1.





  • Ans .

    D


  • Explanation :

    apparel means clothing.





  • Ans .

    B


  • Explanation :

    1 is AP with common difference as double of that of original series.
    2 is AP with common difference as same as original series.





  • Ans .

    A


  • Explanation :

    GATE CSE





  • Ans .

    B


  • Explanation :

    Area of a triangle = 1/2 * ac sinB
    = 1/2 * bc sinA
    = 1/2 ab sinC
    Here area (PQR) = area (PQS) + area (PRS)
    1/2 rq sin120 = 1/2 PS * r sin60 + 1/2 PS * q sin60
    => PS = rq/(r+q)





  • Ans .

    C


  • Explanation :

    The question asks value of fg (h(2, 5, 7, 3), 4, 6, 8)
    We need to first find value of h(2, 5, 7, 3)
    h is defined as h(p, q, r, s) = remainder of (p * q) / (r * s) if (p * q) > (r * s) remainder of (r * s) / (r * q) if (r * s) > (p * q)
    h(2, 5, 7, 3) = remainder of (7 * 3) / (2 * 5) since 7*3 > 2*5 = 1
    fg(1, 4, 6, 8) = f(1, 4, 6, 8) * g(1, 4, 6, 8)
    = max(1, 4, 6, 8) * min(1, 4, 6, 8)
    = 8 * 1
    = 8





  • Ans .

    A






    Ans .

    B


  • Explanation :

    Consistency in database systems refers to the requirement that any given database transaction must only change affected data in allowed ways, that is sum of x and y must not change.





  • Ans .

    A


  • Explanation :

    Q1 reduces in polynomial time to 3-SAT
    ==> Q1 is in NP
    3-SAT reduces in polynomial time to Q2
    ==> Q2 is NP Hard. If Q2 can be solved in P, then 3-SAT
    can be solved in P, but 3-SAT is NP-Complete, that makes
    Q2 NP Hard





  • Ans .

    C


  • Explanation :

    S1: If a candidate is known to be corrupt, then he will not be elected.
    S2: If a candidate is kind, he will be elected.
    If p -> q, then ~q -> ~p
    So from S1, elected -> not corrupt
    and S2 is, kind -> elected





  • Ans .

    C


  • Explanation :

    A software requirements specification (SRS) is a description of a software system to be developed, laying out functional and non-functional requirements, and may include a set of use cases that describe interactions the users will have with the software. (Source Wiki) Design Specification should not be part of SRS.





  • Ans .

    B


  • Explanation :

    | 4-Λ 5 | = 0
    | 2 1-Λ|
    (4-Λ)*(1-Λ) - 10 = 0
    Λ*2 - 5Λ - 6 = 0
    (Λ+1)*(Λ-6) = 0
    Λ = -1, 6
    Greater of two Eigenvalues is 6.





  • Ans .

    B


  • Explanation :

    We can get all values in range from 7 to 59 by accessing 5 nodes.
    1) First search 7 in a leaf node.
    2) Once 7 is found, linearly traverse till 15 is found.





  • Ans .

    D


  • Explanation :

    mod 8 up counter using 3 JK flip flops. Ignore the output of LSB





  • Ans .

    C


  • Explanation :

    In stop and wait, protocol next packet is sent only when acknowledgement of previous packet is received. This causes poor link utilization.
    Tansmission speed = 106
    Time to send a packet = (1000 * 8) bits / 106 = 8 miliseconds
    Since link utilization or efficiency is 25%, total time taken for 1 packet is 8 * 100/25 = 32 miliseconds.
    Total time is twice the one way propagation delay plus transmission delay. Propagation delay has to be considered for packet and ack both. Transmission delay is considered only for packet as the question says that trans. time for ack is negligible. Let propagation delay be x.
    2x + 8 = 32.
    x = 12.





  • Ans .

    B


  • Explanation :

    2100 = 22 * 31 * 52 * 71
    There are 3 choices for powers of 2, the choices are 0, 1, 2
    Similarly, there are 2 choices for powers of 3, 3 choices for power of 5
    and 2 choices for power of 7.
    So total number of divisors is 3 * 2 * 3 * 2 = 36





  • Ans .

    B


  • Explanation :

    Sum of all degrees = 2 * |E|.
    Here considering tree as a k-ary tree :
    Sum of degrees of leaves + Sum of degrees for Internal Node except root + Root's degree = 2 * (No. of nodes - 1).
    Putting values of above terms,
    L + (I-1)*(k+1) + k = 2 * (L + I - 1)
    L + k*I - k + I -1 + k = 2*L + 2I - 2
    L + K*I + I - 1 = 2*L + 2*I - 2
    K*I + 1 - I = L
    (K-1)*I + 1 = L
    Given k = 2, L=20
    ==> (2-1)*I + 1 = 20
    ==> I = 19
    ==> T has 19 internal nodes which are having two children.





  • Ans .

    C


  • Explanation :

    fun(5) = 1 + fun(1) * fun(4) + fun(2) * fun(3) + fun(3) * fun(2) + fun(4) * fun(1)
    = 1 + 2*[fun(1)*fun(4) + fun(2)*fun(3)]
    Substituting fun(1) = 1
    = 1 + 2*[fun(4) + fun(2)*fun(3)]
    Calculating fun(2), fun(3) and fun(4)
    fun(2) = 1 + fun(1)*fun(1) = 1 + 1*1 = 2
    fun(3) = 1 + 2*fun(1)*fun(2) = 1 + 2*1*2 = 5
    fun(4) = 1 + 2*fun(1)*fun(3) + fun(2)*fun(2)
    = 1 + 2*1*5 + 2*2 = 15
    Substituting values of fun(2), fun(3) and fun(4)
    fun(5) = 1 + 2*[15 + 2*5] = 51





  • Ans .

    B


  • Explanation :

    Effort Applied (E) = ab(KLOC)bb [ person-months ]
    Development Time (D) = cb(Effort Applied)db [months]
    People required (P) = Effort Applied / Development Time [count]





  • Ans .

    A


  • Explanation :

    Cookies are not piece of code, they are just strings typically in the form of key value pairs.





  • Ans .

    C


  • Explanation :

    (A) is false, In CFG (Control Flow Graph), code of N2 may be present before N1 when there is a loop or goto.
    (B) is false, CFG (Control Flow Graph) contains cycle when input program has loop.
    (C) is true, successors in AST and CFG depedend on input program
    (D) is false, a single statement may belong to a block of statements.





  • Ans .

    D


  • Explanation :

    The program prints all characters before ‘ ‘ or ‘\0’ (whichever comes first) in reverse order.





  • Ans .

    D


  • Explanation :

    R cannot be reflexive as 'a' and 'b' have to be distinct in aRb.
    R is symmetric if a and b have a common divisor, then b and a also have.
    R is not transitive as aRb and bRc doesn't mean aRc. For example 3 and 15 have common divisor, 15 and 5 have common divisor, but 3 and 5 don't have.





  • Ans .

    A


  • Explanation :

    The answer to this question is simply max-heapify function. Time complexity of max-heapify is O(Log n) as it recurses at most through height of heap.





  • Ans .

    C


  • Explanation :

    The power set has 2n elements. For n = 11, size of power set is 2048.





  • Ans .

    C


  • Explanation :

    Register allocation is a variation of Graph Coloring problem.
    Lexical Analysis uses DFA.
    Parsing makes production tree
    Expression evaluation is done using tree traversal





  • Ans .

    B


  • Explanation :

    bind, listen, accept and recv are server side socket API functions.
    bind() associates a socket with a socket address structure,
    i.e. a specified local port number and IP address.
    listen() causes a bound TCP socket to enter listening state.
    accept() accepts a received incoming attempt to create a new
    TCP connection from the remote client,
    recv() is used to receive data from a remote socket.





  • Ans .

    D


  • Explanation :

    1 is true: Complement of Turing decidable is Turing Decidable.
    3 is true. All NP problems are Turing decidable





  • Ans .

    D


  • Explanation :

    We only need to consider any 3 elements and compare them. So the number of comparisons is constants, that makes time complexity as theta(1) The catch here is, we need to return any element that is neither maximum not minimum.





  • Ans .

    D


  • Explanation :

    It seems to be wrong question in GATE exam. Below seems to be the worst case situation. In below situation P1 and P2 can continue as they have 2 resources each
    P1 --> 2
    P2 --> 2
    P3 --> 1
    P4 --> 1





  • Ans .

    D


  • Explanation :

    The average read access time in nanoseconds
    = 0.8 * 5 + 0.2*50
    = 14





  • Ans .

    D


  • Explanation :

    Total virtual address size = 40
    Since there are 32 sets, set offset = 5
    Since page size is 8kilobytes, word offset = 13
    Minimum tag size = 40 - 5- 13 = 22





  • Ans .

    C


  • Explanation :

    1 is false: function is not a Continuous function. As a change of 1 in x leads to 8 change in f(x). For example when x is changed from -1 to 0. At x = 0, f(x) is 8 and at x = 1, f(x) is finite.
    2 is True: f(x) is not a bounded function as it becomes 8 at x = 0.
    3 is true: A denote the area of the region bounded by f(x) and the X-axis. This area is bounded, we can calculate it by doing integrating the function





  • Ans .

    A


  • Explanation :

    The given matrix is singular matrix as its last column is a multiple of first column. If we multiply 15 with first column, we get the third column.





  • Ans .

    D


  • Explanation :

    An n-vertex self-complementary graph has exactly half number of edges of the complete graph, i.e., n(n - 1)/4 edges, and (if there is more than one vertex) it must have diameter either 2 or 3. Since n(n -1) must be divisible by 4, n must be congruent to 0 or 1 mod 4; for instance, a 6-vertex graph cannot be self-complementary.





  • Ans .

    B


  • Explanation :





  • Ans .

    A


  • Explanation :

    Best fit allocates the smallest block among those that are large enough for the new process. So the memory blocks are allocated in below order.
    357 ---> 400
    210 ---> 250
    468 ---> 500
    491 ---> 600





  • Ans .

    B


  • Explanation :

    Shifted numbers are 2, 4, 6, 18, 25





  • Ans .

    C


  • Explanation :

    full outer join contains e = (1, 5, 7), f = (3, 7, null), g = (4, null, 9).





  • Ans .

    B


  • Explanation :

    Since mod 10 is used, the last digit matters. If you do cube all numbers from 0 to 9





  • Ans .

    C


  • Explanation :

    Since sequence number in TCP header is limited to 16 bits, the maximum window size is limited. When bandwidth delay product of a link is high, scaling is required to efficiently use link. TCP allows scaling of windows when bandwidth delay product is greater than 65,535 (Refer this). The bandwidth delay product for given link is 1048560 * a. Window scaling is needed when this value is more than 65535 bytes, i.e., when a is greater than 65535 * 8 / 1048560 or 0.5 seconds. Scaling is done by specifying a one byte shift count in the header options field. The true receive window size is left shifted by the value in shift count. A maximum value of 14 may be used for the shift count value. Therefore maximum window size with scaling option is 65535 * 214.





  • Ans .

    C


  • Explanation :

    The smallest possible string by given grammar is "11".
    The string "11" is only possible with option (C).






  • Ans .

    C


  • Explanation :

    Dijkstra’s Shortest Path is a Greedy Algorithm.
    Floyd-Warshall algorithm is Dynamic Programming.
    Binary search is a Divide and Conquer.
    Backtracking is Depth-first search






  • Ans .

    A


  • Explanation :

    Given Boolean expression is:
    [D' + AB' + A'C + AC'D + A'C'D]'
    Step 1 : [D' + AB' + A'C + C'D ( A + A')]'
    ( taking C'D as common )
    Step 2 : [D' + AB' + A'C + C'D]'
    ( as, A + A' = 1 )
    : [D' + DC' + AB' + A'C]' (Rearrange)
    Step 3 : [D' + C' + AB' + A'C]'
    ( Rule of Duality, A + A'B = A + B )
    : [D' + C' + CA' + AB']' (Rearrange)
    Step 4 : [D' + C' + A' + AB']'
    (Rule of Duality)
    : [D' + C' + A' + AB']' (Rearrange)
    Step 5 : [D' + C' + A' + B']'
    (Rule of Duality)
    :[( D' + C' )'.( A' + B')']
    (Demorgan's law, (A + B)'=(A'. B'))
    :[(D''.C'').( A''.B'')] (Demorgan's law)
    :[(D.C).(A.B)] (Idempotent law, A'' = A)
    : ABCD
    Hence only 1 minterm after minimization.






  • Ans .

    C


  • Explanation :

    The code in main, basically initializes a stack of size 10, then pushes 5, then pushes 10.
    Finally the printf statement prints sum of two pop operations which is 10 + 5 = 15.
    stkFunc (-1, 10); // Initialize size as 10
    stkFunc (0, 5); // push 5
    stkFunc (0, 10); // push 10
    // print sum of two pop
    printf ("%d\n", stkFunc(1, 0) + stkFunc(1, 0));






  • Ans .

    D


  • Explanation :

    Secant Method






  • Ans .

    A


  • Explanation :

    A function f from X to Y is called onto if for all 'y' in Y there is an 'x' in X such that f(x) = y.
    In onto functions, all elements in Y are used.






  • Ans .

    A


  • Explanation :

    The next hop is decide according to the longest prefix matching. Refer following link for details.





  • Ans .

    D


  • Explanation :

    The current value of SP is (016E)16
    The value of SP after following operations is asked in question
    Store the current value of PC in the stack.
    This operation increments SP by 2 bytes as size
    of PC is given 2 bytes in question.
    So becomes (016E)16 + 2 = (0170)16
    Store the value of PSW register in the stack.
    This operation also increments SP by 2 bytes as size
    of PSW is also given 2 bytes.
    So becomes (0170)16 + 2 = (0172)16
    Load the starting address of the subroutine in PC.
    The Load operation doesn't change SP.
    So new value of SP is (016E)16





  • Ans .

    D


  • Explanation :

    A is False: It is not necessary that code inspection is carried out once the code has been unit tested. B and D are false: Code walkthrough or walk-through is a form of software peer review in which a designer or programmer leads members of the development team and other interested parties through a software product, and the participants ask questions and make comments about possible errors, violation of development standards, and other problems” Inspection in software engineering, refers to peer review of any work product by trained individuals who look for defects using a well defined process.





  • Ans .

    C


  • Explanation :

    1 2 3 4 5 6 7 8 9 10 11 12 13
    IF OF PO PO PO WB
    IF OF PO PO PO PO PO WB
    IF OF PO WB
    IF OF PO WB





  • Ans .

    A


  • Explanation :

    kth-smallestlargest-element-unsorted-array





  • Ans .

    A


  • Explanation :

    Since T1 and T3 are not committed yet, they must be undone. The transaction T2 must be redone because it is after the latest checkpoint.





  • Ans .

    A


  • Explanation :

    Max size of virtual address can be calculated by calculating maximum number of page table entries.
    Maximum Number of page table entries can be calculated using given maximum page table size and size of a page table entry.
    Given maximum page table size = 24 MB
    Let us calculate size of a page table entry.
    A page table entry has following number of bits.
    1 (valid bit) + 1 (dirty bit) + 3 (permission bits) + x bits to store physical address space of a page.
    Value of x = (Total bits in physical address) - (Total bits for addressing within a page)
    Since size of a page is 8 kilobytes, total bits needed within a page is 13.
    So value of x = 32 - 13 = 19 Putting value of x, we get size of a page table entry = 1 + 1 + 3 + 19 = 24bits.
    Number of page table entries = (Page Table Size) / (An entry size)
    = (24 megabytes / 24 bits)
    = 223
    Vrtual address Size = (Number of page table entries) * (Page Size)
    = 223 * 8 kilobits
    = 236
    Therefore, length of virtual address space = 36





  • Ans .

    A


  • Explanation :

    Let us first calculate propagation delay of a single 1 bit full adder.
    Propagation Delay by n bit full adder is (2n + 2) gate delays.
    Here n = 1, so total delay of a 1 bit full adder is (2 + 2)*1.2 = 4.8 ms
    Delay of 4 full adders is = 4 * 4.8 = 19.2 ms





  • Ans .

    A


  • Explanation :

    Transfer Time = 512 / (50 × 106 bytes/sec) = 10.24 microseconds
    Given that controller time is 10 times the average transfer time Controller Overhead = 10 * 10.24 microseconds
    = 0.1 miliseconds
    Disk latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead
    = 4 + 2 + 10.24 * 10-3 + 0.1 miliseconds
    = 6.1 miliseconds





  • Ans .

    B


  • Explanation :

    A bridge in a graph cannot be a part of cycle as removing it will not create a disconnected graph if there is a cycle.





  • Ans .

    A


  • Explanation :

    L1 is length of x is greater than 0, i.e.,
    |x| > 0.
    So any string than starts and ends with same character is acceptable by language and remaining string becomes w.





  • Ans .

    C


  • Explanation :

    UDP data = 8880 bytes
    UDP header = 8 bytes
    IP Header = 20 bytes
    Total Size excluding IP Header = 8888 bytes.
    Number of fragments = ? 8888 / 1480
    = 7
    Refer the Kurose book slides on IP (Offset is always scaled by 8)
    Offset of last segment = (1480 * 6) / 8 = 1110





  • Ans .

    B


  • Explanation :





  • Ans .

    B


  • Explanation :

    X has 2 elements
    Y has 20 elements
    Number of functions from X to Y is 20*20
    [Every element can take any of the 20 values]
    Number of one to one functions from X to Y is 20*19
    [Every element takes a different value]
    So probability of a function being one to one
    = (20*19) / (20*20)
    = 380 / 400
    = 0.95





  • Ans .

    C


  • Explanation :

    As position of the quantifier is not changed and since LHS P -> R = ~P OR R which is equal to RHS. Option c is tautology