Previous Year Paper

UGC NET Paper 2: Computer Science Nov 2017 (Previous Year Paper)

Held in 2017

75 questions150 minutes
With answers
Free

Paper last updated:

Practise under exam conditions

Take this paper as a timed mock test. Review your answers after you submit.

Attempt timed test

Questions & answers

Read the paper at your pace. Open an explanation when you need it.

Technical (75 questions)

Question 1

The address of a class B host is to be split into subnets with a 6 - bit subnet number. What is the maximum number of subnets and maximum number of hosts in each subnet ?

  1. AOption (a)

    62 subnets and 1022 hosts

  2. BOption (b)

    64 subnets and 1024 hosts

  3. COption (c)

    62 subnets and 254 hosts

  4. DOption (d)

    64 subnets and 256 hosts

View answer & explanation

Correct answer

Answer: (a)A.

62 subnets and 1022 hosts

Why this answer is correct

Concept:

In class B, 16 bits are reserved for Network id and 16 for host id.

Explanation

6 bit is added due to subnetting

Number of subnest = 26 − 2= 62

Total Network Id = 16 + 6 = 22

Network Id + Host Id = 32 bits

Number of bit in host id = h = 32 - 22 = 10 bits

The number of available hosts = 2h − 2,

= 210 - 2 = 1024 - 2 = 1022

Therefore option 1 is the correct answer

  

2 is subtracted because subnet values consisting of all zeros and all ones (broadcast), reducing the number of available subnets by two in classic subnetting. In modern networks. Those two are counted leading to 64 subnets.

Question 2

Which of the following statements are true?

(a) The fragmentation fields in the base header section of IPv4 have moved to the fragmentation extension header in IPv6.

(b) The authentication extension header is new in IPv6.

(c) The record route option is not implemented in IPv6.

  1. AOption (a)

    (a) and (b) Only

  2. BOption (b)

    (b) and (c) Only

  3. COption (c)

    (a) and (c) Only

  4. DOption (d)

    (a), (b) and (c)

View answer & explanation

Correct answer

Answer: (d)D.

(a), (b) and (c)

Why this answer is correct

The correct answer is option 4.

Key Points

  • In IPv6, the fragmentation fields from IPv4's base header segment have been transferred to the fragmentation extension header, and hence the given statement is right.
  • Both IPv4 and IPv6 have the same authentication header, but IPv6 has a new authentication extension header. As a result, the given statement is right.
  • The record route function is not specified in the IPv6 specifications, and the record route function in IPv4 is less versatile and has scalability issues. As a result, the given statement is right.

Hence the correct answer is (a), (b) and (c).

Additional Information

IPv4 header:

Question 3

Consider a full binary tree with n internal nodes, internal path length i, and external path length e. The internal path length of a full binary tree is the sum, taken over all nodes of the tree, of the depth of each node. Similarly, the external path length is the sum, taken over all leaves of the tree, of the depth of each leaf.

Which of the following is correct for the full binary tree?

  1. AOption (a)

    e = i + n

  2. BOption (b)

    e = i + 2n

  3. COption (c)

    e = 2i + n

  4. DOption (d)

    e = 2n + i

View answer & explanation

Correct answer

Answer: (b)B.

e = i + 2n

Why this answer is correct

The correct answer is option 2.

Key Points

  • A node's path length is the number of links required to get back to the root.
  • The root has a path length of zero and the maximum path length in a tree is called the tree's height.
  • The sum of the path lengths of a tree's internal nodes is called the internal path and the sum of the path lengths of a tree's external nodes is called the external path length.
  • The sum over all external nodes of the lengths of the paths from the root of an extended binary tree to each node. The internal and external path lengths are related by e = i + 2n.

Example:

 

Number of internal node = n = 3 (A, B, C)

Internal paths= i = 0 + 1 + 1 = 2

External paths= e = 2 + 2 + 2 + 2 = 8  (D, E, F, G)

Option 2:

LHS = e = 8

RHS = i + 2n = 2 + 2 x 3 = 8

LHS = RHS

Hence the correct answer is e = i + 2n.

Question 4

You are given a sequence of n elements to sort. The input sequence consists of n/k subsequences, each containing k elements. The elements in a given subsequence are all smaller than the elements in the succeeding subsequence and larger than the elements in the preceding subsequence. Thus, all that is needed to sort the whole sequence of length n is to sort the k elements in each of the n/k subsequences.

The lower bound on the number of comparisons needed to solve this variant of the sorting problem is :

  1. AOption (a)

    Ω (n)

  2. BOption (b)

    Ω(nk)\Omega \left(\frac{n}{k}\right)

  3. COption (c)

    Ω (n lg k)

  4. DOption (d)

    Ω(nk;lgnk)\Omega \left(\frac{n}{k}; lg \frac{n}{k} \right)

View answer & explanation

Correct answer

Answer: (c)C.

Ω (n lg k)

Why this answer is correct

The correct answer is option 3.

EXPLANATION

There are nkn \over k subsequences and each can be ordered in k! ways. This makes a (k!)nk (k!)^{n \over k} outputs.

We can use the same reasoning:

(k!)nk≤2h (k!)^{n \over k} \le2 ^h

Taking the logarithm of both sides, we get:

h ≥ log(k!)n/k

h≥(nk))log(k!)h \ge ({n \over k)}) log(k!)

≥(nk)(k2)log(k2) =Ω(nlogk) \ge ({n \over k})({k \over 2})log({k \over 2}) \ =\Omega (nlog k)

Hence the correct answer is Ω (n log k).

Question 5

Consider the recurrence relation :

T(n)=8T(n2)+Cn,if;n>1T(n) = 8T \left(\frac{n}{2}\right)+Cn, if ;n > 1

= b, if n = 1

Where b and c are constants.

The order of the algorithm corresponding to above recurrence relation is :

  1. AOption (a)

    n

  2. BOption (b)

    n2

  3. COption (c)

    n lg n

  4. DOption (d)

    n3

View answer & explanation

Correct answer

Answer: (d)D.

n3

Why this answer is correct

The correct answer is option 4.

Master's theorem:

T(n)=aT(nb)+f(n)T(n) = aT \left(\frac{n}{b}\right)+f(n) where a > = 1 and b > 1

Case: 1. If f(n) = Θ(nc) where c < Logba then T(n) = Θ(nlogba)

EXPLANTION

T(n)=8T(n2)+Cn,if;n>1T(n) = 8T \left(\frac{n}{2}\right)+Cn, if ;n > 1

= b, if n = 1

Where b and c are constants.

The above recurrence is in the form of the 

Here, c = Log28 = 3

f(n) = Θ(n3)

Hence the correct answer is n3.

Question 6

Consider the following two sequences :

X = < B, C, D, C, A, B, C >

and Y = < C, A, D, B, C, B >

The length of longest common subsequence of X and Y is :

  1. AOption (a)

    5

  2. BOption (b)

    3

  3. COption (c)

    4

  4. DOption (d)

    2

View answer & explanation

Correct answer

Answer: (c)C.

4

Why this answer is correct

Concept:

If there is match, A[i, j] = A[i – 1, j  – 1] + 1

If not match: max(A[i – 1, j], A[i, j – 1])

CALCULATION

Let M =  length of X and N = length of Y

int dp[N+1][M+1]

Table of longest common subsequence:

X →BCDCABC
Y ↓00000000
C00111111
A00111222
D00122222
B01122233
C01223333
B01223344

 

The length of longest common subsequence of X and Y = A[N][M] = 4

Question 7

A text is made up of the characters a, b, c, d, e each occurring with the probability 0.11, 0.40, 0.16, 0.09 and 0.24 respectively. The optimal Huffman coding technique will have the average length of :

  1. AOption (a)

    2.40

  2. BOption (b)

    2.16

  3. COption (c)

    2.26

  4. DOption (d)

    2.15

View answer & explanation

Correct answer

Answer: (b)B.

2.16

Why this answer is correct

The correct answer is option 2.

Key Points

Concept:

Huffman coding is a data compression technique. It constructs a tree by selecting the minimum frequency of available nodes. And assign the weights 1 for the left child and 0 for the right child or 0 for the left child and 1 for the right-left.

Add all the internal nodes of the tree

Average length =1 + 0.6 + 0.36 + 0.20 = 2.16

OR

Length of A = 1111 = 4 × 0.11 = 0.44

Length of B = 0 = 1 × 0.4 = 0.4

Length of C = 110 = 3 × 0.16 = 0.48

Length of D = 1110 = 4 × 0.09 = 0.36

Length of E = 10 = 2 × 0.24 = 0.48

Average length = 0.36 + 0.4 + 0.72 + 0.6 + 0.24

= 2.16

∴ Hence the correct answer is 2.16.

Question 8

An undirected graph G (V, E) contains n (n > 2) nodes named ν1, ν2, ....νn. Two nodes νi, and νj are connected if and only if 0 < |i - j| ≤ 2. Each edge (νi, νj) is assigned a weight i + j.

The cost of the minimum spanning tree of such a graph with 10 nodes is :

  1. AOption (a)

    88

  2. BOption (b)

    91

  3. COption (c)

    49

  4. DOption (d)

    21

View answer & explanation

Correct answer

Answer: (b)B.

91

Why this answer is correct

The correct answer is option 2

CONCEPT: 

A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges(V – 1) of a connected, edge-weighted undirected graph G(V, E) that connects all the vertices together, without any cycles and with the minimum possible total edge weight.      

EXPLANATION:

  1. Two nodes νi, and νj are connected if and only if 0 < |i - j| ≤ 2
  2. Each edge (νi, νj) is assigned a weight i + j.

Graph from the given conditions

3 + 4 + 8 + 8 + 12 + 16 + 18 = 91

Therefore the minimum cost is 91

Question 9

An XML document that adheres to syntax rules specified by XML 1.0 specification in that it must satisfy both physical and logical structured, is called :

  1. AOption (a)

    Well-formed

  2. BOption (b)

    Reasonable

  3. COption (c)

    Valid

  4. DOption (d)

    Sophisticated

View answer & explanation

Correct answer

Answer: (a)A.

Well-formed

Why this answer is correct

The correct answer is option 1.

CONCEPT 

A well-formed document in XML is a document that "adheres to the syntax rules specified by the XML 1.0 specification in that it must satisfy both physical and logical structures".

Key Points

Well-formed documents requirements:

  • Content be defined.
  • Content be delimited with a beginning and end tag.
  • Content be properly nested (parents within roots, children within parents).

Hence the correct answer is Well-formed.

Question 10

Which of the following statement(s) is/are TRUE regarding Java Servelets?

(a) A Java Servlet is a server-side component that runs on the webserver and extends the capabilities of a server.

(b) A Servelet can use the user interface classes like AWT or Swing.

  1. AOption (a)

    Only (a) is TRUE.

  2. BOption (b)

    Only (b) is TRUE.

  3. COption (c)

    Both (a) and (b) are TRUE.

  4. DOption (d)

    Neither (a) nor (b) is TRUE.

View answer & explanation

Correct answer

Answer: (a)A.

Only (a) is TRUE.

Why this answer is correct

The correct answer is option 1.

EXPLANATION 

STATEMENT (a):

A Java Servlet is a server-side component that runs on the webserver and extends the capabilities of a server.

The above statement is TRUE.

STATEMENT (b):

A Servlet can use the user interface classes like AWT or Swing.

A Servlet cannot use the user interface classes like AWT or Swing. Servlets can respond to any type of requests, they most commonly implement web containers for hosting web applications on web servers and thus qualify as a server-side servlet web API.

The above statement is FALSE.

Hence the correct answer is Only (a) is TRUE.

Question 11

Which of the following is correct statement ?

  1. AOption (a)

    In memory - mapped I/O, the CPU can manipulate I/O data residing in interface registers that are not used to manipulate memory words.

  2. BOption (b)

    The isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment.

  3. COption (c)

    In asynchronous serial transfer of data the two units share a common clock.

  4. DOption (d)

    In synchronous serial transmission of data the two units have different clocks.

View answer & explanation

Correct answer

Answer: (b)B.

The isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment.

Why this answer is correct

The correct answer is option 2

In isolated I/O method, unique 8 bit addresses are allocated to the IO devices. They can be accessed using instructions like IN and OUT.

