Previous Year Paper

UGC NET Paper 2: Computer Science 04th Dec 2019 (Previous Year Paper)

Held in 2019

100 questions120 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.

Computer Science (100 questions)

Question 1

A computer uses a memory unit of 512 K words of 32 bits each. A binary instruction code is stored in one word of the memory. The instruction has four parts: an addressing mode field to specify one of the two-addressing mode (direct and indirect), an operation code, a register code part to specify one of the 256 registers and an address part. How many bits are there in addressing mode part, opcode part, register code part and the address part?

  1. AOption (a)

    1, 3, 9, 19

  2. BOption (b)

    1, 4, 9, 18

  3. COption (c)

    1, 4, 8, 19

  4. DOption (d)

    1, 3, 8, 20

View answer & explanation

Correct answer

Answer: (c)C.

1, 4, 8, 19

Why this answer is correct

Data:

Memory unit = 512 K words

1 word = 32 bits = 4 B

Binary instruction code stored in 1 word of memory

Instruction divided as follows,

Addressing modeOperation codeRegister codeAddress part

 

Calculation:

Addressing mode = 1 bit for direct or indirect

Register code = ln (256) = 8 bits

Since, registers are already addressed, only memory needs to be addressed

Address part = ln (512 K) = 19 bits

Operation mode = 32 – 1 – 8 – 19 = 4 bits

Therefore, bits for addressing mode part, opcode part, register code part and the address part = (1, 4, 8, 19)

Question 2

What is the output of following C program?

#include <stdio.h>

main()

{

                int i, j, x = 0

                for (i = 0; i < 5; ++i)

                for (j = 0; j < i; ++j)       

                {                                            

                x + =(i + j – 1);

                break;

                }

                Printf (“%d”, x);

}

  1. AOption (a)

    6

  2. BOption (b)

    5

  3. COption (c)

    4

  4. DOption (d)

    3

View answer & explanation

Correct answer

Answer: (a)A.

6

Why this answer is correct

Loop evaluation

for i = 0j = 0j not less i, inner for loop terminates
for i = 1j = 0x = 0 + 1 + 0 – 1 = 0
break statement encountered, inner loop terminates
for i = 2j = 0x = 0 + 2 + 0 – 1 = 1 break statement encountered, inner loop terminates
for i = 3j = 0x = 1 + 3 + 0 – 1 = 3 break statement encountered, inner loop terminates
for i = 4j = 0x = 3 + 4 + 0 – 1 = 6 break statement encountered, inner loop terminates
for i = 5i not less 5, outer loop terminates

Question 3

In a B-Tree, each node represents a disk block. Suppose one block holds 8192 bytes. Each key uses 32 bytes. In a B-tree of order M there are M – 1 keys. Since each branch is on another disk block. We assume a branch is of 4 bytes. The total memory requirement for a non-leaf node is

  1. AOption (a)

    32 M - 32

  2. BOption (b)

    36 M - 32

  3. COption (c)

    36 M - 36

  4. DOption (d)

    32 M - 36

View answer & explanation

Correct answer

Answer: (b)B.

36 M - 32

Why this answer is correct

Data:

Block size = 8192 bytes = 213 bytes

Key size = 32 byte

Block pointer = 4 byte

Order of the b-tree = M

Number of keys = M – 1 

Formula:

In a B-Tree, the size of non-leaf node = M × (Block pointer) + (M – 1) × (key + Record pointer)

Calculation:

Assuming Record pointer = 0  (since nothing is mentioned about it)

Total size = M(4) + (M - 1)(32) = 36 M - 32

Question 4

Given following equation:

(142)b + (112)b-2 = (75)8. Find base b.

  1. AOption (a)

    3

  2. BOption (b)

    6

  3. COption (c)

    7

  4. DOption (d)

    5

View answer & explanation

Correct answer

Answer: (d)D.

5

Why this answer is correct

(142)b + (112)b-2 = (75)8

b2 + 4 × b + 2 + 1 × (b – 2)2 + 1 × (b – 2) + 2 = 7×8 + 5

2b2 + b + 6 = 61

2b2 + b – 55 = 0

2b2 +  11b – 10b – 55 = 0

b(2b + 11 ) – 5(2b + 11) = 0

(b – 5).(2b + 11) = 0

∴ b = 5.  

Alternate:

Option 1: b = 3

It has base 3 which is not possible because (142) having a digit 4 cannot exist in base 3.

Option 2: b = 6

(142)6 = (62)10

(112)4 = (22)10

62 + 22 = (84)10

(75)8 = (61)10

Therefore 6 is not the base

Option 3: b = 7

(142)7 = (79)10

(112)5 = (32)10

79 + 32 = (111)10

(75)8 = (61)10

Therefore 7 is not the base

Option_4:  b = 5

(142)5 = (47)10

(112)3 = (14)10

47 + 14 = (61)10

(75)8 = (61)10

Therefore 5 is the base

Hence, (142)5 + (112)3 = (75)8

Question 5

Which of the following statements are true regarding C++?

(a) Overloading a function gives the capability to an existing operator to operate on other data types.

(b) Inheritance in object-oriented programming provides support to reusability.

(c) When object of a derived class is defined, first the constructor of derived class is executed then constructor of a base class is executed.

(d) Overloading is a type of polymorphism.

Choose the correct option from those given below:

  1. AOption (a)

    (a) and (b) only

  2. BOption (b)

    (a), (b) and (c) only

  3. COption (c)

    (b) and (d) only

  4. DOption (d)

    (b), (c) and (d) only

View answer & explanation

Correct answer

Answer: (c)C.

(b) and (d) only

Why this answer is correct

Statement (a): Overloading a function gives the capability to an existing operator to operate on other data types.

This statement is incorrect. Operator overloading is a type of polymorphism in which an operator is overloaded to give a different meaning or user defined meaning. It allows to change the way an operator can work. It gives the capability to an existing operator to operate on other data types.

Statement (b): Inheritance in object-oriented programming provides support to reusability.

This statement is correct.  When a class acquires the properties of another class, this is known as inheritance. The class which acquire the properties and method is known as derived class and other one is parent or base class. Inheritance another name for reusability.

Statement (c): When object of a derived class is defined, first the constructor of derived class is executed then constructor of a base class is executed.

This statement is incorrect Constructor is a special member function of class that is automatically executed or called when objects of that class will be created. As when object of derived class is defined, automatically derived class constructor and base class constructor will execute inside them.

Statement (d): Overloading is a type of polymorphism.

This statement is correct. Operator is a type of polymorphism in which an operator is overloaded to give a different meaning or user defined meaning. It allows to change the way an operator can work.

Question 6

Let A = {001, 0011, 11, 101} and B = {01, 111, 111, 010}. Similarly, let C = {00, 001, 1000} and D = {0, 11, 011}.

Which of the following pairs have a post-correspondence solution?

  1. AOption (a)

    Only pair (A, B)

  2. BOption (b)

    Only pair (C, D)

  3. COption (c)

    Both (A, B) and (C, D)

  4. DOption (d)

    Neither (A, B) nor (C, D)

View answer & explanation

Correct answer

Answer: (a)A.

Only pair (A, B)

Why this answer is correct

Concept:

Post correspondence problem (PCP): It defines the un-decidability of strings. For the solution of PCP , we have to check whether there is a finite sequence (i1,….ip) with ij belongs to {1,….,m} for j = 1,….p so that ui1ui2…uip = vi1vi2………vip.

Explanation:

CASE: for pair (A, B)

A = {001, 0011, 11, 101}

B = {01, 111, 111, 010}.

Consider it as: A1 = 001, A2 = 0011, A3 = 11, A4 = 101

B1 = 01, B2 = 111, B3 = 111, B4 = 010

Here A3A4 = B2B1 or A3A4 = B3B1

i.e. 11101= 11101

So, pair (A, B) has a PCP solution.

CASE 2: Consider pair (C, D)

C = {00, 001, 1000}

D = {0, 11, 011}.

There does not exist any such combination of strings which satisfy the property for PCP solution. So, Pair (C, D) does not have PCP solution.

Question 7

The sequence diagram given in Figure 1 for the Weather Information System takes place when an external system requests the summarized data from the weather station. The increasing order of lifeline for the objects in the system are:

  1. AOption (a)

    Sat comms → Weather station -→ Commslink → Weather data

  2. BOption (b)

    Sat comms → Comas link → Weather station → Weather data 

  3. COption (c)

    Weather data → Comms link → Weather station → Sat Comms

  4. DOption (d)

    Weather data → Weather station → Comma link —> Sat Comma

View answer & explanation

Correct answer

Answer: (c)C.

Weather data → Comms link → Weather station → Sat Comms

Why this answer is correct

In this scenario, first connection request is established, weather information system is requesting for the weather report.

Request takes place as:

  1. Request will be sent from weather information system to sat communication.

  2. sat comm is forwarding that request to weather station.

  3. Then weather station sends get (summary) request to communication link

  4. After that, it will fetch data from weather data.

Reply process:

  1. As the communication link is nearest to weather data, first it will get the data.

  2. Then it goes from comm link to weather station.

  3. Then weather station to sat comm

  4. At the end, weather information system get the weather information.

So, increasing order of lifeline of objects in the system will be same as objects similar or larger distance from weather data, in the way reply is gone through. So, it will be:

Weather data → Comms link → Weather station → Sat Comms

Question 8

Consider the following Linear programming problem (LPP):

Maximize z = x1 + x2

Subject to the constraints:

x1 + 2x2 ≤ 2000

x1 + x2 ≤ 1500

x2 ≤ 600

and x1, x2 ≥ 0

The solution of the above LPP is:

  1. AOption (a)

    x1 = 750, x2 = 750, z = 1500

  2. BOption (b)

    x1 = 500, x2 = 1000, z = 1500

  3. COption (c)

    x1 = 1000, x2 = 500, z = 1500

  4. DOption (d)

    x1 = 900, x2 = 600, z = 1500

View answer & explanation

Correct answer

Answer: (c)C.

x1 = 1000, x2 = 500, z = 1500

Why this answer is correct

Consider it as option-wise:

  1. x1 = 750, x2 = 750, z = 1500

Maximize z = x1 + x2

x1 + 2x2 ≤ 2000      -----(1)

x1 + x2 ≤ 1500      -----(2)

x2 ≤ 600      ------  (3)

and x1, x2 ≥ 0

Check whether the values in the option are satisfying these equations or not.

750 + 2 × 750 < = 2000

2250 < = 2000            [false]

So, this option is not correct.

2) x1 = 500, x2 = 1000, z = 1500

Put value of x1 and x2 in equation (1).

500 + 2× 1000 < = 2000

2500 < = 2000          [False]

Option is incorrect.

  1. x1 = 1000, x2 = 500, z = 1500

Put x1 and x2 in equation 1.

1000 + 2 × 500 < = 2000

2000 < = 2000 [true]

For equation (2), 1000+ 500 < = 1500            [true]

For equation (3), 500 < = 600                     [true]

For maximize z = x1 + x2 = 1000 + 500 = 1500 [true]

It is satisfying all equations.

  1. x1 = 900, x2 = 600, z = 1500

Put the values in equation (1),

900 + 2× 600 < = 2000

2100 < = 2000          [False]

Option is incorrect.

Question 9

Which of the following CPU scheduling algorithms is/are supported by LINUX operating system?

  1. AOption (a)

    Non-preemptive priority scheduling

  2. BOption (b)

    Preemptive priority scheduling and time sharing CPU scheduling

  3. COption (c)

    Time sharing scheduling only

  4. DOption (d)

    Priority scheduling only

View answer & explanation

Correct answer

Answer: (b)B.

Preemptive priority scheduling and time sharing CPU scheduling

Why this answer is correct

Linux operating system supports both preemptive priority scheduling and time sharing CPU scheduling.

Linux scheduler is a priority preemptive scheduler with two priority ranges – Real time from 0 to 99 and a nice range from 100 to 140.

Explanation:

Preemptive priority scheduling: It maintains two array: active array and expired array.  Schedule the processes based on their static and dynamic priorities.

  1.  It finds the highest priority queue with a runnable process and find the first process on that queue. Calculate its time quantum and then run. After time quantum, it put that process on expire array list and repeat the process again.

  2. When priority level of active queue is empty, it looks for next highest queue, after running all active queues, it swaps active and expired queues.

Diagram:

Question 10

Which tag is used to enclose any number of javascript statements in HTML document?

  1. AOption (a)

    <code>

  2. BOption (b)

    <script>

  3. COption (c)

    <title>

  4. DOption (d)

    <body>

View answer & explanation

Correct answer

Answer: (b)B.

<script>

Why this answer is correct

Concept:

Javascript is a programming language for use in HTML pages. Its programs are run by interpreter built into the user’s web browser.

Explanation:

Programs in javascript language are known as scripts. It can execute both on browser and server or any device that supports special program javascript virtual machine. It has full integration with HTML/CSS.

Javascript programs can be inserted into any part of HTML document with the help of  <script > tag.

Example :

<html> <body> <script> alert (“this is javascript program”); </script> </body> </html>

Question 11

When using Dijkstra’s algorithm to find shortest path in a graph, which of the following statement is not true?

  1. AOption (a)

    It can find shortest path within the same graph data structure

  2. BOption (b)

    Every time a new node is visited, we choose the node with smallest known distance/cost (weight) to visit first

  3. COption (c)

    Shortest path always passes through least number of vertices

  4. DOption (d)

    The graph needs to have a non-negative weight on every edge

View answer & explanation

Correct answer

Answer: (c)C.

Shortest path always passes through least number of vertices

Why this answer is correct

Concept:

Dijkstra’s algorithm is used to find single source shortest path i.e path between any two vertices in a graph. All edges must have non-negative weights and graph must be connected.

Explanation:

 

Vabcdefg
a0a3a5a6aInfInfInf
b0a3a5a5bInfInfInf
C0a3a5a5b11c8c12c
d0a3a5a5b11c8c12c
f0a3a5a5b11c8c9f

 

So, we get the shortest distance from a to g . (a -> b -> c -> d -> f -> g).

Question 12

Consider the following statements with respect to duality in LPP

(a) The final simplex table giving optimal solution of the primal also contains optimal solution of its dual in itself.

(b) If either the primal or the dual problem has a finite optimal solution, then the other problem also has a finite optimal solution.

(c) If either problem has an unbounded optimum solution, then the other problem has no feasible solution at all

