Ans .

A


  1. Explanation :

    Here a binary operation on a set of integers is defined as x \(\oplus\) y = x2 + y2. for Commutativity: x \(\oplus\)y= y \(\oplus\)x.
    LHS=> x \(\oplus\)y= x^2+ y^2
    RHS=> y \(\oplus\) x= y^2+x^2
    LHS = RHS. hence commutative.
    for Associativity: x \(\oplus\) (y \(\oplus\) z) =(x \(\oplus\) y) \(\oplus\) z
    LHS=> x \(\oplus\) (y\(\oplus\) z) = x \(\oplus\) ( y^2+z^2)= x^2+(y^2+z^2)^2
    RHS=> (x \(\oplus\) y) \(\oplus\) z= ( x^2+y^2) \(\oplus\) z=(x^2+y^2)^2+z^2
    So, LHS ? RHS, hence not associative.





Ans .

C


  1. Explanation :

    PR(X < 3) = Pr(x = 0) + Pr(x = 1) + Pr(x = 2) = f(0, 3) + f(1, 3) + f(2, 3) Put \lambda = 3 and k = 0, 1, 2 in the formula of Poisson distribution
    = 17 / (2e3)





Ans .

A


  1. Explanation :

    First of all, you should know the basic properties of determinants before approaching For these kind of problems.
    1) Applying any row or column transformation does not change the determinant
    2) If you interchange any two rows, sign of the determinant will change
    A = | 1 x x^2 |
           | 1 y y^2 |
           | 1 z z^2 |
    To prove option (b)
    => Apply column transformation C2 -> C2+C1
    C3 -> C3+C1
    => det(A) = | 1 x+1 x^2+1 |
                       | 1 y+1 y^2+1 |
                       | 1 z+1 z^2+1 |
    To prove option (c),
    => Apply row transformations R1 -> R1-R2
    R2 -> R2-R3
    => det(A) = | 0 x-y x^2-y^2 |
                        | 0 y-z y^2-z^2 |
                        | 1 z z^2 |
    To prove option (d),
    => Apply row transformations R1 -> R1+R2
    R2 -> R2+R3
    => det(A) = | 2 x+y x^2+y^2 |
                       | 2 y+z y^2+z^2 |
                       | 1 z z^2 |





Ans .

B


  1. Explanation :

    For n bit 2's complement numbers, range of number is -(2^(n-1)) to +(2^(n-1)-1)





Ans .

A


  1. Explanation :

    Since there are more than one outputs and number of outputs is less than inputs, it is a Priority encoder
    V=1 when input is valid and for priority encoder it checks first high bit encountered. Except all are having at least one bit high and 'x' represents the "don't care" as we have found a high bit already. So answer is (A).





Ans .

B


  1. Explanation :

    To sort elements in increasing order, selection sort always picks the maximum element from remaining unsorted array and swaps it with the last element in the remaining array. So the number of swaps, it makes in n-1 which is O(n)





Ans .

C


  1. Explanation :

    To insert an element, we need to search for its place first. The search operation may take O(n) for a skewed tree.





Ans .

A


  1. Explanation :

    L1 L2* U L1* Result of L1 L2* is \phi. {\phi} indicates an empty language. Concatenation of \phi with any other language is \phi. It works as 0 in multiplication. L1* = \phi* which is {\epsilon}. Union of \phi and {\epsilon} is {\epsilon}





Ans .

B


  1. Explanation :

    Given in the question, a grammar with no epsilon- and unit-production (i.e., of type A -> ? and A -> a) .
    Suppose the string is abcd. ( n = 4 )
    We can write the grammar which accepts this string as follows:
    S->aB
    B->bC
    C->cd
    The Right Most Derivation for the above is:
    S -> aB ( Reduction 3 )
    -> abC ( Reduction 2 )
    -> abcd ( Reduction 1 )
    We can see here that no production is for unit or epsilon. Hence 3 reductions here.
    We can get less number of reductions with some other grammar which also does't produce unit or epsilon productions,
    S->abA
    A-> cd
    The Right Most Derivation for the above as:
    S -> abA ( Reduction 2 )
    -> abcd ( Reduction 1 )
    Hence 2 reductions.
    But we are interested in knowing the maximum number of reductions which comes from the 1st grammar. Hence total 3 reductions as maximum, which is ( n Ö 1) as n = 4 here.
    Thus, Option B.





