GATE-CS-2009
Question 1 |
Commutativity | |
Associativity | |
Existence of inverse for every element | |
Existence of identity |
Discuss it
Question 2 |
What is the chromatic number of an n-vertex simple connected graph which does not contain any odd length cycle? Assume n >= 2.
n-1 | |
3 | |
2 | |
n |
Discuss it
The chromatic number of a graph is the smallest number of colours needed to colour the vertices of so that no two adjacent vertices share the same colour. These types of questions can be solved by substitution with different values of n.
1) n = 2

This simple graph can be coloured with 2 colours.
2) n = 3

Here, in this graph let us suppose vertex A is coloured with C1 and vertices B, C can be coloured with colour C2 => chromatic number is 2 In the same way, you can check with other values, Chromatic number is equals to 2
A simple graph with no odd cycles is bipartite graph and a Bipartite graph can be colored using 2 colors
Question 3 |
Which one of the following is TRUE for any simple connected undirected graph with more than 2 vertices?
No two vertices have the same degree. | |
At least two vertices have the same degree. | |
At least three vertices have the same degree. | |
All vertices have the same degree. |
Discuss it
Since the graph is simple, there must not be any self loop and parallel edges. Since the graph is connected, the degree of any vertex cannot be 0. Therefore, degree of all vertices should be from 1 to n-1. So the degree of at least two vertices must be same.
Question 4 |
R is symmetric but NOT antisymmetric | |
R is NOT symmetric but antisymmetric | |
R is both symmetric and antisymmetric | |
R is neither symmetric nor antisymmetric |
Discuss it
Question 5 |
(1217)16 | |
(028F)16 | |
(2297)10 | |
(0B17)16 |
Discuss it
Question 6 |
2 | |
3 | |
4 | |
5 |
Discuss it
Question 7 |
As soon as an interrupt is raised | |
By checking the interrupt register at the end of fetch cycle. | |
By checking the interrupt register after finishing the execution of the current instruction. | |
By checking the interrupt register at fixed time intervals. |
Discuss it
Question 8 |
FIFO | |
Optimal | |
LRU | |
MRU |
Discuss it
Question 9 |
Virtual page number | |
Page frame number | |
Both virtual page number and page frame number | |
Access right information |
Discuss it
A page table entry must contain Page frame number. Virtual page number is typically used as index in page table to get the corresponding page frame number. See this for details.
Question 10 |




Theta(n) | |
Theta(nLogn) | |
Theta(n*n) | |
Theta(n*nLogn) |
Discuss it
1. Find the minimum value in the list 2. Swap it with the value in the first position 3. Repeat the steps above for the remainder of the list (starting at the second position and advancing each time)As we can see from the algorithm, selection sort performs swap only after finding the appropriate position of the current picked element. So there are O(n) swaps performed in selection sort. Because swaps require writing to the array, selection sort is preferable if writing to memory is significantly more expensive than reading. This is generally the case if the items are huge but the keys are small. Another example where writing times are crucial is an array stored in EEPROM or Flash. There is no other algorithm with less data movement. References: http://en.wikipedia.org/wiki/Selection_sort