Which of the statements is (are) correct?

  1. AOption (a)

    only (a) and (b)

  2. BOption (b)

    only (a) and (c)

  3. COption (c)

    only (b) and (c)

  4. DOption (d)

    (a), (b) and (c)

View answer & explanation

Correct answer

Answer: (d)D.

(a), (b) and (c)

Why this answer is correct

Concept:

Duality in Linear programming problem (LPP) : It means a linear programming problem has another LPP which is derived from it.  Original LPP is known as primal and derived LPP is known as Dual.

Explanation:

Some points about dual LPP:

  1. The final simplex table giving optimal solution of the primal also contains optimal solution of its dual in itself.

  2. If either the primal or the dual problem has a finite optimal solution, then the other problem also has a finite optimal solution.

  3. If either problem has an unbounded optimum solution, then the other problem has no feasible solution at all

Example:

We have a set of equations as:

Maximize z = 10x1 + 20 x2

Subject to:

3x1 + 4x2 < =100

5x1 + 6x2 < = 150

X1, x2 >= 0

Dual of this will be:

Minimize z = 100 y1 + 150 y2

Subject to:

3y1 + 4y2 >=10

5y1 + 6y2 > = 20

y1, y2 <= 0

Question 13

Given CPU time slice of 2 ms and the following list of processes.

ProcessBurst time (ms)Arrival time (ms)
p130
p242
p355

 

Find average turnaround time and average waiting time using round-robin CPU scheduling?

  1. AOption (a)

    4, 0

  2. BOption (b)

    5.66, 1.66

  3. COption (c)

    5.66, 0

  4. DOption (d)

    7, 2

View answer & explanation

Correct answer

Answer: (b)B.

5.66, 1.66

Why this answer is correct

Gantt Chart with time slice of 2ms

p1p2p1p2p3p3p3

0        2          4          5         7          9         11       12

Process Table: (time in milliseconds)

ProcessBurst time (BT)Arrival time (AT)Completion time (CT)Turn-Around time (TAT) = (CT - AT)Waiting time (WT) = (TAT - BT)
p130552
p242751
p3551272
Sum = 17Sum = 5

 

Average TAT = 173\frac{{17}}{3} = 5.66

Average WT = 53\frac{5}{3} = 1.66

Question 14

Consider the language \(L = \left{ {{a^n}{b^{n - 3}}\ | n > 2} \right}\) on ∑ = {a, b}. Which one of the following grammars generates the language L?

  1. AOption (a)

    S → aA|a, A → aAb|b

  2. BOption (b)

    S → aaA|λ, A → aAb|λ 

  3. COption (c)

    S → aaaA|a, A → aAb|λ 

  4. DOption (d)

    S → aaaA, A → aAb|λ 

View answer & explanation

Correct answer

Answer: (d)D.

S → aaaA, A → aAb|λ 

Why this answer is correct

Given language:

\(L = \left{ {{a^n}{b^{n - 3}} |n > 2} \right}\)

It is generating strings of type = {aaa, a4b, a5b2, a6b3, ………………….}

Now, consider all the options one by one :

Option 1: S → aA|a, A → aAb|b

This grammar is generating strings of type = {a, ab, aabb…………}. But in given language, we are not getting {a}. So, it is not generating given language.

Option 2: S → aaA|λ, A → aAb|λ 

Smallest string that is generated by this grammar is λ. But for given language it is not true, because strings are starting with aaa.

Option 3: S → aaaA|a, A → aAb|λ

In this grammar also, smallest string possible is {a} which is not required here. So, it is not generating given language.

Option 4: S → aaaA, A → aAb|λ

This grammar generates string of type = {aaa, a4b, a5b2,…….} which is same as in the given language. It generates the given language.

Question 15

Consider the following languages:

\({L_1} = \left{ {{a^n}{b^n}{c^m}} \right} \cup \left{ {{a^n}{b^m}{c^m}} \right},;n,;m \ge 0\)

\({L_2} = { w{w^R}|w \in \left{ {a,;b} \right}*}\) Where R represents reversible operation.

Which one of the following is (are) inherently ambiguous language(s)?

  1. AOption (a)

    only L1

  2. BOption (b)

    only L2

  3. COption (c)

    both L1 and L2

  4. DOption (d)

    neither L1 nor L2

View answer & explanation

Correct answer

Answer: (a)A.

only L1

Why this answer is correct

Concept:

Inherently ambiguous language: A context free language is inherently ambiguous if every context free grammar for that language is ambiguous.

Explanation:

If we get any one unambiguous grammar for each of the option given above, then that language will not be inherently ambiguous.

Case 1:

\({L_1} = \left{ {{a^n}{b^n}{c^m}} \right} \cup \left{ {{a^n}{b^m}{c^m}} \right},;n,;m \ge 0\)

This is inherently ambiguous language. There does not exist any unambiguous grammar for this. It is somewhat similar to the language L = {aibjck | i = j or j = k} . It has a common subset anbncn.

\({L_2} = { w{w^R}|w \in \left{ {a,;b} \right}*} \) Where R represents reversible operation.

This is not inherently ambiguous language. An unambiguous grammar exists for it:

S -> aSa | bSb |  λ

Question 16

The weight of minimum spanning tree in graph G, calculated using Kruskal’s algorithm is:

  1. AOption (a)

    14

  2. BOption (b)

    15

  3. COption (c)

    17

  4. DOption (d)

    18

View answer & explanation

Correct answer

Answer: (b)B.

15

Why this answer is correct

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:

Edge set for the given graph = {2, 3, 4, 5, 6, 7, 8}

For 5 vertices, we need 4 edges in MST,

So, edge set for MST = {2, 3, 4, 6}

Minimum spanning tree

Minimum cost 2 + 3 + 4 + 6 = 15

Question 17

What are the greatest lower bound (GLB) and the least upper bound (LUB) of the sets A = {3, 9, 12} and B = {1, 2, 4, 5, 10} if they exist in poset (z+, /)

  1. AOption (a)

    A (GLB – 3, LUB - 36) ; B (GLB – 1, LUB - 20)

  2. BOption (b)

    A (GLB – 3, LUB - 12) ; B (GLB – 1, LUB - 10)

  3. COption (c)

    A (GLB – 1, LUB - 36) ; B (GLB – 2, LUB - 20)

  4. DOption (d)

    A (GLB – 1, LUB - 12) ; B(GLB – 2, LUB - 10)

View answer & explanation

Correct answer

Answer: (a)A.

A (GLB – 3, LUB - 36) ; B (GLB – 1, LUB - 20)

Why this answer is correct

In poset (z+, /), / is the division relation. Hence, Hasse diagram for the given POSET

A = {3, 9, 12, 36 (added)}

A with GLB = 3 and LUB = 36

B = {1, 2, 4, 5, 10, 20 (added)}

B with GLB = 1 and LUB = 20

Question 18

The Reduced Instruction Set Computer (RISC) characteristics are:

(a) Single cycle instruction execution

(b) Variable length instruction formats

(c) Instructions that manipulates operands in memory

(d) Efficient instruction pipeline

Choose the correct characteristics from the options given below:

  1. AOption (a)

    (a) and (b)

  2. BOption (b)

    (b) and (c)

  3. COption (c)

    (a) and (d)

  4. DOption (d)

    (c) and (d)

View answer & explanation

Correct answer

Answer: (c)C.

(a) and (d)

Why this answer is correct

Statement a:  Correct:

RISC has pipelined implementations with the goal of executing one instruction per machine cycle.

Statement b:  Incorrect

RISC has fixed length instruction formats

Statement c:  Incorrect

c – RISC can perform only Register to Register Arithmetic operations

Statement d:  Correct

d – RISC has efficient instruction pipeline

Therefore, statement a and d are correct.

Question 19

Which of the following are legal statements in C programming language?

(a) int * P = &44;

(b) int * P = &r;

(c) int P = &a;

(d) int P = a;

Choose the correct option:

  1. AOption (a)

    (a) and (b)

  2. BOption (b)

    (b) and (c)

  3. COption (c)

    (b) and (d)

  4. DOption (d)

    (a) and (d)

View answer & explanation

Correct answer

Answer: (c)C.

(b) and (d)

Why this answer is correct

a – Pointer variable P cannot store address of a value which is not assigned to a variable.

b – Pointer variable P can store address of variable r.

c – Integer variable P cannot store address of variable a.

d – Integer variable P can store value of variable a.

Hence int * P = &r; and int P = a; are legal statements in C programming language.

Question 20

A non-pipelined system takes 30 ns to process a task. The same task can be processed in a four-segment pipeline with a clock cycle of 10 ns. Determine the speed up of the pipeline for 100 tasks.

  1. AOption (a)

    3

  2. BOption (b)

    4

  3. COption (c)

    3.91

  4. DOption (d)

    2.91

View answer & explanation

Correct answer

Answer: (d)D.

2.91

Why this answer is correct

Concept:

\({\rm{Speed;up}} = \frac{{{\rm{n}}; \times ;{{\rm{t}}{\rm{n}}}}}{{\left( {{\rm{n}}; +; {\rm{k}}; - ;1} \right){{\rm{t}}{\rm{p}}}}}\)

Given:

For a non-pipelines system,

time to process a task, tn = 30 ns

For a pipelined system,

number of segments, k = 4

clock cycle of each segment, tp = 10 ns

For n = 100 tasks,

Calculation:

Speed;up=100;×;30(100;+;4;−;1)10{\rm{Speed;up}} = \frac{{100; \times ;30}}{{\left( {100; + ;4; - ;1} \right)10}}

∴ speed up = 2.91

Question 21

A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minute with each frame carrying an average of 10,000 bits. What is the throughput of this network?

  1. AOption (a)

    1,000,000 bps

  2. BOption (b)

    2,000,000 bps

  3. COption (c)

    12,000,000 bps

  4. DOption (d)

    1,200,00,000 bps

View answer & explanation

Correct answer

Answer: (b)B.

2,000,000 bps

Why this answer is correct

Data:

Bandwidth = 10 Mbps = 106 bps

Data network can pass on average = 12,000 frames in 60 seconds.

1 frame = 10,000 bits

Calculation:

Therefore, data network can pass in 60 seconds = 12,000 × 10,000

Throughput is data network can pass in 1 second

Throughput = 12,000;×;10,00060\frac{{12,000; \times ;10,000}}{{60}} = 2,000,000 bps = 2 Mbps.

Question 22

A fuzzy conjunction operators, t(x, y), and a fuzzy disjunction operator, s(x, y), form a pair if they satisfy:

t(x, y) = 1 – s(1 – x, 1 - y).

If t(x,;y)=xy(x+y−xy)t\left( {x,;y} \right) = \frac{{xy}}{{\left( {x + y - xy} \right)}} then s(x, y) is given by

  1. AOption (a)

    x;+;y1;−;xy\frac{{x; + ;y}}{{1; -; xy}}

  2. BOption (b)

    x;+;y;−;2xy1;−;xy\frac{{x; + ;y; - ;2xy}}{{1; - ;xy}}

  3. COption (c)

    x;+;y;−;xy1;−;xy\frac{{x; + ;y; - ;xy}}{{1; - ;xy}}

  4. DOption (d)

    x;+;y;−;xy1;+;xy\frac{{x; + ;y; - ;xy}}{{1; + ;xy}}

View answer & explanation

Correct answer

Answer: (b)B.

x;+;y;−;2xy1;−;xy\frac{{x; + ;y; - ;2xy}}{{1; - ;xy}}

Why this answer is correct

Given:

t(x, y) = 1 – s(1 – x, 1 - y).

t(x,;y)=xy(x;+;y;−;xy)t\left( {x,;y} \right) = \frac{{xy}}{{\left( {x; + ;y; - ;xy} \right)}} 

s(x,;y)=1−(1;−;x)(1;−;y)1;−x;+;1;−;y;−;(1−x)(1;−;y)s\left( {x,;y} \right) = 1 - \frac{{\left( {1; - ;x} \right)\left( {1; - ;y} \right)}}{{1; - x; + ;1; - ;y; - ;\left( {1 - x} \right)\left( {1; - ;y} \right)}} 

s(x,;y)=1−1;−;y;−;x;+;xy1;−;x;+;1;−;y;−;1;+;y;+;x;−;xys\left( {x,;y} \right) = 1 - \frac{{1; - ;y; - ;x; + ;xy}}{{1 ;-; x ;+; 1; - ;y; - ;1 ;+ ;y ;+ ;x; - ;xy}}

s(x,;y)=1−1;−;y;−;x;+;xy1;−;xys\left( {x,;y} \right) = 1 - \frac{{1; - ;y; - ;x; +; xy}}{{1; - ;xy}}

s(x,;y)=1;−;xy;−;1;+;y;+;x;−;xy1;−;xys\left( {x,;y} \right) = \frac{{1; - ;xy; - ;1; + ;y; + ;x; - ;xy}}{{1 ;- ;xy}} 

s(x,;y)=x;+;y;−;2xy1;−;xys\left( {x,;y} \right) = \frac{{x; + ;y ;- ;2xy}}{{1; -; xy}}

Question 23

Which of the following interprocess communication model is used to exchange messages among co-operative processes?

  1. AOption (a)

    Shared memory model

  2. BOption (b)

    Message passing model

  3. COption (c)

    Shared memory and message passing model

  4. DOption (d)

    Queues

View answer & explanation

Correct answer

Answer: (c)C.

Shared memory and message passing model

Why this answer is correct

Concept:

Inter process communication (IPC) is a mechanism which allows processes to communicate with each other and synchronize their actions.

By maintaining this type of communication, processes are said to so-operate with each other. Processes can communicate with each other using these two ways:

  • Shared Memory
  • Message passing

Question 24

Consider a paging system where translation look aside buffer (TLB) a special type of associative memory is used with hit ratio of 80%.

Assume that memory reference takes 80 nanoseconds and reference time to TLB is 20 nanoseconds. What will be the effective memory access time given 80% hit ratio?

  1. AOption (a)

    110 nanoseconds

  2. BOption (b)

    116 nanoseconds

  3. COption (c)

    200 nanoseconds

  4. DOption (d)

    100 nanoseconds

View answer & explanation

Correct answer

Answer: (b)B.

116 nanoseconds

Why this answer is correct

Data:

TLB hit ratio = 0.8

TLB miss ration = 0.2

TLB reference time = 20 ns

Main Memory reference time = 80 ns

Formula:

Effective memory access time (EMAT)

= TLB hit (TLB time + Main memory time) + TLB miss (TLB time + 2 × Main memory time)