Ans .

B


  1. Explanation :

    The scheduling algorithm works as round robin with quantum time equals to T. After a process's turn comes and it has executed for T units, its waiting time becomes least and its turn comes again after every other process has got the token for T units.





Ans .

C


  1. Explanation :

    The answer can be easily guessed with XML. XML is used for information representation.





Ans . C


  1. Explanation :

    TCP (Transmission Control Protocol) and UDP(User Datagram Protocol) are two main transport layer protocols.
    TCP is connection oriented and UDP is connectionless, this makes TCP more reliable than UDP. But UDP is stateless (less overhead), that makes UDP is suitable for purposes where error checking and correction is less important than timely delivery.
    For real time multimedia, timely delivery is more important than correctness. -> UDP
    For file transfer, correctness is necessary. -> TCP
    DNS, timely delivery is more important -> UDP
    Email again same as file transfer -> TCP





Ans .

D


  1. Explanation :



gate paper solved


Ans .

C


  1. Explanation :

    Router is a network layer device.
    gate paper solved
    So every packet passes twice through data link layer of every intermediate router.





Ans .

C


  1. Explanation :

    A database index is clustered if physical records on disk follow the index order.





Ans .

B


  1. Explanation :

    Option A can cause deadlock. Imagine a situation process X has acquired a, process Y has acquired b and process Z has acquired c and d. There is circular wait now.
    Option C can also cause deadlock. Imagine a situation process X has acquired b, process Y has acquired c and process Z has acquired a. There is circular wait now.
    Option D can also cause deadlock. Imagine a situation process X has acquired a and b, process Y has acquired c. X and Y circularly waiting for each other.
    Consider option A) for example here all 3 processes are concurrent so X will get semaphore a, Y will get b and Z will get c, now X is blocked for b, Y is blocked for c, Z gets d and blocked for a. Thus it will lead to deadlock.
    Similarly one can figure out that for B) completion order is Z,X then Y.



  1. For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine.
  2. Turing recognizable languages are closed under union and complementation.
  3. Turing decidable languages are closed under intersection and complementation.
  4. Turing recognizable languages are closed under union and intersection.


Ans .

C


  1. Explanation :

    A recognizer of a language is a machine that recognizes that language. A decider of a language is a machine that decides that language.
    Both types of machine halt in the Accept state on strings that are in the language
    A Decider also halts if the string is not in the language
    A Recogizer MAY or MAY NOT halt on strings that are not in the language
    On all input:
    A Decider MUST halt (in Accept or Reject state)
    A Recogizer MAY or MAY NOT halt on some strings (Q: Which ones?)
    A language is Turing-decidable (or decidable) if some Turing machine decides it. Aka Recursive Language.
    A language is Turing-recognizable if some Turing machine recognizes it. Aka Recursively Enumerable Language.
    Recursive (Turing Decidable) languages are closed under following Kleene star, concatenation, union, intersection, complement and set difference.
    Recursively enumerable language are closed under Kleene star, concatenation, union, intersection. They are NOT closed under complement or set difference.



  1. The problem of determining whether there exists a cycle in an undirected graph is in P.
  2. The problem of determining whether there exists a cycle in an undirected graph is in NP.
  3. If a problem A is NP-Complete, there exists a non-deterministic polynomial time algorithm to solve A.


Ans .

A


  1. Explanation :

    1 is true because cycle detection can be done in polynomial time using DFS.
    2 is true because P is a subset of NP.
    3 is true because NP complete is also a subset of NP and NP means Non-deterministic Polynomial time solution exists.





Ans .

C


  1. Explanation :

    Time complexity of Bellman-Ford algorithm is O(VE) where V is number of vertices and E is number of edges. For a complete graph with n vertices, V = n, E = O(n^2). So overall time complexity becomes O(n^3)





Ans .

