Computer Science & Information Technology (CS) 2007
Review the key details, then start the test when you are ready. You can also open the full package to see related papers.
Paper pattern & analysis
Available question types, difficulty and classifications for this paper.
Topic distribution
Subtopic distribution
Difficulty distribution
Question type distribution
Practise paper questions
Choose your answer to check it. Log in to view the explanation. For a timed attempt and result, start the exam.
P. \( f(x) \) is continuous for all real values of \( x \)
Q. \( f(x) \) is differentiable for all real values of \( x \)
Which of the following is TRUE?
Let G be the non-planar graph with the minimum possible number of edges. Then G has
[Image of a DAG]
Which of the following is NOT a topological ordering?

Which of the following problems is undecidable?
Which of the following is TRUE?
How many 3-to-8 line decoders with an enable input are needed to construct a 6-to-64 line decoder without using any other logic gates?
\( f(w,x,y,z) = \sum (1,3,4,6,9,11,12,14) \)
The function is
Consider a 4-way set associative cache consisting of 128 lines with a line size of 64 words. The CPU generates a 20-bit address of a word in main memory. The number of bits in the TAG, LINE and WORD fields are respectively:
Consider a disk pack with 16 surfaces, 128 tracks per surface and 256 sectors per track. 512 bytes of data are stored in a bit serial manner in a sector. The capacity of the disk pack and the number of bits required to specify a particular sector in the disk are respectively:
The maximum number of binary trees that can be formed with three unlabeled nodes is:
Which of the following sorting algorithms has the lowest worst-case complexity?
int j, n;
j = 1;
while (j j = j*2;
The number of comparisons made in the execution of the loop for any \( n > 0 \) is:
Group 1 contains some CPU scheduling algorithms and Group 2 contains some applications. Match entries in Group 1 to entries in Group 2.
| Group 1 | Group 2 |
|---|---|
| P. Gang Scheduling | 1. Guaranteed Scheduling |
| Q. Rate Monotonic Scheduling | 2. Real-time Scheduling |
| R. Fair Share Scheduling | 3. Thread Scheduling |
Consider the following statements about user level threads and kernel level threads. Which one of the following statements is FALSE?
Which one of the following is a top-down parser?
In Ethernet when Manchester encoding is used, the bit rate is:
Which one of the following uses UDP as the transport protocol?
Which of the following graphs has an Eulerian circuit?

Which of the following languages is regular?
Suppose only one multiplexer and one inverter are allowed to be used to implement any Boolean function of n variables. What is the minimum size of the multiplexer needed?
| Clear | Clock | Load | Count | Function |
|---|---|---|---|---|
| 1 | X | X | X | Clear to 0 |
| 0 | X | 0 | 0 | No change |
| 0 | ↑ | 1 | X | Load input |
| 0 | ↑ | 0 | 1 | Count next |

IF: Instruction Fetch
ID: Instruction Decode and Operand Fetch
EX: Execute
WB: Write Back
The IF, ID and WB stages take one clock cycle each to complete the operation. The number of clock cycles for the EX stage depends on the instruction. The ADD and SUB instructions need 1 clock cycle and the MUL instruction needs 3 clock cycles in the EX stage. Operand forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions?
ADD R2, R1, R0 R2 ← R1 + R0
MUL R4, R3, R2 R4 ← R3 * R2
SUB R6, R5, R4 R6 ← R5 – R4
8 2 3 ^ / 2 3 * + 5 1 * –
Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are:
d b e a f c g and a b d e c f g, respectively.
The postorder traversal of the binary tree is
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity, by
int f(int n)
{static int r=0;
if (n if (n > 3)
{r = n;
return f(n-2) + 2;}
return f(n-1) + r;
}
What is the value of f(5)?
int gcd(n,m)
{
if (n%m == 0) return m;
n = n%m;
return gcd(m,n);
}
How many recursive calls are made by this function?
int DoSomething (int n){
if (n return 1;
else
return (DoSomething(floor(sqrt(n))) + n);
}
struct CellNode {
struct CellNode *leftChild;
int element;
struct CellNode *rightChild;
};
int GetValue(struct CellNode *ptr) {
int value = 0;
if (ptr != NULL) {
if ((ptr->leftChild == NULL) &&
(ptr->rightChild == NULL))
value = 1;
else
value = value + GetValue(ptr->leftChild)
+ GetValue(ptr->rightChild);
}
return(value);
}
The value returned by GetValue when a pointer to the root of a binary tree is passed as its argument is:
Consider the process of inserting an element into a Max Heap, where the Max Heap is represented by an array. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of comparisons performed is:
Which of the following is TRUE about formulae in Conjunctive Normal Form?
Let w be the minimum weight among all edge weights in an undirected connected graph. Let e be a specific edge of weight w. Which of the following is FALSE?
An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is TRUE about the number of comparisons needed?
int IsPrime(n)
{
int i, n;
for(i=2; iif(n%i == 0)
{printf(“Not Prime\n”); return 0;}
return 1;
}
Let T(n) denote the number of times the for loop is executed by the program on input n. Which of the following is TRUE?
S → iCtSS₁ | a
S₁ → eS | ε
C → b
The grammar is NOT LL(1) because:
P: Every regular grammar is LL(1)
Q: Every regular set has a LR(1) grammar
Which of the following is TRUE?
OP Ri,Rj - Performs Ri OP Rj and stores the result in register Ri.
OP m,Ri - Performs val OP Ri and stores the result in Ri. val denotes the content of memory location m.
MOV m,Ri - Moves the content of memory location m to register Ri.
MOV Ri,m - Moves the content of register Ri to memory location m.
The computer has only two registers, and OP is either ADD or SUB. Consider the following basic block:
t1 = a + b
t2 = c + d
t3 = e – t2
t4 = t1 – t3
Assume that all operands are initially in memory. The final value of the computation should be in memory. What is the minimum number of MOV instructions in the code generated for this basic block?
An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes:
| Process | Execution time | Arrival time |
|---|---|---|
| P1 | 20 | 0 |
| P2 | 25 | 15 |
| P3 | 10 | 30 |
| P4 | 15 | 45 |
P: Increasing the number of page frames allocated to a process sometimes increases the page fault rate.
Q: Some programs do not exhibit locality of reference.
Which one of the following is TRUE?
| alloc | request | |||||
|---|---|---|---|---|---|---|
| X | Y | Z | X | Y | Z | |
| P0 | 1 | 2 | 1 | 1 | 0 | 3 |
| P1 | 2 | 0 | 1 | 0 | 1 | 2 |
| P2 | 2 | 2 | 1 | 1 | 2 | 0 |
/* P1 */
while (true) {
wants1 = true;
while (wants2==true);
/* Critical Section */
wants1=false;
}
/* Remainder section */
/* P2 */
while (true) {
wants2 = true;
while (wants1==true);
/* Critical Section */
wants2=false;
}
/* Remainder section */
Here, wants1 and wants2 are shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?
ΠCourseId((ΠstudId(σsex=‘female’(studInfo)) × ΠcourseId(enroll)) − enroll)
{e.name | employee(e) ∧
(∀x) [¬employee(x) ∨ x.supervisorName ≠ e.name ∨ x.sex = “male”]}
Q1: Select e.empId
From employee e
Where not exists
(Select * From employee s Where s.department = “5” and s.salary >= e.salary)
Q2: Select e.empId
From employee e
Where e.salary > Any
(Select distinct salary From employee s Where s.department = “5”)
Which one of the following statements is FALSE?
S1: r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X)
S2: r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X)
There are n stations in a slotted LAN. Each station attempts to transmit with a probability p in each time slot. What is the probability that ONLY one station transmits in a given time slot?
In a token ring network the transmission speed is 107 bps and the propagation speed is 200 metres/μs. The 1-bit delay in this network is equivalent to:
The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet?
The distance between two stations M and N is L kilometres. All frames are K bits long. The propagation delay per kilometre is t seconds. Let R bits/second be the channel capacity. Assuming that processing delay is negligible, the minimum number of bits for the sequence number field in a frame for maximum utilization, when the sliding window protocol is used, is:
P. SMTP 1. Application layer
Q. BGP 2. Transport layer
R. TCP 3. Data link layer
S. PPP 4. Network layer
5. Physical layer
Assume that the memory is word addressable. After the execution of this program, the content of memory location 2010 is

The minimum state automaton equivalent to the above FSA has the following number of states
For the correct answer string to Q.78, how many derivation trees are there?
Which of the following lines of the data cache will be replaced by new blocks in accessing the array for the second time?
Least Recently Used (LRU) page replacement policy is a practical approximation to optimal page replacement. For the above reference string, how many more page faults occur with LRU than with the optimal page replacement policy?
Showing 5 of 85 questions