Calculation:

EMAT = 0.8 (20 + 80) + 0.2 (20 + 80 + 80)

= 80 + 36

∴ EMAT= 116 ns

Question 25

Which of the following methods are used to pass any number of parameters to the operating system through system calls?

  1. AOption (a)

    Registers

  2. BOption (b)

    Block or table in main memory

  3. COption (c)

    Stack

  4. DOption (d)

    Block in main memory and stack

View answer & explanation

Correct answer

Answer: (d)D.

Block in main memory and stack

Why this answer is correct

Concept:

Following are the methods used to pass parameters to the OS.

1. Registers:

Parameters are passed via registers but the limitation of this method is that the number of parameters cannot exceed the number of registers.

2.  Blocks:

When there are more parameters than registers, these parameters are stored on a main memory block and the pointer to this block (block address) is passed as a parameter to a register.

3.  Stack:

Parameters can also be pushed on and popped off the stack by the OS. This method can be used when we don’t certainly know the number of parameters beforehand.

Therefore, methods used to pass ANY NUMBER of parameters to the operating system through system calls are via block and stack. Registers cannot pass ANY NUMBER of parameters.

Question 26

Match List I and List II

List IList II
a.Physical layeri.Provide token management service
b.Transport layerii.Concerned with transmitting raw bits over a communication channel
c.Session layeriii.Concerned with the syntax and semantics of the information transmitted
d.Presentation layeriv.True end-to-end layer from source to destination

 

Choose the correct option from those given below:

  1. AOption (a)

    a – ii, b – iv, c – iii, d - i

  2. BOption (b)

    a – iv, b – iii, c – ii, d - i

  3. COption (c)

    a – ii, b – iv, c – i, d - iii

  4. DOption (d)

    a – iv, b – ii, c – i, d - iii

View answer & explanation

Correct answer

Answer: (c)C.

a – ii, b – iv, c – i, d - iii

Why this answer is correct

Explanation:

Physical layer: Concerned with transmitting raw bits over a communication channel

Physical layer is the only layer of OSI network model which actually deals with the physical connectivity of two different stations. This layer defines the hardware equipment, cabling, wiring, frequencies, pulses used to represent binary signals etc.

Transport layer: True end-to-end layer from source to destination

It is termed as an end-to-end layer because it provides a point-to-point connection rather than hop-to- hop, between the source host and destination host to deliver the services reliably.

Session layer: Provide token management service

The session layer of OSI model is responsible for establishing, managing, synchronizing and terminating sessions between end-user application processes. Through token, this layer prevents the two users to simultaneously attempt the same critical operation.

Presentation layer: Concerned with the syntax and semantics of the information transmitted

It is responsible for data encryption and decryption of sensitive data before they are transmitted over common channels.

Question 27

Consider the following grammars:

G1 : S → aSb|bSa|aa

G2 : S → aSb|bSa|SS|λ

G3 : S → aSb|bSa|SS|a

G4 : S → aSb|bSa|SS|SSS|λ

Which of the following is correct w.r.t. the above grammars?

  1. AOption (a)

    G1 and G3 are equivalent

  2. BOption (b)

    G2 and G3 are equivalent

  3. COption (c)

    G2 and G4 are equivalent

  4. DOption (d)

    G3 and G4 are equivalent

View answer & explanation

Correct answer

Answer: (c)C.

G2 and G4 are equivalent

Why this answer is correct

G1 : S → aSb|bSa|aa

gives a language G1 = {number of a = number of b + 2}

G2 : S → aSb|bSa|SS|λ

gives a language G2 = {number of a = number of b}

G3 : S → aSb|bSa|SS|a

gives a language G3 = {number of a > = number of b + 1}

G4: S → aSb|bSa|SS|SSS|λ

gives a language G4 = {number of a = number of b}

Hence, G2 and G4 are equivalent.

Question 28

Consider the following statements with respect to the language L = {anbn |n≥ 0}

S1 : L2 is context free language

S2 : Lk is context-free language for any given k ≥ 1

S3 : L̅ and L* are context free languages

Which one of the following is correct?

  1. AOption (a)

    only S1 and S2

  2. BOption (b)

    only S1 and S3

  3. COption (c)

    only S2 and S3

  4. DOption (d)

    S1, S2 and S3

View answer & explanation

Correct answer

Answer: (d)D.

S1, S2 and S3

Why this answer is correct

Statement S1: L2 is context free language – True

L2 means L.L which will give the language {anbn anbn |n≥ 0} and this is context free language.

Statement S2: Lk is context-free language for any given k ≥ 1 – True

Lk is context-free language because CFLs are closed under kleene closure.

Statement S3: L̅ and L* are context free languages – True

L̅ is a DCFL because L is a DCFL. L̅ is a language that accepts all inputs on a and b except anbn and this is easily determined by a PDA.

L* is a CFL because CFLs are closed under kleene closure.

Important Point:

Deterministic Context free language is closed under complementation

Question 29

Which of the following is not needed by an encryption algorithm used in Cryptography?

  1. AOption (a)

    KEY

  2. BOption (b)

    Message

  3. COption (c)

    Ciphertext

  4. DOption (d)

    User details

View answer & explanation

Correct answer

Answer: (d)D.

User details

Why this answer is correct

To encrypt any message, any encryption algorithms necessarily require

  1. Plain text (message)
  2. Key (private or public)
<br>

Encryption algorithm doesn’t require Ciphertext, it produces ciphertext.

To decrypt any message, any decryption algorithms necessarily require

  1. Ciphertext
  2. Key (private or public)
<br>

No encryption or decryption algorithm requires user details.

Therefore, more appropriate answer is 4.

Question 30

A tree has 2n vertices of degree 1, 3n vertices of degree 2, n vertices of degree 3. Determine the number of vertices and edges in tree.

  1. AOption (a)

    12,11

  2. BOption (b)

    11,12

  3. COption (c)

    10,11

  4. DOption (d)

    9,10

View answer & explanation

Correct answer

Answer: (a)A.

12,11

Why this answer is correct

Data:

Degree of 2n vertices = 1

Degree of 3n vertices = 2

Degree of n vertices = 3

Formula

Handshaking theorem:

Sum of the degree of vertices = 2 × number of edges(E)

In a tree, number of edges(E) = number of vertices – 1

Calculation

Using 1st formula,

2n × 1 + 3n × 2 + n×3 = 2E

11n = 2E

E=112;nE = \frac{{11}}{2};n

E = 2n + 3n + n – 1

E = 6n – 1

Comparing above two equations for E,

112n=6n−1\frac{{11}}{2}n = 6n - 1

11n = 12n – 2

n = 2

number of vertices = 6n = 12

number of Edges = 12 – 1 = 11

Question 31

Match List-I with List-II

List IList II
a.Micro operationi.Specify micro operations
b.Micro programmed control unitii.Improve CPU utilization
c.Interruptsiii.Control Memory
d.Micro instructioniv.Elementary operation performed on data stored in registers

 

Choose the correct option from those given below:

  1. AOption (a)

    a – iv, b – iii, c – ii, d - i

  2. BOption (b)

    a – iv, b – iii, c – i, d - ii

  3. COption (c)

    a – iii, b – iv, c – i, d - ii

  4. DOption (d)

    a – iii, b – iv, c – ii, d - i

View answer & explanation

Correct answer

Answer: (a)A.

a – iv, b – iii, c – ii, d - i

Why this answer is correct

Micro operation: Elementary operation performed on data stored in registers

In computer central processing units, micro-operations (also known as micro-ops) are the functional or atomic, operations of a processor. These are low level instructions used in some designs to implement complex machine instructions.

Micro programmed control unit: Control Memory

To execute an instruction, the control unit of the CPU must generate the required control signal in the proper sequence. Micro programmed control unit fetches microinstructions from the control memory.

Interrupts: Improve CPU utilization

Interrupts are important because they give the user better control over the computer.

Micro instruction: Specify micro operations

A collection of micro instructions perform a specific micro operation.

Question 32

Suppose a system has 12 magnetic tape drives and at time t0, three processes are allotted tape drives out of their as given below:

Maximum NeedsCurrent Needs
p0105
p142
p292

 

At time t0, the system is in safe state. Which of the following is safe sequence so that deadlock is avoided?

NOTE:

Current Need is currently allocated resource to a process

  1. AOption (a)

    (p0, p1, p2)

  2. BOption (b)

    (p1, p0, p2)

  3. COption (c)

    (p2, p1, p0)

  4. DOption (d)

    (p0, p2, p1)

View answer & explanation

Correct answer

Answer: (b)B.

(p1, p0, p2)

Why this answer is correct

Data:

Remaining Need = Maximum need – Current need

Maximum NeedsCurrent needsRemaining Needs
p01055
p1422
p2927

 

Total resources = 12

Total resources allocated = 5 + 2 + 2 = 9

Available resources = 12 – 9 = 3

Calculation:

Available resource ≥ remaining need of p1

Using 3 resources, p1 gets executed first. It frees 2 resources.

Available resources = 3 + 2 = 5

Available resource ≥ remaining need of p0

Using 5 resources, p0 gets executed first. It frees 5 resources.

Available resources = 5 + 5 = 10

Available resource ≥ remaining need of p2

Now, p2 can be executed easily. Hence, (p1, p0, p2) is a safe sequence.

Question 33

Identify the circumstances under which pre-emptive CPU scheduling is used:

(a) A process switches from Running state to Ready state

(b) A process switches from Waiting state to Ready state

(c) A process completes its execution

(d) A process switches from Ready to Waiting state

Choose the correct option:

  1. AOption (a)

    (a) and (b) only

  2. BOption (b)

    (a) and (d) only

  3. COption (c)

    (c) and (d) only

  4. DOption (d)

    (a), (b), (c) only

View answer & explanation

Correct answer

Answer: (a)A.

(a) and (b) only

Why this answer is correct

Concept:

To understand pre-emptive scheduling, we first need to understand the process state diagram.

Scheduling is performed from when the process is taken from ready state on to the running state.

Hence, CPU scheduling decisions take place under one of four conditions,

  1. Process switch from Running state to Waiting state.
  2. Process switch from Running state to Ready state. (Statement a)
  3. Process switch from Waiting state to ready state. (Statement b)
  4. Process termination.
<br>

Statement c – No need for preemptive scheduling as execution is complete.

Statement d – Process cannot switch from Ready state to Waiting state.

Question 34

Consider the following grammar:

S → 0A|0BB

A → 00A|λ

B → 1B|11C

C → B

Which language does this grammar generate?

  1. AOption (a)

    L((00) * 0 + (11) * 1)

  2. BOption (b)

    L(0(11) * + 1(00) * )

  3. COption (c)

    L((00) * 0)

  4. DOption (d)

    L(0(11) * 1)

View answer & explanation

Correct answer

Answer: (c)C.

L((00) * 0)

Why this answer is correct

Given grammar is generating string of type: {0, 000, 00000,0000000…...}

  1. L((00) * 0 + (11) * 1)

This language generating string with combination of 0’s and 1’s. But given grammar is not generating any string composed of 1’s.

  1. L(0(11) * + 1(00) * )

This language is not generating string which contains three 0’s together. Also, it is generating strings which contains 1 in it. So, it is not correct option.

  1. L((00) * 0)

It is generating strings of type: {0, 03, 05, 07,.}. These set of strings is similar to the one generating from given grammar. So, this language is generated by given grammar.

  1. L(0(11) * 1)

It is incorrect because it is generating strings which contains 1 which is not the case with given grammar.

Question 35

Let the population of chromosomes in genetic algorithm is represented in terms of binary number. The strength of fitness of a chromosome in decimal form, x, is given by

Sf(x)=f(x)∑f(x);where;;f(x)=x2Sf\left( x \right) = \frac{{f\left( x \right)}}{{\sum f\left( x \right)}};where;;f\left( x \right) = {x^2}

The population is given by P where:

P = {(01101), (11000), (01000), (10011)}

The strength of fitness of chromosome (11000) is ______

  1. AOption (a)

    24

  2. BOption (b)

    576

  3. COption (c)

    14.4

  4. DOption (d)

    49.2

View answer & explanation

Correct answer

Answer: (d)D.

49.2

Why this answer is correct

P = {(01101), (11000), (01000), (10011)}

Also, strength of fitness of a chromosome in decimal form, x is given by:

Sf(x)=f(x)∑f(x);where;;f(x)=x2Sf\left( x \right) = \frac{{f\left( x \right)}}{{\sum f\left( x \right)}};where;;f\left( x \right) = {x^2} 

So, first convert the population in decimal form, then find f(x).

PValue in decimalf(x) = x2
0110113169
1100024576
01000864
1001119361

 

We have to find the strength of fitness of chromosome 11000.

11000 in decimal = 24, f(24) = 576

Sf(x)=576169;+;576;+;64;+;361Sf\left( x \right) = \frac{{576}}{{169; + ;576; + ;64; + ;361}} 

Sf(x) = 576/1170

Sf(x) = 0.492

Question 36

Consider the following statements:

(a) The running time of dynamic programming algorithm is alway θ (ρ) where ρ is number of subproblems.

(b) When a recurrence relation has cyclic dependency, it is impossible to use that recurrence relation (unmodified) in a correct dynamic program.

(c) For a dynamic programming algorithm, computing all values in a bottom-up fashion is asymptotically faster than using recursion and memorization.

(d) If a problem X can be reduced to a known NP-hard problem, then X must be NP-hard.

Which of the statement(s) is (are) true?

  1. AOption (a)

    Only (b) and (a)

  2. BOption (b)

    Only (b)

  3. COption (c)

    Only (b) and (c)

  4. DOption (d)

    Only (b) and (d)

View answer & explanation

Correct answer

Answer: (b)B.

Only (b)

Why this answer is correct

(a) The running time of dynamic programming algorithm is alway θ (ρ) where ρ is number of subproblems.

This statement is incorrect. Running time for dynamic algorithm is the number of subproblems multiplies with time for each subproblem. It means running time of dynamic programming algorithm is O(1).

(b) When a recurrence relation has cyclic dependency, it is impossible to use that recurrence relation (unmodified) in a correct dynamic program.

Cyclic dependency is relation between two or more modules which depends on each other indirectly or directly, these are mutually recursive. So, given statement is correct.

(c) For a dynamic programming algorithm, computing all values in a bottom-up fashion is asymptotically faster than using recursion and memorization.