Key Points

  • in memory - mapped I/O, both memory and IO devices use the same address space.
  • IO devices are accessed just like any other memory location.
  • No special control signals are required.
  • Instructions LDA and STA are used in memory mapped IO.
  • In Synchronous serial transfer of data, the two units share a common clock.
  • In Asynchronous serial transfer of data, the two units do not share a common clock.

Question 12

A micro-instruction format has micro-ops field which is divided into three subfields F1, F2, F3 each having seven distinct micro-operations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field ADF. The address space is of 128 memory locations. The size of micro-instruction is :  

  1. AOption (a)

    17 bits

  2. BOption (b)

    20 bits

  3. COption (c)

    24 bits

  4. DOption (d)

    32 bits

View answer & explanation

Correct answer

Answer: (b)B.

20 bits

Why this answer is correct

The correct answer is option 2

The size of the micro-instruction is 20.

Explanation:

The given micro-instruction consists of the following three subfields - F1, F2, F3, one condition field - CD, one branch field - BR, one address field - ADF.

So, 3 bits are required for each.

Since each sub-field has seven distinct operations, a minimum of 3 bits is required to indicate all of them.

CD-Condition field has four status bits, it needs 4 bits for four different conditions. 

BF-Branch field have four option so, it needs 2 bits for four option. 

Now there are 128 different memory location, So, there 7 bits are required for 128 different location.

But BR field is used in conjunction with the address field therefore the size of the address field is 7 – 2  = 5.

Total number of bits required for this micro-instruction = 3+3+3+4+2+5 = 20

F1F2F3CDBRADF
3 bits3 bits3 bits4 bits2 bits5 bits

Question 13

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item X, denoted by r(X) and w(X) respectively. Which one of them is conflict serializable ?

S1 : r1(X); r2(X); w1(X); r3(X); w2(X)

S2 : r2(X); r1(X); w2(X); r3(X); w1(X)

S3 : r3(X); r2(X); r1(X); w2(X); w1(X)

S4 : r2(X); w2(X); r3(X); r1(X); w1(X)

  1. AOption (a)

    S1

  2. BOption (b)

    S2

  3. COption (c)

    S3

  4. DOption (d)

    S4

View answer & explanation

Correct answer

Answer: (d)D.

S4

Why this answer is correct

CONCEPT

A schedule is called conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting operations.

For a schedule to be conflict serializable, there should be no cycle present in its precedence graph.

EXPLANATION: 

Option_1 – Not conflict serializable

T1T2T3
r(X)
r(X)
w(X)
r(X)
w(X)

 

  • Cycle between T1 and T2.
  • Cycle between T1->T3->T2
<br>

Option_2 – Not conflict serializable

T1T2T3
r(X)
r(X)
w(X)
r(X)
w(X)

 

  • Cycle between T1 and T2.
  • Cycle between T1->T2->T3

 

Option-3 - Not conflict serializable

T1T2T3
r(X)
r(X)
r(X)
w(X)
w(X)

 

  • Cycle between T1 and T2.

 

Option-4 - Conflict serializable

T1T2T3
r(X)
w(X)
r(X)
r(X)
w(X)

 

  • No cycle
<br>

Hence, Option_4 is a conflict serializable schedule

Question 14

Suppose a database schedule 5 involves transactions T1, T2, .............Tn Consider the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule ?

  1. AOption (a)

    Topological order

  2. BOption (b)

    Depth - first order

  3. COption (c)

    Breadth - first order

  4. DOption (d)

    Ascending order of transaction indices

View answer & explanation

Correct answer

Answer: (a)A.

Topological order

Why this answer is correct

The correct answer is option 1

Key Points

  • For a schedule to be conflict serializable, there should be no cycle present in the precedence graph.
  • Topological sort is not possible for the cyclic graph.
  • Hence topological ordering of the vertices is guaranteed to yield a serial schedule.

Additional Information

  • BFS and DFS are also possible for cyclic graphs.
  • Ascending order of transactions indices also does not guarantee serial a serial schedule because in a transaction more indices might come before the lower one.

Question 15

If every non-key attribute is functionally dependent on the primary key, then the relation is in _______.

  1. AOption (a)

    First normal form

  2. BOption (b)

    Second normal form

  3. COption (c)

    Third normal form

  4. DOption (d)

    Fourth normal form

View answer & explanation

Correct answer

Answer: (b)B.

Second normal form

Why this answer is correct

The correct answer is option 2:

CONCEPT

1NF:

  • There are only Single Valued Attributes.
  • There is a unique name for every Attribute/Column.

2NF:

  • A relation that is in First Normal Form
  • Every non-primary-key attribute is fully functionally dependent on the primary key

Additional Information 

3NF:

  • The third normal form is based on the concept of transitive dependency. A functional dependency X->Y in a relation schema R is a transitive dependency if there exists a set of attributed Z in R that is neither a candidate key nor a subset of any key of R.
  • A relation is in 3NF if it satisfies 2NF and no prime attribute of R is transitively dependent on the primary key.
  • If X - > A is a functional dependency, then A should be a prime attribute or X should be a candidate key.
  • Lossless join and dependency preservation is always possible in 3NF. 3NF decomposition is always lossless join and dependency preserving.

BCNF:

  • It stands for Boyce Codd normal form.
  • A relation R is in BCNF if whenever a non-trivial functional dependency X -> A holds in R, then X is a superkey of R. Any relation with two attributes is always in BCNF. Because when a relation contains only two attributes then one attribute determines another and the left side of the functional dependency will always be a candidate key in that case.
  • BCNF is not always dependency preserving.

Question 16

Given two relations R1(A, B) and R2(C, D), the result of following query

Select distinct A, B

from R1, R2

is guaranteed to be same as R1 provided one of the following condition is satisfied.

  1. AOption (a)

    R1 has no duplicates and R2 is empty.

  2. BOption (b)

    R1 has no duplicates and R2 is non-empty.

  3. COption (c)

    Both R1 and R2 have no duplicates.

  4. DOption (d)

    R2 has no duplicates and R1 is non - empty

View answer & explanation

Correct answer

Answer: (b)B.

R1 has no duplicates and R2 is non-empty.

Why this answer is correct

CONCEPT:

  • SQL Relations are MULTISET, not SET. So, R1 or R2 can have duplicated.
  • If R1 has duplicates, in that case, due to distinct keywords those duplicates will be eliminated in the final result and SQL query will not be equal to R1. So, R1 cannot have duplicates.

 

EXPLANATION:

Select A,B

from R1, R2 :

In this query first we will take cartesian product of R1, R2 (R2 must be non empty)for this 0- R2 then select distinct A,B from cartesian product of R1, R2 (for A,B being distinct there should not any duplicate A,B).

And

Select A,B

from R2

For this query A,B → No duplicate A,B.

By combining condition for both query we will get the right condition.

So, option (2) is correct.

Question 17

Consider a relation R (A, B, C, D, E, F, G, H), where each attribute is atomic, and following functional dependencies exist.

CH → G

A → BC

B → CFH

E → A

F → EG

The relation R is ______.

  1. AOption (a)

    in 1NF but not in 2NF

  2. BOption (b)

    in 2NF but not in 3NF

  3. COption (c)

    in 3NF but not in BCNF

  4. DOption (d)

    in BCNF

View answer & explanation

Correct answer

Answer: (a)A.

in 1NF but not in 2NF

Why this answer is correct

The correct answer is option 1

Explanation:

Since attribute D is not a part of any FD, it must be a part of the candidate key.

AD+ = {ABCDEFGH}

BD+ = {ABCDEFGH}

ED+ = {ABCDEFGH}

FD+ = {ABCDEFGH}

CD+, GD+, and HD+ do not all the attributes. So, they can not be candidate keys.

Candidate keys are AD, BD, ED, and FD.

A → BC, B → CFH, and F → EG are partial dependencies. So, the relation is not in 2NF.

Hence the relation is in 1NF but not in 2NF.

Question 18

Consider a schema R(A, B, C, D) and following functional dependencies.

A → B

B → C

C → D

D → B

Then decomposition of R into R1(A, B), R2(B, C) and R3(B, D) is _______

  1. AOption (a)

    Dependency preserving and lossless join.

  2. BOption (b)

    Lossless join but not dependency preserving.

  3. COption (c)

    Dependency preserving but not lossless join.

  4. DOption (d)

    Not dependency preserving and not lossless join.

View answer & explanation

Correct answer

Answer: (a)A.

Dependency preserving and lossless join.

Why this answer is correct

The correct answer is "option 1".

CONCEPT: 

Lossless join: If there is no loss of information by replacing a relation R with two relation schema R1 & R2, then join can be said as Lossless decomposition.

That means, after natural join R1 & R2, we will get exactly the same relation R.

Some properties of lossless decomposition are:

1. R1 ∩ R2 = R1 or R1 ∩ R2 = R2

2. R1 U R2 = R 3. R1 ∩ R2 = super key of either R1 or R2

Decomposition preservation: Decomposition D = { R1,R2..Rn } of relation R is dependency preserving with respect to Functional dependency F if :

Closure of Union of all functional dependencies with respect to each relation is equivalent to closure of F.

In other words, If relation R has FD F, its decomposed relations R1 & R2 has FD F1 & F2 respectively then, F' = F1 U F2 & F'+ = F+ .                   

EXPLANATION: 

Lossless: Consider relation R1(A,B) & R2(B,C):

R1 ∩ R2 -> (B)+ -> { B,C,D }                      {B is common attribute in both relation so find its closure}

Since B+  derives relation R2, Hence, relation R1'(A,B,C) is lossless.

Now consider relation R1'(A,B,C) & R3(B,D):

R1' ∩ R3 -> (B)+ -> { B,C,D }                      {B is common attribute in both relation so find its closure}

Since B+  derives relation R3, Hence relation R(A,B,C,D) is lossless.

Decomposition: 

Here,

R1(A,B) -> { A->B },     --- FD1

R2(B,C) -> { B->C },     --- FD2

R3(B,D) -> { D->B }      --- FD3

F' = FD1 U FD2 U FD3

    = { A->B, B->C, D->B }

Now find closure of F' & F :

F'+ = {A,B,C,D} & F+ = {A,B,C,D}

Since the closure of F' also preserve dependency C -> D,

Hence, given decomposition of R into R1(A, B), R2(B, C) and R3(B, D) is dependency preserving and lossless join.

Additional Information

1. If any one of the above lossless properties fails then the decomposition will be lossy decomposition.

Lossy decomposition after natural join includes some extra information including the whole relation.

2. Decomposition preservation can also be described as "if all the functional dependencies can be derived or preserved even after decomposition of relations by finding closure of the union of decomposed relation & original relation."

Question 19

Which of the following is not a component of Memory tube display ?

  1. AOption (a)

    Flooding gun

  2. BOption (b)

    Collector

  3. COption (c)

    Ground

  4. DOption (d)

    Liquid Crystal

View answer & explanation

Correct answer

Answer: (d)D.

Liquid Crystal

Why this answer is correct

The correct answer is "option 4".

CONCEPT: 

The components of the Memory tube display are:

  1. Flooding gun
  2. Collector 
  3. Ground

Hence, Liquid crystal is not a component of the Memory tube display.

Additional Information

1.There are two types of guns in the Memory tube display: Primary gun and flooding gun.

2.Some other components of Memory tube display are:

a. Writing beam

b. storage grid

c. Screen

d. Focusing & deflection system

e. Flood electron

f. Ground/base

Question 20

Which of the following is not true in case of Oblique Projections?

  1. AOption (a)

    Parallel projection rays are not perpendicular to the viewing plane.

  2. BOption (b)

    Parallel lines in space appear parallel on the final projected image.

  3. COption (c)

    Used exclusively for pictorial purposes rather than formal working drawings.

  4. DOption (d)

    Projectors are always perpendicular to the plane of projection.

View answer & explanation

Correct answer

Answer: (d)D.

Projectors are always perpendicular to the plane of projection.

Why this answer is correct

The correct answer is option 4.

Key Points

Statement I: TRUE

Parallel projection rays are not perpendicular to the viewing plane.

In an oblique projection, the parallel projection rays are not perpendicular to the viewing plane.

Statement II: TRUE

Parallel lines in space appear parallel on the final projected image.

In an oblique projection, Parallel lines in space appear parallel on the final projected image.

Statement III: TRUE

Used exclusively for pictorial purposes rather than formal working drawings.

