Question 1

**Based on the given statements, select the most appropriate option to solve the given question What will be the total weight of 10 poles each of same weight?**

Statements

(I) One fourth of the weight of a pole is 15kg.

(II) The total weight of these poles is 160 kg more than the total weight of two poles

Statements

(I) One fourth of the weight of a pole is 15kg.

(II) The total weight of these poles is 160 kg more than the total weight of two poles

A : Statement I alone is not sufficient

B : Statement II alone is not sufficient

C : Either I or II alone is sufficient

D : Both statements I and II together are not sufficient.

.

Correct answer is : C

Solution :

Let weight of each pole be x

Given, x/4 =15 kg

=>x-60kg

All poles are of same weight

Weight of 10 poles = 10x =10 * 60= 600 kg

II. Given, 10x= 2x+ 160

8x = 160 kg => x = 20 kg

Weight of 10 poles = 10x = 10 * 20 =200 kg

Question 2

**Consider a function f (x)=1-|x| on -1<= x <=1.The value of x at which the function attains a maximum, and the maximum value of the function are.**

A : 0,-1

B : -1,0

C : 0,1

D : -1,2

.

Correct answer is : C

Solution :

For -1<=x<=1 , 0<=|x|<=1.f(x) will be maximum when |x| is minimum, i.e.|x| =0 => x=0

Maximumvalue of f (x)=1-0 =1

Question 3

**A generic term that include various items of clothing such as a skirt, a pair of trousers and a shirt is**

A : fabric

B : textile

C : fibre

D : apparel

.

Correct answer is : D

Solution :

apparel- clothing, especially outerwear; garments; attire; raiment

Question 3

**Consider the following transaction involving two bank account x and y.**

read (x) ; x : = x – 50; write (x) ; read (y); y : = y + 50 ; write (y)The constraint that the sum of the accounts x and y should remain constant is that of

read (x) ; x : = x – 50; write (x) ; read (y); y : = y + 50 ; write (y)The constraint that the sum of the accounts x and y should remain constant is that of

A : Atomicity

B : Consistency

C : Isolation

D : Durability

.

Correct answer is : B

Solution :

