You are on page 1of 6

1. Which one of the following in NOT necessarily a property of a Group? A. Commutativity B. Associativity C.

Existence of inverse for every element Answer & Explanation Answer: Option A Explanation: Group is an algebraic system having property of closed under operation, associative, contain identity element and exist inverse of every element. Alternatively, A group(G*) is a monoid with identity e that the additional property that for every element a . G there exist an element a' G such that a * a' = a' * a =e. Thus group is set together with binary operation *. It follows property (i) Associativity: (a * b) * c = a *(b * c) (ii) Inverse for every element a * e = e * a for every a G (iii) Existance of identity: a * a' = a' * a 2. What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n = 2. A. 2 B. 3 D. n C. n-1 Answer & Explanation Answer: Option A Explanation: Chromatic Number of n-vertex simple connected undirected graph which doesnt contain any odd length cycle will be 2(n 2) A graph is bipartite graph if and only if doesnot contain any odd length cycle. The chromatic number of any bipartite graph is 2(why? lets say the partitions of the graph are A,B. Color all the vertices of partion A with same color say 1, Color all the vertices of partition B with same color say 2. So we can color the graph using 2 colors and at the same time we can not color any connected graph(n>2) with one color. Hence min no of colors required is 2 ). 3. Which one of the following is TRUE for any simple connected undirected graph with more than 2 vertices? A. No two vertices have the same degree. C. At least three vertices have the same degree. Answer & Explanation B. At least two vertices have the same degree. D. All vertices have the same degree. D. Existence of identity

Answer: Option B Explanation: Since the graph is connected it can not have a vertex of degree '0 and since the graph is simple(no self loops and parallel edges) it can not have degree more than n-1. Since every vertex can have a degree between 1 and n-1 which forces at least 2 vertices to have same degree(pigeon hole principle). 4. Consider the binary relation R = {(x,y), (x,z), (z,x), (z,y)} on the set {x,y,z}.Which one of the following is TRUE? A. R is symmetric but NOT antisymmetric B. R is NOT symmetric but antisymmetric D. R is neither symmetric nor C. R is both symmetric and antisymmetric antisymmetric Answer & Explanation Answer: Option D Explanation: R is not symmetric as it violates the definition of symmetry. R = {(x,y),(x,z),(z,x),(z,y)} <br if (a,b) ; R then (b,a) R to be symmetric but (x,y) R and (y,x) R So R is NOT symmetric. if (a,b) R then (b,a) R to be Antisymmetric but (x,z) R and (z,x) R. <br So R is NOT Antisymmetric. 5. (1217)8 is equivalent to A. (1217)16 C. (2297)10 Answer & Explanation Answer: Option B Explanation: (1217)8 =(001 010 001 111)8 = (0010 1000 1111) = (28F)16 = (028F)16. 6. What is the minimum number of gates required to implement the Boolean function (AB+C) if we have to use only 2-input NOR gates? A. 2 B. 3 C. 4 Answer & Explanation Answer: Option B D. 5

B. (028F)16 D. (0B17)16

Explanation: AB + C = (A+C)(B+C) hint: given expression ,for finding minimum nor gates always use product of sums form 7. How many 32K x 1 RAM chips are needed to provide a memory capacity of 256Kbytes? A. 8 B. 32 D. 128 C. 64 Answer & Explanation Answer: Option C Explanation: We need 256 Kbytes, i.e., 256 x 1024 x 8 bits. We have RAM chips of capacity 32 Kbits = 32 x 1024 bits. (256 * 1024 * 8)/(32 * 1024) = 64 8. A CPU generally handles an interrupt by executing an interrupt service routine A. As soon as an interrupt is raised C. By checking the interrupt register after finishing the execution of the current instruction. Answer & Explanation Answer: Option C Explanation: A CPU generally handles an interrupt by executing ISR by checking the interrupt register after finishing the execution of the current exection 9. In which one of the following page replacement policies, Belady's anomaly may occur? A. FIFO B. Optimal D. MRU C. LRU Answer & Explanation Answer: Option A Explanation: S The property that the set of pages in memory for n frames is always a subset of the set of pages that would be in memory with n + 1 frames is thus broken. That leads to Beladys anomaly for FIFO replacement algorithm. B. By checking the interrupt register at the end of fetch cycle. D. By checking the interrupt register at fixed time intervals.