A


  1. Explanation :

    Number of sets in cache = v. So, main memory block j will be mapped to set (j mod v), which will be any one of the cache lines from (j mod v) * k to (j mod v) * k + (k-1). (Associativity plays no role in mapping- k-way associativity means there are k spaces for a block and hence reduces the chances of replacement.)





Ans .

D


  1. Explanation :

    It is a simple De Morgan's laws question.





Ans .

A


  1. Explanation :

    A function is continuous at some point c, Value of f(x) defined for x > c = Value of f(x) defined for x < c = Value of f(x) defined for x = c All values are 2 in option A



"


Ans .

D


  1. Explanation :

    Apply Trapezoidal rule.





Ans .

C


  1. Explanation :

    Q is true: Since the graph is undirected, every edge increases the sum of degrees by 2. P is true: If we consider sum of degrees and subtract all even degrees, we get an even number (because Q is true). So total number of odd degree vertices must be even.





Ans .

C


  1. Explanation :

    A cycle of length 3 can be formed with 3 vertices. There can be total 8C3 ways to pick 3 vertices from 8. The probability that there is an edge between two vertices is 1/2. So expected number of unordered cycles of length 3 = (8C3)*(1/2)^3 = 7





Ans .

C


  1. Explanation :

    M = 0 indicates that this packet is the last packet among all fragments of original packet. So the answer is either A or C.
    It is given that HLEN field is 10. Header length is number of 32 bit words. So header length = 10 * 4 = 40
    Also, given that total length = 400.
    Total length indicates total length of the packet including header.
    So, packet length excluding header = 400 - 40 = 360
    Last byte address = 2400 + 360 - 1 = 2759 (Because numbering starts from 0)





Ans .

A


  1. Explanation :

    Answer is "No Change"
    Cohesion refers to the degree to which the elements of a module belong together.
    Coupling is the manner and degree of interdependence between software modules
    Coupling between M1 and M2 = (Number of external links) / (Number of modules)
    = 2/2
    = 1 v Cohesion of a module = (Number of internal links) / (Number of methods)
    Cohesion of M1 = 8/4 = 2
    Cohesion of M2 = 6/3 = 2
    Coupling = 2/2 = 1
    Cohesion of M1 = 6/3 = 2
    Cohesion of M2 = 8/4 = 2





Ans .

C


  1. Explanation :

    purpose here is neither the deadlock should occur nor the binary semaphores be assigned value greater than one.
    A leads to deadlock
    B can increase value of semaphores b/w 1 to n
    D may increase the value of semaphore R and S to 2 in some cases



  1. Cannot be merged since look aheads are different.
  2. Can be merged but will result in S-R conflict.
  3. Can be merged but will result in R-R conflict.
  4. Cannot be merged since goto on c will lead to two different sets.


Ans .

D


  1. Explanation :

    The given two LR(1) set of items are :
    X -> c.X, c/d
    X -> .cX, c/d
    X -> .d, c/d
    and
    X -> c.X, $
    X -> .cX, $
    X -> .d, $
    The symbols/terminals after the comma are Look-Ahead symbols.
    These are the sets of LR(1) ( LR(1) is also called CLR(1) ) items.
    The LALR(1) parser combines those set of LR(1) items which are identical with respect to their 1st component but different with respect to their 2nd component.
    In a production rule of a LR(1) set of items, ( A -> B , c ) , A->B is the 1st component , and the Look-Ahead set of symbols, which is c here, is the second component.
    Now we can see that in the sets given, 1st component of the corresponding production rule is identical in both sets, and they only differ in 2nd component ( i.e. their look-ahead symbols) hence we can combine these sets to make a a single set which would be :
    X -> c.X, c/d/$
    X -> .cX, c/d/$
    X -> .d, c/d/$
    This is done to reduce the total number of parser states.
    Now we can check the statements given.
    Statement 1 : The statement is false, as merging has been done because 2nd components i.e. look-ahead were different.
    Statement 2 : In the merged set, we can't see any Shift-Reduce conflict ( because no reduction even possible, reduction would be possible when a production of form P -> q. is present)
    Statement 3 : In the merged set, we can't see any Reduce-Reduce conflict ( same reason as above, no reduction even possible, so no chances of R-R conflict )
    Statement 4: This statement is also wrong, because goto is carried on Non-Terminals symbols, not on terminal symbols, and c is a terminal symbol.
    Thus, all statements are wrong, hence option D.





