Consider the following language L such that

L={ w | w ∈ {a,b}* & w is any string not in (a* U b*) }

The minimum number of states in the DFA which accepts L are ____

4
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider the following languages. [MSQ]

L1: { ww^R | w ∈ {a,b}* }

L2: { w^Rw | w ∈ {a,b}+ }

Consider a new language L3 such that L3= (L1 ⋂ L2). Select the correct option about L3.

L3 must be context free.
L3 cannot be regular.
L3 must be DCFL
L3 must be finite.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Assume the language L such that L contains all strings which has at least two “a’s”. Consider the following regular expressions.

R1: (a+b)* a (a+b)* a (a+b)*

R2: (a+b)* aa (a+b)*

Select the correct option.

Both R1 and R2 generate the language L.
R1 generates L while R2 does not generate L.
R2 generates L while R1 does not generate L.
Both R1 and R2 do not generate the language L.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a regular language L and two other languages L1 and L2 given below and strings x, y ∈ ∑*.

L1={ xy | x ∈ L & y ∉ L }

L2={ xy | x ∈ L & y ∈ L^R, where LR is the reverse of L}

Select the correct option

Both L1 and L2 are regular.
L1 is regular and L2 is non-regular.
L1 is non-regular and L2 is regular.
Both L1 and L2 are non-regular.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The pumping lemma says that every regular language has a pumping length p, such that every string in the language can be pumped if it has length p or more.

Pumping lemma says that:

For any language L, there exists an integer p (p is the pumping length), such that for all x ∈ L with |x| ≥ p, there exists u,v, w ∈ Σ*, such that x = uvw, and

(1) |uv| ≤ p

(2) |v| ≥ 1

(3) for all i ≥ 0: uv^i w ∈ L

Consider the regular language L given by regular expression: bab*aa. The minimum pumping length for language L will be

3
4
5
6
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66

R is necessarily CFL but not necessarily regular.
R is necessarily regular but infinite.
R is necessarily non regular.
None of the above.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following C-code: [MSQ]

while(x < 2021)

{

val += x--;

printf(“Value =%d \n”, val);

}

Select the correct statement from the option.

Both printf and val are lexemes matching with pattern for token id (identifier).
“Value =%d \n” is a lexeme matching with pattern literal.
while is a lexeme matching with pattern while
semicolon “;” is not considered as lexeme and deleted by lexical analyser.

Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider the following grammar G, where {S,X} are non terminals and {a,b,c,d} are terminals. [MSQ]

S→ Xa | bXc | dc | bda

X→d

Select the correct option.

Grammar G is unambiguous
Grammar G is LL(1)
Grammar G is LALR(1) but not SLR(1)
Grammar G is LR(1)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider the following expression (a+b)+e* (c-d). Assume all variables are currently in memory and require loading into the register to evaluate the expression. The minimum number of registers required to evaluate this expression (without spilling into memory) are _____.

[Spilling is the action consists of storing a variable into memory instead of registers]

3
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
[MSQ]

Consider the above graph. Which among the following is correct BFS traversal ?

a b c g e d f
a g c b f e d
a c b g e f d
a b c d e f g
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Choose the correct option/s among the following statements: [MSQ]

Topological Sorting for a graph is possible if the graph is not a DAG.
There can be more than one topological sorting for a graph.
The first vertex in topological sorting is always a vertex with in-degree as 0
The first vertex in topological sorting is always a vertex with no incoming edges.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
A matrix ‘A’ has eigen values as 1,2,5,9. The determinant of (A^-1)^T is
0.99
0.11
0.011
0.099
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Let a set A={1,2,3,4} , a relation defined on A as R ={(2,3),(3,2)} Then choose the correct statement about R
R is symmetric and anti symmetric
R is not symmetric and anti symmetric
R is not symmetric and not antisymmetric
R is symmetric and not anti symmetric
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Let R be a relation defined on a set A={1,2,3,4} as

R= {(2,3),(3,4),(4,1),(1,3),(3,2)} Then the inverse of R is