In an oblique projection, Used exclusively for pictorial purposes rather than formal working drawings.

Statement IV: FALAE

Because in orthographic projection, the projectors are parallel to each other and also perpendicular to the plane but in oblique projection, the projectors are inclined to the plane of projection and projectors are parallel to each other.

∴ Hence the correct answer is Projectors are always perpendicular to the plane of projection.

Question 21

With respect to CRT, the horizontal retrace is defined as :

  1. AOption (a)

    The path an electron beam takes when returning to the left side of the CRT.

  2. BOption (b)

    The path an electron beam takes when returning to the right side of the CRT.

  3. COption (c)

    The technique of turning the electron beam off while retracing.

  4. DOption (d)

    The technique of turning the electron beam on/off while retracing.

View answer & explanation

Correct answer

Answer: (a)A.

The path an electron beam takes when returning to the left side of the CRT.

Why this answer is correct

The correct answer is option 1.

Key Points

 Horizontal retracing is also known as vertical retracing. The beam returns to the left of the screen at the end of each scan line to show the next scan line.

<br>

∴ Hence the correct answer is The path an electron beam takes when returning to the left side of the CRT.

Question 22

Find the equation of the circle x2 + y2 = 1 in terms of x' y' coordinates, assuming that the xy coordinate system results from a scaling of 3 units in the x’ direction and 4 units in the y' direction.

  1. AOption (a)

    3(x')2 + 4(y)2 = 1

  2. BOption (b)

    (x′3)2+(y′4)2=1{\left( {\frac{{x'}}{3}} \right)^2} + {\left( {\frac{{y'}}{4}} \right)^2} = 1

  3. COption (c)

    (3x')2 + (4y')2 = 1

  4. DOption (d)

    13(x′)2+14(y′)2=1\frac{1}{3}(x')^2+\frac{1}{4}(y')^2 = 1

View answer & explanation

Correct answer

Answer: (b)B.

(x′3)2+(y′4)2=1{\left( {\frac{{x'}}{3}} \right)^2} + {\left( {\frac{{y'}}{4}} \right)^2} = 1

Why this answer is correct

The correct answer is option 2.

Key Points

Scaling a Curve:

Let f[x,y]==0 be the equation for a curve in rectangular coordinates. To scale the curve by S, the new equation would be: f[x/s, y/s]==0

Let f[θ,r]==0 be the equation for a curve in polar coordinate. To scale it by s, the new formula is f[r/s,θ]==0.

The equation of the circle x2 + y2 = 1 in terms of x' y' coordinates and the xy coordinate system results from a scaling of 3 units in the x’ direction and 4 units in y' direction. So, x replace by xl3x^l \over 3 and y replace by yl4y^l \over 4 and substitute the value in the x2 + y2 = 1

Hence the correct answer is (x′3)2+(y′4)2=1{\left( {\frac{{x'}}{3}} \right)^2} + {\left( {\frac{{y'}}{4}} \right)^2} = 1

Question 23

Find the normalization transformation that maps a window whose lower left corner is at (1,1) and upper right corner is at (3, 5) onto a viewport that is the entire normalized device screen.

  1. AOption (a)

    \(\left( {\begin{array}{*{20}{c}} {\frac{1}{2}}&0&{ - \frac{1}{2}}\ 0&{\frac{1}{4}}&{ - \frac{1}{4}}\ 0&0&1 \end{array}} \right)\)

  2. BOption (b)

    \(\left( {\begin{array}{*{20}{c}} {\frac{1}{2}}&0&{\frac{1}{2}}\ 0&{ - \frac{1}{4}}&{\frac{1}{4}}\ 1&1&1 \end{array}} \right)\)

  3. COption (c)

    \(\left( {\begin{array}{*{20}{c}} {\frac{1}{2}}&0&{ - \frac{1}{2}}\ 0&{\frac{1}{4}}&{\frac{1}{4}}\ 1&0&0 \end{array}} \right)\)

  4. DOption (d)

    \(\left( {\begin{array}{*{20}{c}} {\frac{1}{2}}&0&{\frac{1}{2}}\ 0&{\frac{1}{4}}&{ - \frac{1}{4}}\ 1&0&0 \end{array}} \right)\)

View answer & explanation

Correct answer

Answer: (a)A.

\(\left( {\begin{array}{*{20}{c}} {\frac{1}{2}}&0&{ - \frac{1}{2}}\ 0&{\frac{1}{4}}&{ - \frac{1}{4}}\ 0&0&1 \end{array}} \right)\)

Why this answer is correct

The correct answer is option 1.

Given Data:

Window to viewport mapping

FORMULA:

Window to viewport mapping

Sx = Vxmax−VxminWxmax−WxminV_xmax-V_xmin \over W_xmax-W_xmin

Sy = Vymax−VyminWymax−WyminV_ymax-V_ymin \over W_ymax-W_ymin

Normalization transformation N = [Sx0−Sx×Wxmin+Vxmin 0Sy−Sy×Wymin+Vymin 001]\begin{bmatrix} S_x & 0 & -S_x \times W_xmin+V_xmin\ 0 & S_y & -S_y \times W_ymin+V_ymin\ 0 & 0 & 1 \end{bmatrix}

CAlCULATION:

Sx = 1−03−11-0 \over 3-1

Sy = 121 \over 2

Sy = 1−05−11-0 \over 5-1

Sy = 141 \over 4

−Sx×Wxmin+Vxmin-S_x \times W_xmin+V_xmin = −12×(1)+0{-1 \over 2 }\times(1)+0 = −12-1 \over 2

−Sy×Wymin+Vymin-S_y \times W_ymin+V_ymin = −14×(1)+0{-1 \over 4 }\times(1)+0 = −14-1 \over 4

Hence the correct answer is

\(\left( {\begin{array}{*{20}{c}} {\frac{1}{2}}&0&{ - \frac{1}{2}}\ 0&{\frac{1}{4}}&{ - \frac{1}{4}}\ 0&0&1 \end{array}} \right)\)

Question 24

The three aspects of Quantization, programmers generally concerned with are :

  1. AOption (a)

    Coding error, Sampling rate and Amplification

  2. BOption (b)

    Sampling rate, Coding error and Conditioning

  3. COption (c)

    Sampling rate, Aperture time and Coding error

  4. DOption (d)

    Aperture time, Coding error and Strobing

View answer & explanation

Correct answer

Answer: (c)C.

Sampling rate, Aperture time and Coding error

Why this answer is correct

The correct answer is option 3.

CONCEPT

Quantizing: Quantizing is the process of dividing an input analog signal into a string of discrete outputs, each of constant amplitude. There are three aspects of quantizing.

Key Points

Mainly three aspects of quantizing are Sampling rate, Aperture time, and Coding error.

  • Sampling rate: The number of samples per second.
  • Aperture time: Aperture time is the sampling rate, defined as the number of a second per sample.
  • Coding error (amplitude uncertainty): The difference between the conditional signal and the quantized signal.

Hence the correct answer is the sampling rate, Aperture time, and Coding error.

Question 25

Which of the following problems is undecidable ?

  1. AOption (a)

    To determine if two finite automata are equivalent

  2. BOption (b)

    Membership problem for context free grammar

  3. COption (c)

    Finiteness problem for finite automata

  4. DOption (d)

    Ambiguity problem for context free grammar

View answer & explanation

Correct answer

Answer: (d)D.

Ambiguity problem for context free grammar

Why this answer is correct

The correct answer is option 4:

EXPLANATION

Option 1: Decidable

Minimize both finite automata if both are the same having automata then both are equivalent and hence to determine if two finite automata are equivalent is decidable 

Option 2: Decidable

For the context-free language, we have a CYK algorithm for membership problem, so it is decidable

Option 3: Decidable

There is an algorithm for the finiteness problem

ALGORITHM:

Step1: delete states which are not reachable from the initial state and corresponding transitions.

Step 2: delete states and corresponding transitions which are not reachable to the final state.

Step 3: In remaining finite automata, if we find at least one loop and one final state then it is accepting infinite language.

so the finiteness problem is decidable

Option 4: Undecidable

Decidable there is no algorithm for finding ambiguity in grammar, so ambiguity is undecidable.

Question 26

Finite state machine can recognize language generated by ________.

  1. AOption (a)

    Only context free grammar

  2. BOption (b)

    Only context sensitive grammar

  3. COption (c)

    Only regular grammar

  4. DOption (d)

    any unambiguous grammar

View answer & explanation

Correct answer

Answer: (c)C.

Only regular grammar

Why this answer is correct

The correct answer is "option 3".

CONCEPT: 

The finite state machine, also known as a finite automaton, is a model of computation that can be used to model problems in various fields like Artificial Intelligence & has only finite internal memory, that's why called a finite state machine. 

It can be only in one of any definite states at any instant of time and changes the state when receiving input. 

EXPLANATION: 

Option1: 

Push Down automata can recognize language generated by a context-free grammar.

Option2:  

Linear Bounded automata can recognize language generated by Context-sensitive grammar.

Option3:  

Finite state machine can recognize language generated by regular grammar.

Option4: 

Unambiguous grammar is the grammar that doesn't have ambiguity i.e. does not have more than one left or rightmost derivation for an input string.

Hence, language generated by the regular grammar is accepted by the finite state machines.

Question 27

The logic of pumping lemma is an example of _______.

  1. AOption (a)

    iteration

  2. BOption (b)

    recursion

  3. COption (c)

    the divide and conquer principle

  4. DOption (d)

    the pigeon - hole principle

View answer & explanation

Correct answer

Answer: (d)D.

the pigeon - hole principle

Why this answer is correct

The logic of the pumping lemma is an example of the pigeon - hole principle

Concept:

Pigeon-hole principle: If there are total p pigeons seating into q holes then what pigeon-hole principle says that at least one hole must have more than one pigeon.

Pumping lemma: There is an infinite number of input sequences possible and for every finite automaton there is a finite number of states.

Therefore, the logic pumping lemma is a good example of the pigeon-hole principle

Question 28

Heap allocation is required for languages that :

  1. AOption (a)

    use dynamic scope rules

  2. BOption (b)

    support dynamic data structures

  3. COption (c)

    support recursion

  4. DOption (d)

    support recursion and dynamic data structures

View answer & explanation

Correct answer

Answer: (b)B.

support dynamic data structures

Why this answer is correct

The correct answer is option 2.

Key Points

  • Heap allocation is required for languages that support dynamic data structures.
  • Dynamic data structures are data structures that grow and shrink as you need them to by allocating and deallocating memory from a place called the heap.
  • Dynamic data structures allocate blocks of memory from the heap as required, and link those blocks together into some kind of data structure using pointers.

Hence the correct answer is to Support dynamic data structures.

Question 29

Pumping lemma for regular language is generally used for proving :

  1. AOption (a)

    whether two given regular expressions are equivalent

  2. BOption (b)

    a given grammar is ambiguous

  3. COption (c)

    a given grammar is regular

  4. DOption (d)

    a given grammar is not regular

View answer & explanation

Correct answer

Answer: (d)D.

a given grammar is not regular

Why this answer is correct

The correct answer is option 4.

Key Points

The pumping lemma is often used to prove that a particular language is non-regular. Pumping lemma for regular language is generally used for proving a given grammar is not regular.

Hence the correct answer is a given grammar is not regular.

Additional Information

Pumping Lemma is to be applied to show that certain languages are not regular. It should never be used to show a language is regular.

If L is regular, it satisfies Pumping Lemma.

If L does not satisfy Pumping Lemma, it is non-regular.

Question 30

Quadrature Amplitude Modulation means changing both:

  1. AOption (a)

    Frequency and phase of the carrier.

  2. BOption (b)

    Frequency and Amplitude of the carrier.

  3. COption (c)

    Amplitude and phase of the carrier.

  4. DOption (d)

    Amplitude and Wavelength of the carrier.

View answer & explanation

Correct answer

Answer: (c)C.

Amplitude and phase of the carrier.

Why this answer is correct

The correct answer is option 3.

CONCEPT:

Quadrature Amplitude Modulation (QAM) utilizes both amplitude and phase components to provide a form of modulation that is able to provide high levels of spectrum usage efficiency.

Important Points

Quadrature amplitude modulation (QAM) has been used for some analog transmissions including AM stereo transmissions, but it is for data applications where it has come into its own. It is able to provide a highly effective form of modulation for data and as such it is used in everything from cellular phones to Wi-Fi and almost every other form of the high-speed data communications system.

<br>

∴ Hence the correct answer is Amplitude and phase of the carrier.

Question 31

If a file consisting of 50,000 characters takes 40 seconds to send, then the data rate is ______

  1. AOption (a)

    1 kbps

  2. BOption (b)

    1.25 kbps

  3. COption (c)

    2 kbps

  4. DOption (d)

    10 kbps

View answer & explanation

Correct answer

Answer: (d)D.

10 kbps

Why this answer is correct

CONCEPT:

The data rate is the number of bits per second transferred.

DATA:

File size =  50,000 characters

1 character = 8 bits

1 kb = 1000 b

CALCULATION:

40 seconds = 50,000 characters

40 seconds = 50,000 ×  8 bits

÷ by 40 on both sides

1 second =  10,000 bits

1 second =  10 kb

Therefore the date rate is 10 kbps

Question 32

The language L = {ai b ci | i ≥  0} over the alphabet {a, b, c} is :

  1. AOption (a)

    a regular language

  2. BOption (b)

    not a deterministic context free language but a context free language

  3. COption (c)

    recursive and is a deterministic context free language

  4. DOption (d)

    not recursive

View answer & explanation

Correct answer

Answer: (c)C.

recursive and is a deterministic context free language

Why this answer is correct

The correct answer is option 3:

EXPLANATION

Language L = {ai b ci | i ≥  0} 

Deterministic Pushdown automata

For every push of 'a' every 'c' should be popped.

This is the deterministic context-free language because L is accepted by Deterministic Pushdown automata

Every deterministic context-free language is also a recursive language.

Therefore option 3 is correct.

Question 33

Suppose we want to download-text documents at the rate of 100 pages per second. Assume that a page consists of an average of 24 lines with 80 characters in each line. What is the required bit rate of the channel? 

  1. AOption (a)

    192 kbps

  2. BOption (b)

    512 kbps

  3. COption (c)

    1.248 Mbps

  4. DOption (d)

    1.536 Mbps

View answer & explanation

Correct answer

Answer: (d)D.

1.536 Mbps

Why this answer is correct

The correct answer is "option 4".

CONCEPT: 

Bit rate means no. of bits per second.

Data: 

Download rate: 100 pages/second

No. of lines per page: 24 lines/page

No. of characters per line: 24 character/line

Formula:

Bit rate of channel = No. of pages/second × No. of lines/page × No. of characters/line × No. of bits

CALCULATION: 

Bit rate of channel = 100 pages × 24 lines × 80 characters × 8 bits 

                              = 1536000 bits/second or 1.536Mbps

Hence, the bit rate is 1.536Mbps.

Mistake Points 

Never consider Mbps & MBPS as the same. 

Mbps  - Mega Bits Per Second

MBPS - MegaBytes Per Second

1 Byte - 8 bits

Question 34

Match the following:

List - IList - II
A. Data link layerI. Encryption
B. Network layerII. Connection control
C. Transport layerIII. Routing
D. Presentation layerIV. Framing
  1. AOption (a)

    A - IV, B - III, C - I, D - II

  2. BOption (b)

    A - III, B - IV, C - II, D - I

  3. COption (c)

    A - IV, B - II, C - III, D - I

  4. DOption (d)

    A - IV, B - III, C - II, D - I

View answer & explanation

Correct answer

Answer: (d)D.

A - IV, B - III, C - II, D - I

Why this answer is correct

The correct answer is option 4.

Key Points

  • Data link-layer work is to do framing
  • Network layer work is host to host connection, logical address, switching, routing, congestion control, fragmentation, so routing takes place in the network layer
  • Transport layer. responsibilities are end to end connectivity,flow control,error control,segmentation,multiplex,demultiplex,connection control.
  • Presentation layer monitors character translation ,encryption ,decryption,compression, expansion etc

Therefore option 4 is correct.

Question 35

Consider a system with five processes P0, through P4, and three resource types A, B and C. Resource type A has seven instances, resource type B has two instances and resource type C has six instances suppose at time T0 we Have the following allocation.

ProcessAllocationRequestAvailable
ABCABCABC
P0010000000
P1200202
P2303000
P3211100
P4022002

 

If we implement Deadlock detection algorithm we claim that system is ______.

  1. AOption (a)

    Semaphore

  2. BOption (b)

    Deadlock state

  3. COption (c)

    Circular wait

  4. DOption (d)

    Not in deadlock state

View answer & explanation

Correct answer

Answer: (d)D.

Not in deadlock state

Why this answer is correct

The correct answer is "option 4".

CONCEPT: 

Deadlock is a condition in which a process P1 wants a resource that is held by any other process P2 & process P2 wants a resource that is held by process P1.

No processes that are in deadlock can further proceed and get blocked.

EXPLANATION: 

Deadlock detection algorithm is used to detect any chance of deadlock while allocating resources to the processes.

If any process will cause or has a chance of creating a deadlock, then this algorithm will not give resources to that particular process causing deadlock.

Steps of deadlock detection algorithm:

1.Deadlock detection algorithm will check that process requesting resources are available.

Request <= Available

2. If the above condition gets satisfied then the algorithm will allocate the resources demanded by the process.

Also, after fulfilling the request, availability gets added with the allocation of that process.

available = available + allocation

3. Else, the algorithm will keep the process till its next turn.

CALCULATION: 

Step 1.

Process P0 is requesting instances (0,0,0) and it is available

(0,0,0) <= (0,0,0)

so, P0 will get the resources:

available = (0,0,0) + (0,1,0) = (0,1,0)                { A - 0 instance, B - 1 instance , C - 0 instance  }

Step 2.

Process P1 is requesting instances (2,0,2) it is not available 

(2,0,2) > (0,1,0)                                       { request < available }

so, P2 will wait.

Step 3.

Process P2 is requesting instances (0,0,0) and it is available

(0,0,0) < (0,1,0)

so, P2 will get the resources:

available = (0,1,0) + (3,0,3) = (3,1,3)                { A - 3 instance, B - 1 instance , C - 3 instance  }

Step 4.

Process P3 is requesting instances (1,0,0) and it is available 

(1,0,0) < (3,1,3)

so, P3 will get the resources:

available = (3,1,3) + (2,1,1) = (5,2,4)                { A - 5 instance, B - 2 instance , C - 4 instance  }

Step 5.

Process P4 is requesting instances (0,0,2) and it is available 

(0,0,2) < (5,2,4)

so, P4 will get the resources:

available = (5,2,4) + (0,0,2) = (5,2,6)                { A - 5 instance, B - 2 instance , C - 6 instance  }

Step 6.

Process P1 is requesting instances (2,0,2) and it is available 

(2,0,2) < (5,2,6)

so, P1 will get the resources:

available = (5,2,6) + (2,0,0) = (7,2,6)                { A - 7 instance, B - 2 instance , C - 6 instance  }

Also, detection algorithm create safe sequence i.e. sequence of resource allocated processes without any deadlock.

Here, safe sequence is <P0,P2,P3,P4,P1>

Hence, the system is not in a deadlock state.

Important Points

If a system is in the safe state then the system is not in a deadlock state but if the system is not in the safe state then the system may or may not be in a deadlock state.

Mistake Points

Always compare as follows:

(1,2,3) < (1,0,0) means 1<1, 2<0 & 3<0 

Never check as :123<100

Question 36

The Bounded buffer problem is also known as _______

  1. AOption (a)

    Producer - consumer problem

  2. BOption (b)

    Reader - writer problem

  3. COption (c)

    Dining Philosophers problem

  4. DOption (d)

    Both (2) and (3)

View answer & explanation

Correct answer

Answer: (a)A.

Producer - consumer problem

Why this answer is correct

The correct answer is option 1. 

Key Points

The Bounded buffer problem is also known as the producer-consumer problem.

  • The Producer-Consumer problem is a classic multi-process synchronization problem, which means we're attempting to synchronize several processes.
  • In the producer-consumer dilemma, there is only one Producer who produces certain goods, and there is only one Consumer who consumes the Producer's products. Both producers and users share the same memory buffer, which has a fixed capacity.
  • The Producer's job is to make the object, store it in the memory buffer, and then start making more. The Consumer's responsibility is to consume the object from the memory buffer.

Hence the correct answer is Producer - consumer problem.

Additional Information

Reader-writer problem​:

The readers-writers problem is a classical problem of process synchronization, it relates to a data set such as a file that is shared between more than one process at a time. Among these various processes, some are Readers - which can only read the data set; they do not perform any updates, some are Writers - can both read and write in the data sets.

Dining Philosophers problem​:

The dining philosophers problem is another classic synchronization problem that is used to evaluate situations where there is a need of allocating multiple resources to multiple processes.

Question 37

Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 37, 122, 14, 124, 65, 67. Suppose SSTF disk scheduling algorithm implemented to meet the requests then the total number of head movements are ______ if the disk head is initially at 53. 

  1. AOption (a)

    224

  2. BOption (b)

    248

  3. COption (c)

    236

  4. DOption (d)

    240

View answer & explanation

Correct answer

Answer: (c)C.

236

Why this answer is correct

Concept:

In Shortest Seek Time First (SSTF) scheduling, after servicing every I/O request, the disk head finds the nearest block to be serviced and moves to that particular block.

Explanation

For Example, after servicing block 53, the nearest block request is at 65 and moves to block 65. Similarly all the above requests are serviced as shown in the figure below

Total number of head movements = (67-53) + (67-14) + (183-14) = 236

Question 38

In Artificial Intelligence (AI), which agent deals with happy and unhappy state ?

  1. AOption (a)

    Simple reflex agent

  2. BOption (b)

    Model based agent

  3. COption (c)

    Learning agent

  4. DOption (d)

    Utility based agent

View answer & explanation

Correct answer

Answer: (d)D.

Utility based agent

Why this answer is correct

The correct answer is "option 4".

CONCEPT:

According to computer science, Artificial Intelligence is the study of "intelligent agents" or "rational agents and their environment".

Agent: Agent is those that work or act in their environment.

Environment: It is the surrounding of an agent.

An agent takes input from the environment through sensors & delivers the output to the environment through actuators.

EXPLANATION: 

option1: Simple reflex agent acts on the basis of current percept and ignores percept history i.e. all the history an agent has perceived till date.

option2: Model-based agents have a model i.e. knowledge about how things happen in the whole world & based on the model it performs actions.

option3: Learning agents learn from past experiences and automatically adapt through learning. It has learning capabilities.

option4: Utility-based agents choose actions on the basis of utilities or preference and chooses the actions that maximize the expected utility. Utility describes the happiness of the agent.

Hence, Utility-based agents deal with happy & unhappy agents.

Additional Information

1. Sensors are used to detect any type of change in the environment & inform other electronic devices.

2. Actuators convert energy into motion & are responsible for the movement of the system.

3. Rational agent acts in a way that improves the performance measure with any possible actions.

Question 39

If b is the branching factor and m is the maximum depth of the search tree, what is the space complexity of greedy search ?  

  1. AOption (a)

    O (b + m)

  2. BOption (b)

    O (bm)

  3. COption (c)

    O(bm)

  4. DOption (d)

    O(mb)

View answer & explanation

Correct answer

Answer: (c)C.

O(bm)

Why this answer is correct

The correct answer is option 3.

EXPLANATION: 

Best First search or Greedy search:

worst-case time complexityworst-case space complexity
Greedy searchO(bm+1)O(bm)

where m is the maximum depth of the search.

Greedy best-first search algorithm always selects the path which appears best at that moment. It is the combination of depth-first search and breadth-first search algorithms. It uses the heuristic function and search. Best-first search allows us to take advantage of both algorithms. With the help of the best-first search, at each step, we can choose the most promising node. In the best-first search algorithm, we expand the node which is closest to the goal node and the closest cost is estimated by heuristic function.

Hence the correct answer is O(bm).

Question 40

Let P, Q, R and S be Propositions. Assume that the equivalences P↔(Q∨;¬;Q)P\leftrightarrow(Q \vee ;\neg; Q) and Q↔RQ \leftrightarrow R hold. Then the truth value of the formula (P∧Q)⇒((P∧R)∨S)\left( {P \wedge Q} \right) \Rightarrow \left( {\left( {P \wedge R} \right) \vee S} \right) is always:

  1. AOption (a)

    True

  2. BOption (b)

    False

  3. COption (c)

    Same as truth table of Q

  4. DOption (d)

    Same as truth table of S

View answer & explanation

Correct answer

Answer: (a)A.

True

Why this answer is correct

The correct answer is option 1.

Key Points

Equivalence condition (Both RHS and LHS should be True)= P⇔(QV¬Q)

Holding condition (Both RHS and LHS may True/False)=Q⇔R

Step 1: (P∧Q)⇒((P∧R)VS)[Note: Q, R, and S is True]

PQRS(P∧Q)((P∧R)VS)(P∧Q)⇒((P∧R)VS)
TTTTTTT

Note: The given condition is True

Step-2:(P∧Q)⇒((P∧R)VS) [Note: Q, R, and S is False]

PQRS(P∧Q)((P∧R)VS)(P∧Q)⇒((P∧R)VS)
TFFFFFT

Note: The given condition is True

Hence the correct answer is True.

Question 41

“If X, then Y unless Z” is represented by which of the following formulae in propositional logic ?

  1. AOption (a)

    (X∧Y)→¬;Z\left( {X \wedge Y} \right) \to \neg ;Z

  2. BOption (b)

    (X∧¬;Z)→Y\left( {X \wedge \neg ;Z} \right) \to Y

  3. COption (c)

    X→(Y∧¬;Z)X \rightarrow (Y \wedge \neg;Z)

  4. DOption (d)

    Y→(X∧¬;Z)Y \rightarrow (X \wedge \neg;Z)

View answer & explanation

Correct answer

Answer: (b)B.

(X∧¬;Z)→Y\left( {X \wedge \neg ;Z} \right) \to Y

Why this answer is correct

The correct answer is option 2.

Key Points

“If X, then Y unless Z”  means   ¬Z→(X→Y)\neg Z \to(X \to Y)

Z∨¬X∨YnegX∨Z∨YZ \lor \neg X \lor Y \\neg X\lor Z \lor Y

A). (X∧Y)→¬;Z ¬(X∧Y)∨¬Z ¬X∨¬Y∨¬ZA). \ \left( {X \wedge Y} \right) \to \neg ;Z \ \neg (X \land Y ) \lor \neg Z \ \neg X \lor \neg Y \lor \neg ZB). (X∧¬;Z)→Y ¬(X∧¬Z)∨Y ¬X∨Z∨YB). \ \left( {X \wedge \neg ;Z} \right) \to Y \ \neg (X \land \neg Z) \lor Y \ \neg X \lor Z \lor YC. X→(Y∧¬;Z) ¬X∨(Y∧¬Z) ¬X∨Y∧¬ZC. \ X \rightarrow (Y \wedge \neg;Z) \ \neg X \lor (Y \land \neg Z) \ \neg X \lor Y \land \neg ZD. Y→(X∧¬;Z) Y∨(X∧¬Z) Y∨X∧¬ZD. \ Y \rightarrow (X \wedge \neg;Z) \ Y \lor (X \land \neg Z) \ Y \lor X \land \neg Z

