Computer Science & Information Technology (CS) 2008
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.
\[ \begin{aligned} x_1 + x_2 + 2x_3 &= 1 \\ x_1 + 2x_2 + 3x_3 &= 2 \\ x_1 + 4x_2 + \alpha x_3 &= 4 \end{aligned} \]
has a unique solution. The only possible value(s) for \(\alpha\) is/are
In the IEEE floating point representation the hexadecimal value 0x00000000 corresponds to

The most efficient algorithm for finding the number of connected components in an undirected graph on n vertices and m edges has time complexity
\[ \begin{aligned} f_1 &= \Sigma m (4, 5, 6, 7, 8) \\ f_2 &= \Sigma m (1, 6, 15) \\ f &= \Sigma m (1, 6, 8, 15) \end{aligned} \]
then \(f_2\) is

I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free
Which of the following describes a handle (as applicable to LR-parsing) appropriately?
What is the maximum size of data that the application layer can pass on to the TCP layer below?
I. \(\neg \exists t \in r (P(t))\)
II. \(\exists t \in r (P(t))\)
III. \(\neg \exists t \in r (\neg P(t))\)
IV. \(\exists t \in r (\neg P(t))\)
A clustering index is defined on the fields which are of type
Which of the following system calls results in the sending of SYN packets?
\[ a = ( x > y ) ? ( ( x > z ) ? x : z ) : ( ( y > z ) ? y : z ) \]
The Breadth First Search algorithm has been implemented using the queue data structure. One possible order of visiting the nodes of the following graph is

The data blocks of a very large file in the Unix file system are allocated using
Each finite state automaton has an equivalent pushdown automaton.
I. $P \vee \neg Q$
II. $\neg(\neg P \wedge Q)$
III. $(P \wedge Q) \vee (P \wedge \neg Q) \vee (\neg P \wedge \neg Q)$
IV. $(P \wedge Q) \vee (P \wedge \neg Q) \vee (\neg P \wedge Q)$
For a magnetic disk with concentric circular tracks, the seek latency is not linearly proportional to the seek distance due to
I. It is useful in creating self-relocating code.
II. If it is included in an Instruction Set Architecture, then an additional ALU is required for effective address calculation.
III. The amount of increment depends on the size of the data item accessed.
I. It must be a trap instruction.
II. It must be a privileged instruction.
III. An exception cannot be allowed to occur during execution of an RFE instruction.
I. L1 must be a write-through cache
II. L2 must be a write-through cache
III. The associativity of L2 must be greater than that of L1
IV. The L2 cache must be at least as large as the L1 cache
Which of the following are NOT true in a pipelined processor? I. Bypassing can handle all RAW hazards. II. Register renaming can eliminate all register carried WAR hazards. III. Control hazard penalties can be eliminated by dynamic branch prediction.
I. function locals and parameters
II. register saves and restores
III. instruction fetches
In an instruction execution pipeline, the earliest that the data TLB (Translation Lookaside Buffer) can be accessed is
$f(n) = 2^n$,
$g(n) = n!$,
$h(n) = n^{\log n}$
Which of the following statements about the asymptotic behaviour of $f(n), g(n)$, and $h(n)$ is true?
An algorithm Q solves this problem in $O(nW)$ time. Which of the following statements is false?

Which of the following statements is false?
Y:
| a | b | |
|---|---|---|
| → 1 | 1 | 2 |
| 2 (F) | 2 | 1 |
Z:
| a | b | |
|---|---|---|
| → 1 | 2 | 2 |
| 2 (F) | 1 | 1 |
Which of the following represents the product automaton Z × Y?
I. Every left-recursive grammar can be converted to a right-recursive grammar and vice-versa
II. All ε-productions can be removed from any context-free grammar by suitable transformations
III. The language generated by a context-free grammar all of whose productions are of the form X → w or X → wY (where, w is a string of terminals and Y is a non-terminal), is always regular
IV. The derivation trees of strings generated by a context-free grammar in Chomsky Normal Form are always binary trees