This statement is incorrect. For a dynamic programming algorithm, computing all values using recursion and memorization takes less time than computing in bottom- up fashion.

(d) If a problem X can be reduced to a known NP-hard problem, then X must be NP-hard.

If a problem X can be reduced to a known NP hard problem, then X must be NP complete not NP hard. SO, given statement is incorrect.

Question 37

Let P be the set of all people. Let R be a binary relation on P such that (a, b) is in R if a is a brother of b. Is R symmetric transitive, an equivalence relation, a partial order relation?

  1. AOption (a)

    NO, NO, NO, NO

  2. BOption (b)

    NO, NO, YES, NO

  3. COption (c)

    NO, YES, NO, NO

  4. DOption (d)

    NO, YES, YES, NO

View answer & explanation

Correct answer

Answer: (c)C.

NO, YES, NO, NO

Why this answer is correct

R is a relation on P such that (a, b) is in R if a is a brother of b.

Case 1: check symmetric relation

(a, b) – a is the brother of b

(b, a) – b may or may not be brother of a.

So, given relation is not symmetric.

Case 2: Check transitivity

If a is the brother of b, b is the brother of c, then a will also be brother of c.

It means if (a, b) and (b, c) then (a, c).

So, given relation is transitive.

Case 3: Equivalence

As relation is not symmetric, so it cannot be equivalence relation.

Case 4: Partial order relation

For this, we have to check anti-symmetric property.

i.e. if (a, b) is in relation than (b, a) should not be in relation unless a = b. Here, it is not partial order relation.

Question 38

Which of the following algorithms is not used for line clipping?

  1. AOption (a)

    Cohen-Sutherland algorithm

  2. BOption (b)

    Southerland-Hodgeman algorithm

  3. COption (c)

    Liang-Barsky algorithm

  4. DOption (d)

    Nicholl-Lee-Nicholl algorithm

View answer & explanation

Correct answer

Answer: (b)B.

Southerland-Hodgeman algorithm

Why this answer is correct

Line clipping: It involves clipping of lines which are outside the window line.

Explanation:

From above given options line clipping algorithms are:

Cohen- Sutherland algorithm:  It cuts lines to portions which are within a rectangular area. It eliminates those lines which are outside the view port and clip those lines which are partially inside and partially outside of view port. To clip a line, we must have the endpoints. Region code in cohen – Sutherland algorithm is:

TopBottomLeftright

 

Two cases are there: trivial acceptance and trivial rejection. If both end points are inside the window, then trivially accepted. If both end points lie entirely to one side, or outside of window. Then trivially rejected otherwise clip the line.

Liang Barsky algorithm: It uses four computations to find the appropriate end points of a line. It is based on floating point arithmetic. It uses parametric equations for the line.

Nichole-Lee-NicholI algorithm: It divides the clipping window into separate areas and matches the start point area code to one of those areas. Imaginary lines are drawn to all the edges of the window and based on these imaginary lines, line is clipped.

Question 39

The following multithreaded algorithm computes transpose of a matrix in parallel:

p Trans (X, Y, N)

if N = 1

then Y[1, 1] ← X [1, 1]

else partition X into four (N/2) × (N/2) submatrices X11, X12, X21, X22

partition Y into four (N/2) × (N/2) submatrices Y11, Y12, Y21, Y22

spawn p Trans (X11, Y11, N/2)

spawn p Trans (X12, Y12, N/2)

spawn p Trans (X21, Y21, N/2)

spawn p Trans (X22, Y22, N/2)

What is the asymptotic parallelism of the algorithm?

  1. AOption (a)

    T1/T∞ or θ (N2/lg N)

  2. BOption (b)

    T1/T∞ or θ (N/lg N)

  3. COption (c)

    T1/T∞ or θ (1g N/N2)

  4. DOption (d)

    T1/T∞ θ (lg N/N)

View answer & explanation

Correct answer

Answer: (a)A.

T1/T∞ or θ (N2/lg N)

Why this answer is correct

During transpose of the matrix, it is partitioned into 4 submatrices of size N/2.

If n = 1, then T(1) = 1

Else T1(n) = 4T1(N/2) + O(1)       ----- (1)

Solving equation 1 by master’s theorem:

nlogba=;nlog24=n2{n^{log_b^a}} = ;{n^{log_2^4}} = {n^2}, here a= 4 and b = 2

So, T1(n) = O(N2)

But the algorithm is multithreaded, and transposing is going in parallel. And we solved one subproblem already.

So, Tn(N) = Tn(N/2) + O(1)

Tn(N) becomes O(log N)

asymptotic parallelism of the algorithm:

T1/T∞ or θ (N2/lg N)

Question 40

Java Virtual Machine (JVM) is used to execute architectural neutral byte code. Which of the following is needed by the JVM for execution of Java code?

  1. AOption (a)

    Class loader only

  2. BOption (b)

    Class loader and Java Interpreter

  3. COption (c)

    Class loader, Java Interpreter and API

  4. DOption (d)

    Java Interpreter only

View answer & explanation

Correct answer

Answer: (b)B.

Class loader and Java Interpreter

Why this answer is correct

Concept:

Java virtual machine is component of technology for its hardware and operating system independence, the small size of its compiled code and its ability to protect users from malicious programs.

Explanation:

Java virtual machine is an abstract computing machine. Like a real computing machine, it has an instructions set and manipulated various memory areas at run time.

  • Java virtual machine knows nothing of java programming language, only of  a particular binary format, the class file format.
  • A class file contains JVM instructions or bytecodes and a symbol table, as well as other information.
  • JVM imposes strong syntactical and structural constraints on code in a class file.
  • Class loader and interpreter is needed by JVM to execute Java code.
  • Basic structure in JVM are: heap store, stack, method area, runtime constant pools, PC.

Question 41

In a system for a restaurant, the main scenario for placing order is given below:

(a) Customer reads menu

(b) Customer places order

(c) Order is sent to kitchen for preparation

(d) Ordered items are served

(e) Customer requests for a bill for the order

(f) Bill is prepared for this order

(g) Customer is given the bill

(h) Customer pays the bill

A sequence diagram for the scenario will have atleast how many objects among whom the messages will be exchanged.

  1. AOption (a)

    3

  2. BOption (b)

    4

  3. COption (c)

    5

  4. DOption (d)

    6

View answer & explanation

Correct answer

Answer: (c)C.

5

Why this answer is correct

There are five objects among whom the message will be exchanged :

These are:

  1. Customer

  2. Person who takes the order

  3. Chef

  4. Serving person

  5. Cashier

Process with the help of diagram is:

Question 42

Let G = (V, T, S, P) be any context-free grammar without any λ-productions or unit productions. Let K be the maximum number of symbols on the right of any production in P. The maximum number of production rules for any equivalent grammar in Chomsky normal form is given by:

Where |⋅| denotes the cardinality of the set.

  1. AOption (a)

    (K - 1)|P| + |T| -1

  2. BOption (b)

    (K - 1)|P| + |T|

  3. COption (c)

    K |P| + |T| -1

  4. DOption (d)

    K |P| + |T|

View answer & explanation

Correct answer

Answer: (b)B.

(K - 1)|P| + |T|

Why this answer is correct

Concept:

Context free grammar : A grammar G = (V, T ,S, P) is said to be context- free if all productions in P have the form A -> x where A ϵ V and x ϵ (V U T)*.

Explanation:

If context free grammar G = (V, T, S, P) is without λ-productions or unit productions.

K = maximum number of symbols on right side of production.

The maximum number of production rules for equivalent grammar in CNF:

(K - 1)|P| + |T|

A context free grammar is in CNF (Chomsky normal form) if it satisfies these conditions:

  1. Should not contains null or unit productions.

  2. A non-terminal symbol generating two non-terminals. For example, S -> AB

  3. A non- terminal generating a terminal. Example: S -> a

Question 43

Consider the following statement with respect to network security:

(a) Message confidentiality means that the sender and the receiver expect privacy.

(b) Message integrity means that the data must arrive at the receiver exactly as they were sent.

(c) Message authentication means the receiver is ensured that the message is coming from the intended sender.

Which of the statements is (are) correct?

  1. AOption (a)

    Only (a) and (b)

  2. BOption (b)

    Only (a) and (c)

  3. COption (c)

    Only (b) and (c)

  4. DOption (d)

    (a), (b) and (c)

View answer & explanation

Correct answer

Answer: (d)D.

(a), (b) and (c)

Why this answer is correct

(a) Message confidentiality means that the sender and the receiver expect privacy.

Message confidentiality means that only sender and intended receiver should be able to access the contents of a message. Confidentiality gets compromised if an unauthorized person is able to access a message. It means sender and receiver expect privacy.

(b) Message integrity means that the data must arrive at the receiver exactly as they were sent.

When the contents of a message are changed after the sender sends it, but before it reaches the intended recipient, we say that the integrity of the message is lost. It means that the data must arrive at the receiver exactly as they were sent.

(c) Message authentication means the receiver is ensured that the message is coming from the intended sender.

Authentication mechanisms help establish proof of identities. The authentication process ensures that the origin of an electronic message or document is correctly identified. It means that receiver is ensured that the message is coming from the intended sender.

Question 44

Consider the following learning algorithms:

(a) Logistic regression

(b) Back propagation

(c) Linear repression

Which of the following option represents classification algorithms?

  1. AOption (a)

    Only (a) and (b)

  2. BOption (b)

    Only (a) and (c)

  3. COption (c)

    Only (b) and (c)

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (a)A.

Only (a) and (b)

Why this answer is correct

Concept:

Learning algorithms: These algorithms are used in machine learning to help technology in human learning process. It is used to process data to extract patterns appropriate for application in a new system.

Explanation:

From above given options, only a) and b) are learning algorithms.

a) Logistic regression: It is used for binary classification problems. It is used to examine and describe the relationship between a binary variable and set of predicator variables.  The primary objective of logistic regression is to model the mean of the response variables, given a set or predicator variables.

b) Back propagation: It is the essence of neural net training. It is the method of fine tuning the weights of a neural net based on the error rate obtained in the previous iteration. It is a standard method of training artificial neural networks.

Question 45

A micro instruction format has micro operation field which is divided into 2 subfields F1 and F2, each having 15 distinct microoperations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field AD. The address space is of 128 memory words. The size of micro instruction is:

  1. AOption (a)

    19

  2. BOption (b)

    18

  3. COption (c)

    17

  4. DOption (d)

    20

View answer & explanation

Correct answer

Answer: (a)A.

19

Why this answer is correct

Micro instruction format: It consists of two fields of micro-operation. One field from conditions, one for branch field and one is address field.

F1F2ConditionBranchAddress

 

Explanation:

Micro operation field into two subfields containing 15 micro operations each.

Condition field: 4 status bits

Branch: 4 options in conjunction with address

So, bits required for microoperations = log215 + log215 = 4 + 4 = 8

Condition = log24 = 2

Branch in conjunction with address field = log2(4 × 128) = log2 512 = 9

F1 (4 bits)F2( 4 bits)Condition( 2 bits)Branch with address (9 bits)

 

Size of micro – instruction = 8 + 2 + 9 = 19 bits

Question 46

Given two tables EMPLOYEE (EID, ENAME, DEPTNO)

            DEPARTMENT (DEPTNO. DEPTNAME)

Find the most appropriate statement of the given query:

              Select count (*) total

              from EMPLOYEE where DEPTNO IN (D1, D2)

              group by DEPTNO

              having count (*) >5

  1. AOption (a)

    Total number of employees in each department D1 and D2

  2. BOption (b)

    Total number of employees of department D1 and D2 if their total is > 5

  3. COption (c)

    Display total number of employees in both departments Dl and D2

  4. DOption (d)

    The output of the query must have atleast two rows

View answer & explanation

Correct answer

Answer: (b)B.

Total number of employees of department D1 and D2 if their total is > 5

Why this answer is correct

Given query is:

             Select count (*) total

             from EMPLOYEE where DEPTNO IN (D1, D2)

             group by DEPTNO

having count (*) >5

STEP 1: It will first find the all the entries with department no. as D1 and D2 with the help of natural join from both the relations.

STEP 2: Then in the resulting table, it groups the tuples with the department no. (DEPTNO)

STEP3: Then select all those tuples having count > 5.

STEP 4: Finally, it results in the total number of employees of department D1 and D2 if their total is > 5.

Question 47

Consider the following statements:

(a) Microsoft Azure is a cloud-based operating system.

(b) Google App Engine is an integrated set of online services for consumers to communicate and share with others.

(c) Amazon Cloud Front is a web service content delivery.

Which of the statements is (are) correct?

  1. AOption (a)

    Only (a) and (b)

  2. BOption (b)

    Only (a) and (c)

  3. COption (c)

    Only (b) and (c)

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (b)B.

Only (a) and (c)

Why this answer is correct

(a) Microsoft Azure is a cloud-based operating system.

This statement is correct. Microsoft Azure is a cloud-based operating system which enables running of business applications, services and workload in the cloud itself. It mainly deals with the foundation of running applications and keeping the data on the cloud.

(b) Google App Engine is an integrated set of online services for consumers to communicate and share with others.

Google app engine is PaaS (Platform as a service) product. It provides web developing services to developers. Apps must be written in java or python.  So, this statement is incorrect.

(c) Amazon Cloud Front is a web service content delivery.

Amazon cloud front is a fast content delivery network service that securely delivers data, video, applications and APIs to customers. Cloud front is integrated with AWS global infrastructure and services. So, statement is correct.

Question 48

Two concurrent executing transactions T1 and T2 are allowed to update same stock item say ‘A’ in an uncontrolled manner. In such scenario. Following problems may occur:

(a) Dirty read problem

(b) Lost update problem

(c) Transaction failure

(d) Inconsistent database state

Which of the following option is correct if database system has no concurrency module and allows concurrent execution of above two transactions?

  1. AOption (a)

    (a), (b) and (c) only

  2. BOption (b)

    (c) and (d) only

  3. COption (c)

    (a) and (b) only

  4. DOption (d)

    (a), (b) and (d) only

View answer & explanation

Correct answer

Answer: (d)D.

(a), (b) and (d) only

Why this answer is correct

Problems that can occur during concurrent execution of two transactions in an uncontrolled manner:

a) Lost update problem:  Lost update problem occurs when two transactions that access the same database items have their operations interleaved in a way that makes the value of some database item incorrect.

b) Dirty read problem: It occurs when a transaction is allowed to retrieve or update a record that has been updated by another transaction. Because it has not yet been committed, there is always a possibility that it will never be committed but rather rollback.