Hence Option 2 only matches negX∨Z∨Y\\neg X\lor Z \lor Y

Hence the correct answer is (X∧¬;Z)→Y\left( {X \wedge \neg ;Z} \right) \to Y

Question 42

Consider the following two well-formed formulas in prepositional logic.

F1: P⟹¬;PP \Longrightarrow \neg ;P

F2: (P⟹¬;P);∨;(¬;P⟹P)(P \Longrightarrow \neg ;P) ;\vee; (\neg ; P \Longrightarrow P)

Which of the following statements is correct ?

  1. AOption (a)

    F1 is Satisfiable, F2 is valid

  2. BOption (b)

    Fl is unsatisfiable, F2 is Satisfiable

  3. COption (c)

    F1 is unsatisfiable, F2 is valid

  4. DOption (d)

    Fl and F2 both are Satisfiable

View answer & explanation

Correct answer

Answer: (a)A.

F1 is Satisfiable, F2 is valid

Why this answer is correct

The correct answer is option 1.

CONCEPT:

Valid: If for all the combinations of variables, the expression returns true then it is valid.

Satisfiable: If there exists at least one combination of variable which return true then it is satisfiable

Key Points

F1: It is Satisfiable.

P¬PP⇒¬P
TFF
FTT

F2: It is valid