I. {aⁿb²ᵐ | n ≥ 0, m ≥ 0}
II. {aⁿbᵐ | n = 2m}
III. {aⁿbᵐ | n ≠ m}
IV. {xcy | x, y ∈ {a, b}*}
I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation
II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions
III. Recursion in programming languages cannot be implemented with dynamic storage allocation
IV. Nesting of procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records
V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
In the slow start phase of the TCP congestion control algorithm, the size of the congestion window
If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet?
A computer on a 10Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 2Mbps. It is initially filled to capacity with 16 Megabits. What is the maximum duration for which the computer can transmit at the full 10Mbps?
A client process P needs to make a TCP connection to a server process S. Consider the following situation: the server process S executes a socket(), a bind() and a listen() system call in that order, following which it is preempted. Subsequently, the client process P executes a socket() system call followed by connect() system call to connect to the server process S. The server process has not executed any accept() system call. Which one of the following events could take place?
int f(int x, int *py, int **ppz) { int y, z; **ppz += 1; z = *ppz; *py += 2; y = *py; x += 3; return x+y+z; } void main() { int c, *b, **a; c = 4; b = &c; a = &b; printf("%d", f(c, b, a)); }
void reverse(void) { int c; if(??1) reverse(); ??2 } main() { printf("Enter Text"); printf("\n"); reverse(); printf("\n"); }
struct node { int value; struct node *next; }; void rearrange(struct node *list) { struct node *p, *q; int temp; if ((!list) || (!list -> next)) return; p = list; q = list -> next; while (q) { temp = p -> value; p -> value = q -> value; q -> value = temp; p = q -> next; q = p ? p -> next : 0; } }
P(s): s = s - 1;
if s < 0 then wait;
V(s): s = s + 1;
if s <= 0 then wakeup a process waiting on s;
Assume that Pb and Vb the wait and signal operations on binary semaphores are provided. Two binary semaphores xb and yb are used to implement the semaphore operations P(s) and V(s) as follows:
P(s) : Pb(xb);
s = s - 1;
if (s < 0) {
Vb(xb);
Pb(yb);
}
else Vb(xb);
V(s) : Pb(xb);
s = s + 1;
if (s <= 0) Vb(yb);
Vb(xb);
The initial values of xb and yb are respectively
Which of the following statements about synchronous and asynchronous I/O is NOT true?
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes?
for(i=0; i<n; i++) fork();
The total number of child processes created is
• bits 30-31 are used to index into the first level page table.
• bits 21-29 are used to index into the second level page table.
• bits 12-20 are used to index into the third level page table, and
• bits 0-11 are used as offset within the page.
The number of bits required for addressing the next level page table (or page frame) in the page table entry of the first, second and third level page tables are respectively
R(P, Q, R1, R2, R3)
S(P, Q, S1, S2)
where {P,Q} is the key for both schemas. Which of the following queries are equivalent?
I. \(\Pi_P (R \bowtie S)\)
II. \(\Pi_P (R) \bowtie \Pi_P(S)\)
III. \(\Pi_P (\Pi_{P,Q} (R) \cap \Pi_{P,Q} (S))\)
IV. \(\Pi_P (\Pi_{P,Q} (R) - (\Pi_{P,Q} (R) - \Pi_{P,Q} (S)))\)
Book (Title, Author, Catalog_no, Publisher, Year, Price)
Collection (Title, Author, Catalog_no)
with the following functional dependencies:
I. Title Author → Catalog_no
II. Catalog_no → Title Author Publisher Year
III. Publisher Title Year → Price
Assume {Author,Title} is the key for both schemes. Which of the following statements is true?
Which of the following array elements has the same cache index as ARR [0] [0]?
The cache hit ratio for this initialization loop is
I1: ADD R2 ← R7 + R8
I2: SUB R4 ← R5 – R6
I3: ADD R1 ← R2 + R3
I4: STORE Memory[R4] ← R1
BRANCH to Label if R1 == 0
Which of the instructions I1, I2, I3 or I4 can legitimately occupy the delay slot without any other program modification?
Let \(x_n\) denote the number of binary strings of length \(n\) that contain no consecutive 0s.
Which of the following recurrences does \(x_n\) satisfy?
The subset-sum problem is defined as follows. Given a set of \(n\) positive integers, \(S = \{a_1, a_2, a_3, \dots, a_n\}\), and a positive integer \(W\), is there a subset of \(S\) whose elements sum to \(W\)? A dynamic program for solving this problem uses a 2-dimensional Boolean array, \(X\), with \(n\) rows and \(W+1\) columns. \(X[i, j]\), \(1 \le i \le n\), \(0 \le j \le W\), is TRUE if and only if there is a subset of \(\{a_1, a_2, \dots, a_i\}\) whose elements sum to \(j\).
Which of the following is valid for \(2 \le i \le n\) and \(a_i \le j \le W\)?
Consider the following ER diagram
The minimum number of tables needed to represent M,N,P,R1,R2 is

Which of the following is a correct attribute set for one of the tables for the correct answer to the above question?
Consider the following C program that attempts to locate an element x in an array Y[ ] using binary search. The program is erroneous.
1. f(int Y[10], int x) {
2. int i, j, k;
3. i = 0; j = 9;
4. do {
5. k = (i+j)/2;
6. if (Y[k] 7. } while ((Y[k] != x) && (i 8. if (Y[k] == x) printf("x is in the array");
9. else printf("x is not in the array");
10. }
On which of the following contents of Y and x does the program fail?
The correction needed in the program to make it work properly is
Showing 5 of 85 questions