The above synchronous sequential circuit built using JK flip-flops is initialized with
Q2Q1Q0 = 000 The state sequence for this circuit for the next 3 clock cycles is
Which of the following statements are TRUE?
I. There exist parsing algorithms for some programming languages whose complexities are less than O(n^3) . II. A programming language which allows recursion can be implemented with static storage allocation. III. No L-attributed definition can be evaluated in the framework of bottom-up parsing. IV. Code improving transformations can be performed at both source language and intermediate code level.
Consider the following two sets of LR(1) items of an LR(1) grammar.
Set-1: X → c.X, c/d X → .cX, c/d X → .d, c/d Set-2: X → c.X, $ X →.cX, $ X →.d, $ Which of the following statements related to merging of the two sets in the corresponding LALR parser is/are FALSE? (1). Cannot be merged since look heads are different. (2). Can be merged but will result in S-R conflict. (3). Can be merged but will result in R-R conflict. (4). Cannot be merged since goto on c will lead to two different sets.
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaa
Which of the following statements is/are FALSE?
(1) For every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine. (2) Turing recognizable languages are closed under union and complementation. (3) Turing decidable languages are closed under intersection and complementation. (4) Turing recognizable languages are closed under union and intersection.
When there is a miss in L1 cache and a hit in L2 cache, a block is transferred from L2 cache to L1 cache. What is the time taken for this transfer?
A computer system has an L1 cache, an L2 cache, and a main memory unit connected as shown below. The block size in L1 cache is 4 words. The block size in L2 cache is 16 words. The memory access times are 2 nanoseconds. 20 nanoseconds and 200 nanoseconds for L1 cache, L2 cache and main memory unit respectively.
Consider the pseudocode given below. The function Dosomething () takes as argument a pointer to the root of an arbitrary tree represented by the left Most Child-right Sibling representation. Each node of the tree is of type tree Node.
Typedef struct treeNode* treeptr;
Struct treeNode
{
Treeptr leftMostchild, rightSibling;
};
Int Dosomething (treeptr tree)
Int value = 0;
if (tree! = NULL) {
If (tree → leftMostchild):
Value = value + Dosomething (tree → rightsibiling);
}
Return (value);
When the pointer to the root of a tree is passed as the argument to DoSomething, the value returned by the function corresponds to the
Consider the program below: The value printed is:
Consider the following combinational function block involving four Boolean variables x, y, a, b where x, a, b are inputs and y is the output.
f (x, y, a, b)
if (x is 1) y = a;
else y = b;
Which one of the following digital logic blocks is the most suitable for implementing this function?
Let U = {1,2,…,'}. Let 𝐴={(', ')| ' ∈ ', ' ⊆ '}. Consider the following two statements on |𝐴|.
I. |𝐴| = '2'−1
II.
Which of the above statements is/are TRUE?
Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read (P) and the write operation on data item P is denoted by write (P).
Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?
Let # be a binary operator defined as X#Y=X′+Y′ where X and Y are Boolean variables. Consider the following two statements. (S1)(P#Q)#R=P# (Q#R) (S2)Q#R=R#Q Which of the following is / are true for the Boolean variables P, Q and R?
Match the following:
List - I 1) Waterfall model 2) Evolutionary model 3) Component-based software engineering 4) Spiral development List - II a) Specifications can be developed incrementally b) Requirements compromises are inevitable c) Explicit recognition of risk d) Inflexible partitioning of the project into stages
Match the following according to input (from the left column) to the complier phase (in the right column) that processes it.
Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links.
[S1] The computational overhead in link state protocols is higher than in distance vector protocols. [S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol. [S3] After a topology change, a link state protocol will converge faster than a distance vector protocol. Which one of the following is correct about S1, S2, and S3?
Consider an instruction pipeline with five stages without any branch prediction: Fetch Instruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) and Write Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 ns and 6 ns, respectively. There are intermediate storage buffers after each stage and the delay of each buffer is 1 ns. A program consisting of 12 instructions I1, I2, I3, …, I12 is executed in this pipelined processor. Instruction I4 is the only branch instruction and its branch target is I9. If the branch is taken during the execution of this program, the time (in ns) needed to complete the program is
A sender S sends a message m to receiver R, which is digitally signed by S with its private key. In this scenario, one or more of the following security violations can take place.
(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?
Consider the following two statements.
S1: If a candidate is known to be corrupt, then he will not be elected
S2: If a candidate is kind, he will be elected
Which one of the following statements follows from S1 and S2 as per sound inference rules of logic ?
What will be the output of the following C program segment?
char inChar = ‘A’ ; switch ( inChar ) { case ‘A’ : printf (“Choice A\ n”) ; case ‘B’ : case ‘C’ : printf (“Choice B”) ; case ‘D’ : case ‘E’ : default : printf ( “ No Choice” ) ; }
Consider the decision problem 2CNFSAT defined as follows:
{ϕ | ϕ} is a satisfiable propositional formula in CNF with at most two literal per clause}
For example, is a Boolean formula and it is in 2CNFSAT.
The decision problem 2CNFSAT is
Consider the basic block given below.
a = b + c
c = a + d
d = b + c
e = d – b
a = e + b
The minimum number of nodes and edges present in the DAG representation of the above basic block respectively are
What is the return value of f(p, p) if the value of p is initialized to 5 before the call? Note that the first parameter is passed by reference, whereas the second parameter is passed by value.
int f(int &x, int c) { c = c - 1; if (c == 0) return 1; x = x + 1; return f(x, c) * x; }
Consider the set of all functions f : {0,1,…..,2014} → {0,1,…..,2014} such that f(f(i)) = I, for 0 ≤ i ≤ 2014. Consider the following statements.
P. For each such function it must be the case that for every i, f(i) = i,
Q. For each such function it must be the case that for some i, f(i) = i,
R. Each such function must be onto.
Which one of the following is CORRECT ?
Consider the directed graph given below:
Which one of the following is TRUE?
What is the complement of the language accepted by the NFA shown below?
Assume Σ = {a} and ε is the empty string.
The degree sequence of a simple graph is the sequence of the degrees of the nodes in the graph in decreasing order. Which of the following sequences cannot be the degree sequence of any graph?
I. 7, 6, 5, 4, 4, 3, 2, 1 II. 6, 6, 6, 6, 3, 3, 2, 2
III. 7, 6, 6, 4, 4, 3, 2, 2 IV. 8, 7, 7, 6, 4, 2, 1, 1
Let L be the language represented by the regular expression Σ∗0011Σ∗where = {0, 1}. What is the minimum number of states in a DFA that recognizes (complement of L)?