P**¬**PP**⇒¬**P**¬P⇒**P(P**⇒¬P)∨(¬P⇒**P)
TFFTT
FTTFT

∴ Hence the correct answer is F1 is Satisfiable, F2 is valid.

Additional Information

  • A proposition P is a tautology if it is true under all circumstances. It means it contains only TRUE in the final column of its truth table.
  • A statement that is always false is known as a contradiction.
  • A statement that can be either true or false depending on the truth values of its variables is called a contingency.

Question 43

Standard planning algorithms assume environment to be  _______.

  1. AOption (a)

    Both deterministic and fully observable

  2. BOption (b)

    Neither deterministic nor fully observable

  3. COption (c)

    Deterministic but not fully observable

  4. DOption (d)

    Not deterministic but fully observable

View answer & explanation

Correct answer

Answer: (a)A.

Both deterministic and fully observable

Why this answer is correct

The correct answer is "option 1".

Explanation

Planning is the task of coming up with a sequence of actions that will help to achieve a goal.

Examples of planning agents are Search-based problem-solving agents and logical planning agents.

In a classical planning environment, only those environments are considered that are fully observable, deterministic, static, and discrete.

Non-classical planning is for a partially observable & stochastic environment.

Hence, Standard planning algorithms assume the environment to be both deterministic and fully observable.

Question 44

Consider the following statements :

(a) UNIX provides three types of permissions

  • Read

  • Write

  • Execute

(b) UNIX provides three sets of permissions

  • permission for owner

  • permission for group

  • permission for others

Which of the above statement/s is/are true ?

  1. AOption (a)

    Only (a)

  2. BOption (b)

    Only (b)

  3. COption (c)

    Both (a) and (b)

  4. DOption (d)

    Neither (a) nor (b)

View answer & explanation

Correct answer

Answer: (c)C.

Both (a) and (b)

Why this answer is correct

The correct answer is option 3.

EXPLANATION 

UNIX provides three types of permissions using octal numbers

  1. Read(R or 4)
  2. Write (W or 2)
  3. Execute (X or 1)

UNIX provide three sets of permissions. For each set of permission, we are having 3 types of permissions.

permission for the owner(RWX or 421)

permission for a group(RWX or 421)

permission for others(RWX or 421)

Additional Information

  • We can change/modify permissions using chmod, chown, etc...commands.
  • We can see the permissions for file using -l command

Hence the correct answer is Both (a) and (b).

Question 45

Which of the following routing technique/techniques is/are used in distributed systems?

(a) Fixed Routing

(b) Virtual Routing

(c) Dynamic Routing

  1. AOption (a)

    (a) only

  2. BOption (b)

    (a) and (b) only

  3. COption (c)

    (c) only

  4. DOption (d)

    All (a), (b), (c)

View answer & explanation

Correct answer

Answer: (a)A.

(a) only

Why this answer is correct

The correct answer is option 1.

Distributed systems are using fixed routing whereas dynamic and virtual routing is not used in the distributed system.

Key Points

Fixed routing: A path from A to B is specified in advance; the path changes only if a hardware failure disables it.

  • Since the shortest path is usually chosen, communication costs are minimized.
  • Fixed routing can not adapt to load changes.
  • Ensures that messages will be delivered in the order in which they were sent.

Virtual routing: A path from A to B is fixed for the duration of one session.

  • Different sessions involving messages from A to B may have different paths
  • A partial remedy to adapting to load changes
  • Ensures that messages will be delivered in the order in which they were sent

Dynamic routing: The path used to send a message from site A to site B is chosen only when a message is sent.

  • Usually, a site sends a message to another site on the link least used at that particular time
  • Adapts to load changes by avoiding routing messages on heavily used path
  • Messages may arrive out of order

Hence the correct answer is (a) only.

Question 46

Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation.

WindowsUNIX
A. Create-process( )I. Open( )
B. WaitForSingleObject( )II. Close( )
C. CreateFile( )III. Fork( )
D. CloseHandle( )IV. Wait( )
  1. AOption (a)

    A - III, B - IV, C - I, D - II

  2. BOption (b)

    A - IV, B - III, C - I, D - II

  3. COption (c)

    A - IV, B - III, C - II, D - I

  4. DOption (d)

    A - III, B - IV, C - II, D - I

View answer & explanation

Correct answer

Answer: (a)A.

A - III, B - IV, C - I, D - II

Why this answer is correct

The correct answer is option 1.

Key Points

Equivalent System call for Windows and Unix Operating System

Windows (system call)UNIX (System call)
Create-process( )Fork ( )
WaitForSingleObject( )Wait ( )
CreateFile( )Open ()
CloseHandle ( )Close( )

∴ Hence the correct answer is A-III, B - IV, C - I, D - II.

Question 47

Which of the following statements is/are TRUE regarding JAVA ?

(a) Constants that cannot be changed are declared using the ‘static’ keyword.

(b) A class can only inherit one class but can implement multiple interfaces.

  1. AOption (a)

    Only (a) is TRUE

  2. BOption (b)

    Only (b) is TRUE.

  3. COption (c)

    Both (a) and (b)are TRUE

  4. DOption (d)

    Neither (a) nor (b) is TRUE

View answer & explanation

Correct answer

Answer: (b)B.

Only (b) is TRUE.

Why this answer is correct

The correct answer is option 2. 

Statement a: FALSE

In Java, to declare any variable as constant, static and final modifiers are used

Statement b: TRUE

In JAVA, A class can implement multiple interfaces but the class can inherit only one class

To inherit class, extends is used and to inherit an interface, implements keyword is used 

Hence the correct answer is Only (b) is TRUE.

Question 48

What is the output of the following JAVA program?

class Test

{

public static void main (String [ ] args)

{

Test obj = new Test ();

obj.start ();

}

void start ()

{

String stra="do”;

String strb = method (stra);

System.out.print(“:” + stra + strb);

}

String method (String stra)

{

stra=stra+”good”;

System.out.print (stra);

return “good”;

}

}

  1. AOption (a)

    dogood : dogoodgood

  2. BOption (b)

    dogood : good dogood 

  3. COption (c)

    dogood : dodogood

  4. DOption (d)

    dogood : dogood

View answer & explanation

Correct answer

Answer: (d)D.

dogood : dogood

Why this answer is correct

The correct answer is option 4.

Key Points

Test class initiates the object. And call the start function, 'stra' stores 'do' and 'strb' waits for the value for returning method function. After the control moves to the method function(). And it concatenates the value of 'stra' and prints 'dogood'. Finally, the method returns a 'good' start function. 

∴ Hence the correct answer is dogood : do good.

Question 49

Statistical software quality assurance in software engineering involves  _________

  1. AOption (a)

    using sampling in place of exhaustive testing of software.

  2. BOption (b)

    surveying customers to find out their opinions about product quality.

  3. COption (c)

    tracing each defect to its underlying cause, isolating the vital few causes, and moving to correct them.

  4. DOption (d)

    tracing each defect to its underlying causes, and using the Pareto principle to correct each problem found.

View answer & explanation

Correct answer

Answer: (c)C.

tracing each defect to its underlying cause, isolating the vital few causes, and moving to correct them.

Why this answer is correct

The correct answer is option 3.

Key Points

  • Statistical software quality assurance in software engineering involves tracing each defect to its underlying cause, isolating the vital few causes, and moving to correct them.
  • Statistical software quality assurance uses the Pareto principle to identify vital causes(80% of defects can be traced to 20% of causes) and moves to correct the problems that have caused the defects.

∴ Hence the correct answer is tracing each defect to its underlying cause, isolating the vital few causes, and moving to correct them.

Question 50

In Software Configuration Management (SCM), which of the following is a use-case supported by standard version control systems ?

(a) Managing several versions or releases of a software

(b) Filing bug reports and tracking their progress

(c) Allowing team members to work in parallel

(d) Identifying when and where a regression occurred

  1. AOption (a)

    Only (a), (c), and (d)

  2. BOption (b)

    Only (a), (b), and (c)

  3. COption (c)

    Only (a), (b), and (d)

  4. DOption (d)

    Only (b), (c), and (d)