d) Inconsistent database state: It occurs when a transaction reads several values, but a second transaction updates some of these values during the execution of first. This causes an inconsistency. For example: if one transaction is calculating an aggregate summary function on a number of records while other transactions are updating some of records.

Question 49

Consider the game tree given below

Here O and □ represent MIN and MAX nodes respectively, The value of the root node of the game tree is:

  1. AOption (a)

    14

  2. BOption (b)

    17

  3. COption (c)

    111

  4. DOption (d)

    112

View answer & explanation

Correct answer

Answer: (b)B.

17

Why this answer is correct

Step 1:

Step 2:

Step 3:

Step 4:

The value of root node become 17.

Question 50

Consider the following statements:

S1: If a group (G, *) is of order n, and a ∈ G is such that am = e for some integer m ≤ n, then m must divide n.

S2: If a group (G, *) is of even order, then there must be an element a ∈ G such that a ≠ e and a * a = e

Which of the statements is (are) correct

  1. AOption (a)

    Only S1

  2. BOption (b)

    Only S2

  3. COption (c)

    Both S1 and S2

  4. DOption (d)

    Neither S1 nor S2

View answer & explanation

Correct answer

Answer: (c)C.

Both S1 and S2

Why this answer is correct

S1: If a group (G, *) is of order n, and a ∈ G is such that am = e for some integer m ≤ n, then m must divide n.

Given statement is correct. As a ∈ G , is such that am = e for some integer m<=n, then it means it is a subgroup of G and m is the order of a. where order of given group is n. By the property of subgroup or Lagrange’s theorem, a order of subgroup divides the order of a group. So, here m must divide n is true.

S2: If a group (G, *) is of even order, then there must be an element a ∈ G such that a ≠ e and a * a = e

This statement is correct.  Consider an example for this : Consider G is of order 2n. There exists a ∈ G such that ap = e and p divides 2n. Let n = pq. So, (an)2 = (apq)2 = ((ap)q)2 = (eq)2 = e . It means an is an element which satisfy the condition and a =! e. Here, a is non trivial subgroup of G.

Question 51

Consider a subnet with 720 routers. If a three-level hierarchy is chosen, with eight clusters, each containing 9 regions of 10 routers, then total number of entries in hierarchical table of each router is

  1. AOption (a)

    25

  2. BOption (b)

    27

  3. COption (c)

    53

  4. DOption (d)

    72

View answer & explanation

Correct answer

Answer: (a)A.

25

Why this answer is correct

Concept:

In link state and distance vector routing, every router has to save some information about other routers. When network size grows, the number of routers in network increases. Due to this, routers can’t handle network traffic efficiently. That’s why there comes a need of hierarchical routing.

Explanation:

In hierarchical routing, routers are classified in groups known as regions. In three level hierarchical routing, network is classified into a number of clusters. Each cluster is made up of number of regions and each region contain number of routers.

Given: number of routers = 720

Clusters = 8

Regions = 9 of 10 routers

Total number of entries in hierarchical table of each router = (number of clusters – 1) + (number of regions - 1) + routers in each region

= (8 - 1) + (9 - 1) + 10 = 7 + 8 + 10 = 25

Question 52

An _______ chart is a project schedule representation that presents project plan as directed graph. The critical path is the _______ sequence of _______ tasks and it defines project ______

  1. AOption (a)

    Activity, Shortest, Independent, Cost

  2. BOption (b)

    Activity, Longest, Dependent, Duration

  3. COption (c)

    Activity, Longest, Independent, Duration

  4. DOption (d)

    Activity, Shortest, Dependent, Duration

View answer & explanation

Correct answer

Answer: (b)B.

Activity, Longest, Dependent, Duration

Why this answer is correct

CPM (critical path method) models the activities and events of a project as a network. Activities are identified as nodes and events that signify the start and end of activities are denoted as edges between nodes.  CPM provides a graphical view of the project. It predicts the time required to complete the project.

  • Main aim of CPM is to determine the minimum completion time for a project
  • It uses forward and backward pas routines to analyse the project network
  • It monitors the progress of project on basis of network schedule.
  • In CPM, critical path is the longest sequence of dependent tasks and it defines project duration.
  • During forward pass, it is assumed that each activity will begin at its earlies starting time.
  • During backward pass, it is assumed that each activity begins at its latest completion time
<br>

Steps of CPM project planning:

  1. Specification of individual activities and determining the sequence of those activities.

  2. Then draw network diagram as directed graph.

  3. Estimation of completion time for each activity.

  4. Then identify the critical path or longest path through the network

  5. Finally update the CPM as the project progresses.

Question 53

Piconet is a basic unit of a Bluetooth system consisting of _______ master node and up to _______ active slave nodes.

  1. AOption (a)

    one, five

  2. BOption (b)

    one, seven

  3. COption (c)

    two, eight

  4. DOption (d)

    one, eight

View answer & explanation

Correct answer

Answer: (b)B.

one, seven

Why this answer is correct

Concept:

Bluetooth is a wireless LAN technology designed to connect devices of different functions. A Bluetooth LAN is an ad hoc network which means that the network is formed spontaneously; devices sometimes called gadgets, find each other and make a network called piconet.

Explanation:

Bluetooth defines two types of networks: piconet and scatternet

PICONET: A Bluetooth network is called piconet or small net. A piconet can have up to eight stations one of which is called primary and rest are secondaries. All the secondary stations synchronize their clocks and hopping sequence with the primary.  Communication between primary and secondary can be one to one or one to many. A piconet can have a maximum of 7 secondaries.

Diagram:

Question 54

Match the Agile Process models with the task performed during the model:

List IList II
a.Scrumi.CRC cards
b.Adaptive software developmentii.Sprint backlog
c.Extreme programmingiii.<action> the <result> <by/for/of/to> a(n) <object>
d.Feature driven developmentiv.Time box release plan
<br>

Choose the correct option from those given below:

  1. AOption (a)

    a – ii, b – iii, c – i, d - iv

  2. BOption (b)

    a – i, b – iii, c – ii, d - iv

  3. COption (c)

    a – ii, b – i, c – iv, d - iii

  4. DOption (d)

    a – i, b – iv, c – ii, d - iii

View answer & explanation

Correct answer

Answer: (a)A.

a – ii, b – iii, c – i, d - iv

Why this answer is correct

  1. Scrum model: It is an agile project management methodology which articulates a set of values and principles to guide decisions on how to develop high quality software. It is related with sprint backlog. Sprint backlog is a list of tasks identified by scrum team to be completed during scrum sprint.

  2. Adaptive software development: It is a design principle for creation of software systems. It focuses on rapid creation and evolution of software. It is a series of three steps: speculate, collaborate and learn. It considers <action> the <result> <by/for/of/to> a(n) <object>.

  3. Extreme programming: It is a methodology designed to improve the quality of software. It uses CRC modelling which includes CRC cards that divided into three sections: class name, responsibilities and collaborators.

  4. Feature driven development: It is a client centric and pragmatic software process. Features are an important aspect of feature driven development. A feature is a small, client valued function expressed in the form. It is based on time box release plan as time boxing is used as project planning technique.

Question 55

Consider the following

(a) Trapping at local maxima

(b) Reaching a plateau

(c) Traversal along the ridge

Which of the following option represents shortcomings of the hill climbing algorithm?

  1. AOption (a)

    (a) and (b) only

  2. BOption (b)

    (a) and (c) only

  3. COption (c)

    (b) 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

Concept:

In hill climbing algorithm, at each point in the search path, a successor node that appears to lead most quickly to the top of the hill or goal is selected for exploration.

In this method of searching, the generate and test method is augmented by a heuristic foundation which measures the closeness of the current state to the goal state.

Explanation:

Problems in hill climbing are:

  1. Local maximum: It is a state which is better than all of its neighbours but is not better than some other states which are farther away. Solution of this problem is backtracking.

  2. Plateau: It is a flat area of search space in which a whole set of neighbouring states have the same value. On a plateau, it is not possible to determine the best direction in which to move.

  3. Ridge:  It is an area of search space which is higher than the surrounding areas and that itself has a slope.

Question 56

According to the ISO-9126 Standard Quality Model, match the attributes given in List-I with their definition in List-II

List – IList – II
a.Functionalityi.Relationship between level of performance and amount of resources
b.Reliabilityii.Characteristics related with achievement of purpose
c.Efficiencyiii.Effort needed to make for improvement
d.Maintainabilityiv.Capability of software to maintain performance of software

 

Choose the correct option from the ones given below

  1. AOption (a)

    a – i, b – ii, c – iii, d - iv

  2. BOption (b)

    a – ii, b – i, c – iv, d - iii

  3. COption (c)

    a – ii, b – iv, c – i, d - iii

  4. DOption (d)

    a – i, b – ii, c – iv, d - iii

View answer & explanation

Correct answer

Answer: (c)C.

a – ii, b – iv, c – i, d - iii

Why this answer is correct

ISO 9126 software quality model has six quality characteristics: functionality, reliability, usability, efficiency, maintainability, portability.

  1. Functionality: This characteristic is related with the achievement of purpose. It is the essential purpose of any product. It is expressed as a total of essential functions that the software product provides.

  2. Reliability: It is capability of software to maintain performance of software. Fault tolerance is one of the aspects of the characteristic. Fault tolerance is the ability of a system to withstand component failure.

  3. Efficiency: It is relationship between level of performance and amount of resources. Amount of disk space, memory, network etc. are part of this characteristic.

  4. Maintainability: It is the ability to identify and fix a fault within a software component. It is related with the efforts needed to make for improvement in software.

Question 57

Which of the component module of DBMS does rearrangement and possible ordering of operations, eliminate redundancy in query and use efficient algorithms and indexes during the execution of a query?

  1. AOption (a)

    query compiler

  2. BOption (b)

    query optimizer

  3. COption (c)

    Stored data manager

  4. DOption (d)

    Database processor

View answer & explanation

Correct answer

Answer: (b)B.

query optimizer

Why this answer is correct

Concept:

There are many plans that a database management system can follow to process a query, but it is the amount of time that they need to run is given importance. For this, query optimization is required.

Explanation:

Query optimization examines all algebraic expressions that are equivalent to the given query and chooses the one that is estimated to be the cheapest.

  • Query optimization procedures either attempt to maximize the output for a given a number of resources or to minimize the resource usage for a given output.
  • It tries the minimize the response time for a given query language.
  • It does rearrangement and possible ordering of operations, eliminate redundancy in query.
  • In order to allow fair comparison of efficiency, the functional capabilities of the query evaluation systems to be compared must be similar.

Question 58

A rectangle is bound by the lines x = 0; y = 0; x = 5 and y = 3. The line segment joining (-1, 0) and (4, 5), if clipped against this window will connect the points _______.

  1. AOption (a)

    (0, 1) and (3, 3)

  2. BOption (b)

    (0, 1) and (2, 3)

  3. COption (c)

    (0, 1) and (4, 5)

  4. DOption (d)

    (0, 1) and (3, 5)

View answer & explanation

Correct answer

Answer: (b)B.

(0, 1) and (2, 3)

Why this answer is correct

Given:

Rectangle is bound by the lines x =0 , y = 0 , x = 5 and y = 3.

We follow the pattern of

TopBottomRightLeft

 

Steps:

  1. As P lies in the left of window. So region for this will be : 0001

  2. Q point lies in the top of the window, So, region for this will be : 1000

  3. Logical AND of 0001 AND 1000 = 0000 i.e. line is partially inside the window.

  4. Slope of the line PQ = (5-0)/(4-(-1)) = 5/5 = 1

  5. Now, we have to find the coordinates of P’ , Slope of P’Q’ is same as slope of PQ.

  6. So, we have to find the y coordinate as x coordinate is 0.

(5- y’)/(4-0) = 1 , 5- y’ = 4, y’ = 1

Coordinates of P’ will be (0,1).

  1. Next we have to find the coordinates of point Q’. For this , y coordinate we already know. i.e. 3

  2. So, (5 - 3)/ (4- x’) = 1 , 2 = 4 – x’ , x’ = 2

Coordinates of point Q’ will be (2,3).

So, The line segment joining (-1, 0) and (4, 5), if clipped against this window will connect the points (0,1 ) and (2, 3).

Question 59

Consider ∑ = {w, x} and T = {x, y, z}. Define homomorphism h by:

h(x) = xzy

h(w) = zxyy

If L is the regular language denoted by r = (w + x*)(ww)*, then the regular language h(L) is given by

  1. AOption (a)

    (z x yy + x z y) (z x yy)

  2. BOption (b)

    (zxyy + (xzy))(zxyy zxyy)

  3. COption (c)

    (zxyy + xzy)(zxyy)*

  4. DOption (d)

    (zxyy + (xzy)*)(zxyy zxyy)

View answer & explanation

Correct answer

Answer: (b)B.

(zxyy + (xzy))(zxyy zxyy)

Why this answer is correct

Concept:

Homomorphism is a function from strings to string that is based on the concatenation. For any x and y ϵ Σ*, h(xy) = h(x)h(y)

Explanation:

L is the regular language with the regular expression r = (w + x*)(ww)*

Then h(L) = (h(w) + h(x)<sup></sup>)(h(w)h(w))

Given: h(x) = xzy

h(w) = zxyy

h(L) = (zxyy + (xzy))(zxyy zxyy)

Question 60

Consider the following statements:

S1 : ∀x P(x) ∨ ∀xQ(x) and ∀x(P(x) ∨ Q(x)) are not logically equivalent.

S2 : ∃x P(x) ∧ ∃x Q(x) and ∃x (P(x) ∧ Q(x)) are not logically equivalent

Which of the following statements is/are correct?

  1. AOption (a)

    Only S1

  2. BOption (b)

    Only S2

  3. COption (c)

    Both S1 and S2

  4. DOption (d)

    Neither S1 and S2

View answer & explanation

Correct answer

Answer: (c)C.

Both S1 and S2

Why this answer is correct

S1: ∀x P(x) ∨ ∀xQ(x) and ∀x(P(x) ∨ Q(x)) are not logically equivalent.

This statement is correct. Consider an example: x – is a number. P(x) denotes x is even and Q(x) denotes x is odd. 

∀x P(x) ∨ ∀xQ(x)- it means for all numbers x is even or for all numbers x is odd.

∀x(P(x) ∨ Q(x)) – it means for all x, x is either odd or even.