The consistency property ensures that the database remains in a consistent state before the (start of the transaction and after the transaction is over. Here sum of the accounts x & y should remain same before & after execution of the given transactions which refers to the consistency of the sum.

Question 4

**Choose the statement where underlined word is used correctly.**

A : The industrialist load a

__personnel__jet.

B : I write my experience in my

__personnel__diary.

C : All

__personnel__are being given the day off.

D : Being religious is a

__personnel__aspect.

.

Correct answer is : C

Solution :

personnel- people employed in an organization or engaged in an organized undertaking such as military service.

Question 5

**We __________________ our friend's birthday and we ______________ how to make it up to him.**

A : Completely forgot - - - don't just know

B : Forgot completely - - - don't just know

C : Completely forgot - - - just don't know

D : Forgot completely - - - just don't know

.

Correct answer is : C

Question 6

**In a triangle PQR,PS is the angle bisector of ∠QPR and ∠QPS = 60**

^{o}. What is the length of PS?A : (q+r)/qr

B : qr/(q+r)

C : √(q

^{2}+r

^{2})

D : (q+r)

^{2}/qr

.

Correct answer is : B

Question 7

**Out of the following four sentences, select the most suitable sentence with respect to grammar and usage.**

A : Since the report lacked needed information, it was of no use to them.

B : The report was useless to them because there were no needed information in it.

C : Since the report did not contain the needed information, it was not real useful to them

D : Since the report lacked needed information, it would not had been useful to them.

.

Correct answer is : A

Solution :

(B) there was no needed information

(C) not really useful

(D) would not have been

Question 8

**If the list of letters, P,R,S,T,U is an arithmetic sequence, which of the following are also in arithmetic sequence?**

I . 2P, 2R, 2S, 2T, 2U

II . P-3,R-3,S-3,T-3,U-3

III. P

I . 2P, 2R, 2S, 2T, 2U

II . P-3,R-3,S-3,T-3,U-3

III. P

^{2}, R^{2}, S^{2},T^{2},U^{2}A : I only

B : I and II

C : II and III

D : I and III

.

Correct answer is : B

Solution :

Let us take the numbers as 3,4,5,6,7 n=1 and they are in arithmetic sequence

I. 6, 8,10,12,14 n=2 and they are in arithmetic sequence

II. 0,1,2,3,4 n=1 and they are in arithmetic sequence

III. 9,16,25,36,49 n=7,9,11,13 they are not in an arithmetic sequence

Question 9

**If p,q,r,s are distinct integers such that:**

f (p,q, r,s)=max (p,q, r,s)

g(p,q, r,s)=min(p,q, r,s)

h(p,q, r,s)=remainder of (p*q)/(r *s) if (p*q)> (r *s) or remainder of (r *s) / (p*q)

if (r*s) > (p*q)

Also a function fgh (p,q,r,s) = f(p,q,r,s) × g(p,q,r,s) × h(p,q,r,s)

Also the same operations are valid with two variable functions of the form f(p,q)

What is the value of fg (h(2,5,7,3), 4,6,8)?

f (p,q, r,s)=max (p,q, r,s)

g(p,q, r,s)=min(p,q, r,s)

h(p,q, r,s)=remainder of (p*q)/(r *s) if (p*q)> (r *s) or remainder of (r *s) / (p*q)

if (r*s) > (p*q)

Also a function fgh (p,q,r,s) = f(p,q,r,s) × g(p,q,r,s) × h(p,q,r,s)

Also the same operations are valid with two variable functions of the form f(p,q)

What is the value of fg (h(2,5,7,3), 4,6,8)?

.

Correct answer is : 1

Question 10

**Four branches of a company are located at M.N.O and P. M is north of N at a distance of 4km: P is south of O at a distance of 2 km: N is southeast of O by 1 km. What is the distance between M and P in km?**

A : 5.34

B : 6.74

C : 28.5

D : 45.49

.

Correct answer is : A

Question 11

**An unordered list contain n distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is**

A : Θ(nlogn )

B : Θ(n)

C : Θ(log n)

D : Θ(1)

.

Correct answer is : D

Solution :

Consider first three element of the list, atleast one of them will be neither minimum nor maximum

Θ(1)

Question 12

**Let R be the relation on the set of positive integers such that a aRb if and only if a and b are distinct and have a common divisor other than 1. Which one of the following statements about R is true?**

A : R is symmetric and reflexive but not transitive

B : R is reflexive but not symmetric and not transitive

C : R is transitive but not reflexive and not symmetric

D : R is symmetric but not reflexive and not transitive

.

Correct answer is : D

Solution :

R is not reflexive as each element can?t be related to itself.

R is symmetric

Let a = 3, b = 6 and c = 10 then 3 and 6 have a common division other than 1

6 and 10 have a common division other than 1

but 3 &10 have no common division other than 1

3R6 and 6R10 but 3not related10

=> R is not transitive

Question 14

**A binary tree T has 20 leaves. The number of nodes in T having two children is _________.**

.

Correct answer is : 19

Solution :

Let the number of vertices of a binary tree with „p? leaves be n then the tree has

(i) p vertices (i.e., leaves) of degree 1

(ii) one vertex (i.e.., root of T) of degree 2

(iii) 'n - p -1' (i.e., interval) vertices of degree 3

(iv) n -1edges

By Handshaking theorem,

p*1+1*2+(n-p-1)*3=2(n-1)

=> n=2p-1

=39 as p=20

n-p=19 vertices have exactly two children

Question 15

**Consider the basic COCOMO model where E is the effort applied in person-months, D is the development time in chronological months, KLOC is the estimated number of delivered lines of code (in thousands) and a**

_{b},b_{b},c_{b},d_{b}have their usual meanings. The basic COCOMO equations are of the formA : E=a

_{b}(KLOC) exp(b

_{b}), D=c

_{b}(E) exp(d

_{b})

B : D=a

_{b}(KLOC) exp(b

_{b}), E=c

_{b}(D) exp(d

_{b})

C : E=a

_{b}exp(b

_{b}), D=c

_{b}(KLOC) exp(d

_{b})

D : E=a

_{b}exp(D

_{b}), D=c

_{b}(KLOC) exp(d

_{b})

.

Correct answer is : A

Solution :

Basic cocomo model takes the form

Effort applied (E)= a

_{b}(kLoc)

^{bb}

Development time(D) c

_{b}(E) d

_{b}

Question 16

**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 per sound interference rules of logic?

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 per sound interference rules of logic?

A : If a person is known to corrupt, he is kind

B : If a person is not known to be corrupt, he is not kind

C : If a person is kind, he is not known to be corrupt

D : If a person is not kind, he is not known to be corrupt

.

Correct answer is : C

Solution :

Let P: candidate known to be corrupt

q: candidate will be elected

r: candidate is kind

then S

_{1}= p -> ~q

=q -> ~p (contrapoitive rule)

and s2 : r -> q => r -> ~p (transitive rule )

i.e., If a person is kind, he is not known to be corrupt

Option is C

Question 17

**Assume that for a certain processor, a read request takes 50 nanoseconds on a cache miss and 5 nanoseconds on a cache hit. Suppose while running a program, it was observed that 80% of the processors read requests result in a cache hit. The average and access time in nanoseconds is _______.**

.

Correct answer is : 14

Solution :

Average read access time =[(0.8)(5)+(0.2)(50)] ns.

=4+10 =14ns

Question 18

**A system has 6 identical resources and N processes competing for them. Each process can request atmost 2 resources. Which one of the following values of N could lead to a deadlock?**

.

Correct answer is : NO OPTION

Solution :

it might be a wring question

Question 19

**Consider a complete binary tree where the left and the right subtrees of the root are maxheaps. The lower bound for the number of operations to convert the tree to a heap is**

A : Ω (log n)

B : Ω (n)

C : Ω (n log n)

D : Ω (n

^{2})

.

Correct answer is : A

Question 20

**In the context of abstract-syntax-tree (AST) and control-flow-graph (CFG), which one of the following is TRUE?**

A : In both AST and CFG, let node, N2 be the successor of node N1. In the input program, the code corres

B : For any input program, neither AST nor CFG will contain a cycle

C : The maximum number of successors of a node in an AST and a CFG depends on the input program

D : Each node is AST and CFG corresponds to at most one statement in the input program

.

Correct answer is : C

Solution :

Optional (A) is not true when CFG contains cycle

Option (B) is false as CFG can contain cycle

Option (D) is false as a single node can contain block of statements.

Question 21

**With reference to the B+ tree index of order 1 shown below, the minimum number of nodes (including the Root node) that must be fetched in order to satisfy the following query: “Get all records with a search key greater than or equal to 7 and less than 15” is _________**

.

Correct answer is : 6

Question 22

**A software requirements specification (SRS) document should avoid discussing which one of the following?**

A : User interface issues

B : Non-functional requirements

C : Design specification

D : Interfaces with third party software

.

Correct answer is : D

Solution :

SRS is a description of a software system to be developed, laying out functional & nonfunctional requirements and may include a set of use cases that describe interactions the user will have with the software.

Question 23

**Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIX socket APL**

A : listen, accept, bind recv

B : bind, listen, accept, recv

C : bind, accept, listen, recv

D : accept, listen, bind recv

.

Correct answer is : B

Solution :

The correct order in which a server process must invoke the function calls is bind, listen, accept and recv. First three are used in connection establishment phase and recv is used in data transfer phase.

Question 24

**The larger of the two eigenvalues of the matrix is ____________.**

.

Question 25

**The cardinality of the power set of {0, 1, 2,.......10} is _________**

.

Correct answer is : 2048

Solution :

cardinality of the power set of {0, 1, 2, … , 10} is 11

^{2}i.e.., 2048

Question 25

**Consider the following statements**

I. The complement of every Turing decidable language is Turing decidable

II. There exists some language which is in NP but is not turing decidable

III. If L is a language in NP, L is turing decidable

Which of the above statements is/are true?

I. The complement of every Turing decidable language is Turing decidable

II. There exists some language which is in NP but is not turing decidable

III. If L is a language in NP, L is turing decidable

Which of the above statements is/are true?

A : Only II

B : Only III

C : Only I and II

D : Only I and III

.

Correct answer is : D

Solution :

Turing decidable => Recursive language

Turing recognizable => Recursive enumerable language

I) Complement of turning decidable language is decidable which is true.