View answer & explanation

Correct answer

Answer: (a)A.

Only (a), (c), and (d)

Why this answer is correct

The correct answer is option 1.

Key Points

Software Configuration Management(SCM) is a use-case supported by standard version control systems:

  • Develop the next version of a piece of software while fixing problems with the current one.
  • Share code with other team members in a controlled way, allowing you to develop code in parallel with others and join with the current state of the code line.
  • Identify what versions of code went into a particular component.
  • Analyze where the change happened in the history of components development.

∴ Hence the correct answer is Only (a), (c), and (d).

Question 51

Consider the following four processes with the arrival time and length of CPU burst given in milliseconds :

ProcessArrival TimeBurst Time
P108
P214
P329
P435

 

The average waiting time for preemptive SJF scheduling algorithm is

  1. AOption (a)

    6.5 ms

  2. BOption (b)

    7.5 ms 

  3. COption (c)

    6.75 ms

  4. DOption (d)

    7.75 ms

View answer & explanation

Correct answer

Answer: (a)A.

6.5 ms

Why this answer is correct

The correct answer is option 1.

CONCEPT:

Shortest Job First:

In the SJF scheduling algorithm, the process with the lowest burst time, among the list of available processes in the ready queue, is going to be scheduled next. Preemptive SJF scheduling is the shortest remaining time first

Formula:

TAT=CT-AT

WT=TAT-BT

Gantt Chart:

P1P2P4P1P3

0                      1                        5                      10                      17                    26             

ProcessArrival Time(AT)Burst Time(BT)Completion Time(CT)TAT=CT-ATWT=TAT-BT
P10817179
P214540
P329262415
P4351072

 

Average waiting time= (9+0+15+2)4\frac{(9+0+15+2) }{4}=6.5

∴ Hence the correct answer is 6.5.

Question 52

Consider a virtual page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0,1, 7, 0,1 Suppose a demand paged virtual memory system running on a computer system such that the main memory has 3 page frames. Then_______ page replacement algorithm has minimum number of page faults.  

  1. AOption (a)

    FIFO

  2. BOption (b)

    LIFO

  3. COption (c)

    LRU

  4. DOption (d)

    Optimal

View answer & explanation

Correct answer

Answer: (d)D.

Optimal

Why this answer is correct

The correct answer is "option 4".

CONCEPT:  

Page fault occurs when the CPU tries to find the required page in main memory or RAM but does not find it. 

Page Hit: It means the CPU successfully finds the required page in RAM.

Page Fault: It means the CPU unable to find the page in RAM.

EXPLANATION:

Page replacement is the way to swap in the pages in RAM if its page frame capacity gets full. 

That means, we have to replace any one of the frame pages with other required pages when we have no space in page frames. 

The four types of page replacement algorithms are:

option1:

FIFO: FIFO stands for First In First Out. In this algorithm we replacement the page frame that came first in the given reference string out of those three frames that are currently in page frames.

The page frame table for FIFO replacement algorithm is:

70120304230321201701
111100033333222221
0000333222221111100
77722224440000000777
FFFFFFFFFFFFFFF

 

This page replacement is having 15-page faults.

option2:

LIFO: LIFO stands for Last In First Out. In this algorithm we replacement the page frame that came last in the given reference string out of:

a. Those three frames that are currently in page frames

b. That makes the page fault.

The page frame table for the LIFO replacement algorithm is:

70120304230321201701
122334233321221111
0000000000000000000
77777777777777777777
FFFFFFFFFFF

 

In this table, in the 8th column, 4 can be replaced with 0 as it came last out of (7,0,3) but 0 didn't cause page fault but 3 does so 4 will replace page 3. 

This page replacement is having 11-page faults.

option3:

LRU: LRU stands for Least Recently Used. In this algorithm, we replacement the page frame that is not used recently in the given reference string out of those three frames that are currently in page frames.

The page frame table for LRU replacement algorithm is:

70120304230321201701
111333222222222777
0000000033333300000
77722224440001111111
FFFFFFFFFFFF

 

This page replacement is having 12-page faults.

option4:

Optimal algorithm: In this algorithm, we replace the page frame that will not be used for the longest period of time in the near future in the given reference string. 

The page frame table for optimal replacement algorithm is:

70120304230321201701
111333333331111111
0000004440000000000
77722222222222222777
FFFFFFFFF

 

After (7,0,1), page frame 2 will replace page frame 7 since page frame 7 is going to be referenced only one time in the future. 

This page replacement is having 9-page faults.

Hence, the optimal algorithm has the least page faults.

Question 53

Entropy of a discrete random variable with possible values {x1 x2, ..., xn} and probability density function P(X) is:

\(H\left( X \right) = - \mathop \sum \limits_{i = 1}^n P\left( {{x_i}} \right){\log _{\rm{b}}}P\left( {{x_i}} \right)\)

The value of b gives the units of entropy. The unit for b = 10 is:

  1. AOption (a)

    bits

  2. BOption (b)

    bann

  3. COption (c)

    nats

  4. DOption (d)

    deca

View answer & explanation

Correct answer

Answer: (c)C.

nats

Why this answer is correct

The correct answer is option 3.

CONCEPT:

Information Entropy or Shannon's entropy quantifies the amount of uncertainty (or surprise) involved in the value of a random variable or the outcome of a random process. Its significance in the decision tree is that it allows us to estimate the impurity or heterogeneity of the target variable.

Common values of b are 2, Euler's number e, and 10, and the corresponding units of entropy are the bits for b = 2, nats for b = e, and bans for b = 10.

Hence the correct answer is nats.

Question 54

Which of the following is a valid reason for causing degeneracy in a transportation problem ? Here m is no. of rows and n is no. of columns in transportation table. 

  1. AOption (a)

    When the number of allocations is m + n - 1

  2. BOption (b)

    When two or more occupied cells become unoccupied simultaneously

  3. COption (c)

    When the number of allocations is less than m + n - 1

  4. DOption (d)

    When a loop cannot be drawn without using unoccupied cells, except the starting cell of the loop.

View answer & explanation

Correct answer

Answer: (c)C.

When the number of allocations is less than m + n - 1

Why this answer is correct

The correct answer is "option 3".

EXPLANATION: 

In standard transportation problem as m is no. of rows and n is no. of columns,

The test of optimality of any of the feasible solutions requires allocations in m + n – 1 independent cell.

If the number of allocations is less than m+n-1, then degeneracy in the transportation problems can exist.

Hence, the correct answer is "option 3".

Question 55

Consider the following LPP.:

Max Z = 15x1 + 10x2

Subject to the constraints

4x1 + 6x2 ≤  360

3x1 + 0x2 ≤  180

0x1 + 5x2 ≤  200

x1, x2 ≥ 0

The solution of the LPP using Graphical solution-technique is :

  1. AOption (a)

    x1 = 60, x2 = 0 and Z = 900

  2. BOption (b)

    x1 = 60, x2​ = 20 and Z = 1100

  3. COption (c)

    x1 = 60, x2​ = 30 and Z = 1200

  4. DOption (d)

    x1 = 50, x2​ = 40 and Z = 1150

View answer & explanation

Correct answer

Answer: (b)B.

x1 = 60, x2​ = 20 and Z = 1100

Why this answer is correct

The correct answer is option 2.

EXPLANATION 

4x1 + 6x2 ≤  360

if x1=0=> 6x2=360 => x2=60 (0,60)

if x2=0=> 4x1=30  => x1=90 (90,0)

3x1 + 0x2 ≤  180

3x1=180 => x1=60 =(60,0)

0x1 + 5x2 ≤  200

 5x2=200 =>x2=40= (0,40)

Extreme pointcoordinatesZ
O(0,0)0
A(60,0)900
B(60,20)1100
C(30,40)850
D(0,40)400

 

for B coordinates , consider 4x1 + 6x2 = 360

Put x1=60,

4x60+6x2=360

x2=20

At O point, Z = 15x1 + 10x2 , Z = 0×15 + 0×10, Z=0

At A point, Z = 15x1 + 10x2 , Z = 60×15 + 0×10, Z=900

At B point, Z = 15x1 + 10x2 , Z = 60×15 + 20×10, Z=1100

At C point, Z = 15x1 + 10x2 , Z = 30×15 + 40×10, Z=850

At D point, Z = 15x1 + 10x2 , Z = 0×15 + 40×10, Z=400

∴ Hence the correct answer is x1 = 60, x2​ = 20 and Z = 1100.

Question 56

Consider a Takagi - Sugeno - Kanga  (TSK) Model consisting of rules of the form :

If x1 is Ai1 and ... and xr is Air

THEN y = fi (x1, x2, ...., xr) = bi0 + bi1x1 + birxr

assume, αi is the matching degree of rule i, then the total output of the model is given by :

  1. AOption (a)

    \(y = ;\mathop \sum \limits_{i = 1}^L {\alpha _i}{f_i}\left( {{x_1},;{x_2}, \ldots .,;{x_r}} \right)\)

  2. BOption (b)

    \(y = \frac{{\mathop \sum \nolimits_{i = 1}^L {\alpha i}{f_i}\left( {{x_1},;{x_2}, \ldots .,;{x_r}} \right)}}{{\mathop \sum \nolimits{i = 1}^L {\alpha _i}}}\)

  3. COption (c)

    \(y = \frac{{\mathop \sum \nolimits_{i = 1}^L {f_i}\left( {{x_1},;{x_2}, \ldots .,;{x_r}} \right)}}{{\mathop \sum \nolimits_{i = 1}^L {\alpha _i}}}\)

  4. DOption (d)

    y = max[αifi (x1, x2,....xr)]

View answer & explanation

Correct answer

Answer: (b)B.

\(y = \frac{{\mathop \sum \nolimits_{i = 1}^L {\alpha i}{f_i}\left( {{x_1},;{x_2}, \ldots .,;{x_r}} \right)}}{{\mathop \sum \nolimits{i = 1}^L {\alpha _i}}}\)

Why this answer is correct

The correct answer is option 2.

Key Points

If x1 is Ai1 and ... and xr is Air

THEN y = fi (x1, x2, ...., xr) = bi0 + bi1x1 + birxr

assume, αi is the matching degree of rule i,

 The consequence polynomials deteriorate to constant numbers β0r when the outputs are discrete crisp numbers (to represent symbolic values). Given an input vector (A∗1,..., A∗m), the TSK engine performs inference in the following steps:

  1. Determine the firing strength of each rule Rr (r ∈ {1, 2,..., n}) by integrating the similarity degrees between its antecedents and the given inputs.
  2. Calculate the sub-output led by each rule Rr based on the given observation (A×1,..., A×m).
  3. Generate the final output by integrating all the sub-outputs from all the rules:

\(y = \frac{{\mathop \sum \nolimits_{i = 1}^L {\alpha i}{f_i}\left( {{x_1},;{x_2}, \ldots .,;{x_r}} \right)}}{{\mathop \sum \nolimits{i = 1}^L {\alpha _i}}}\)

∴ Hence the correct answer is \(y = \frac{{\mathop \sum \nolimits_{i = 1}^L {\alpha i}{f_i}\left( {{x_1},;{x_2}, \ldots .,;{x_r}} \right)}}{{\mathop \sum \nolimits{i = 1}^L {\alpha _i}}}\)

Question 57

The Sigmoid activation function f(t) is defined as :

  1. AOption (a)

    1exp(t)+exp(−t)\frac{1}{exp (t) + exp (-t)}

  2. BOption (b)

    t exp (-t)

  3. COption (c)

    11+exp(t)\frac{1}{1+exp(t)}

  4. DOption (d)

    11+exp(−t)\frac{1}{1+exp(-t)}

View answer & explanation

Correct answer

Answer: (d)D.

11+exp(−t)\frac{1}{1+exp(-t)}

Why this answer is correct

The correct answer is option 4.

Key Points

The Sigmoid Function curve looks like an S-shape.

∴ Hence the correct answer is f(t)=11+exp(−t)\frac{1}{1+exp(-t)}

Question 58

Which of the following statements is/are TRUE ?

(a) In HTML, character entities are used to incorporate external content into a web page, such as images.