From this, it is clear that both these are not logically equivalent.

S2: ∃x P(x) ∧ ∃x Q(x) and ∃x (P(x) ∧ Q(x)) are not logically equivalent

This statement is correct.  Consider the same example as of first case.

∃x P(x) ∧ ∃x Q(x) – It means there exists a number which is odd and there exists a number which is even also which is true.

∃x (P(x) ∧ Q(x))- It means, there exists a number which is both even and odd which is not possible. It is false.

So, these are not logically equivalent.

Question 61

Which of the following binary codes for decimal digits are self-complementing?

(a) 8421 code

(b) 2421 code

(c) excess-3 code

(d) excess-3 gray code

Choose the correct option:

  1. AOption (a)

    (a) and (b)

  2. BOption (b)

    (b) and (c)

  3. COption (c)

    (c) and (d)

  4. DOption (d)

    (d) and (a)

View answer & explanation

Correct answer

Answer: (b)B.

(b) and (c)

Why this answer is correct

Concept:

A binary coded decimal code in which the combination for the complement of a digit is the complement of the combination for that digit.

Explanation:

Self-complementing codes are: excess-3 code, and 2421 code.

  1. 2421 code: It is positive weighted code. Values in binary terms for each digit from 0 to 9 are given as :
Decimal digit2421 code
00000
10001
20010
30011
40100
51011
61100
71101
81110
91111

 

  1. Excess -3 code: It is a non-weighted code and self-complementary code. It is derived from 8421 code by adding 3 to each digit.
Decimal digitExcess-3 code
00011
10100
20101
30110
40111
51000
61001
71010
81011
91100

Question 62

Consider the following statements with respect to approaches to fill area on raster system:

P: To determine the overlap intervals for scan lines that cross the area.

Q: To start from a given interior position and paint outward from this point until we encounter the specific boundary conditions.

Select the correct answer from the options given below:

  1. AOption (a)

    P only

  2. BOption (b)

    Q only

  3. COption (c)

    Both P and Q

  4. DOption (d)

    Neither P nor Q

View answer & explanation

Correct answer

Answer: (c)C.

Both P and Q

Why this answer is correct

Concept:

In raster scan system, electron beam move across the screen one row at a time from top to bottom. In this, electron beam intensity is turned on and off to produce illumination on the screen.

Explanation:

There are two approaches used in area filling on raster systems: one is scan line algorithm and another is seed fill algorithm.

  1. Scan line algorithm: determine the overlap intervals for scan lines that cross the area or scan line. A scan line is a line of pixels that are plotted on display device when electron beam scans the display area horizontally.

  2. Seed fill algorithm: It starts from interior position and point outward from this point until the boundary condition reached. In this, a point is selected and then four or eight connected approaches is used to fill it.

Question 63

According to Dempster-Shafer theory for uncertainty management.

Where Bel(A) denotes Belief of event A.

  1. AOption (a)

    Bel(A) + Bel(¬A) ≤ 1

  2. BOption (b)

    Bel(A) + Bel(¬A) ≥ 1

  3. COption (c)

    Bel(A) + Bel(¬A) = 1

  4. DOption (d)

    Bel(A) + Bel(¬A) = 0

View answer & explanation

Correct answer

Answer: (c)C.

Bel(A) + Bel(¬A) = 1

Why this answer is correct

Dempster – Shafer theory: It is designed to deal with the distinction between uncertainty and ignorance. Rather than computing the probability of a proposition it computes the probability that evidence supports the proposition.

Rather than estimating probabilities it uses belief intervals to estimate how close the evidence is to determining the truth of a hypothesis.  It allows representation of ignorance about support provided by evidence.

  • Belief or possibility is the probability that B is provable by the evidence.
  • Plausibility is the probability that B is compatible with the available evidence.
  • According to Dempster – shafer theory (Bel A) = 1 – Bel (¬A)
<br>

For example: if there are three groups A, B and C who did the crime. We may have evidence the group

C is guilty. We would not want to say the probability of other two groups being guilty is 1. Belief and

Disbelief are functional opposites. Dempster –shafer theory allows to leave relative beliefs unspecified.

Question 64

Consider a weighted directed graph. The current shortest distance from source S to node x is represented by d[x]. Let d[v] = 29, d[u] = 15, w[u, v] = 12. What is the updated value of d[v] based on current information?

  1. AOption (a)

    29

  2. BOption (b)

    27

  3. COption (c)

    25

  4. DOption (d)

    17

View answer & explanation

Correct answer

Answer: (b)B.

27

Why this answer is correct

Given values are: d[v] = 29

d[u] = 15

where d[x] represents the current shortest distance from source S to node x.

w[u, v] = 12

Representation in graph form:

From graph it is clear that, source node s to node v path is also described as: s -> u -> v

Cost of this path = 15 + 12 = 27

So, update value of d[v] = 27

Question 65

The following program is stored in the memory unit of the basic computer. Give the content of accumulator register in hexadecimal after the execution of the program.

LocationInstruction
010CLA
011ADD 016
012BUN 014
013HLT
014AND 017
015BUN 013
016C1A5
01793C6
  1. AOption (a)

    A1B4

  2. BOption (b)

    81B4

  3. COption (c)

    A184

  4. DOption (d)

    8184

View answer & explanation

Correct answer

Answer: (d)D.

8184

Why this answer is correct

LocationInstructionOperationContent of accumulatororder of instruction
010CLAClear Accumulator00001st
011ADD 016ADD (C1A5) to AccumulatorC1A52nd
012BUN 014Goto address 014C1A53rd
013HLTTerminate program81845th
014AND 017AND (93C6) with Accumulator81844th
015BUN 013Goto address 013
016C1A5
01793C6

 

     C1A5 =1100 0001 1010 0101

& 93C6 = 1001 0011 1100 0110


      8184 = 1000 0001 1000 0100

The content of accumulator register in hexadecimal after the execution of the program is 8184

Important Point:

In instruction address in mentioned not data

Question 66

Find minimum number of tables required for converting the following entity relationship diagram into relational database?

  1. AOption (a)

    2

  2. BOption (b)

    4

  3. COption (c)

    3

  4. DOption (d)

    5

View answer & explanation

Correct answer

Answer: (c)C.

3

Why this answer is correct

Rules for finding a minimum number of tables required for an ER diagram:

  1. A strong entity with single or composite attributes requires one table.

  2. A strong entity with multivalued attributes requires two tables.

  3. In the case of many to many relations between two entities, 3 tables are required.

Explanation:

There is one to many relationships between R1and R2. So, two tables are required for two entities. But, entity R1 contains multivalued attribute B, due to which one table for this is also needed.

Here we have 1 to Many relation so we requires two tables.

Attribute B being multi-valued, we need to remove the multi-valued attribute B to convert the given entity-relationship diagram into a relational database.

As relational database do not allow multi-valued attributes. We have to introduce a new table.

So, the number of tables is as below:

R1

R12R2

A table for B (Multi-valued attribute)

So, a total of 3 tables are required for the given entity relational diagram.

So, option 3 is the correct answer.

Question 67

Consider the following statements:

(a) Fiber optic cable is much lighter than copper cable

(b) Fiber optic cable is not affected by power surges or electromagnetic interference

(c) Optical transmission is inherently bidirectional.

Which of the statements is (are) correct?

  1. AOption (a)

    Only (a) and (b)

  2. BOption (b)

    Only (a) and (c)

  3. COption (c)

    Only (b) and (c)

  4. DOption (d)

    (a), (b) and (c)

View answer & explanation

Correct answer

Answer: (a)A.

Only (a) and (b)

Why this answer is correct

(a) Fiber optic cable i**s much lighter than copper cable

Given statement is correct. Fibre optic cable transmit signal in the form of light pulses. They can transmit data at higher speed than copper cables and these are lighter than copper cables. Also, fibre optic cable have higher bandwidth.

(b) Fiber optic cable is not affected by power surges or electromagnetic interference

This statement is correct. Fibre optic cables are non metallic and they transmit signal in the form of light pulses. That’s why they are immune to electromagnetic interference. Integrity of signal is not affected by electrical noise.

(c) Optical transmission is inherently bidirectional.

This statement is incorrect. Two optical modules are connected by single fibre cable which supports unidirectional communication. For bi- directional communication, two cables will be required.

Question 68

Consider the following models:

M1: Mamdani model

M2: Takagi – Sugeno-Kang model

M3: Kosko’s additive model (SAM)

Which of the following option contains examples of additive rule model?

  1. AOption (a)

    Only M1 and M2

  2. BOption (b)

    Only M2 and M3

  3. COption (c)

    Only M1 and M3

  4. DOption (d)

    M1, M2 and M3

View answer & explanation

Correct answer

Answer: (b)B.

Only M2 and M3

Why this answer is correct

Mamdani model*:* In a Mamdani system, output of each rule is a fuzzy set. These are well suited to expert system applications where the rules are created from human expert knowledge. It is a method to create a control system by synthesizing a set of linguistic control rules obtained from experienced human operators.

Takagi – Sugeno-Kang model : This model allows to construct  the system of analysis from a set of example data. These are used for the approximation of a large class of non – linear systems. The degree of relevance of a linear model is determined by the degree the input data belongs to fuzzy subspace associated with the linear model. This is an example of additive rule model.

Kosko’s additive model (SAM) :  It assumes the inputs are crisp and uses the scaling method. It uses addition to combine the conclusion of fuzzy rules and includes the centroid defuzzification technique.

Question 69

The order of schema?10?101? and ???0??1 are _______ and _______ respectively.

  1. AOption (a)

    5, 3

  2. BOption (b)

    5, 2

  3. COption (c)

    7, 5

  4. DOption (d)

    8, 7

View answer & explanation

Correct answer

Answer: (b)B.

5, 2

Why this answer is correct

Concept:

A schema is a set of binary strings that match the template which is made up of 1’s , 0’s and *s where * matches with either 0 or 1. The order of schema is the number of its fixed bits i.e. number of bits that that are either 0 or 1.

Explanation:

Given schema is: ?10?101? and ???0??1

CASE 1:

For ?10?101?, number of bits  that are either 0 or 1 are 5.

So, order of this schema is 5.

CASE 2:

For ???0??1, number of bits that are fixed are 2. So, order of schema is 2.

Question 70

An instruction is stored at location 500 with its address field at location 501. The address field has the value 400. A processor register R1 contains the number 200. Match the addressing mode (List-I) given below with effective address (List-II) for the given instruction.

List IList II
a.Directi.200
b.Register indirectii.902
c.Index with R1 as the index registeriii.400
d.Relativeiv.600

 

Choose the correct option from those given below:

  1. AOption (a)

    a – iii, b – i, c – iv, d - ii

  2. BOption (b)

    a – i, b – ii, c – iii, d - iv

  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: (a)A.

a – iii, b – i, c – iv, d - ii

Why this answer is correct

Concept:

Direct address: Address field contains the effective address of operand.

Register indirect: Address field of instruction refers to CPU that contains effective address.

Relative addressing: Effective address = next instruction address + address part(direct)

Index addressing: Effective address = content of index register + address part of instruction

Explanation:

Instruction is stored at location 500 with address field at 501 with value 400.

So, direct address will be 400.

Register indirect address will be 200.

Relative addressing mode = 502 + 400 = 902

Index addressing = 200 + 400 = 600

Question 71

Let a2c mod n = (ac)2 mod n and a2c+1 mod n = a⋅(ac)2 mod n. For a = 7, b = 17 and n = 561, what is the value of ab (mod n)?

  1. AOption (a)

    160

  2. BOption (b)

    166

  3. COption (c)

    157

  4. DOption (d)

    67

View answer & explanation

Correct answer

Answer: (a)A.

160

Why this answer is correct

717mod561

= 7((74)2)2)mod561

= 7((2401)2)2)mod561

= 7((157)2)2)mod561 [2401 mod 561 ≡ 157]

= 7(24649)2mod561 

= 7(−35)2 [∵24649mod561 ≡ 526 ≡ −35]

= 7(1225)mod561

= 7(103)mod561

= 721mod561

= 160

Question 72

Consider the following statements:

S1 : These exists no algorithm for deciding if any two Turing machines M1 and M2 accept the same language.

S2: Let M1 and M2 be arbitrary Turing machines. The problem to determine L(M1) ⊆ L(M2) is undecidable.

Which of the statements is (are) correct?

  1. AOption (a)

    Only S1

  2. BOption (b)

    Only S2

  3. COption (c)

    Both S1 and S2

  4. DOption (d)

    Neither S1 and S2

View answer & explanation

Correct answer

Answer: (c)C.

Both S1 and S2

Why this answer is correct

S1 : These exists no algorithm for deciding if any two Turing machines M1 and M2 accept the same language.

Equivalence problem for recursive enumerable language is undecidable which means there does not exist any algorithm to decide if two Turing machine accept the same language or not. If it were decidable, there will be algorithm to decide the acceptance of a string by a Turing machine and problem of whether the language accepted by Turing machine is empty.

S2: Let M1 and M2 be arbitrary Turing machines. The problem to determine L(M1) ⊆ L(M2) is undecidable.

It is correct. Subset problem for Turing machine is undecidable. There can exists a problem which is accepted by Turing machine M2 but not by Turing machine M1. The problem to determine L(M1) ⊆ L(M2) is undecidable.

Question 73

If we want to resize a 1024 × 768 pixels image to one that is 640 pixels wide with the same aspect ratio, what would be the height of the resized image?

  1. AOption (a)

    420 Pixels

  2. BOption (b)

    640 Pixels

  3. COption (c)

    480 Pixels

  4. DOption (d)

    540 Pixels

View answer & explanation

Correct answer

Answer: (c)C.

480 Pixels

Why this answer is correct

Aspect ratio of an image = width/height

Here we have given a image with size 1024 × 768 pixels.

Width = 1024 pixels

Height = 768 pixels

Aspect ratio = 1024/768 = 4/3

Also, width changes to 640 pixels while aspect ratio remain same.

So, 43=640height\frac{4}{3} = \frac{{640}}{{height}}

height=640;×;34=480;pixels{\rm{height}} = \frac{{640; \times ;3}}{4} = 480{\rm{;pixels}}

Height of resized image will be 480 pixels.

Question 74

