Computer Science & Information Technology (CS) 2017 [Session 1]
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.
I. $p \Rightarrow q$
II. $q \Rightarrow p$
III. $(\neg q) \vee p$
IV. $(\neg p) \vee q$
I. $\exists y(\exists x R(x, y))$
II. $\exists y(\forall x R(x, y))$
III. $\forall y(\exists x R(x, y))$
IV. $\neg \exists x(\forall y \neg R(x, y))$
Consider the following table:
| Algorithms | Design Paradigms |
| (P) Kruskal | (i) Divide and Conquer |
| (Q) Quicksort | (ii) Greedy |
| (R) Floyd-Warshall | (iii) Dynamic Programming |

Note: The height of a tree with a single node is 0.
typedef struct node {
int data;
node* next;
} node;
void join(node* m, node* n) {
node* p = n;
while(p->next != NULL) {
p = p->next;
}
p->next = m;
}
Assuming that m and n point to valid NULL-terminated linked lists, invocation of join will
\[S \to abScT \mid abcT\]
\[T \to bT \mid b\]
Which one of the following represents the language generated by the above grammar?
struct data {
int marks [100];
char grade;
int cnumber;
};
struct data student;
The base address of student is available in register R1. The field student.grade can be accessed efficiently using
\[ \begin{array}{l} p = a - b \\ q = p * c \\ p = u * v \\ q = p + q \end{array} \]
Which one of the following corresponds to a static single assignment form of the above code?
#include <stdio.h> int *assignval(int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval(x,0); if (x) { x = (int *)malloc(sizeof(int)); if (NULL == x) return; x = assignval(x,10); } printf("%d\n", *x); free(x); }
The code suffers from which one of the following problems:
Consider a TCP client and a TCP server running on two different machines. After completing data transfer, the TCP client calls close to terminate the connection and a FIN segment is sent to the TCP server. Server-side TCP responds by sending an ACK, which is received by the client-side TCP. As per the TCP connection state diagram (RFC 793), in which state does the client-side TCP connection wait for the FIN from the server-side TCP?

(I) S can launch a birthday attack to replace m with a fraudulent message.
(II) A third party attacker can launch a birthday attack to replace m with a fraudulent message.
(III) R can launch a birthday attack to replace m with a fraudulent message.
Which of the following are possible security violations?
\(V \rightarrow W\)
\(VW \rightarrow X\)
\(Y \rightarrow VX\)
\(Y \rightarrow Z\)
Which of the following is irreducible equivalent for this set of functional dependencies?

\(P \rightarrow xQRS\)
\(Q \rightarrow yz \mid z\)
\(R \rightarrow w \mid \epsilon\)
\(S \rightarrow y\)
What is FOLLOW(Q)?

Threads of a process share
| dc \ ba | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | X | X | ||
| 01 | 1 | X | ||
| 11 | 1 | 1 | ||
| 10 | X | X |
Assume for all inputs (a, b, c, d), the respective complements (ā, b̄, c̄, d̄) are also available. The above logic is implemented using 2-input NOR gates only. The minimum number of gates required is ______.

| EMP | ||
|---|---|---|
| EmpId | EmpName | DeptName |
| 1 | XYA | AA |
| 2 | XYB | AA |
| 3 | XYC | AA |
| 4 | XYD | AA |
| 5 | XYE | AB |
| 6 | XYF | AB |
| 7 | XYG | AB |
| 8 | XYH | AC |
| 9 | XYI | AC |
| 10 | XYJ | AC |
| 11 | XYK | AD |
| 12 | XYL | AD |
| 13 | XYM | AE |
| SELECT AVG(EC.Num) FROM EC WHERE (DeptName, Num) IN (SELECT DeptName, COUNT(EmpId) AS EC(DeptName, Num) FROM EMP GROUP BY DeptName) |
The output of executing the SQL query is ______.

| Process | Arrival time | Burst time |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 3 | 3 |
| P3 | 5 | 5 |
| P4 | 6 | 2 |
If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is ______ milliseconds.

(I) Minimum Spanning Tree of \(G\) is always unique.
(II) Shortest path between any two vertices of \(G\) is always unique.
Which of the above statements is/are necessarily true?
(I) One eigenvalue must be in \([-5, 5]\).
(II) The eigenvalue with the largest magnitude must be strictly greater than 5.
Which of the above statements about eigenvalues of \(A\) is/are necessarily CORRECT?