(b) Once a web server returns a cookie to a browser, the cookie will be included in all future requests from the browser to the same server.

  1. AOption (a)

    Only (a) is TRUE

  2. BOption (b)

    Only (b) is TRUE

  3. COption (c)

    Both (a) and (b) are TRUE

  4. DOption (d)

    Neither (a) nor (b) is TRUE

View answer & explanation

Correct answer

Answer: (b)B.

Only (b) is TRUE

Why this answer is correct

The correct answer is : option 2

Key Points

Statement (a): False

Character entities in HTML are used to represent special characters that are reserved or invisible. For example:

  • & → &
  • < → <
  • > → >

These entities allow the display of characters that have special meanings in HTML. However, they are not used to embed or incorporate external content like images.

<br>

To include external content such as images, HTML uses specific tags like:

  • for images
  • <video> and <audio> for media
  • <iframe> for embedding web pages

Hence, statement (a) is incorrect.

 

Statement (b): True

Once a server sends a cookie to the browser using the Set-Cookie header, the browser stores it. For example:

Set-Cookie: sessionId=abc123; Path=/; HttpOnly On all future HTTP requests to the same domain and path, the browser automatically includes the cookie:

Cookie: sessionId=abc123 This mechanism is used for session tracking, user preferences, and authentication. Therefore, statement (b) is correct.

 

Final Answer:

Option 2: Only (b) is TRUE.

Question 59

Which of the following statements is/are FALSE with respect to software testing ?

S1: White-box tests are based on specifications; better at telling whether program meets specification, better at finding errors of ommission.

S2: Black-box tests are based on code; better for finding crashes, out of bounds errors, file not closed errors.

S3: Alpha testing is conducted at the developer’s site by a team of highly skilled testers for software that is developed as a product to be used by many customers.

  1. AOption (a)

    Only S1 and S2 are FALSE

  2. BOption (b)

    Only S1 and S3 are FALSE

  3. COption (c)

    Only S2 and S3 are FALSE

  4. DOption (d)

    All of S1, S2, and S3 are FALSE.

View answer & explanation

Correct answer

Answer: (a)A.

Only S1 and S2 are FALSE

Why this answer is correct

The correct answer is option 1.

Key Points

S1: Black-box tests are based on specifications; better at telling whether the program meets specification, better at finding errors of omission. 

Hence the statement I is False.

S2: White-box tests are based on code; better for finding crashes, out-of-bounds errors, file not closed errors.

Hence the statement II is False.

S3: Alpha testing is conducted at the developer’s site by a team of highly skilled testers for software that is developed as a product to be used by many customers.

Hence the statement III is True.

Therefore the correct answer is Only S1 and S2 are FALSE.

Question 60

Consider the method mcq():

int mcq(boolean a, boolean b, boolean c, boolean d)

{

int ans=1;

if (a) {ans = 2;}

else if (b) {ans = 3;}

else if (c) {

if (d) {ans=4;}

}

return ans ;

}

If

M1 = Number of tests to exhaustively test mcq ();

M2 = Minimum number of tests to achieve full statement coverage for mcq (); and

M3 = Minimum number of tests to achieve full branch coverage for mcq ( ); then (M1, M2, M3) = ______.

  1. AOption (a)

    (16, 3, 5) 

  2. BOption (b)

    (8,5, 3)

  3. COption (c)

    (8, 3, 5)

  4. DOption (d)

    (16, 4, 4)

View answer & explanation

Correct answer

Answer: (a)A.

(16, 3, 5) 

Why this answer is correct

The correct answer is option 1.

Key Points

M1: Number of tests to exhaustively test MCQ()

Given total $ conditions. Total exhaustively test MCQ =222*2=16

M2:Minimum number of tests to achieve full statement coverage for MCQ();

Total 4 conditions. If any one condition is TRUE remaining automatically will get False except C and D

Condition-ACondition-BCondition-CCondition-D
TrueFalseFalseFalse
FalseTrueFalseFalse
FalseFalseTrueTrue

M3: Minimum number of tests to achieve full branch coverage for MCQ():

Condition-ATruePrint ans=2return Ans
Condition-BFalseTruePrint ans=3return Ans
Condition-C&DFalseFalseTrueTruePrint ans=4return Ans
Condition-C&DFalseFalseTrueFalsereturn Ans
Condition-CFalseFalseFalsereturn Ans

∴ Hence the correct answer is (16, 3, 5).

Question 61

A simple stand - alone software utility is to be developed in ’C’ programming by a team of software experts for a computer running Linux and the overall size of this software is estimated to be 20,000 lines of code. Considering (a, b) = (2.4, 1.05) as multiplicative and exponention factor for the basic COCOMO effort estimation equation and (c, d)=(2.5, 0.38) as multiplicative and exponention factor for the basic COCOMO development time estimation equation, approximately how long does the software project take to complete ?  

  1. AOption (a)

    10.52 months

  2. BOption (b)

    11.52 months

  3. COption (c)

    12.52 months

  4. DOption (d)

    14.52 months

View answer & explanation

Correct answer

Answer: (b)B.

11.52 months

Why this answer is correct

The correct answer is option 2.

Data:

Lines of code(LOC)=20,000(or 20K)

Multiplicative value 'a' = 2.4

Exponential 'b' = 1.05

Multiplicative value 'c' = 2.5

Exponential 'd' = 0.38

Formula:

Basic COCOMO formula = a × (LOC in K)b

<br>

Development = c × (basic COCOMO result)d

Step 1:

Basic COCOMO formula = a × (LOC in K)b

                                        = 2.4 × (20)1.05

                                        = 55.756

Step 2:

Develoment  = c × (basic COCOMO result)d

                     = 2.5(55.756)0.38

                     =11.52 months

Hence the correct answer is 11.52 months.

Question 62

User level threads are threads that are visible to the programmer and are unknown to the kernel. The operating system kernel supports and manages kernel level threads. Three different types of models relate user and kernel level threads.

Which of the following statements is/are true ?

(a)

(i) The Many - to - one model maps many user threads to one kernel thread

(ii) The one - to - one model maps one user thread to one kernel thread

(iii) The many - to - many model maps many user threads to smaller or equal kernel threads

(b)

(i) Many - to - one model maps many kernel threads to one user thread

(ii) One - to - one model maps one kernel thread to one user thread

(iii) Many - to- many model maps many kernel threads to smaller or equal user threads

  1. AOption (a)

    (a) is true; (b) is false

  2. BOption (b)

    (a) is false; (b) is true

  3. COption (c)

    Both (a) and (b) are true

  4. DOption (d)

    Both (a) and (b) are false

View answer & explanation

Correct answer

Answer: (a)A.

(a) is true; (b) is false

Why this answer is correct

The correct answer is option 1.

CONCEPT:

  • Threads are lightweight processes because they have their own stack but can access shared data. Because threads share the same address space as the process and other threads within the process, the operational cost of communication between the threads is low, which is an advantage.
  • The many–to–one model maps many user threads to one kernel thread.
  • The one–to–one model maps one user thread to one kernel thread.
  • The many–to–many model maps many user threads to smaller or equal kernel threads.

EXPLANATION

​

∴ Hence the correct answer is (a) is true; (b) is false.

Additional Information

Multiple threads of the same process share other resources of the process except for register, stack, and stack pointer. In particular, a process is generally considered to consist of a set of threads sharing an address space, heap, static data, code segments, and file descriptors.

Thread of the same process doesn't share program counter (register), stack,  registers

Question 63

A 4 x 4 DFT matrix is given by :

\(\frac{1}{2}\left[ {\begin{array}{{20}{c}} {\begin{array}{{20}{c}} 1&1\ 1&x \end{array}}&{\begin{array}{{20}{c}} 1&1\ { - 1}&y \end{array}}\ {\begin{array}{{20}{c}} 1&{ - 1}\ 1&{ - j} \end{array}}&{\begin{array}{*{20}{c}} 1&{ - 1}\ { - 1}&j \end{array}} \end{array}} \right]\)

(j2 = -1)

Where values of x and y are_____ , ______ respectively.

  1. AOption (a)

    1, -1

  2. BOption (b)

    -1, 1

  3. COption (c)

    -j, j

  4. DOption (d)

    j, -j

View answer & explanation

Correct answer

Answer: (d)D.

j, -j

Why this answer is correct

The correct answer is option 4.

Key Points

Definition of 4X4 DFT matrix  is, 

1/4[1111 1WW2W3 1W2W4W6 1W3W6W9]1/\sqrt{4}\begin{bmatrix} 1 & 1 & 1 & 1\ 1 & W & W^2 & W^3\ 1 & W^2 & W^4 & W^6\ 1 & W^3 & W^6 & W^9 \end{bmatrix}

And the given example is,

\(\frac{1}{2}\left[ {\begin{array}{{20}{c}} {\begin{array}{{20}{c}} 1&1\ 1&x \end{array}}&{\begin{array}{{20}{c}} 1&1\ { - 1}&y \end{array}}\ {\begin{array}{{20}{c}} 1&{ - 1}\ 1&{ - j} \end{array}}&{\begin{array}{*{20}{c}} 1&{ - 1}\ { - 1}&j \end{array}} \end{array}} \right]\)

Given that j2 = -1

compare the values of the definition matrix and given example,

W = x, x2 = -1 and j2 =-1  (W2 = -1) then x=j

W3 = y, W3 ​= -j (i.e y=-j)

∴ Hence the correct answer is j, -j.

Question 64

For any binary (n, h) linear code with minimum distance (2t + 1) or greater \(n - h \ge {\log 2}\left[ {\mathop \sum \limits{i = 0}^α \left( {\begin{array}{*{20}{c}} n\ i \end{array}} \right)} \right]\) where α  is:

  1. AOption (a)

    2t + 1

  2. BOption (b)

    t + 1

  3. COption (c)

    t - 1

  4. DOption (d)

    t

View answer & explanation

Correct answer

Answer: (b)B.

t + 1

Why this answer is correct

The correct answer is option 2.

EXPLANATION

For any binary (n, k) linear code with a minimum distance 2t + 1 or greater, the number of parity-check bits satisfies the following inequality:

n-k => log2 [1+(n0)+(n1)+....+(nt)\binom{n}{0}+\binom{n}{1}+ ....+\binom{n}{t}]

Recall that all the vectors of weight t or less can be used as coset leaders.

The number of vectors (n-tuple) of weight t or less are (n0)+(n1)+....+(nt)\binom{n}{0}+\binom{n}{1}+ ....+\binom{n}{t}

The total number of coset leaders is 2n-k.

Therefore, we have 2n-k => (n0)+(n1)+....+(nt)\binom{n}{0}+\binom{n}{1}+ ....+\binom{n}{t}

Taking logarithm on both sides of the inequality, we get n-k => log2[1+ (n0)+(n1)+....+(nt)]\binom{n}{0}+\binom{n}{1}+ ....+\binom{n}{t}]

So, here α  will be t=1 correcting  (n,k) vector are required.

α=t+1

∴ Hence the correct answer is t + 1.

Question 65

Consider the following HTML table definition:

<table border = 1> <tr> <td colspan = 2> Text A </td> </tr> <tr> <td> Text B </td> <td> Text C </td> </tr> <tr> <td rowspan = 2> Text D < /td> <td> Text E </td> </tr> <tr> <td> Text F </td> </tr> </table>

The above HTML code would render on screen as:

  1. AOption (a)
    Text A
    Text BText C
    Text DText E
    Text F
  2. BOption (b)
    Text AText B
    Text C
    Text DText E
    Text F
  3. COption (c)
    Text A
    Text BText C
    Text DText E
    Text F
  4. DOption (d)
    Text A
    Text BText C
    Text DText E
    Text F
View answer & explanation

Correct answer

Answer: (c)C.
Text A
Text BText C
Text DText E
Text F

Why this answer is correct

The correct answer is option 3.

Key Points

<table border = 1> <tr>                                                       **//Creating table row**<br> <td colspan = 2> Text A </td>               **//Table data is "Test A" and merging 2 columns.**<br> </tr>                                                     **//Ending table row**<br> <tr>                                                     **//Creating table row**<br> <td> Text B </td>                               **//Table data is "Test B"**<br> <td> Text C </td>                             **//Table data is "Test C"**<br> </tr>                                                **//Ending table row**<br> <tr>                                                **//Creating table row**<br> <td rowspan = 2> Text D < /td>    **//Table data is Test D and merging 2 rows**<br> <td> Text E </td>                          **//Table data is "Test E"**<br> </tr>                                            **//Ending table row**<br> <tr>                                            **//Creating table row**<br> <td> Text F </td>                      **// Table data is "Test F"**<br> </tr> <br> </table>