Give asymptotic upper and lower bound for T(n) given below. Assume T(n) is constant for n≤2.;T(n)=4T(n)+log2nn \le 2.;T\left( n \right) = 4T\left( {\sqrt n } \right) + lo{g^2}n

  1. AOption (a)

    T(n) = θ(lg(lg2n)lg n)

  2. BOption (b)

    T(n) = θ(lg2nlgn)

  3. COption (c)

    T(n) = θ(lg2 n lg lg n)

  4. DOption (d)

    T(n) = θ(lg(lg n))g n) 

View answer & explanation

Correct answer

Answer: (c)C.

T(n) = θ(lg2 n lg lg n)

Why this answer is correct

T(n)=4T(√n)+log2nT\left( n \right) = 4T\left( {√ n } \right) + lo{g^2}n

Consider n = 2m

m = log2n

n = 2m

Taking square root

√n = 2m/2

T(2m) = 4T(2m/2) + m2

Put S(m) = T (2m/2)

S(m) = 4 S(m/2) + m2

Comparing with

T(m) = a T(m/k) + cmk

a = 4, b = 2, k = 2

a = bk = 4

Now use master’s theorem :

T(m) = O(mklog m)

So, Time complexity will be O(m2log m)

Put the value of m

Time complexity will be :  O (log2n log (logn))

Question 75

Let A be the base class in C++ and B be the derived class from A with protected inheritance. Which of the following statement is false for class B?

  1. AOption (a)

    Member function of class B can access protected data of class A

  2. BOption (b)

    Member function of class B can access public data of class A

  3. COption (c)

    Member function of class B cannot access private data of class A

  4. DOption (d)

    Object of derived class B can access public base class data

View answer & explanation

Correct answer

Answer: (d)D.

Object of derived class B can access public base class data

Why this answer is correct

Concept:

Object of Derived class cannot access any member of Base class directly. So it cannot access public, protected as well as private members directly.

Therefore, Object of derived class B can access public base class data is false.

Question 76

A counting semaphore is initialized to 8. 3 wait() operations and 4 signal() operations are applied. Find the current value of semaphore variable.

  1. AOption (a)

    9

  2. BOption (b)

    5

  3. COption (c)

    1

  4. DOption (d)

    4

View answer & explanation

Correct answer

Answer: (a)A.

9

Why this answer is correct

Concepts:

V(S): Signal operation will increment the semaphore variable, that is, S++.

P(S): Wait operation will decrement the semaphore variable., that is, S--.

Data:

Initial counting semaphore = I = 8

Wait operation = 3 P

Signal operation = 4 V

Final(current) counting semaphore = F

Formula:

F = I + 4V + 3P

Calculation:

F = 8 + 4(+1) + 3(-1)

∴ F = 9

the resulting value of the semaphore is 9

Question 77

The Boolean expression AB + AB̅ + A̅C + AC is unaffected by the value of the Boolean variable ______

  1. AOption (a)

    A

  2. BOption (b)

    B

  3. COption (c)

    C

  4. DOption (d)

    A, B and C

View answer & explanation

Correct answer

Answer: (b)B.

B

Why this answer is correct

Let F(A, B, C) = AB + AB̅ + A̅C + AC

F(A, B, C) = A(B + B̅) + (A̅ + A).C

F(A, B, C) = A + C     ...(∵  A + A̅ = 1  and 1.A = A)

Since the minimized Boolean expression does not contain Boolean variable B.

Therefore, F(A, B, C) is unaffected by the value of the Boolean variable B

Question 78

The full form of ICANN is

  1. AOption (a)

    Internet Corporation for Assigned Names and Numbers

  2. BOption (b)

    Internet Corporation for Assigned Numbers and Names

  3. COption (c)

    Institute of Cooperation for Assigned Names and Numbers

  4. DOption (d)

    Internet Connection for Assigned Names and Numbers

View answer & explanation

Correct answer

Answer: (a)A.

Internet Corporation for Assigned Names and Numbers

Why this answer is correct

ICANN stands for internet corporation for assigned names and numbers. It is formed as an international multi- stakeholder organization responsible for the coordination policies related to domain name system which are:

  • Related to the unique assignment of internet domain names.
  • Assignment of IP address, protocol port numbers.
  • Coordinated the DNS root server system
<br>

Its aim is to ensure the stable and secure operation of the internet’s unique identifier systems. It

promotes competition and choice for registrants, especially in the generic top-level domain area and

develop policies appropriate to its mission through bottom up, consensus-based processes

Question 79

The Data Encryption Standard (DES) has a function consists of four steps. Which of the following is correct order of these four steps?

  1. AOption (a)

    an expansion permutation, S-boxes, an XOR operation, a straight permutation

  2. BOption (b)

    an expansion permutation, an XOR operation. S-boxes, a straight permutation

  3. COption (c)

    a straight permutation, S-boxes, an XOR operation, an expansion permutation

  4. DOption (d)

    a straight permutation, an XOR operation. S-boxes, an expansion permutation

View answer & explanation

Correct answer

Answer: (b)B.

an expansion permutation, an XOR operation. S-boxes, a straight permutation

Why this answer is correct

Concept:

Data encryption standard (DES) is a block cipher that encrypts data in blocks of size 64 bits each. That is 64 bits of plain text goes input to the DES which produces 64 bit of cipher text. Key length is 56 bits.

Explanation:

Broad level steps of DES are:

  • In first step, 64 – bit plain text block is handed over to initial permutation.
  • Next , initial permutation (IP) produces two halves of permuted block, say left plain text and right plain text
  • Now, each LPT and RPT go through 16 rounds of encryption process each with its own key.
  • At the end, LPT and RPT are re-joined and a final permutation is performed on combined block.
<br>

Each of the 16 rounds, in turn consists of these steps:

During expansion permutation, it goes to S- box substitution after doing XOR of 48 bit key with 48 bit right plain text. S- Box produces the 32-bit output using substitution technique. Then a straight permutation is done. These 32 bits are permuted using P- box.

Question 80

Given two table R1 (x, y) and R2(y, z) with 50 and 30 number of tuples respectively. Find maximum number of tuples in the output of natural join between tables R1 and R2 i.e. R1 * R2? (* - Natural Join)

  1. AOption (a)

    30

  2. BOption (b)

    20

  3. COption (c)

    50

  4. DOption (d)

    1500

View answer & explanation

Correct answer

Answer: (d)D.

1500

Why this answer is correct

Concept:

A natural join is based on common attributes or common columns to join two tables or relations.

Explanation:

Consider an example, suppose there are two tables Employee(Eid, Ename) consists of 5 tuples and department(Eid, Did) consists of 3 tuples only.

EidEname
1E1
1E2
1E3
1E4
1E5

 

EidDid
1D1
1D2
1D3

 

Natural join of employee and department(Employee * Department) gives:

5 × 3 = 15

So, maximum number of tuples in natural join are from the relation having minimum tuples. So, in given question, R2 contains 30 tuples, so , maximum number of tuples in the output of natural join between tables R1 and R2 i.e. R1 * R2 = 50 × 30 = 1500.

Question 81

Match List – I with List – II:

List IList II
a.Frame attributei.To create link in HTML
b.<tr>tagii.For vertical alignment of content in cell
c.Valign attributeiii.To enclose each row in table
d.<a>tagivTo specify the side of the table frame hat display border

 

Choose the correct option from those given below:

  1. AOption (a)

    a – i, b – ii, c – iii, d - iv

  2. BOption (b)

    a – ii, b – i, c – iii, d - iv

  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: (c)C.

a – iv, b – iii, c – ii, d - i

Why this answer is correct

Frame attribute:

It specifies the side of the table frame that display border. The value frame = “hsides” indicates that border should be drawn on the top and bottom of the table.

tr tag:

It is used to define the rows in the table. Tr tag contains one or more td tags. Td tags inside tr defines the columns in a table.

valign attribute:

It vertically aligns the content in a cell. HTML valign attribute supports col, colgroup, tbody, td, tfoot, th, thead, tr elements.

<a> tag:

it is known as anchor tag. It is used to create hyperlinks in the webpage. When we click on a hyperlink, it takes us to another webpage which is linked with it.

Question 82

Which of the following class of IP address has the last address as 223.255.255.255?

  1. AOption (a)

    Class A

  2. BOption (b)

    Class B

  3. COption (c)

    Class C

  4. DOption (d)

    Class D

View answer & explanation

Correct answer

Answer: (c)C.

Class C

Why this answer is correct

Concept:

IPv4 address: 32 bits

IP address = Network ID + Host ID

Network ID + Host ID = 32

PREFIX is the part of the Network ID

IPv4 classification:

ClassPREFIX (bits reserved from 1st byte)Network ID (bits)Range of 1st byteNo. of IP address consumedNumber of networksIP address per networkHost per network
Class A080 -12723127224224 – 2
Class B1016128-191230214216216 – 2
Class C11024192 -2232292212828 – 2
Class D1110-224- 239228MULTICAST ADDRESS
Class E1111-239-255228RESERVED FOR FUTURE

 

In Classful address starts with 110 is class C because class C first 3 bits is reserved

To get last address make all remaining host Id part and network id part as 1

(1101 1111.11111111. 11111111.11111111)2 = 223.255.255.255.255

Therefore, class of IP address has the last address as 223.255.255.255 is C.

Question 83

A flow graph F with entry node (1) and exit node (11) is shown below:

How many nodes are there in the longest independent path?

  1. AOption (a)

    6

  2. BOption (b)

    7

  3. COption (c)

    8

  4. DOption (d)

    9

View answer & explanation

Correct answer

Answer: (c)C.

8

Why this answer is correct

Concept

A linearly independent path is any path that introduces at least one new edge that is not included in any other linearly independent path.

Data

From the graph shown above, following are possible independent paths.

Path 1: 1-11

Path 2: 1-2-3-4-5-10-1-11

Path 3: 1-(2,3)-6-8-9-10-1-11

Path 4: 1-(2,3)-6-7-9-10-1-11

Each of the above path introduces a new edge. And Path 3 and Path 4 are longest independent paths with 8 nodes.

Note that, a path like 1-(2,3)-4-5-10-1-2-3-6-8-9-10-1-11 is not an independent path because it includes already specified edges and doesn’t exclusively add new edges.

Question 84

A flow graph F with entry node (1) and exit node (11) is shown below:

How many regions are there in flowgraph F?

  1. AOption (a)

    2

  2. BOption (b)

    3

  3. COption (c)

    4

  4. DOption (d)

    5

View answer & explanation

Correct answer

Answer: (c)C.

4

Why this answer is correct

Concept

A region is an area that is bounded by edges and cannot be further subdivided. Region can be finite nature and can also be infinite nature. A planar graph can only have one infinite region.

Explanation

The graph in the data has 3 finite or closed regions.

Region 1 – Bounded by edge 1-(2,3)-(4,5)-10-1

Region 2 – Bounded by edges (2.3)-6-8-9-10-(4.5)-(2.3)

Region 3 – Bounded by edges 6-7-9-8-6

The fourth region is infinite or open region

So, correct answer is 4.

Question 85

What is the worst case running time of Insert and Extract-min, in an implementation of a priority queue using an unsorted array? Assume that all insertions can be accommodated.

  1. AOption (a)

    θ(1), θ(n) 

  2. BOption (b)

    θ(n), θ(1)

  3. COption (c)

    θ(1), θ(1)

  4. DOption (d)

    θ(n), θ(n)

View answer & explanation

Correct answer

Answer: (a)A.

θ(1), θ(n) 

Why this answer is correct

Concept:

A priority queue is a queue in which each element is assigned a priority and they are served according to the priority. If element having same priority, they are processes according to their order in queue.

Explanation:

Insert, extract – min is performed on unsorted array.

Insert: It means insertion of element in unsorted array. In the worst case, element is inserted at the end of the queue. Simply inserting the element at the end of queue takes O(1) complexity.

Extract –min: To do extract – min, use linear search approach for worst case to find the minimum element. For this, we need to traverse all the elements of the queue in worst case. So, it will take O(n) time complexity to extract –min in priority queue.

Question 86

Consider the following language families:

L1 ≡ The context – free languages

L2 ≡ The context – sensitive languages

L3 ≡ The recursively enumerable languages

L4 ≡ The recursive languages

Which one of the following options is correct?

  1. AOption (a)

    L1 ⊆ L2 ⊆ L3 ⊆ L4

  2. BOption (b)

    L2 ⊆ L1 ⊆ L3 ⊆ L4

  3. COption (c)

    L1 ⊆ L2 ⊆ L4 ⊆ L3

  4. DOption (d)

    L2 ⊆ L1 ⊆ L4 ⊆ L3

View answer & explanation

Correct answer

Answer: (c)C.

L1 ⊆ L2 ⊆ L4 ⊆ L3

Why this answer is correct

Context free languages: A language is said to be context free if and only if there exists a context free grammar for it. A grammar G = (V, T, S, P) is said to be context free is all production is in the form of A -> x where A ϵ V and x ϵ (V U T)*. These are accepted by push down automata.

Context sensitive languages: If there exists a context sensitive grammar for a language, then it is known context sensitive language. Context sensitive grammar is one in which all productions are of the form x -> y where x, y ϵ (V U T)+ and x<=y. These are accepted by linear bounded automata.

Recursive languages: A language is recursive if there exists a Turing machine accepts it and halts on every input string.

Recursive enumerable languages: A language is recursive enumerable if there exists some Turing machine which accepts it.

Question 87

A flow graph F with entry node (1) and exit node (11) is shown below:

How many predicate nodes are their names?

  1. AOption (a)

    Three: (1, (2, 3), 6)

  2. BOption (b)

    Three: (1, 4, 6)

  3. COption (c)

    Four: ((2, 3), 6, 10, 11)

  4. DOption (d)

    Four: ((2, 3), 6, 9, 10)

View answer & explanation

Correct answer

Answer: (a)A.

Three: (1, (2, 3), 6)

Why this answer is correct

Concept

Predicate node is a node that contains a condition. This node has 2 or more outgoing edges from it.

Explanation

In the given graph, the nodes with a condition or with 2 or more outgoing edges are – 1, (2.3), 6. Hence, there are 3 predicate nodes.

Question 88

A clique in a undirected graph G=V,EG = V,E is a subset V’ ⊆ V of vertices, such that

  1. AOption (a)

    If (u, v) ∈ E then u ∈ V’ and v ∈ V’

  2. BOption (b)

    If (u, v) ∈ E then u ∈ V’ or v ∈ V’

  3. COption (c)

    Each pair of vertices in V’ is connected by an edge

  4. DOption (d)

    All pairs of vertices in V’ are not connected by an edge

View answer & explanation