Ans .

D


  1. Explanation :

    First is Emptiness for CFG; whether a CFG is empty or not, this problem is decidable.
    Second is everything for CFG; whether a CFG will generate all possible strings (completeness of CFG), this problem is undecidable.
    Third is Regularity for REC; whether language generated by TM is regular is undecidable.
    Fourth is equivalence for regular; whether language generated by DFA and NFA are same is decidable.
    Second and third will be undecidable.
    Hence, option (D) is Correct.





Ans .

All


  1. Explanation :





Ans .

D


  1. Explanation :

    In order to construct a binary tree from given traversal sequences, one of the traversal sequence must be Inorder. The other traversal sequence can be either Preorder or Postorder. We know that the Inorder traversal of Binary Search Tree is always in ascending order so the Inorder Traversal would be the ascending order of given Preorder traversal i.e 10, 15, 20, 23, 25, 30, 35, 39, 42.Now we have to construct a tree from given Inorder and Preorder traversals.





Ans .

B


  1. Explanation :

    Pipeline will have to be stalled till Ei stage of l4 completes, as Ei stage will tell whether to take branch or not.
    After that l4(WO) and l9(Fi) can go in parallel and later the following instructions.
    So, till l4(Ei) completes : 7 cycles * (10 + 1 ) ns = 77ns
    From l4(WO) or l9(Fi) to l12(WO) : 8 cycles * (10 + 1)ns = 88ns
    Total = 77 + 88 = 165 ns





Ans .

A


  1. Explanation :





Ans .

B


  1. Explanation :

    RAM chip size = 1k x 8[1024 words of 8 bits each]
    RAM to construct =16k x 16
    Number of chips required = (16k x 16)/ ( 1k x 8) = (16 x 2)
    [16 chips vertically with each having 2 chips horizontally]
    So to select one chip out of 16 vertical chips, we need 4 x 16 decoder.
    Available decoder is 2 x 4 decoder
    To be constructed is 4 x 16 decoder
    Hence 4 + 1 = 5 decoders are required.





Ans .

All


  1. Explanation :





Ans .

D


  1. Explanation :

    F(x) ==> x is my friend
    P(x) ==> x is perfect
    D is the correct answer.
    A. There exist some friends which are not perfect
    B. There are some people who are not my friend and are perfect
    C. There exist some people who are not my friend and are not perfect.
    D. There doesn't exist any person who is my friend and perfect





Ans .

A


  1. Explanation :





Ans .

D


  1. Explanation :

    MBR - Memory Buffer Register ( that stores the data being transferred to and from the immediate access store)
    MAR - Memory Address Register ( that holds the memory location of data that needs to be accessed.)
    PC - Program Counter ( It contains the address of the instruction being executed at the current time )
    The 1st instruction places the value of PC into MBR
    The 2nd instruction places an address X into MAR.
    The 3rd instruction places an address Y into PC.
    The 4th instruction places the value of MBR ( which was the old PC value) into Memory.
    Now it can be seen from the 1st and the 4th instructions, that the control flow was not sequential and the value of PC was stored in the memory, so that the control can again come back to the address where it left the execution.
    This behavior is seen in the case of interrupt handling. And here X can be the address of the location in the memory which contains the beginning address of Interrupt service routine.
    And Y can be the beginning address of Interrupt service routine.
    In case of conditional branch (as for option C ) only PC is updated with the target address and there is no need to store the old PC value into the memory.
    And in the case of Instruction fetch and operand fetch ( as for option A and B), PC value is not stored anywhere else.
    Hence option D.