R’ = { (2,3),(3,1),(1,4),(4,3),(3,2) }
R’ ={ (2,3),(3,4),(4,1),(1,3),(3,2)}
R’ = ( (2,4),(4,3),(3,3),(3,1),(2,3)}
R’ ={(4,2),(3,4),(3,3),(1,3),(3,2)}
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
A die is tossed three times, What is the probability that the number 2 is not turned up is ___
0.3545
0.4545
0.6767
0.5767
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Choose the correct statements [MSQ]
¬(p → q) is equivalent to p ∧ ¬q
¬(p → q) is satisfiable
¬(p → q) is valid
¬(p → q) is not equivalent to pv~q
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
The number of edges in a chess board excluding the external boundaries are ______
112
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Assume two predicate variables b,c such that b belongs to the bikers set ‘B’ and c belongs to the cyclist set ‘C’. Let the predicate F(x,y) indicates that x is faster than y.


The correct expression of the sentence “ Every biker is faster than some cyclist “ is

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Virtual memory may be realized with
paging only
segmentation only
combined paging and segmentation only
paging or segmentation
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Larger the page size_________ will be the memory wastage .
the more
the less
no effect
none
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
______ is also known as a magic number that uniquely identifies the file type.
Superblock
Free list
FCB

File system identifier

Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
_________will provide low variance of response time due to random seek.
C-SCAN
FIFO
LOOK
SSTF
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33

Consider the following memory reference string :

1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2

Calculate the average memory access time if memory access time is 100ns and 3000ns page fault service time if on demand Optimal page replacement algorithm is used with a total physical memory of 4 frames.

3000ns
1250ns
1420ns
1550ns
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider a byte addressable system in which the memory manager allocates memory in fixed chunks of 1KB. What is the maximum internal fragmentation possible?
1024 bytes
1023 bytes
0 byte
1 byte
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The disk requests for tracks 5,25,18,3,39,8,35 in that order. Calculate the total seek time using SSTF disk scheduling algorithm where each seek takes 1.5ms per track and curecnt head position is on request 5 is________
57
38
31
50
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Which of the one of the following statement is FALSE
To guarantee no deadlock, it is sufficient to negate just one of the four conditions that contribute to avoid deadlock.
Code that can deadlock is not guaranteed to make progress in all cases.
If the code is vulnerable to starvation, then that will result in deadlock.
Race conditions and deadlocks are separate kinds of coding errors.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following function

Bob(int n)

{

if(n<2)

return;

else

{

sum=0;

for(i=1; i<=4; i++)

Bob(n/2);

for(i=1; i<=n ; i++)

sum=sum+1;

}

}

Assume that the division operation takes constant time and “sum” is a global variable. What is the time complexity of “Bob(n)”?

O(n^2 logn)
O(n^2)
O(nlogn)
None
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following graph.

Assume node ‘S’ is the starting vertex for prim’s algorithm, Which of the following can be the correct order of edges in which they are added to construct the minimal spanning tree?

4, 2, 1, 6, 8
4, 1, 2, 6, 8
4, 2, 1, 7, 10
None of these
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
The number of min heap trees are possible with 13 elements such that every leaf node must be greater than all non-leaf nodes of the tree are ____?
100800
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
The frequency of a number in an array is the number of times it appears in the array. Design an algorithm that finds the most frequent number in an array of n numbers. If there are multiple numbers with the highest frequency then list them all. What is the time complexity of an algorithm____?
O(n)
O(nlogn)
O(n^2)
O(1)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Let B1, B2, B3, B4, B5 be five matrices of dimensions 15 x 20, 20 x 17, 17 x 22, 22 x 16, 16 x 23 respectively. The minimum number of scalar multiplications required to find the product B1 B2 B3 B4 B5 using the Matrix Chain Multiplication method ____
20684
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Which of the following statement(s) is/are True? [MSQ]

P: Every directed acyclic graph has exactly one topological ordering.

Q: Given a graph G = (V,E) with positive edge weights, the Bellman-Ford algorithm and Dijkstra’s algorithm can produce different shortest-path trees despite always producing the same shortest-path weights.

R: Dijkstra’s algorithm may not terminate if the graph contains negative-weight edges.

S: If a topological sort exists for the vertices in a directed graph, then a DFS on the graph will produce no back edges.

P
Q
R
S
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
What will be the output of following C program?

void main()

{

char c='5';

int a=3,b=2;

printf("%d", a+b+c);

}

Note: ASCII value of ‘5’ is 53

58
53
'532'
None
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33