Correct answer

Answer: (c)C.

Each pair of vertices in V’ is connected by an edge

Why this answer is correct

Concept:

A clique is a subset of vertices of an undirected graph G such that every two distinct vertices in the clique are adjacent.

Explanation:

A clique in an undirected graph G = (V, E) is a subset of V i.e. V’ such that each pair of vertices in V’ is connected by an edge. A clique of size k is called k- clique. A 0- clique contains set of 0 vertices.

A maximal clique is a clique that cannot be extended by including one more adjacent vertex. A maximum clique of G is such that there is no clique with more vertices.

Question 89

How many reflexive relations are there on a set with 4 elements?

  1. AOption (a)

    24

  2. BOption (b)

    212

  3. COption (c)

    42

  4. DOption (d)

    2

View answer & explanation

Correct answer

Answer: (b)B.

212

Why this answer is correct

Data:

Number of elements in a set = n = 4

Formula:

Total number of reflexive relations in a set = 2n2−n{2^{{n^2} - n}}

Calculation:

Total number of reflexive relations in a set = 242−4=212{2^{{4^2} - 4}} = {2^{12}}

Question 90

A flow graph F with entry node (1) and exit node (11) is shown below:

How many nodes are there in flowgraph F?

  1. AOption (a)

    9

  2. BOption (b)

    10

  3. COption (c)

    11

  4. DOption (d)

    12

View answer & explanation

Correct answer

Answer: (a)A.

9

Why this answer is correct

Concept

Nodes are vertices of the graph

Data

In the gives graph there are 9 nodes – 1, (2.3), (4.5), 6, 7, 8, 9, 10, 11

Question 91

A flow graph F with entry node (1) and exit node (11) is shown below:

What is the cyclomatic complexity of flowgraph F?

  1. AOption (a)

    2

  2. BOption (b)

    3

  3. COption (c)

    4

  4. DOption (d)

    5

View answer & explanation

Correct answer

Answer: (c)C.

4

Why this answer is correct

Concept

Cyclomatic complexity of a flow graph is the quantitative measure of the number of linearly independent paths in it.

For calculation of cyclomatic complexity, it is necessary to understand some parameters.

  1. Region - In our case, there are 4 regions.
  2. Edges - In our case, there are 11 edges.
  3. Nodes - In our case, there are 9 nodes.
  4. Connected Components - In our case, there is 1 connected component.
  5. Predicates – These are nodes that contain condition. In our case, there are 3 predicates namely node 1, 2.3, 6.

 

Formula

There are three ways of calculating the cyclomatic complexity M,

E - Number of Edges

N - Number of Nodes

P - number of predicate nodes (1, (2,3), 6)

  1. M = E – N + 2

        M = 9 - 11 + 2

        M = 9 - 13

         M = 4

Or   

        M = p + 1

         M = 3 + 1 = 4

Direction: Answer question based on the problem statement given below:

An organization needs to maintain database having five attributes A, B, C, D, E. These attributes the functionally dependent on each other for which functionally dependency set F is given as: F : (A → BC, D → E, BC → D, A → D}. Consider a universal relation R(A, B, C, D, E) with functional dependency set F. Also all attributes are simple and take atomic values only.

Question 92

Identify the redundant functional dependency in F

  1. AOption (a)

    BC → D

  2. BOption (b)

    D → E

  3. COption (c)

    A → D

  4. DOption (d)

    A → BC

View answer & explanation

Correct answer

Answer: (c)C.

A → D

Why this answer is correct

Explanation

The dependency A → D is derived from A → BC, BC → D. Hence it is transitive and redundant.

Question 93

Identify primary key of table R with functional dependency set F

  1. AOption (a)

    BC

  2. BOption (b)

    AD

  3. COption (c)

    A

  4. DOption (d)

    AB

View answer & explanation

Correct answer

Answer: (c)C.

A

Why this answer is correct

Concept

A primary key is a special relational database table column (or combination of columns) designated to uniquely identify all table records.

Data

In the Functional dependency set f of relation R, the key ‘A’ is not in the RHS of any FD.

Explanation

If A is not in RHS of any FD, it is mandatory to include it in the set of candidate key.

Now, to make sure if ‘A’ alone is the primary key, we write its closure. The set of all those attributes which can be functionally determined from an attribute set is called as a closure of that attribute set.

A+ = {A, B, C, D, E}

A derives all the attributes of Relation R. Hence, it is the primary key of R.

Question 94

Identify the normal form in which relation R belong to

  1. AOption (a)

    1 NF

  2. BOption (b)

    2 NF

  3. COption (c)

    3 NF

  4. DOption (d)

    BCNF

View answer & explanation

Correct answer

Answer: (b)B.

2 NF

Why this answer is correct

Concept

Normal forms refer to type of functional dependencies.

1NF - A relation is in 1NF if it contains an atomic value.

2NF - A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key.

3NF - A relation will be in 3NF if it is in 2NF and no transition dependency exists.

BCNF - A relation is in BCNF if every functional dependency X → Y, X is the super key of the table.

Data

  1. A is the primary key.
  2. There is no partial dependency in R. Partial Dependency occurs when a non-prime attribute is functionally dependent on part of a candidate key.

 

Hence, R is in 2NF.

Explanation

R is in 2NF and not in 3NF because D → E, BC → D neither have a super key in their LHS nor do they have a primary key in their RHS. If it is in not in 3NF, it cannot be in BCNF.

Question 95

Minimal cover F’ of functional dependency set F is

  1. AOption (a)

    F’ = {A → B, A → C, BC → D, D → E}

  2. BOption (b)

    F’ = {A → BC, B → D, D → E}

  3. COption (c)

    F’ = {A → B, A → C, A → D, D → E}

  4. DOption (d)

    F’ = {A → B, A → C, B → D, C → D, D → E}

View answer & explanation

Correct answer

Answer: (a)A.

F’ = {A → B, A → C, BC → D, D → E}

Why this answer is correct

Concept

A canonical cover is a simplified and reduced version of the given set of functional dependencies. A minimal canonical cover is a cover for which removal of any single functional dependency destroys the covering property.

Data

The functional dependencies over the universal relation R(A, B, C, D, E) are

A → BC = A → B, A → C

D → E

BC → D

A → D

Method

Following are the steps to find the minimal cover.

  1. Write all FDs such that RHS of each FD has only one attribute.

A → B

A → C

D → E

BC → D

A → D

 

  1. Remove transitive FDs and any other FDs where the RHS can be driven of LHS of the other FDs. In this case, A → D is a redundant FD. Hence, the result becomes

A → B

A → C

D → E

BC → D

 

  1. Finding the FDs with 2 attributes in LHS, we get the dependency BC → D. Try to eliminate the attributes using closure of both the attributes B and C.

In this case, it is not possible to remove either B or C because both have different closures. Hence, minimal cover is

A → B

A → C

D → E

BC → D

Question 96

Assume that given table R is decomposed in two tables

R1(A, B, C) with functional dependency set f1 = {A → B, A → C} and R2(A, D, E) with FD set F2 = {A → D, D → E}

Which of the following option is true w.r.t. given decomposition?

  1. AOption (a)

    Dependency preservation property is followed

  2. BOption (b)

    R1 and R2 are both in 2 NF

  3. COption (c)

    R2 is in 2 NF and R3 is in 3 NF

  4. DOption (d)

    R1 is in 3 NF and R2 is in 2 NF

View answer & explanation

Correct answer

Answer: (d)D.

R1 is in 3 NF and R2 is in 2 NF

Why this answer is correct

Data

Relation R(A, B, C, D, E) with its functional dependencies F : (A → BC, D → E, BC → D, A → D} has been decomposed in two relations.

  1. R1(A, B, C) with functional dependency set f1 = {A → B, A → C}
  2. R2(A, D, E) with FD set F2 = {A → D, D → E}

 

Explanation

Dependency Preservation

In both the relations, the dependency BC → D cannot be determined. Hence, both R1 and R2 are not following Dependency Preservation property.

Normal Forms

In R1, A is the candidate key. And the functional dependency set does not contain any transitive partial dependency. Hence, the set is in 3NF.

In R1, A is the candidate key. But the FD D → E breaks the rule of 3NF. Hence, it is in 2NF.

Question 97

The time complexity to multiply two polynomials of degree n using Fast Fourier transform method is:

  1. AOption (a)

    θ(n lg n)

  2. BOption (b)

    θ(n2)

  3. COption (c)

    θ(n)

  4. DOption (d)

    θ(lg n)

View answer & explanation

Correct answer

Answer: (a)A.

θ(n lg n)

Why this answer is correct

Concept:

Fast Fourier transform is a discrete Fourier transform algorithm which reduces the number of computations needed for N points from 2N2 to 2NlogN.

Explanation:

A discrete Fourier transform can be computed using Fast Fourier transform by means of Danielson- lanczos lemma, if the number of points N is a power of two. If number of points N is not a power of two, a transform can be performed on sets of points corresponding to prime factors of N.

Fast Fourier transform allows computing in O(nlogn) time. Basic idea is to apply divide and conquer. We divide the coefficient vector of polynomial into two vectors, recursively compute the Discrete Fourier transform for each of them and combine the results. Recursive relation will become:

Tf(N) = 2Tf(N/2) + O(N).

Question 98

Let Wij represents weight between node i at layer k and node j at layer (k – 1) of a given multilayer perceptron. The weight updation using gradient descent method is given by

Where α and E represents learning rate and Error in the output respectively.

  1. AOption (a)

    Wij(t+1)=Wij(t)+α∂E∂Wij,;0≤α≤1{W_{ij}}\left( {t + 1} \right) = {W_{ij}}\left( t \right) + \alpha \frac{{\partial E}}{{\partial {W_{ij}}}},;0 \le \alpha \le 1

  2. BOption (b)

    Wij(t+1)=Wij(t)−α∂E∂Wij,;0≤α≤1{W_{ij}}\left( {t + 1} \right) = {W_{ij}}\left( t \right) - \alpha \frac{{\partial E}}{{\partial {W_{ij}}}},;0 \le \alpha \le 1

  3. COption (c)

    Wij(t+1)=α∂E∂Wij,;0≤α≤1{W_{ij}}\left( {t + 1} \right) = \alpha \frac{{\partial E}}{{\partial {W_{ij}}}},;0 \le \alpha \le 1

  4. DOption (d)

    Wij(t+1)=−α∂E∂Wij,;0≤α≤1{W_{ij}}\left( {t + 1} \right) = - \alpha \frac{{\partial E}}{{\partial {W_{ij}}}},;0 \le \alpha \le 1

View answer & explanation

Correct answer

Answer: (b)B.

Wij(t+1)=Wij(t)−α∂E∂Wij,;0≤α≤1{W_{ij}}\left( {t + 1} \right) = {W_{ij}}\left( t \right) - \alpha \frac{{\partial E}}{{\partial {W_{ij}}}},;0 \le \alpha \le 1

Why this answer is correct

Concept:

A perceptron is a single neuron model that was part of larger neural network. A multilayer perceptron is a finite acyclic graph. Nodes are neurons with logistic activation.

Explanation:

During multi-layer perceptron, neurons of ith layer serve as input features for neuron of i+1th layer. Using gradient descent algorithm, weights are updated incrementally after each pass over training data set. Gradient descent method assists in determining error while searching for optimal value to plug into cost function. It involves two steps:

  • Calculate gradients of loss/error function
  • Then updating existing parameters in response to the gradients.

This learning process is described by :                        

Wij(t+1)=Wij(t)−α∂E∂Wij,;0≤α≤1{W_{ij}}\left( {t + 1} \right) = {W_{ij}}\left( t \right) - \alpha \frac{{\partial E}}{{\partial {W_{ij}}}},;0 \le \alpha \le 1

Question 99

Match List – I and List II:

List IList II
a.Isolated I/Oi.Same set of control signal for I/O and memory communication
b.Memory mapped I/Oii.Separate instructions for I/O and memory communication
c.I/O interfaceiii.Requires control signals to be transmitted between the communicating units
d.Asynchronous data transferiv.Resolve the differences in control computer and peripherals

 

Choose the correct option from those given below:

  1. AOption (a)

    a – ii, b – iii, c – iv, d - i

  2. BOption (b)

    a – i, b – ii, c – iii, d - iv

  3. COption (c)

    a – ii, b – i, c – iv, d - iii

  4. DOption (d)

    a – i, b – ii, c – iv, d - iii

View answer & explanation

Correct answer

Answer: (c)C.

a – ii, b – i, c – iv, d - iii

Why this answer is correct

Isolated I/O:

In isolated I/O, devices are treated in a separate domain. There are separate instructions for I/O and memory communication. Device register size is 8 bit in case of isolated I/O. In this, common bus for I/O and memory but separate for read and write control lines for I/O.

Memory mapped I/O: 

In this, same set of control signal for I/O and memory communication. Every bus is common due to which same set of instructions work for memory and I/O. In this, I/O devices are treated as a part of memory only.

I/O interface:

It resolves the differences in control computer and peripherals. It provides a method for transferring information between internal storage and external I/O devices.

Asynchronous data transfer:

It is when internal timing in each unit is independent from other and when registers in interface and registers of CPU uses its own private clock. It requires control signals to be transmitted between the communicating units.

Question 100

A basic feasible solution of an m × n transportation problem is said to be non-degenerate, if basic feasible solution contains exactly _______ number of individual allocations in ______ positions.

  1. AOption (a)

    m + n + 1, independent

  2. BOption (b)

    m + n – 1, independent

  3. COption (c)

    m + n – 1, appropriate

  4. DOption (d)

    m – n + 1, independent

View answer & explanation

Correct answer

Answer: (b)B.

m + n – 1, independent

Why this answer is correct

Concept:

Transportation problem is crucial part of linear programming problem which can be connected for required sources of supply to corresponding destination of demand, with the end goal that the aggregate transportation cost to be limited.

Explanation:

The essential phase of any transportation problem as initial basic feasible solution.

  • Initial basic feasible solution must be feasible i.e. it must satisfy all the supply and demand constraints.
  • The number of positive allocations must be equal to m+n-1 where m is number of rows and n is number of columns.
<br>

Nondegenerate basic feasible solution: A basic feasible solution is non – degenerate if it has exactly m+n-1 positive allocations in individual positions. If the allocations are less than required number, then it is known as degenerate basic feasible solution. This solution is not easy to modify, because it is impossible to draw a closed loop for each occupied cell.

100 questions in the full paper