III) True ( Theorem ) Which violates (II) hence key is D

Question 26

**Which one of the following statements is NOT correct about HTTP cookies?**

A : A cookie is a piece of code that has the potential to compromise the security of an internet user

B : A cookie gains entry to the user?s work area through an HTTP header

C : A cookie has an expiry date and time

D : Cookies can be used to track the browsing pattern of a user at a particular site

.

Correct answer is : B

Solution :

(A) is correct

(B) Option B is false

(C) Option C is correct

(D) Option D is correct

Question 27

**Consider the following function written the C programming language.**

void foo(char *a) {

if(*a && *1 != ' ') {

putchar(*a);

}

}

The output of the above function on input “ABCD EFGH” is

void foo(char *a) {

if(*a && *1 != ' ') {

putchar(*a);

}

}

The output of the above function on input “ABCD EFGH” is

A : ABCD EFGH

B : ABCD

C : HGFE DCBA

D : DCBA

.

Correct answer is : D

Question 28

**A link has a transmission speed of 106 bits/sec. It uses data packets of size 1000 bytes each. Assume that the acknowledgement has negligible transmission delay, and that its propagation delay is the same as the data propagation delay. Also assume that the processing delays at the nodes are negligible. The efficiency of the stop-and-wait protocol in this setup is exactly 25%. The value of the one-way propagation delay (in milliseconds) is __________**

.

Correct answer is : 12

Solution :

Given, B =10

^{6}bps

L=1000 bytes

n=25%

T

_{p}= ?

In stop-and-wait, efficiency = 1/(1+2a)

=> 1/4 = 1/(1+2a) => 1+2a =4

2a=3; a=3/2

T

_{x}= L/B = (8*10

^{3})/10

^{6}=8ms

T

_{p}/t

_{x}= 3/2 ; 2T

_{p}= 3T

_{x}

2T

_{p}=24ms

T

_{p}=12ms

Question 29

**The minimum number of JK flip-flops required to construct a synchronous counter with the count sequence (0,0, 1, 1, 2, 2, 3, 3, 0, 0,…….) is ___________.**

.

Correct answer is : 2

Solution :

Here number of distinct states are 4. So, minimum number of flip-flop required is = 2.

Question 30

**Match the following:**

A : P - 2, Q-3, R -1, S- 4

B : P - 2, Q-1, R -4, S- 3

C : P - 2, Q-4, R -1, S- 3

D : P - 2, Q-3, R -4, S- 1

.

Correct answer is : C

Solution :

Lemical Analyzer uses DFA to recognize the longest possible input sequence that makes up a token. Parser takes input in the form of tokens and usually builds a data structure in the form of parse tree. Here parse tree can be termed as a Production tree as parser uses production of the grammar to check whether generated tokens form a meaningful compression).