∴ Hence the correct answer is

Text A
Text BText C
Text DText E
Text F

Question 66

A signal processor software is expected to operate for 91.25 days after repair, and the mean software repair time is expected to be 5 minutes. Then, the availability of the software is :

  1. AOption (a)

    96.9862%

  2. BOption (b)

    97.9862%

  3. COption (c)

    98.9962%

  4. DOption (d)

    99.9962%

View answer & explanation

Correct answer

Answer: (d)D.

99.9962%

Why this answer is correct

The correct answer is option 4

DATA:

After repair, the signal processor is expected to operate for 91.25 days 

Mean software repair time = 5 minutes

FORMULA:   

The percentage of availability of software = (time available for software operation ÷ total time) × 100

Time available for software operation is 91.25 days= 91.25 × 24 × 60 minutes 

Total time = 91.25 days + 5minutes =91.25 × 24 × 60 + 5 minutes

Availabity = (91.25 × 24 × 60 ÷ (91.25 × 24 × 6  +5)) × 100

∴ Availabity = 99.996194 ≈ 99.9962%

Question 67

Which of the following statements is not correct ?

  1. AOption (a)

    Every recursive language is recursively enumerable.

  2. BOption (b)

    L  = {0n 1n 0n | n = 1, 2, 3, ....} is recursively enumerable.

  3. COption (c)

    Recursive languages are closed under intersection

  4. DOption (d)

    Recursive languages are not closed under intersection

View answer & explanation

Correct answer

Answer: (d)D.

Recursive languages are not closed under intersection

Why this answer is correct

The correct answer is "option 4".

EXPLANATION

option1: Correct

If there exists a Turing machine that accepts every string of the language and does not accept any string that is not in the language then, the language is recursively enumerable language.

So, every recursive language is also recursively enumerable.

option2: Correct

The language L  = {0n 1n 0n | n = 1, 2, 3, ....} is recursive enumerable and it is accepted by Linear bounded Automataon.

option3: Correct

Recursive languages are closed under intersection.

option4: Not Correct

Since recursive languages are closed under intersection.

Hence, the correct answer is "option 4".

Question 68

Context free grammar is not closed under:

  1. AOption (a)

    Concatenation

  2. BOption (b)

    Complementation

  3. COption (c)

    Kleene Star

  4. DOption (d)

    Union

View answer & explanation

Correct answer

Answer: (b)B.

Complementation

Why this answer is correct

Concept:

Context free languages are closed under Union, Concatenation and Kleene Closure (star)

CFLs are NOT closed under intersection and not closed under complementation

Example:

L1 = pn qn rm | m, n > 0 → CFL

L2 = pm qn rn  | m, n > 0 → CFL

L = pn qn rm ∩ pm qn rn  | m, n > 0. L = pn qn rn it is not accepted by pushdown automaton and hence it is not a CFL. and hence it is not closed under intersection.

Important Point:

Context free languagesOnly Deterministic Context free languages
Closed under - Union - Concatenation - Kleene Closure - Homomorphism - Inverse Homomorphism - Reversal of language - Intersection with Regular languageClosed under - Complementation - Inverse Homomorphism
Not Closed under - Complementation - IntersectionNot Closed under - Union - Intersection - Concatenation - Kleene closure - Homomorphism - Reversal of language

Question 69

Consider the following languages :

L1 = {am bn | m ≠ n}

L2 = {am bn | m = 2n + 1}

L3 = {am bn | m ≠ 2n}

Which one of the following statement is correct ?

  1. AOption (a)

    Only L1 and L2 are context free languages

  2. BOption (b)

    Only L1 and L3 are context free languages

  3. COption (c)

    Only L2 and L3 are context free languages

  4. DOption (d)

    L1, L2 and L3 are context free languages

View answer & explanation

Correct answer

Answer: (d)D.

L1, L2 and L3 are context free languages

Why this answer is correct

The correct answer is option 4.

Key Points

L1 = {am bn | m ≠ n}

  • It means m could be greater than (m>n) or less than 'n' (m<n)but m will not be equal to 'n'(m=n).
  • Since for accepting L1, we need storage so then a number of 'a' can be stored in it and when b's come as input a's and b's can be compared.
  • Since finite automata do not have a storage element hence language is not regular.

 

L2 = {am bn | m = 2n + 1}

L2 rewrite as {a2n+1bn }.

Here skip the first 'a'. If the input string reaches an empty symbol then it accepts the language(string: a) or if the input symbol is 'a' stores all a's in the stack. After every 'b' pop the two a's until it reaches the empty symbol then it accepts the language.

Hence the language L2  is CFL.

L3 = {am bn | m ≠ 2n}

It means m could be greater than (m>2n) or less than 'n' (m<2n) but m will not be equal to 'n'(m=n). Store all a's in the stack and for two b's pop one 'a'. If if there any a's in the stack (m>2n) or the top of the stack is Z0 and the input symbol is not reached to the empty symbol (m<2n) then it is accepting the language. 

Hence the language L3  is CFL.

Hence the correct answer is L1, L2 and L3 are context-free languages.

Question 70

Consider the following LPP :

Min Z = 2x1 + x2 + 3x3

Subject to :

x1 - 2x2 + x3 ≥ 4

2x1 + x2 + x3 ≤ 8

x1 - x3 ≥ 0

x1, x2, x3 ≥ 0

The solution of this LPP using the Dual Simplex Method is :

  1. AOption (a)

    x1 = 0, x2 = 0, x3 = 3 and Z = 9

  2. BOption (b)

    x1​ = 0, x2 = 6, x3 = 0 and Z = 6

  3. COption (c)

    x1​ = 4, x2 = 0, x3 = 0 and Z = 8

  4. DOption (d)

    x1​ = 2, x2 = 0, x3 = 2 and Z = 10

View answer & explanation

Correct answer

Answer: (c)C.

x1​ = 4, x2 = 0, x3 = 0 and Z = 8

Why this answer is correct

The correct answer is option 3.

EXPLANATION

Z = 2x1 + x2 + 3x3+0s1+0s2+0s3

x1 - 2x2 + x3+s1=-4

2x1 + x2 + x3 +s2=8

x1 - x3+s3= 0

<br>

   -2 -1 -3 0 0 0   Xb

--------------------------------

s1  -1 2 -1 1 0 0   -4

s2   2 1 1  0 1 0   8

s3  -1 0 0  0 0 1   0

-------------------------------

zj   0 0 0  0 0 0

----------------------------------

cj-zj -2 -1 -3 0 0 0

ratio  2 -1/2 3 0 0 0

---------------------------------------

leave the smallest negative is,-4

In ratio smallest positive number is 2 so, x1 enters and s1 leaves

      -2  -1 -3  0  0  0  

-----------------------------------

-2x1  1  -2  1  -1  0   0   4

0S2   0  5   -1  2  1   0   0 

0s3   0  -2   2  -1  0  1   4

------------------------------------

Zj   -2   4  -2  2  0  0

cj-zj 0  -5   -1 -2  0  0

------------------------------------

If all the entries are x3>=0 then we reach the optimal table.

Hence, x1=4, x2=0, x3=0

Min Z=2x1+x2+3x3

z=8

∴ Hence the correct answer is x1​ = 4, x2 = 0, x3 = 0 and Z = 8.

Question 71

Consider a single perceptron with sign activation function. The perceptron is represented by weight vector [0.4 - 0.3 0.1]t and a bias θ = 0. If the input vector to the perceptron is X = [0.2 0.6 0.5] then the output of the perceptron is :

  1. AOption (a)

    1

  2. BOption (b)

    0

  3. COption (c)

    -0.05

  4. DOption (d)

    -1

View answer & explanation

Correct answer

Answer: (d)D.

-1

Why this answer is correct

The correct answer is option 4.

Key Points

Here, it is given input vector X =[0.2 0.6 0.5] and weight vector W =[0.4 −0.3 0.1]T

The output of perceptron is P=∑Wi x Xi = [0.20.4     0.6(-0.3)     0.5*0.1] = [0.08-0.18+0.05] = -0.05

Usually used in hidden layers of a neural network as its values lie between -1 to 1

P=1, if P>0

P=-1, if P<0

P=0, if P=0

Here, the value of P is -0.05(<0), so the output is -1

∴ Hence the correct answer is -1.

Question 72

In 8085 microprocessor which of the following flag(s) is (are) affected by an arithmetic operation ?

  1. AOption (a)

    AC flag Only

  2. BOption (b)

    CY flag Only

  3. COption (c)

    Z flag Only

  4. DOption (d)

    AC, CY, Z flags

View answer & explanation

Correct answer

Answer: (d)D.

AC, CY, Z flags

Why this answer is correct

The correct answer is option 4

All the Carry flag (CY), Auxiliary carry flag (AC) and Zero flag (Z) are affected when an arithmetic operation is performed.

Key Points

Auxiliary carry flag (AC):

In the addition of two 8 bit hexadecimal numbers, if a carry occurs when the LS hex digits of the two numbers are added, then such a carry is called Auxiliary carry and AC flag is set.

Carry flag (CY):

Carry flag is set when two 8 bit numbers are added and the result has a carry.

Zero flag (Z):

Zero flag is set when any arithmetic operation is performed and the result is 00H.

Question 73

In 8085 microprocessor the address bus is of _______ bits.  

  1. AOption (a)

    4

  2. BOption (b)

    8

  3. COption (c)

    16

  4. DOption (d)

    32

View answer & explanation

Correct answer

Answer: (c)C.

16

Why this answer is correct

The correct answer is option 3

In 8085 microprocessor, the address bus is of 16 bits.

8085 microprocessor has three buses - Address bus, Databus, and Control bus.

Address bus:

It is a 16 bit bus used to select a particular memory location or a peripheral device. It is a unidirectional bus.

Data bus: 

Length of the data bus is 8 bits. This bus is used to transfer data between microprocessor and memory or IO devices in both directions.

Control bus:

Control bus is used to generate timing and control signals which control the operation of memory and various other peripheral devices.

Question 74

In the architecture of 8085 microprocessor match the following:

A. Processing unitI. Interrrupt
B. Instruction unitII. General purpose   Register
C. Storage and Interface unitIII. ALU
IV. Timing and   Control

Code:

  1. AOption (a)

    A - IV, B - I, C - II

  2. BOption (b)

    A - III, B - IV, C - II

  3. COption (c)

    A - II, B - III, C - I

  4. DOption (d)

    A - I, B - II, C - IV

View answer & explanation

Correct answer

Answer: (b)B.

A - III, B - IV, C - II

Why this answer is correct

The correct answer is option 2

The correct matching for the above data is:

Processing unit --> ALU

Instruction Unit --> Timing and Control

Storage and Interface unit --> General purpose register

Key Points

  • It is the Arithmetic Logic Unit (ALU) where all the arithmetic and logical operations are processed in a microprocessor.
  • Instruction unit generates various timing and control signals to coordinate the operations of ALU, memory, IO devices and other peripheral devices.
  • Storage and Interface Unit consists of General purpose registers, Program counter (PC), Stack pointer (SP), Increment/Decrement Register and Address Latch.

Question 75

Which of the following addressing mode is best suited to access elements of an array of contiguous memory locations ?

  1. AOption (a)

    Indexed addressing mode

  2. BOption (b)

    Base Register addressing mode

  3. COption (c)

    Relative address mode

  4. DOption (d)

    Displacement mode

View answer & explanation

Correct answer

Answer: (a)A.

Indexed addressing mode

Why this answer is correct

The correct answer is option 1

Key Points

Indexed addressing mode is best suited to access the elements of an array of contiguous memory locations.

Here, the effective address is calculated as the sum of the contents of Index Register SI or DI and the displacement.

Accessing registers is much faster than accessing memory locations.

So, when an operation is performed on elements of an array, the execution is much faster.

Additional Information

Base Register addressing mode: In this mode effective address is calculated by adding base register value to address field value.

Relative Address mode: In this mode, effective address is calculated by adding accumulator and value in address part of the instruction.

Displacement mode: In this mode, the address of the operand is formed by adding the displacement to the contents of the specified register in the instruction.

75 questions in the full paper