Ans .


  1. Explanation :

    42797KB will take 85512 sectors (42797*1024 bytes / 512 bytes)
    Since there are 64 sectors per surface, 85512/64 = 1337.406 sectors are required, so we take 1338 sectors these sectors are distributed among 16 surfaces, so 1338/16 = 83.58 cylinders will be required.
    So the final ans will be 84+1200 = 1284.
    one more fact to be noted is that the file occupies 83.58 cylinders, but the 0.58 cannot be accommodated in the first one (the file storage starts from ). Hence, the file will be extended to 194 (85594-85400) more bytes of cylinder 1284.





Ans .

C


  1. Explanation :





Ans .

B


  1. Explanation :

    Here we have to tell the value of k returned not the time complexity.
    for (i = n/2; i <= n; i++)
    for (j = 2; j <= n; j = j * 2)
    k = k + n/2;
    return k;
    The outer loop runs n/2 times
    The inner loop runs logn times.(2^k = n => k = logn).
    Now looking at the value of k in inner loop, n is added to k, logn times as the inner loop is running logn times.
    Therefore the value of k after running the inner loop one time is n*logn.
    Therefore total time complexity is inner multiplied with outer loop complexity which (n for outer and nlogn for inner) n^2logn.





Ans .

D


  1. Explanation :

    (D) is false.
    L1 is regular, so its complement would also be regular.
    L1 is a regular language of the form 0^* 1^* 0^*. L2 on the other hand is a CFL as it can be derived from the following CFG
    L2 = { 0^p 1^q 0^r | p,q,r>0 And p notEqualTo r }
    S -> AC|CA
    C -> 0C0|B
    A -> 0A|0
    B -> 1B|epsilon
    If coming up with a CFG for L2 is difficult, one can intuitively see that by reducing it to a simpler problem. L2 is very similar to a known CFL L3 = { a^m b^l | m notEqualTo n }
    (A) L2 is context free, which is true [CORRECT]
    (B) L1 intersection L2 is context free, which is again true because L1 is a regular language and L2 is a CFL. RL union CFL is always a CFL. Hence [CORRECT]
    (C) Complement of L2 is recursive, which is true due to the fact that complement of a CFL is CSL for sure (Context sensitive language), which in turn (CSL) is a subset of recursive languages. Hence [CORRECT]
    (D) Complement of L1 is context free but not regular, which is false due to closure laws of regular languages. Complement of a RL is always a RL. Hence [INCORRECT]





Ans .

D


  1. Explanation :

    is true. L(A) is regular, its complement would also be regular. A regular language is also context free.
    2 is true.
    3 is false, the DFA can be minimized to two states. Where the second state is final state and we reach second state after a 0.
    4 is clearly false as the DFA accepts a single 0.





Ans .

D


  1. Explanation :

    Since initial value of semaphore is 2, two processes can enter critical section at a time- this is bad and we can see why.
    Say, X and Y be the processes.X increments x by 1 and Z decrements x by 2. Now, Z stores back and after this X stores back. So, final value of x is 1 and not -1 and two Signal operations make the semaphore value 2 again. So, now W and Z can also execute like this and the value of x can be 2 which is the maximum possible in any order of execution of the processes. (If the semaphore is initialized to 1, processed would execute correctly and we get the final value of x as -2.)
    Option (D) is the correct answer.





Ans .

A


  1. Explanation :

    Option A: This is a SQL query expression. It first perform a cross product of Students and Registration, then WHERE clause only keeps those rows in the cross product set where the student is registered for course no 107, and percentage is > 90. Then select distinct statement gives the distinct names of those students as the result set.
    Option B: This is a relational algebra expression. It first perform a NATURAL JOIN of Students and Registration (NATURAL JOIN implicitly joins on the basis of common attribute, which here is rollno ), then the select operation( sigma) keeps only those rows where the student is registered for courseno 107, and percentage is > 90. And then the projection operation (pi) projects only distinct student names from the set.
    Note: Projection operation (pi) always gives the distinct result.
    Option C: This is a Tuple Relational Calculus (TRC) language expression, It is not a procedural language (i.e. it only tells "what to do", not "how to do"). It just represents a declarative mathematical expression.
    Here T is a Tuple variable.
    From left to right, it can be read like this, "It is a set of tuples T, where, there exists a tuple S in Relation Students, and there exist a tuple R in relation Registration, such that S.rollno = R.rollno AND R.couseno = 107 AND R.percent > 90 AND T.sname = S.sname". And the schema of this result is (sname), i.e. each tuple T will contain only student name, because only T.sname has been defined in the expression.
    As TRC is a mathematical expression, hence it is expected to give only distinct result set.
    Option D: This is a Domain Relational Calculus (DRC) language expression. This is also not procedural. Here SN is a Domain Variable. It can be read from left to right like this "The set of domain variable SN, where, there exist a domain variable SR , and a domain variable Rp, such that, SN and SR domain variables is in relation Students and SR,107,RP is a domain variables set in relation Registration, AND RP > 90"
    Above, SN represents sname domain attribute in Students relation, SR represents rollno domain attribute in Students relation, and RP represents percentage domain attribute in Registration relation.
    The schema for the result set is (SN), i.e. only student name.
    As DRC is a mathematical expression, hence it is expected to give only distinct result set.