FIFO may have Belady's Anamoly eg. In FIFO for three frames the reference string 1,2,3,4,1,2,5,1,2,3,4,5 There are 9 page faults and for four frames for the reference string there will be 10 faults. 10. The essential content (s) in each entry of a page table is / are A. Virtual page number B. Page frame number D. Access right information C. Both virtual page number and page frame number Answer & Explanation Answer: Option B Explanation: Page table is a linear array indexed by virtual page number that gives the physical page frame that contains that page. Page frame number is essential content in each entry of the page table Alternatively The page table has the ability to mark on entry invalid through a valid invalid bit or special value of protection bit, which is often called page frame number. 11. What is the number of swaps required to sort n elements using selection sort, in the worst case? A. q(n) B. q(n log n) C. q(n2) Answer & Explanation Answer: Option C Explanation: In each pass, there can be n swaps at most. For n elements, in the worst case n * n will be required. If there are n elements then in worse case, total swaps will be (n-1) in selection sort. So the number of swaps is (n). Alternatively The selection sort is similar to bubble sort except it does not swap elements with every move. The sorting algorithm first finds the smallest element in the list and then puts it in to place in single swap. So n swap required for n elements. 12. S -> aSa|bSb|a|b; The language generated by the above grammar over the alphabet {a,b} is the set of A. All palindromes. B. All odd length palindromes. C. Strings that begin and end with the same D. All even length palindromes. D. q(n2 log n)

symbol Answer & Explanation Answer: Option B Explanation: All the productions of S, starts and ends with the same symbol. So it generates all palindromes. And terminals productions of S contains a single terminal. So all the strings generated by S are of odd length. So it generates of all odd length palindromes. S -> aSa | bSb | a|b will generate all odd length palindromes e.g. S => aSa => abSba => abbSbba => abbabba 13. Which of the following statement (s) is / are correct regarding Bellman-Ford shortest path algorithm? P.Always finds a negative weighted cycle, if one exist s. Q.Finds whether any negative weighted cycle is reachable from the source. A. P only C. both P and Q Answer & Explanation Answer: Option B Explanation: The algorithm identifies a negative weight cycle iff it is reachable from Source. In Bellman Ford shortest path algorithm, we choose a node first and then we find any nagative weighted cycle as reachable from source. 14. Let pA be a problem that belongs to the class NP. Then which one of the following is TRUE? A. There is no polynomial time algorithm for pA. C. If pA is NP-hard, then it is NP-complete. Answer & Explanation Answer: Option C Explanation: B. If pA can be solved deterministically in polynomial time, then P = NP. D. pA may be undecidable. B. Q only D. Neither P nor Q

if A is NP-hard, then it is NP-Complete. Alternatively A be a problem(given) in class NP. We say that A is NP complete if the following statements are true about I. (1) A is in NP. (2) For every A' in NP there is polynomial reduction A' to A. 15. Which one of the following languages over the alphabet {0,1} is described by the regular expression: (0+1)*0(0+1)*0(0+1)*? A. The set of all strings containing the B. The set of all strings containing at substring 00. most two 0's. D. The set of all strings that begin C. The set of all strings containing at least two 0's. and end with either 0 or 1. Answer & Explanation Answer: Option C Explanation: R.E = (0+1) * 0(0+1) * 0(0+1)* Accepting language will be L = {00,000,100,001,010,0000,0001,1000,1001,0100,1100,0010,0011,0110,0101,1010,....} Atleast two zeros.

You might also like