Register allocation can be reduced to K-colouring problem where K is the number of registers available on the target architecture.

P

Question 31

**Consider two decision problems Q1, Q2 such that Q1 reduces in polynomial time to 3-SAT and 3 -SAT reduces in polynomial time to Q2. Then which one of following is consistent with the above statement?**

A : Q1 is in NP, Q2 in NP hard

B : Q2 is in NP, Q1 is NP hard

C : Both Q1 and Q2 are in NP

D : Both Q1 and Q2 are in NP hard

.

Correct answer is : A

Question 32

**A computer system implements a 40-bit virtual address, page size of 8 kilobytes, and a 128- entry translation look-aside buffer (TLB) organized into 32 sets each having four ways. Assume that the TLB tag does not store any process id. The minimum length of the TLB tag in bits is _________.**

.

Correct answer is : 22

Solution :

tag =22bit ,set offset=5bit , word offset = 13bit.

Question 33

**Consider the following C function.**

int fun(int n) {

int x=1,k;

if(n==1) return x;

for(k=1;k x=x+fun(k) * fun(n-k);

return xl

}

The return value of fun (5) is _______

int fun(int n) {

int x=1,k;

if(n==1) return x;

for(k=1;k

return xl

}

The return value of fun (5) is _______

.

Correct answer is : 51

Question 35

**The number of divisors of 2100 is _______.**

.

Correct answer is : 36

Solution :

Let N =2100

2

^{2}* 3*5

^{2}* 7 (i.e.,product of primes)

Then the number of division of 2100 is

(2+1).(1+1)e. 36.(2+1).(1+1) i.e. (3)(2)(3)(2) i.e. 36

Question 36

**In a connected graph, a bridge is an edge whose removal disconnects a graph. Which one of the following statements is true?**

A : A tree has no bridges

B : A bridge cannot be part of a simple cycle

C : Every edge of a clique with size >= 3 is a bridge (A clique is any compete sub graph of a graph)

D : A graph with bridges cannot have a cycle

.

Correct answer is : B

Solution :

Since, every edge in a tree is bridge (A) is false

Since, every edge in a complete graph k

_{n}(n>= 3) is not a bridge =>c is false

Since, in a cycle every edge is not a bridge => (B) is true

Question 37

**Consider six memory partitions of sizes 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250 KB, where KB refers to kilobyte. These partitions need to be allotted to four processes of sizes 357 KB, 210KB, 468 KB and 491 KB in that order. If the best fit algorithm is used, which partitions are NOT allotted to any process?**

A : 200KB and 300 KB

B : 200KB and 250 KB

C : 250KB and 300 KB

D : 300KB and 400 KB

.

Correct answer is : A

Solution :

375 KB fits into 400KB block

210 KB fits into 250KB block

468KB fits into 500KB block

491 KB fits into 600KB block

Therefore partition 200KB and 300KB are NOT allotted to any process.

Question 38

**Which one of the following assertions concerning code inspection and code walkthrough is true?**

A : Code inspection is carried out once the code has been unit tested

B : Code inspection and code walkthrough are synonyms

C : Adherence to coding standards is checked during code inspection

D : Code walkthrough is usually carried out by an independent test team

.

Correct answer is : A

Question 39

**Given below are some algorithms, and some algorithm design paradigms.**

Match the above algorithms on the left to the corresponding design paradigm they follow.

(1) Dijkstra?s Shortest Path | (i) Divide and Conquer |

(2) Floyd-Warshall algorithm to compute all pair shortest path | (ii) Dynamic Progamming |

Binary search on a sorted array | (iii) Greedy design |

(4) Backtracking search on a graph | (iv) Depth-first search |

(iv) Breadth-first search |

A : 1-i, 2 -iii, 3-i, 4 - v

B : 1-iii, 2 -iii, 3-i, 4 - v

C : 1-iii, 2 -ii, 3-i, 4 - iv

D : 1-iii, 2 -ii, 3-i, 4 - v

.

Correct answer is : C

Solution :

Dijkstra shortest path algorithm find next node by choosing minimum distance hence greedy approach.

Floyd warshall always apply dynamic programming, once it saves a cost and in the next iteration it will change if this is minimum hence dynamic.

Binary search always divide on two parts .Hence divide and conquer.

Backtracking uses by DFS, one it will reach to dead end it will take back track.

Question 40

**Suppose you are provided with the following function declaration in the C programming language**

int partition (int a [ ], int n);

The function treats the first element of a [ ] as a pivot, and rearranges the array so that all elements less than or equal to the pivot is in the left part of the array , and all elements greater than the pivot is in the right part. In addition, it moves the pivot so that the pivot is the last elements of the left part. The return value is the number of elements in the left part.

The following partially given function in the C programming language is used to find the Kth smallest element in an array a [ ] of size n using the partition function We assume k<= n .

int kth _smallest (int a[], int n, int k)

{

int left_end=partition(a,n);

if(left_end +1 ==k){

return a[left_end];

}

if(left_end +1 > k){

return kth_smallest ( ____________ );

}else {

return kth_smallest(______________);

}

}

The miss

int partition (int a [ ], int n);

The function treats the first element of a [ ] as a pivot, and rearranges the array so that all elements less than or equal to the pivot is in the left part of the array , and all elements greater than the pivot is in the right part. In addition, it moves the pivot so that the pivot is the last elements of the left part. The return value is the number of elements in the left part.

The following partially given function in the C programming language is used to find the Kth smallest element in an array a [ ] of size n using the partition function We assume k<= n .

int kth _smallest (int a[], int n, int k)

{

int left_end=partition(a,n);

if(left_end +1 ==k){

return a[left_end];

}

if(left_end +1 > k){

return kth_smallest ( ____________ );

}else {

return kth_smallest(______________);

}

}

The miss

A : (a, left _end,k) and (a + left _end +1, n -left _end -1, k -left _end -1)

B : (a.left_end,k) and (a,n-left_end-1,k-left_end-1)

C : (a+left_end+1,n-left_end-1,k-left_end) and (a,left_end,k)

D : (a,n-left_end-1,k-left_end-1) and (a,left_end ,k)

.

Correct answer is : A

Question 41

**Consider a typical disk that rotates at 15000 rotations per minute (RPM) and has a transfer rate of 50*10**

^{6}bytes/sec. if the average seek time of the disk is twice the average rotational delay and the controller?s transfer time is 10 times the disk transfer time, the average time (in milliseconds) to read or write a 512-byte sector of the disk is _____________..

Correct answer is : 6.1

Solution :

60sec -> 15000 rotations

60/15000 = 4ms <- 1 rotation

Average rotational delay = 1/2 *4=2ms

As per question, average seek time= 2* Avg.rotational delay = 2*2 =4ms

Disk transfer time : 1sec ->50 * 10

^{6}=> 0.01ms = 512/(50 *10

^{6}) <- 512 bytes

As per Question, controller?s transfer time is = 10 * 0.01 ms = 0.1ms

Avg time = 4ms +0.1ms+2ms = 6.1ms

Question 42

**Let f(X) = x**

(I) f is continuous in [-1,1]

(II) f is not bounded in [-1,1]

(III) A is nonzero and finite

^{-(1/3)}and A denote the area of the region bounded by f(x) and the X-axis, when x varies from – 1 to 1. Which of the following statements is/are TRUE?(I) f is continuous in [-1,1]

(II) f is not bounded in [-1,1]

(III) A is nonzero and finite

A : II only

B : III only

C : II and III only

D : I, II and III

.

Correct answer is : C

Question 43

**Consider the intermediate code given below.**

(1) i=1

(2) j=1

(3) t1 = 5*i

(4)t2=t1+j

t3=4*t2

t4=t3

a[t4]=-1

j=j+1

if j<=5 goto (3)

i = i+1

if i<5 goto (2)

The number of nodes and edges in the control-flow-graph constructed for the above code, respectively, are

(1) i=1

(2) j=1

(3) t1 = 5*i

(4)t2=t1+j

t3=4*t2

t4=t3

a[t4]=-1

j=j+1

if j<=5 goto (3)

i = i+1

if i<5 goto (2)

The number of nodes and edges in the control-flow-graph constructed for the above code, respectively, are

A : 5 and 7

B : 6 and 7

C : 5 and 5

D : 7 and 8

.

Correct answer is : B

Question 44

**The number of min-terms after minimizing the following Boolean expression is _______.**

[D'+AB'+A'C+AC'D+A'C'D]'

[D'+AB'+A'C+AC'D+A'C'D]'

.

Correct answer is : 1

Solution :

Given function is F(A,B,C,D) : According to the function k-map is

Question 45

**The number of onto function (surjective function) from set X = {1,2,3,4}to set Y ={a,b,c} is ______.**

.

Correct answer is : 36

Question 46

**Consider the alphabet Σ={0,1}, the null/empty string λand the sets of strings X**

X

X

X

Which one of the following choices precisely represents the strings in X

_{0},X,sub>1 and X_{2}generated by the corresponding non-terminals of regular grammar X_{0}, X_{1}and X_{2}are related as followsX

_{0}= 1 X_{1}X

_{1}= 0 X_{1}+ 1 X_{2}X

_{2}= 0 X_{1}+ {λ}Which one of the following choices precisely represents the strings in X

_{0}?A : 10(0

^{*}+ (10)

^{*})1

B : 10(0

^{*}+ (10)

^{*})

^{*}1

C : 1(0+10)

^{*}1

D : 10(0+10

^{*})

^{*}1 + 110(0+10)

^{*}1

.

Correct answer is : C

Question 47

**Which of the following languages is/are regular?**

L

L

L

L

_{1}: { wxw^{R}| w,x ∈ {a,b}^{*}nad |w| , |x| >0 } ,w^{R}is the reverse of sring w.L

_{2}: {a^{n}b^{m}| m ≠ n and m,n >=0 }L

_{3}: { a^{p}b^{q}c^{r}} p,q,r >=0}A : L

_{1}and L

_{3}only

B : L

_{1}only

C : L

_{2}and L

_{3}only

D : L

_{3}only

.

Correct answer is : A

Solution :

L

_{1}:w

^{R}is reverse of string w ∴ Its is regular

L

_{2}: m ≠ n ,that mean n is greater than m, or m is greater than n. So we need memory, so we can't draw DfA for it.

L

_{3}It is regular (a+b+c)*

Question 48

**Consider a processor with byte-addressable memory. Assume that all registers, including Program Counter (PC) and Program Status Word (PSW), are of size 2 bytes. A stack in the main memory is implemented from memory location (0100)**

Store the current Vale of PC in the Stack

Store the value of PSW register in the stack

Load the starting address of the subroutine in PC

The content of PC just before the fetch of a CALL instruction is (5FA0)

_{16}and it grows upward. The stack pointer (SP) points to the top element of the stack. The current value of SP is (016E)_{16}. The CALL instruction is of two words, the first word is the op-code and the second word is the starting address of the subroutine. ( oneword = 2bytes) . The CALL instruction is implemented as follows:Store the current Vale of PC in the Stack

Store the value of PSW register in the stack

Load the starting address of the subroutine in PC

The content of PC just before the fetch of a CALL instruction is (5FA0)

_{16}. After execution of the CALL instruction, the value of the stack pointer isA : (016A)

_{16}

B : (016C)

_{16}

C : (0170)

_{16}

D : (0172)

_{16}

.

Correct answer is : D

Question 49

**The number of states in the minimal deterministic finite automaton corresponding to the regular expression (0+1)**

^{*}(10 ) is _________________.

Correct answer is : 3

Solution :

(0+1)

^{*}(10 )

Question 50

**Host A sends a UDP datagram containing 8880 bytes of user data to host B over an Ethernet LAN. Ethernet frames may carry data up to 1500 bytes (i.e. MTU = 1500 bytes). Size of UDP header is 8 bytes and size of IP heard is 20 bytes.There is no option field in IP header How many total number of IP fragments will be transmitted and what will be the contents of offset field in the last fragment?**

A : 6 and 95

B : 6 and 7400

C : 7 and 1110

D : 7 and 8880

.

Correct answer is : C

Question 51

**Consider the following routing table at an IP router:**

For each IP address in Group I identify the correct choice of the next hop from Group II using the entries from the routing table above.

<

Network No. | Net Mask | Next hop |

128.96.170.0 | 255.255.254.0 | Interface 0 |

128.96.168.0 | 255.255.254.0 | Interface 1 |

128.96.166.0 | 255.255.254.0 | R2 |

128.96.164.0 | 255.255.252.0 | R3 |

0.0.0.0 | Default | R4 |

For each IP address in Group I identify the correct choice of the next hop from Group II using the entries from the routing table above.

<

Group 1 | Group 2 |

128.96.171.92 | Interface 0 |

128.96.167.151 | Interface 1 |

128.96.163.151 | R2 |

128.96.165.121 | R3 |

R4 |

A : i-a , ii-c , iii-e , iv-d

B : i-a , ii-d , iii-b , iv-e

C : i-b , ii-c , iii-d , iv-3

D : i-b , ii-c , iii-e , iv-d

.

Correct answer is : A

Question 52

**Consider two relations R1(A,B) with the tuples (1.5), (3,7) and R2 (A,C) = (1,7), (4,9). Assume that R(A,B,C) is the full natural outer join of R1 and R2 . Consider the following tuples of the form (A,B,C): a =(1.5,null), b=(1,null,7) c=(3,null,9), d=(4,7,null), e =(1,5,7), f=(3,7,null), g =(4,null,9).Which one of the following statements is correct?**

A : R contains a,b,e,f,g but not c, d.

B : R contains all of a,b,c,d,e,f,g

C : R contains e,f,g but not a,b

D : R contains e but not f,g.

.

Correct answer is : C

Question 53

**Consider a simple checkpointing protocol and the following set of operations in the log :**

(Start , T4) ; (write , T4,y,2,3) ; (Start ,T1); (commit , T4);(write , T1,z,5,7);

(checkpoint);

(Start , T2);(write ,T2,x,1,9);(commit ,T2) ; (start T3),(write,T3,z,7,2);

If a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo lists and the redo list?

(Start , T4) ; (write , T4,y,2,3) ; (Start ,T1); (commit , T4);(write , T1,z,5,7);

(checkpoint);

(Start , T2);(write ,T2,x,1,9);(commit ,T2) ; (start T3),(write,T3,z,7,2);

If a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo lists and the redo list?

A : Undo T3,T1; Redo T2

B : Undo T3,T1; Redo T2,T4

C : Undo: none; redo:T2,T4,T3,T1

D : Undo T3,T1; T4; Redo:T2

.

Correct answer is : A

Solution :

As 1 3 T &T are not yet committed they must be undone. The transactions which are after the latest checkpoint must be redone. So T2 must be redone. No need to redo the records which are before last checkpoint, so T4 need not be redone.

Question 54

**A computer system implements 8 kilobyte pages and a +32-bit physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is 24 megabytes, the length of the virtual address supported by the system is _________ bits.**

.

Correct answer is : 36

Solution :

Given Page size = 8kb

PAS = 32 – bit

No.of frames 2 frames=PAS/PS = 2

^{32}/2

^{13}= 2

^{19}frames

So, it is given that each page table entry contains a valid bit, a dirty bit, 3 permission bits. =>5 bits are reserved.

It means one entry requires 19 + 5 = 24 bits

Page Table size = n × e

24*2

^{20}*3 = n*24

n=(24*2

^{20}*8)/24 = 2

^{23}pages.

Length of the virtual address = 23+13=36 bits

Question 55

**Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020?**

A : h (i)= i

^{2}mod 10

B : h (i)= i

^{3}mod 10

C : h (i)= (11 * i

^{2}) mod 10

D : h (i)=(12 * i

^{2}) mod 10

.

Correct answer is : B

Solution :

If we take first 10 elements, number of collisions taken by the hash function given by option (B) is less when compared to others.

Question 56

**Assume that the bandwidth for a TCP connection is 1048560 bits/sec. Let Α be the value of RTT in milliseconds. (rounded off to the nearest integer) after which the TCP window scale option is needed. Let Β be the maximum possible window size the window scale option. Then the values of Α and Β are**

.

Correct answer is :

Question 57

**A young tableau is a 2D array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with ∞ , and hence there cannot be any entry to the right of , or below a ∞ . The following Young tableau consists of unique entries.**

When an element is removed from a Young tableau, other elements should be moved into its place so that the resulting table is still a Young tableau (unfilled entries may be filled in with a ∞ ). The minimum number of entries (other than 1) to be shifted, to remove 1 from the given Young tableau is _________

1 | 2 | 5 | 14 |

3 | 4 | 6 | 23 |

10 | 12 | 18 | 25 |

31 | ∞ | ∞ | ∞ |

When an element is removed from a Young tableau, other elements should be moved into its place so that the resulting table is still a Young tableau (unfilled entries may be filled in with a ∞ ). The minimum number of entries (other than 1) to be shifted, to remove 1 from the given Young tableau is _________

.

Correct answer is : 5

Question 58

**A half adder is implemented with XOR and AND gates. A full adder is implemented with two half adders and one OR gate. The propagation delay of an XOR gate is twice that of an AND/OR gate. The propagation delay of an AND/OR gate is 1.2 microseconds. A 4-bit ripple-carry binary adder is implemented by using four full adders. The total propagation time of this 4-bit binary adder in microseconds is ____________.**

.

Correct answer is : 19.2

Solution :

Here sum and carry delay is same= 4.8 ?sec

so T

_{total}= ( 4 * 4.8 ) micro sec

= 19.2 micro sec

Question 59

**Consider the sequence of machine instruction given below:**

MUL R5,R0,R1

DIV R6,R2,R3

ADD R7,R5,R6

SUB R8,R7,R4

In the above sequence, R0 to R8 are general purpose registers. In the instructions shown. the first register stores the result of the operation performed on the second and the third registers. This sequence of instructions is to be executed in a pipelined instruction processor with the following 4 stages (1) Instruction Fetch and Decode (IF), (2) Operand Fetch (OF), (3) Perform Operation (PO) and (4) Write back the result (WB) . The IF,OF and WB stages take 1 clock cycle each for any instruction The PO stage takes 1 clock cycle for ADD or SUB instruction, 3 clock cycles for MUL instruction and 5 clock cycles for DIV instruction. The pipelined processor uses operand forwarding from the PO stage to the OF stage. The number of clock cycles taken for the execution of the above sequence of instructions is __________

MUL R5,R0,R1

DIV R6,R2,R3

ADD R7,R5,R6

SUB R8,R7,R4

In the above sequence, R0 to R8 are general purpose registers. In the instructions shown. the first register stores the result of the operation performed on the second and the third registers. This sequence of instructions is to be executed in a pipelined instruction processor with the following 4 stages (1) Instruction Fetch and Decode (IF), (2) Operand Fetch (OF), (3) Perform Operation (PO) and (4) Write back the result (WB) . The IF,OF and WB stages take 1 clock cycle each for any instruction The PO stage takes 1 clock cycle for ADD or SUB instruction, 3 clock cycles for MUL instruction and 5 clock cycles for DIV instruction. The pipelined processor uses operand forwarding from the PO stage to the OF stage. The number of clock cycles taken for the execution of the above sequence of instructions is __________

.

Correct answer is : 13

Solution :

I=> Instruction fetch

O=>Operand Fetch

P=>Perform operation

W = >write back the result

Question 60

**Perform the following operations on the matrix**

(i) Add the third row to the second row

(ii) Subtract the third column from the first column.

The determinant of the resultant matrix is __________.

(i) Add the third row to the second row

(ii) Subtract the third column from the first column.

The determinant of the resultant matrix is __________.

.

Correct answer is : 0

Solution :

Determinant is unaltered by the operations (i) and (ii)

=> Determinant of the resultant matrix = Determinant of the given matrix

Question 61

**Which one of the following well formed formulae is tautology?**

A : A only

B : B only

C : C only

D : D only

.

Correct answer is : C

Question 62

**A graph is self-complementary if it is isomorphic to its complement For all selfcomplementary graphs on n vertices, n is**

A : A multiple of 4

B : Even

C : Odd

D : Congruent to 0 mod 4, or, 1 mod 4

.

Correct answer is : D

Solution :

An n vertex self complementary graph has exactly half number of edges of the complete graph i.e., n(n-1)/4 edges . Since n(n-1) must be divisible by 4 , n must be congruent to 0 or 1 module 4.

Question 63

**The secant method is used to find the root of an equation f(x) = 0 . It is started from two distinct estimates, a b x and x for the root. It is an iterative procedure involving linear interpolation to a root. The iteration stops if f(xb) is very small and then xb is the solution. The procedure is given below. Observe that there is an expression which is missing and is marked by? Which is the suitable expression that is to be put in place of ? so that it follows all steps of the secant method?**

Secant

Initialize: xa, xb, ,N // ε = convergence indicator and N = maximum no. of iterations

fb= -f(xb)

i=0

while(i ( ε) do

i = i + 1 //update counter

xt = ? //missing expression for

xa=xb // intermediate value and reset xa

xb=xt //reset xb

fb = f(xb) // function value at new xb

end while

if |fb| > ε then //loop is terminated with i=N

write “Non-convergence”

else

A : x

B : x

C : x

D : x

Answer Discuss it!

.

Correct answer is : D

Solution :

Secant method direct formula

Answer Discuss it!

.

Correct answer is : 0.95

Solution :

|X| =2 , |Y| =20

Number of functions from X to Y is 20

Probability of a function f being one-one is 380/400 = 0.95

Answer Discuss it!

.

Correct answer is : -2

Solution :

StkFunc(1,0) returns -1 both the times. So – 2 will be printed

Secant

Initialize: xa, xb, ,N // ε = convergence indicator and N = maximum no. of iterations

fb= -f(xb)

i=0

while(i

i = i + 1 //update counter

xt = ? //missing expression for

xa=xb // intermediate value and reset xa

xb=xt //reset xb

fb = f(xb) // function value at new xb

end while

if |fb| > ε then //loop is terminated with i=N

write “Non-convergence”

else

A : x

_{b}- (f

_{b}- f(x

_{a}) f

_{b}/ (x

_{b}- x

_{a})

B : x

_{a}- (f

_{b}- f(x

_{a}) f

_{a}/ (x

_{b}- x

_{a})

C : x

_{b}- (x

_{b}- x

_{a})f(x

_{b}) / f

_{b}/ (f

_{b}-

D : x

_{a}- (x

_{b}- x

_{a})f(x

_{a}) / f

_{b}/ (f

_{b}-

.

Correct answer is : D

Solution :

Secant method direct formula

Question 64

**Let X and Y denote the sets containing 2and 20 distinct objects respectively and F denote the set of all possible functions defined from X to Y. let f be randomly chosen from F .The probability of f being one-to-one is _______.**

.

Correct answer is : 0.95

Solution :

|X| =2 , |Y| =20

Number of functions from X to Y is 20

^{2}i.e., 400 and number of one-one functions from X to Y is 20P2 i.e 20 * 19 =380

Probability of a function f being one-one is 380/400 = 0.95

Question 65

**Consider the C program below.**

#include

Int *A, stkTop;

Int stkFunc (int opcode, int val)

{

Static int size =0, stkTop=0;

Switch (opcode) {

Case -1 : Size = val; break;

Case 0 : if (stkTop < size) A (stktop++] = val; break;

Default : if (stktop) return A [--stkTop];

}

return -1; }

int main ( )

{

int B[20] ; A = B; stkTop = -1;

stkFunc (-1, 10);

stkFunc (0, 5);

stkFunc (0, 10);

printf (“%d\n”, stkFunc(1, 0) + stkfunc(1, 0);

}

The value printed by the above program is _____________.

#include

Int *A, stkTop;

Int stkFunc (int opcode, int val)

{

Static int size =0, stkTop=0;

Switch (opcode) {

Case -1 : Size = val; break;

Case 0 : if (stkTop < size) A (stktop++] = val; break;

Default : if (stktop) return A [--stkTop];

}

return -1; }

int main ( )

{

int B[20] ; A = B; stkTop = -1;

stkFunc (-1, 10);

stkFunc (0, 5);

stkFunc (0, 10);

printf (“%d\n”, stkFunc(1, 0) + stkfunc(1, 0);

}

The value printed by the above program is _____________.

.

Correct answer is : -2

Solution :

StkFunc(1,0) returns -1 both the times. So – 2 will be printed

## Prepjunkie

Home . Contact . About . Disclaimer

Prepjunkie© 2015

Picture Palace Tilak Road Mussoorie, Uttarakhand

contactus@prepjunkie.com

About Prepjunkie PrepJunkie provides comprehensive guidance for entrance exams with well thought of solutions for selected questions, notes, books & much more.