Ans .

B


  1. Explanation :

    Data should be transmitted at the rate of 500 Mbps.
    Transmission Time >= 2*Propagation Time
    => 10000/(500*1000000) lenght = 2km (max)
    so, answer will be: (B) 2km





Ans .

C


  1. Explanation :





Ans .

B


  1. Explanation :





Ans .

B


  1. Explanation :





Ans .

B


  1. Explanation :

    r1......r2
    a.......b......c = a + b
    a.......c......x = c * c
    a.......x......but we will have to store c in mem as we don't know if x > a ................. or not
    y.......x......y = a * a
    choosing the best case of x > a , min spills = 1





Ans .

B


  1. Explanation :





Ans .

A


  1. Explanation :

    The table is not in 2nd Normal Form as the non-prime attributes are dependent on subsets of candidate keys.
    The candidate keys are AD, BD, ED and FD. In all of the following FDs, the non-prime attributes are dependent on a partial candidate key.
    A -> BC
    B -> CFH
    F -> EG





Ans .

A


  1. Explanation :





Ans .

C


  1. Explanation :





Ans .

C


  1. Explanation :

    The correct sentence is "She is a European."
    'an' applies to those words which get pronounced with a, e, i, o, u.
    Here pronunciation is "Yuropean" ( E-silent; has a "Y" sound) , similar to ' a University'.
    Hence a European.





Ans .

C


  1. Explanation :

    This is a decreasing arithmetic progression with difference as 2. The series is 44, 42, 40.... 0, -2, -4...
    The sum would be maximum if we consider the series till 0 or 2. So sum would be 506 using the AP Sum formula





Ans .

A


  1. Explanation :





Ans .

B


  1. Explanation :

    Nadir means below
    1. Astronomy A point on the celestial sphere directly below the observer, diametrically opposite the zenith.
    2. The lowest point: the nadir of their fortunes.





Ans .

A


  1. Explanation :

    Diffuseness means to spreading widely.





Ans .

B


  1. Explanation :

    The Series can be re-written as
    (v2-v1)/(v2+v1)(v2-v1) + (v3-v2)/(v2+v2)(v3-v2) + .....
    which simplifies to (v2-v1) + (v3-v2) + ..... (v81-v80)
    which again simplifies to
    v81 - v1
    which is 8





Ans .

D


  1. Explanation :

    There are total 90 two digit numbers, out of them 13 are divisible by 7, these are 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98.
    Therefore, probability that selected number is not divisible by 7 = 1 - 13/90 = 77/90.
    So, option (D) is true.





Ans .


  1. Explanation :

    None of A, B and C make sense.
    Only option D "No adversity justifies giving up hope" is related to the given information.





Ans .

C


  1. Explanation :

    Let total distance be D
    Total Time = D(1/2*60 + 1/4*30 + 1/4*10) = D/24
    Average Speed = Total distance / Total time = 24





Ans .

B


  1. Explanation :

    Cost is proportional to wages per day and number of hours.
    Wages are increased by 1/5 and working hours are decreased by 1/24.
    So the cost becomes (current cost)*(1+1/5)*(1-/24) = 13200*(6/5)*(23/24) = 15180