G1: S → aSb|T, T → cT|ϵ
G2: S → bSa|T, T → cT|ϵ
The language L(G1) ∩ L(G2) is
Which of the following are context-free languages?
I. L1 ∪ L2
II. L1 ∩ L2
Which of the following statements is true:
Recall that Belady's anomaly is that the page-fault rate may increase as the number of allocated frames increases. Now, consider the following statements:
- S1: Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady's anomaly
- S2: LRU page replacement algorithm suffers from Belady's anomaly
(I) {t | ∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∀ v ∈ DEPT(t[DeptId] ≠ v[DeptId]))}
(II) {t | ∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃v ∈ DEPT(t[DeptId] ≠ v[DeptId]))}
(III) {t | ∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃v ∈ DEPT(t[DeptId] = v[DeptId]))}
Which of the above queries are safe?
if \(TS(T_2) < TS(T_1)\) then
\(T_1\) is killed
else \(T_2\) waits.
Assume any transaction that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?
stmt -> if expr then expr else expr; stmt | 0
expr -> term relop term | term
term -> id | number
id -> a | b | c
number -> [0-9]
where relop is a relational operator (e.g., , ...). 0 refers to the empty statement, and if, then, else are terminals.
Consider a program P following the above grammar containing ten if terminals. The number of control flow paths in P is ________. For example, the program
if e1 then e2 else e3
has 2 control flow paths. e1 → e2 and e1 → e3.
Bit rate of the transmission channel = 1 Mbps.
Propagation delay from sender to receiver = 0.75 ms.
Time to process a frame = 0.25 ms.
Number of bytes in the information frame = 1980.
Number of bytes in the acknowledge frame = 20.
Number of overhead bytes in the information frame = 20.
Assume that there are no transmission errors. Then, the transmission efficiency (expressed in percentage) of the Stop-and-Wait ARQ protocol for the above parameters is ________ (correct to 2 decimal places).
| CR | |
|---|---|
| StudentName | CourseName |
| SA | CA |
| SA | CB |
| SA | CC |
| SB | CB |
| SB | CC |
| SC | CA |
| SC | CB |
| SC | CC |
| SD | CA |
| SD | CB |
| SD | CC |
| SD | CD |
| SE | CD |
| SE | CA |
| SE | CB |
| SF | CA |
| SF | CB |
| SF | CC |
\[ T1 \leftarrow \pi_{CourseName}(\sigma_{StudentName='SA'}(CR)) \]
\[ T2 \leftarrow CR \div T1 \]
The number of rows in T2 is __________.

| Instr. No. | Instruction |
|---|---|
| i | add R2, R3, R4 |
| i+1 | sub R5, R6, R7 |
| i+2 | cmp R1, R9, R10 |
| i+3 | beq R1, Offset |

(i) a naive pipeline implementation (NP) with 5 stages and
(ii) an efficient pipeline (EP) where the OF stage is divided into stages OF1 and OF2 with execution times of 12 ns and 8 ns respectively.
The speedup (correct to two decimal places) achieved by EP over NP in executing 20 independent instructions with no hazards is __________.
(0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, 257, 129)
is repeated 10 times. The number of conflict misses experienced by the cache is __________.
Rahul, Murali, Srinivas and Arul are seated around a square table. Rahul is sitting to the left of Murali. Srinivas is sitting to the right of Arul. Which of the following pairs are seated opposite each other?
Which of the following statements best reflects the author’s opinion?
Six people are seated around a circular table. There are at least two men and two women. There are at least three right-handed persons. Every woman has a left-handed person to her immediate right. None of the women are right-handed. The number of women at the table is
The expression \(\frac{(x+y)-|x-y|}{2}\) is equal to
Arun, Gulab, Neel and Shweta must choose one shirt each from a pile of four shirts coloured red, pink, blue and white respectively. Arun dislikes the colour red and Shweta dislikes the colour white. Gulab and Neel like all the colours. In how many different ways can they choose the shirts so that no one has a shirt with a colour he or she dislikes?

Showing 5 of 65 questions