Previous Year Paper

UGC NET Paper 2: Computer Science July 2018 Paper (Previous Year Paper)

Held in 2018

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

The finite state machine given in figure below recognizes :

  1. AOption (a)

    any string of odd number of a’s

  2. BOption (b)

    any string of odd number of b’s

  3. COption (c)

    any string of even number of a’s and odd number of b’s

  4. DOption (d)

    any string of odd number of a’s and odd number of b’s

View answer & explanation

Correct answer

Answer: (d)D.

any string of odd number of a’s and odd number of b’s

Why this answer is correct

Concept:

Finite state machine accepts L

L = {a, b, aaab, abbb, aaabbb, baaa, bbba, bbbaaa}

Therefore, finite state machine accepts any string of odd number of a’s and odd number of b’s

Explanation:

Option 1: any string of odd number of a’s

String ‘a’ is not accepted by finite state machine. Therefore option 1 is incorrect

Option 2: any string of odd number of b’s

Since string ‘b’ is not accepted by finite state machine. Therefore option 2 is incorrect

Option 3*:* any string of even number of a’s and odd number of b’s

Since string ‘aab’ is not accepted by finite state machine. Therefore option 3 is incorrect

Question 2

The definitions in an XML document are said to be_______ when the tagging system and definitions in the DTD are all in compliance.

  1. AOption (a)

    well-formed

  2. BOption (b)

    reasonable

  3. COption (c)

    valid

  4. DOption (d)

    logical

View answer & explanation

Correct answer

Answer: (c)C.

valid

Why this answer is correct

XML:

XML stands for extensible mark-up language. It is a meta markup language for text documents/data. It allows to define languages to represent text. It is designed to describe data not to display data. XML tags are not predefined.

Some points in XML are as follows:

  • An XML document is well-formed it satisfies rule specified by the W3C.
  • A well-formed XML has a proper starting and closing tag.
  • An XML document having correct syntax is termed as “well-formed “.
  • The purpose of DTD is to define the structure and legal elements and attribute of an XML document
  • XML does not require DTD.
  • XML carries the data, it does not represent it.
  • XML can be used for offloading and reloading of databases.
  • The definitions in an XML document are said to be valid when the tagging system and definitions in the DTD are all in compliance.

Question 3

What is the output of the following JAVA program?

class simple

{

public static void main(String[ ] args)

{

simple obj = new simple( );

obj.start( );

}

void start( )

{

long [ ] P= {3, 4, 5};

long [ ] Q= method (P);

System.out.print (P[0] + P[1] + P[2]+”:”);

System.out.print (Q[0] + Q[1] + Q[2]);

}

long [ ] method (long [ ] R)

{

R [1]=7;

return R;

}

} //end of class

  1. AOption (a)

    12 : 15

  2. BOption (b)

    15 : 12

  3. COption (c)

    12 : 12

  4. DOption (d)

    15 : 15

View answer & explanation

Correct answer

Answer: (d)D.

15 : 15

Why this answer is correct

Consider the given code :

STEP 1 :

class simple

{

public static void main(String[ ] args)

{

simple obj = new simple( );               // it creates an object of class simple

obj.start( );                                          // then calls the function start

}

STEP 2:

void start( )

{

long [ ] P= {3, 4, 5};          // it creates an array with three integers.

long [ ] Q= method (P);        /* function method P is called here, which is then reflected in  array Q */

System.out.print (P[0] + P[1] + P[2]+”:”);

System.out.print (Q[0] + Q[1] + Q[2]);

}

STEP 3 :

long [ ] method (long [ ] R)

{

R [1]=7;               /*it indirectly change the value of second element of array to 7 which reflects in array Q. Also address of P is passed as an argument, it changes the value of array P second element to 7 */

return R;

}

STEP 4:

Now ,  Array P becomes , long [ ] P= {3, 7, 5};       

Array Q becomes , long [ ] Q= {3, 7, 5};            

System.out.print (P[0] + P[1] + P[2]+”:”);             // it print the sum of elements of array P i.e. (3+7+5 = 15)

System.out.print (Q[0] + Q[1] + Q[2]);             //// it print the sum of elements of array Q i.e. (3+7+5 = 15)

Question 4

Which of the following statements is/are True ?

P: C programming language has a weak type system with static types.

Q: Java programming language has a strong type system with static types.

Code:

  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:

Statically typed programming language are those in which variables need not be defined before they are used. It needs explicit declaration of variables.

Explanation:

P: C programming language has a weak type system with static types.

Statement P is correct. C programming language is weakly typed language. In this, variables are not bound to a specific data type. If there is need of type checking in C, it can be done at compile time or at run time. But in case of static type, C has a weak type system.

Q: Java programming language has a strong type system with static types.

Statement Q is correct here. In java, every variable must be declared with a data type. Once variable is declared in java, its data type cannot be changed. In this, each type of data is pre- defined. With static types, java programming language is strongly typed language.

Question 5

A bottom-up parser generates :

  1. AOption (a)

    Left-most derivation in reverse

  2. BOption (b)

    Right-most derivation in reverse

  3. COption (c)

    Left-most derivation

  4. DOption (d)

    Right-most derivation

View answer & explanation

Correct answer

Answer: (b)B.

Right-most derivation in reverse

Why this answer is correct

ParserDerivation
LR parsers or Bottom-up ParsersRightmost reverse Derivation
LL parsers or Top-down ParsersLeftmost Derivation

Question 6

The period of a signal is 100 ms. Its frequency is.

  1. AOption (a)

    1003 Hertz

  2. BOption (b)

    10−2 KHz

  3. COption (c)

    10−3 KHz

  4. DOption (d)

    105 Hertz

View answer & explanation

Correct answer

Answer: (b)B.

10−2 KHz

Why this answer is correct

Data:

Period (T) = 100 ms = 100 × 10-3 sec  = 0.1 sec

Formula:

frequency;(f)=1T{\rm{frequency;}}\left( {\rm{f}} \right) = \frac{1}{{\rm{T}}}

Calculation:

f=1T;=10.1=10;Hz{\rm{f}} = \frac{1}{{\rm{T}}}; = \frac{1}{{0.1}} = 10;Hz

f=10×103103=10−2;KHz{\rm{f}} = \frac{{10 \times {{10}^3}}}{{{{10}^3}}} = {10^{ - 2}}{\rm{;KHz}}

Question 7

Consider a vocabulary with only four propositions A, B, C and D. How many models are there for the following sentence?

B ∨ C

  1. AOption (a)

    10 

  2. BOption (b)

    12

  3. COption (c)

    15

  4. DOption (d)

    16

View answer & explanation

Correct answer

Answer: (b)B.

12

Why this answer is correct

Concepts:

Number of models is nothing but number of TRUE in final statement.

Sentence.: B ∨ C

Truth Table:

ABCDB ∨ C
TTTTT
TTTFT
TTFTT
TTFFT
TFTTT
TFTFT
TFFTF
TFFFF
FTTTT
FTTFT
FTFTT
FTFFT
FFTTT
FFTFT
FFFTF
FFFFF
<br>

12 models are there for given Sentence.

Tips and Tricks:

Number of variables = 4

Statement possible = 24 = 16

Since (B ∨ C) OR operation between two variables ∴ ¾ of total cases will be true.

Therefore, number of modes = ¾ × 16 = 12

Question 8

In Java, which of the following statements is/are True?

S1: The ‘final’ keyword applied to a class definition prevents the class from being extended through derivation.

S2: A class can only inherit one class but can implement multiple interfaces.

S3: Java permits a class to replace the implementation of a method that it has inherited. It is called method overloading.

Code:

  1. AOption (a)

    S1 and S2 only

  2. BOption (b)

    S1 and S3 only

  3. COption (c)

    S2 and S3 only

  4. DOption (d)

    All of S1, S2 and S3

View answer & explanation

Correct answer

Answer: (a)A.

S1 and S2 only

Why this answer is correct

S1 : The ‘final’ keyword applied to a class definition prevents the class from being extended

through derivation.           [True]

A variable in java can be declared as final. Doing so prevents its contents from being modified. A final variable is essentially a constant. Methods declared with keyword ‘final’ cannot be overridden. Sometimes, final keyword is used to prevent a class from inheritance. So, final keyword applied to a class definition prevents the class from being extended through derivation.

S2 : A class can only inherit one class but can implement multiple interfaces.       [true]

This statement is correct. An interface in java is a kind of blueprint for a class. It is uses to achieve abstraction. A class that implements an interface can inherit the abstract methods of the interface. A class can only inherit one class but can implement multiple interfaces. Interfaces are not extended by a class, they are implemented by the class. Multiple inheritance is not allowed in java.

S3 : Java permits a class to replace the implementation of a method that it has inherited. It

is called method overloading.             [false]

When a class has more than one method with same name, then it known as method overloading while arguments are different. When java permits a class to replace the implementation of a method that it has inherited, it is known as method overriding. So, given statement is incorrect.

Question 9

A graphic display system has a frame buffer that is 640 pixels wide, 480 pixels high and 1 bit of color depth. If the access time for each pixel on the average is 200 nanoseconds, then the refresh rate of this frame buffer is approximately:

  1. AOption (a)

    16 frames per second 

  2. BOption (b)

    19 frames per second

  3. COption (c)

    21 frames per second 

  4. DOption (d)

    23 frames per second

View answer & explanation

Correct answer

Answer: (a)A.

16 frames per second 

Why this answer is correct

Data:

Frame buffer width = 640 pixels

Height = 480 pixels

Color depth = 1 bit per pixel

Access time for each pixel = 200 ns

Calculation:

Frame buffer size (in bits) = 640 × 480 × 1 = 307200 bits

Access time for 307200 bits (1 frame) = 307200 × 200

= 61440000 ns = 0.06144 seconds

As, 0.06144 seconds makes = 1 frame

1 seconds makes = 1/0.06144 = 16.27604166 frames

So, refresh rate = 16. 27604166 frame per sec (approx. 16 frames per sec)

Question 10

Which of the following statements is/are True regarding the solution to the visibility problem in 3D graphics?

S1: The Painter’s algorithm sorts polygons by depth and then paints (scan - converts) each Polygon on to the screen starting with the most nearest polygon.

S2: Backface Culling refers to eliminating geometry with backfacing normals.

Code:

  1. AOption (a)

    S1 only 

  2. BOption (b)

    S2 only

  3. COption (c)

    Both S1 and S2

  4. DOption (d)

    Neither S1 nor S2

View answer & explanation

Correct answer

Answer: (b)B.

S2 only

Why this answer is correct

Statement S1: The Painter’s algorithm sorts polygons by depth and then paints (scan - converts) each Polygon on to the screen starting with the most nearest polygon.

This statement is not true. Painter’s algorithm is used while projecting a 3D view on a 2D screen to ensure that which polygons are visible, and which should not.

Painter algorithm sorts polygons by depth, and then paints the farthest polygon first.

Statement S2:  Backface Culling refers to eliminating geometry with backfacing normals.

This statement is true. Back face culling is a technique used to eliminate invisible back facing polygons (which are not facing viewer) from further processing.  Principle behind back face culling is that if a polygon on a 3D model is facing away from you, then it cannot be seen.

Backface curling don't render the curves, which are backface, and not visible. So, it enhances the rendering time.

Question 11

Consider the matrix = \(\left[ {\begin{array}{*{20}{c}} 2&0&2\ 0&1&1\ 0&0&1 \end{array}} \right]\) representing a set of planar (2D) geometric transformations in homogeneous coordinates. Which of the following statements about the matrix M is True ?

  1. AOption (a)

    M represents first, a scaling of vector (2, 1) followed by translation of vector (1, 1)

  2. BOption (b)

    M represents first, a translation of vector (1, 1) followed by scaling of vector (2, 1)

  3. COption (c)

    M represents first, a scaling of vector (3, 1) followed by shearing of parameters (−1, 1)

  4. DOption (d)

    M represents first, a shearing of parameters (−1, 1) followed by scaling of vector (3, 1)

View answer & explanation

Correct answer

Answer: (b)B.

M represents first, a translation of vector (1, 1) followed by scaling of vector (2, 1)

Why this answer is correct

Concept:

Scaling:

In this, the size of an object is increased or decreased by changing the dimension. Representation of the scaling matrix is:

 \(\left[ {\begin{array}{*{20}{c}} a&0&0\ 0&b&0\ 0&0&1 \end{array}} \right]\)

Translation:

It moves an object from its original position to a new position by adding a translation factor with the original coordinates. It does not change the size. Translation matrix is represented as :

\(\left[ {\begin{array}{*{20}{c}} 1&0&a\ 0&1&b\ 0&0&1 \end{array}} \right]\)

Explanation:

Given scalar matrix

 \(\left[ {\begin{array}{*{20}{c}} 2&0&0\ 0&1&0\ 0&0&1 \end{array}} \right]\)

Translation matrix will be:

\(\left[ {\begin{array}{*{20}{c}} 1&0&1\ 0&1&1\ 0&0&1 \end{array}} \right]\)

If we do, first translation of (1,1), then scaling of a vector (2,1), then we get the original matrix. So, multiply scalar matrix with translation matrix of the specified vector and finally, we get the matrix M.

\(\left[ {\begin{array}{{20}{c}} 2&0&0\ 0&1&0\ 0&0&1 \end{array}} \right]; \times ;\left[ {\begin{array}{{20}{c}} 1&0&1\ 0&1&1\ 0&0&1 \end{array}} \right] = ;\left[ {\begin{array}{*{20}{c}} 2&0&2\ 0&1&1\ 0&0&1 \end{array}} \right]\)

Question 12

To obtain a string of n Terminals from a given Chomsky normal form grammar, the number of productions to be used is :

  1. AOption (a)

    2n − 1

  2. BOption (b)

    2n

  3. COption (c)

    n + 1

  4. DOption (d)

    n2

View answer & explanation

Correct answer

Answer: (a)A.

2n − 1

Why this answer is correct

Concept:

Chomsky normal form

S → AB

A → a

B → b

Length of string = n

Length of the derivate of string n in context free grammar:

2|n| – 1

Example:

If we need to generate ab (string of length 2)

S → AB

S → aB

S → ab

Number of steps = 2 × 2 – 1 = 3

Question 13

What is the output of the following ‘C’ program ? (Assuming little - endian representation of

multi-byte data in which Least Significant Byte (LSB) is stored at the lowest memory address.)

#include <stdio.h>

#include <stdlib.h>

/* Assume short int occupies two bytes of storage */

int main ( )

{

union saving

{

short int one;

char two[2];

};

union saving m;

m.two [0] = 5;

m.two [1] = 2;

printf(’’%d, %d, %d\n”, m.two [0], m.two [1], m.one);

}/* end of main */

  1. AOption (a)

    5, 2, 1282

  2. BOption (b)

    5, 2, 52

  3. COption (c)

    5, 2, 25

  4. DOption (d)

    5, 2, 517

View answer & explanation

Correct answer

Answer: (d)D.

5, 2, 517

Why this answer is correct

Concept:

Endianness: it refers to the bytes order in which data stored in memory and tells about the order of byte transmission. Two types are there: little endian and big endian

Little endian: In this case, LSB byte stores first (at lower address) and then MSB (at high address).

Big endian: In this, MSB byte stores first, it means at lower address and LSB at higher address. It is reverse of little endian.

Explanation:

m.two [0] = 5;                // in print function, it prints 5

m.two [1] = 2;              // it prints 2 as value of m.two[1]

Now, it is given that

union saving

{

short int one;                  /*as short int occupies 2 bytes, we have to arrange m.two[0] and m.two[1] into m.one by using little endian method. */

char two[2];

};

So, while doing this, value 5 is stored in lower address and 2 will be stored in higher address. In binary representation, it will become: 00000010 00000101

It decimal notation is: 517

Question 14

Given below are three implementations of the swap( ) function in C++ :

(a) void swap (int a, int b) { int temp; temp = a; a = b; b = temp; } int main( ) { int p = 0, q = 1; swap (p, q); }(b) void swap (int &a, int &b) { int temp; temp = a; a = b; b = temp; } int main( ) { int p = 0, q = 1; swap (p, q); }(c) void swap (int *a, int *b) { int *temp; temp = a; a = b; b = temp; } int main( ) { int p = 0, q = 1; swap (&p, &q); swap (&p, &q);

 

Which of these would actually swap the contents of the two integer variables p and q ?

  1. AOption (a)

    (a) only

  2. BOption (b)

    (b) only

  3. COption (c)

    (c) only

  4. DOption (d)

    (b) and (c) only

View answer & explanation

Correct answer

Answer: (b)B.

(b) only

Why this answer is correct

Consider CASE (a) :

Initially p =0 and q = 1;

When swap (p, q) is called.

void swap (int a, int b)

{

int temp;             // a variable temp is declared

temp = a;             // temp = a = 0

a = b;             // a = b i.e. a = 1

b = temp;        // b = temp i.e. b = 0

}

Here, values are changing in the function, But as function call is “call by value” here. So, changes will not reflect back to the main function. Contents of p and q are not swapped here.

CASE b:

Initially p = 0 and q = 1

When swap (p, q) is called.

void swap (int &a, int &b)                      

/* it is call by reference, function parameters are as reference types. Final changes will get back to main function. */

{

int temp;                

temp = a;                 

a = b;                       

b = temp;                 

}

In this case, values get swapped .

CASE c:

Initially p = 0 and q = 1

Swap function is :

void swap (int *a, int *b)

{

int *temp;

temp = a;

a = b;

b = temp;

}

Here, it is pass by pointer.  Values get swapped but there are two calls to swap function. So, final value of p and q remain same at the end of the program.

Question 15

Consider the JavaScript Code :

var y= ’’12”;

function f( ) {

var y=’’6”;

alert (this.y);

function g( ) {alert (y); }

g( );

}

f( );

If M is the number of alert dialog boxes generated by this JavaScript code and D1, D2, ....,

DM represents the content displayed in each of the M dialog boxes, then :

  1. AOption (a)

    M = 3; D1 displays ”12”; D2 displays ”6”; D3 displays ”12”.

  2. BOption (b)

    M = 3; D1 displays ”6”; D2 displays ”12”; D3 displays ”6”.

  3. COption (c)

    M = 2; D1 displays ”6”; D2 displays ”12”.

  4. DOption (d)

    M = 2; D1 displays ”12”; D2 displays ”6”.

View answer & explanation

Correct answer

Answer: (d)D.

M = 2; D1 displays ”12”; D2 displays ”6”.

Why this answer is correct

Concept:

In Javascript, this keyword holds the reference to an object. It may be different each time the function is called. In global execution context (outside of a function), “this” refers to the global object whether in strict mode or not. Inside a function, value of “this” keyword depends on how function is called.

Explanation:

Given code :

var y= ’’12”;

function f( ) {

var y=’’6”;

alert (this.y);

function g( ) {alert (y); }

g( );

}

f( );

In this Javascript code, alert box appear two times. So value of m becomes .

First alert box will show the value of y as 12, as it takes the global value which is outside from the function. So, d1 becomes 12.

Second alert box show the value of y as 6. It takes the local value which is inside the function. So, d2 becomes 6.

Question 16

Consider the following three processes with the arrival time and CPU burst time given in

milliseconds:

ProcessArrival TimeBurst Time
P107
P214
P328
<br>

The Gantt Chart for preemptive SJF scheduling algorithm is

  1. AOption (a)

  2. BOption (b)

  3. COption (c)

  4. DOption (d)

View answer & explanation

Correct answer

Answer: (b)B.

Why this answer is correct

Concepts:

Shortest remaining time first (SRTF), is a scheduling method that is a pre-emptive version of shortest job first (SJF).

In this scheduling algorithm, the process with the smallest amount of time remaining until completion is selected to execute.

Explanation:

At t = 0:

Only Process P1 is available and hence P1 is executed for 1 ms.

At t = 1:

Process P1 and Process P2 are available, between them P2 has least burst time. Therefore, P1 gets pre-empted and hence P2 is executed for 1 ms.

At t = 2:

All three process are available. Since P2 is having least burst time it executes till its completion followed by Process P1 and process P3 respectively

Gantt chart:

 

Preemptive SJF scheduling is equal to SRTF

Question 17

Assume the following regarding the development of a software system P:

  • Estimated lines of code of P: 33, 480 LOC
  • Average productivity for P: 620 LOC per person-month
  • Number of software developers: 6
  • Average salary of a software developer: ` 50,000 per month

If E, D and C are the estimated development effort (in person-months), estimated development

time (in months), and estimated development cost (in ` Lac) respectively, then (E, D, C) =

  1. AOption (a)

    (48, 8, 24)

  2. BOption (b)

    (54, 9, 27)

  3. COption (c)

    (60, 10, 30)

  4. DOption (d)

    (42, 7, 21)

View answer & explanation

Correct answer

Answer: (b)B.

(54, 9, 27)

Why this answer is correct

Concept:

Estimation is the process of finding how much time, money and effort will be used to develop a software. So, main terms are development effort, time, and development cost.

Data:

Size of code = 33480 LOC (lines of code)

Average productivity for P = 620 LOC per person-month

Number of software developers = 6

Average salary of a software developer = 50,000 per month

Formula:

Development effort = sizeproductivity\frac{{{\rm{size}}}}{{{\rm{productivity}}}}

Development time = development;effortnumber;of;developer\frac{{{\rm{development;effort}}}}{{{\rm{number;of;developer}}}}

Development cost = development time × persons to develop software × salary of each developer

Calculation:

Development effort = 33480620=54;person−month\frac{{33480}}{{620}} = 54{\rm{;person}} - {\rm{month}} 

Development time = 546=9;months\frac{{54}}{6} = 9{\rm{;months}}

Development cost = 9 × 6 × 50000 = 2700000 = 27 lacs

Question 18

Match the following in Software Engineering:

List – IList – II
(a)Product Complexity(i)Software Requirements Definition
(b)Structured System Analysis(ii)Software Design
(c)Coupling and Cohesion(iii)Validation Technique
(d)Symbolic Execution(iv)Software Cost Estimation
  1. AOption (a)

    (a) – (ii), (b) – (iii), (c) – (iv), (d) – (i)

  2. BOption (b)

    (a) – (iii), (b) – (iii), (c) – (iv), (d) – (ii)

  3. COption (c)

    (a) – (iv), (b) – (i), (c) – (ii), (d) – (iii)

  4. DOption (d)

    (a) – (iii), (b) – (iv), (c) – (i), (d) – (ii)

View answer & explanation

Correct answer

Answer: (c)C.

(a) – (iv), (b) – (i), (c) – (ii), (d) – (iii)

Why this answer is correct

Product complexity:

  • Product complexity is related with software complexity. Complexity of any software is measured in terms of software cost estimation.
  • There are various cost estimation models used to estimate the complexity of the software. One such model is COCOMO. Product complexity is described as a determinant of software development time.
<br>

Structured system analysis:

  • It is a software requirement definition. The primary objective of this is to deliver the requirements as specified in the feasibility report.
  • It involves accuracy, timeliness and comprehensiveness of the system output. More clearly defined logical method for developing system that meet user requirements has led to new techniques that can improve productivity of analysts and programmers.
<br>

Coupling and cohesion: These two are related to software design.

  • Software coupling defines that how two modules interdependent on each other. Low coupling is desirable in the system.
  • Cohesion describes the intra - dependence of modules. High cohesion is desirable.
<br>

Symbolic execution:

  • Symbolic execution is a validation technique, or we can say that it is a software testing technique.
  • In this, data is represented as symbolic values with expressions. It tests the program by using a flow graph. When testing is done at the end of completion of software then that is known as validation testing.

Question 19

Which one of the following is not typically provided by Source Code Management Software?

  1. AOption (a)

    Synchronisation 

  2. BOption (b)

    Versioning and Revision history

  3. COption (c)

    Syntax highlighting

  4. DOption (d)

    Project forking

View answer & explanation

Correct answer

Answer: (c)C.

Syntax highlighting

Why this answer is correct

Source code management is used to control or track the modification done in a software. When software grows, lines of code increases with it and then to manage that complex software becomes difficult. At that time, source code management is required to manage all the counts and lines of code. It is the part of software configuration management. It is also known as revision control.

Main points of source code management:

  1. It provides synchronization by managing the complex code.

  2. Complex point is that there is possibility of multiple versions.

  3. It is related with team workflow that defines how source code management will be done and which type of tools should be used

  4. It controls project forking. Project forking is when other developers takes copy of a source code and then used it for any other development.

  5. it provides versions to the program. Each version has a timestamp.

  6. It allows only authenticated access for commits.

  7. It revise history of files so that changes can be tracked.

Question 20

Consider the following two Grammars:

G1 : S → SbS|a

G2 : S → aB|ab, A → AB|a, B → ABb|b

Which of the following option is correct?

  1. AOption (a)

    Only G1 is ambiguous

  2. BOption (b)

    Only G2 is ambiguous

  3. COption (c)

    Both G1 and G2 are ambiguous

  4. DOption (d)

    Both G1 and G2 are not ambiguous

View answer & explanation

Correct answer

Answer: (c)C.

Both G1 and G2 are ambiguous

Why this answer is correct

Concept:

Ambiguous grammar:

A grammar in which there exists a string for which two derivation trees are possible, then it is known as ambiguous grammar.

Explanation:

G1: S → SbS|a

String: “ababa”

Two derivation trees (parse tree) is possible. So, grammar G1 is ambiguous

G2 : S → aB|ab, A → AB|a, B → ABb|b

String: “ab”

Two derivation trees (parse tree) is possible. So, grammar G2 is ambiguous

Question 21

Context sensitive language can be recognized by a:

  1. AOption (a)

    Finite state machine

  2. BOption (b)

    Deterministic finite automata

  3. COption (c)

    Non-deterministic finite automata

  4. DOption (d)

    Linear bounded automata

View answer & explanation

Correct answer

Answer: (d)D.

Linear bounded automata

Why this answer is correct

Concept:

A grammar G = (V, T, S, P) is said to be context sensitive if all productions are of the form x → y where x, y, belongs to (V U T)+ and |x| ≤ | y|.

Languages that are generates from context sensitive grammar is known as context sensitive languages.

Relation between languages and their automaton.

Explanation:

  • Context sensitive languages are recognized with the help of linear bounded automata. A linear bounded automaton has an unbounded tape, but usable part of the tape is restricted as compared to Turing machine.
  • In linear bounded automata, there are two end markers [ left end marker, right end marker ]. Read write head cannot move to the left or right of these markers.

Language L = {an bn cn: n > = 1}

  • It is accepted by linear bounded automata. It is a context sensitive language. A push down automata cannot accept this language.

As, it requires more than one stack which is available in linear bounded automata. In this, each a, b and c are replaced by x, y and z respectively. At the end, original symbols are checked if they are rewritten or not.

Question 22

Consider the following statements():

S1: There exists no algorithm for deciding if any two Turing machines M1 and M2 accept

the same language.

S2: The problem of determining whether a Turing machine halts on any input is undecidable.

Which of the following options is correct?

  1. AOption (a)

    Both S1 and S2 are correct

  2. BOption (b)

    Both S1 and S2 are not correct

  3. COption (c)

    Only S1 is correct

  4. DOption (d)

    Only S2 is correct

View answer & explanation

Correct answer

Answer: (a)A.

Both S1 and S2 are correct

Why this answer is correct

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

Statement S1 is correct.

Reason:

  • The equivalence of two Turing machines is undecidable. There exists no algorithm that can find if two Turing machines accept the same language or not.
  • There exists a machine M2 that accepts the same language as accepted by Turing machine M1 but, if two Turing machines are equal or not, is not decidable. This is a non-trivial property in Turing machines.

Statement S2: The problem of determining whether a Turing machine halts on any input is undecidable.

Statement S2 is correct.

Reason:

It is related to the halting problem of Turing machine. A recursive language is decidable if there exists a Turing machine that either halts or rejects an input. But it cannot be decided whether it halts on any input. According to the concept of rice theorem, it is undecidable.

Question 23

The set A = { 0n 1n 2n | n = 1, 2, 3, ......... } is an example of a grammar that is:

  1. AOption (a)

    Context sensitive

  2. BOption (b)

    Context free

  3. COption (c)

    Regular 

  4. DOption (d)

    None of the above

View answer & explanation

Correct answer

Answer: (a)A.

Context sensitive

Why this answer is correct

Language A = {0n 1n 2n | n = 1, 2, 3, .........}

It is context sensitive language.

  • This language cannot be a context free grammar. Since all 0, 1 and 2’s is equal in number.

Reason:

If we take the case of push down automata. Then first push all the 0’s into the stack then with each 1 pop all 0’s. But at the end, there is no symbol at the stack and input is remaining. So, it is not accepted by push down automata and cannot be context free grammar.

  • It is accepted by linear bounded automata with the help of forward and backward movement of tape.

Machine that accepts Language A:

Question 24

A slotted ALOHA network transmits 200-bit frames using a shared channel with a 200 Kbps bandwidth. Find the throughput of the system, if the system (all stations put together) produces 250 frames per second:

  1. AOption (a)

    49

  2. BOption (b)

    368

  3. COption (c)

    149

  4. DOption (d)

    151

View answer & explanation

Correct answer

Answer: (a)A.

49

Why this answer is correct

Concept:

In slotted aloha, there are time slots for the stations to transmit the data. Stations can transmit data in time slots. Stations have to wait for their time slots to transmit the data.

Formula:

Throughput of slotted aloha = G× e-G

Calculation:

Bandwidth = 200 kbps

It transmits 200 frames using shared channel

Frame transmission rate =200200=1;ms= \frac{{200}}{{200}} = 1;ms

System produces 250 frames per second

So, in 1 second frames are = 250

In 1 ms frames are = 250 × 1 ms = (250) × 10-3 = ¼

So, G= ¼

S=;14×;e−14=0.195{\rm{S}} = {\rm{;}}\frac{1}{4} \times {\rm{;}}{{\rm{e}}^{ - \frac{1}{4}}} = 0.195

Throughput of system = 250 × 0.195 = 49 frames

Question 25

The dotted-decimal notation of the following IPV4 address in binary notation is.

10000001 00001011 00001011 11101111

  1. AOption (a)

    111.56.45.239 

  2. BOption (b)

    129.11.10.238

  3. COption (c)

    129.11.11.239 

  4. DOption (d)

    111.56.11.239

View answer & explanation

Correct answer

Answer: (c)C.

129.11.11.239 

Why this answer is correct

Concept

Range of each octet (8 bit) of decimal notation of an IPv4 address is from 0 to 255.

Explanation:

10000001 .00001011. 00001011 .11101111

1st Octet → (10000001)2 = 2× 27 + 1×20 = (129)10

2nd Octet → (00001011)2 = 2× 23 + 1 × 21 + 2 × 20 = (11)10

3rd Octet → (00001011)2 = 2× 23 + 1 × 21 + 2 × 20 = (11)10

4th Octet → (11101111)2 = 1× 27 + 1 × 26 + 1 × 25 + 2 × 23 +1× 22 + 1 × 21 + 2 × 20 = (239)10

Decimal representation is 129. 11. 11. 239

Question 26

Which of the following statements are true?

(a) Advanced Mobile Phone System (AMPS) is a second-generation cellular phone system.

(b) IS - 95 is a second generation cellular phone system based on CDMA and DSSS.

(c) The Third generation cellular phone system will provide universal personnel communication.

Code:

  1. AOption (a)

    (a) and (b) only 

  2. BOption (b)

    (b) and (c) only

  3. COption (c)

    (a), (b) and (c) 

  4. DOption (d)

    (a) and (c) only

View answer & explanation

Correct answer

Answer: (b)B.

(b) and (c) only

Why this answer is correct

Statement a:

Advanced Mobile Phone System (AMPS) is a second-generation cellular phone system.

This is statement incorrect

Reason:

  • An advanced mobile phone system is an analog cellular system. It uses FDMA to separate channels in a link. It operates in ISM 800 MHz band.
  • It uses two separate analog channels one for forwarding communication and one for reverse communication.
  • It is a first-generation cellular phone system. So, the given statement is incorrect.

Statement b:

IS - 95 is a second-generation cellular phone system based on CDMA and DSSS.

This statement is correct

Reason:

  • IS – 95 is a second-generation cellular phone system.
  • It is based on CDMA and DSSS. It uses two bands for duplex communication. IS 95 has two different transmission techniques: one for use in the forward direction and another in a reverse direction.
  • In this, each voice channel is digitized. It uses FDMA to separate channels in the link.

Statement c:

The Third-generation cellular phone system will provide universal personnel communication.

This statement is correct

Reason:

The third generation of cellular telephony refers to a combination of technologies that provide a variety of services. Using a small portable device, a person should be able to talk to anyone else in the world with a voice quality similar to that of an existing fixed telephone network. It provides universal personal communication.

Question 27

Match the following symmetric block ciphers with corresponding block and key sizes:

List - IList – II
(a)DES(i)block size 64 and key size ranges between 32 and 448
(b)IDEA(ii)block size 64 and key size 64
(c)BLOW FISH(iii)block size 128 and key sizes 128, 192, 256
(d)AES(iv)block size 64 and key size 128
  1. AOption (a)

    (a) – (iv), (b) – (ii), (c) – (i), (d) – (iii)

  2. BOption (b)

    (a) – (ii), (b) – (iv), (c) – (i), (d) – (iii)

  3. COption (c)

    (a) – (ii), (b) – (iv), (c) – (iii), (d) – (i)

  4. DOption (d)

    (a) – (iv), (b) – (ii), (c) – (iii), (d) – (i)

View answer & explanation

Correct answer

Answer: (b)B.

(a) – (ii), (b) – (iv), (c) – (i), (d) – (iii)

Why this answer is correct

DES:

  • DES stands for data encryption standard is a block cipher technique to encrypt the data.
  • It encrypts the data in blocks of size 64 bits each, that is, 64 bits of plain text goes to input to DES which produces 64 bits of cipher text.
  • DES uses key of size 56 bits but actual size of key is 64 bits. Before the DES process, every eighth bit of key is discarded to produce 56 bits key.
  • DES is based on two fundamental attributes of cryptography: substitution and transposition.

IDEA:

  • IDEA stands for international data encryption algorithm. It is a block cipher.
  • It also works on 64-bit plain text blocks. In IDEA, key size is larger which is of 128 bits.
  • 64- bit plain text block is divided into four portions of plain text (each of size 16 bits). There are 8 rounds and in each round six sub keys are generated. These subkeys are applied to each of portion. Finally, output transformation is done and four blocks of 16 bits comes as cipher text (64 bits).

Blow Fish:

  • It is a symmetric key cryptographic algorithm. It works on 64-bit plain text and key size is variable in blow fish.
  • It ranges between 32 bits to 448 bits long. First part of encryption is key expansion in which process converts the key up to 448 bits long to subkeys. Second part is data encryption in which the iteration of simple function 16 times. Each round contains a key dependent permutation and data dependent substitution.

AES:

  • It is a symmetric block cipher. It is capable of using key of sizes 128, 192 and 256 bits and decrypt the data in blocks of 128 bits each.
  • It encrypts the data faster than DES. Number of rounds are not fixed in AES, there are 10 rounds for 128 bit keys, 12 rounds for 192 bit keys and 14 rounds for 256 bit keys.
  • Encryption process includes byte substitution, shifting of rows, adding of round keys.

Question 28

Which of the following statements are true?

(a) Three broad categories of Networks are:

(i) Circuit Switched Networks

(ii) Packet Switched Networks

(iii) Message Switched Networks

(b) Circuit Switched Network resources need not be reserved during the set up phase.

(c) In packet switching there is no resource allocation for packets.

  1. AOption (a)

    (a) and (b) only

  2. BOption (b)

    (b) and (c) only

  3. COption (c)

    (a) and (c) only

  4. DOption (d)

    (a), (b) and (c)

View answer & explanation

Correct answer

Answer: (c)C.

(a) and (c) only

Why this answer is correct

Concept:

A network consists of two kind of elements:

  1. Network nodes known as actual computing end system

  2. connection between these along which data transmission travel.

There must be some method to switch data flows between these network nodes.

Explanation:

There are three basic type of switching.

Circuit switching:

  • It occurs when a physical link is made between two network nodes for duration of session along which data can flow under the control of end systems.
  • In circuit switching, a route and its associated bandwidth is reserved from source to destination, making circuit switching relatively inefficient since capacity is reserved whether or not the connection is in continuous use.

Message switching:

  • It is a network switching technique does not establish a physical connection. It relies on the network to deliver a message successfully once sent.
  • Message is routed entirety from the source node to the destination node, one hope at a time.
  • During message routing, every intermediate switch in the network stores the whole message. If the entire network's resources are engaged or the network becomes blocked, the message-switched network stores and delays the message until ample resources become available for effective transmission of the message.
  • It is low cost network.

Packet switching*:*

  • Individual message is divided into packets each of which travels independently through the network.
  • Packets are dispatched from source and reassembles at the point of exit for the destination.
  • There is no resource allocation for packets in packet switching. With this technique, faster transmission rate is achieved.

Question 29

In Challenge-Response authentication the claimant.

  1. AOption (a)

    Proves that she knows the secret without revealing it

  2. BOption (b)

    Proves that she doesn’t know the secret

  3. COption (c)

    Reveals the secret

  4. DOption (d)

    Gives a challenge

View answer & explanation

Correct answer

Answer: (a)A.

Proves that she knows the secret without revealing it

Why this answer is correct

Concept:

In challenge-response authentication, one entity authenticates to other entity providing the knowledge

of a secret. Three protocols used in challenge-response authentication are random numbers, sequences, timestamp.

Explanation:

In the challenge-response authentication mechanism, one entity challenges another entity for their answer and other entity response with the correct answer.

It means, when a user wants to login into the system, the system asks for his/her login and password. When data is found to be correct by the system, only then the user can access the system.

Question 30

Decrypt the message “WTAAD” using the Caesar Cipher with key=15.

  1. AOption (a)

    LIPPS

  2. BOption (b)

    HELLO

  3. COption (c)

    OLLEH

  4. DOption (d)

    DAATW

View answer & explanation

Correct answer

Answer: (b)B.

HELLO

Why this answer is correct

Concept:

Caesar cipher:

It is a substitution cipher. In this, characters of plain text are replaced by other character.

In this, each alphabet in a message is replaced by an alphabet with some places up or down according to the key size.

Explanation:

Here, we have to decrypt the message “WTAAD”. So, we need to decrease the count according to the Key size.

Here, key size is given as 15. So, for every alphabet of cipher text, replace it with alphabet which is available at 15 places down to it.

As alphabet series is from A to Z (1 to 26).

W is replaced by 23 – 15 = 8 i.e. H

T is replaced by 20 – 15 = 5 i.e. E

A is replaced by 1 – 15 = - 14 (as, negative number comes, add 26). (-14 + 26 = 12 i.e. L)

D is replaced by 4 – 15 = -11 + 26 = 15 i.e. O

SO, plain text will be “HELLO”.

Question 31

To guarantee correction of upto t errors, the minimum Hamming distance dmin in a block code must be.

  1. AOption (a)

    t + 1

  2. BOption (b)

    t − 2

  3. COption (c)

    2t − 1

  4. DOption (d)

    2t + 1

View answer & explanation

Correct answer

Answer: (d)D.

2t + 1

Why this answer is correct

Concept:

It is one of the concepts in coding for error control. Hamming distance between two words of the same size is the number of differences between the corresponding bits. It can be calculated by applying the XOR operation.

Explanation:

Minimum Hamming distance is the smallest hamming distance between all possible pairs in a set of words. There are three parameters in this: codeword size, data word size, and minimum Hamming distance. When a codeword is corrupted during transmission, the hamming distance between the sent and the received codeword is the number of bits affected by the error.

Points regarding hamming distance:

  1. To guarantee the detection of up to s errors in all cases, the minimum hamming distance in a block code must be dmin = s + 1.

  2. To guarantee the correction of up to t errors in all cases, the minimum hamming distance in a block code must be dmin = 2t + 1

Example:

A coding scheme has a hamming distance dmin = 4

Then code can detect up to 4 -1 = 3 errors and can correct up to 1 error.

Question 32

Encrypt the Message “HELLO MY DEARZ” using Transposition Cipher with

\(Key\left{ {\begin{array}{*{20}{c}} {Plain;Text;2;4;1;3}\ {Cipher;Text;1;2;3;4} \end{array}} \right.\)

  1. AOption (a)

    HLLEO YM AEDRZ

  2. BOption (b)

    EHOLL ZYM RAED

  3. COption (c)

    ELHL MDOY AZER

  4. DOption (d)

    ELHL DOMY ZAER

View answer & explanation

Correct answer

Answer: (c)C.

ELHL MDOY AZER

Why this answer is correct

Concept:

Transposition cipher:

In this type, plain text alphabets position is shifted according to some key.

Transposition cipher perform some permutation over the plain text alphabets.

Explanation:

Message: HELLO MY DEARZ

Break the message into blocks of size 4. “HELL OMYD EARZ”

1234
HELL
OMYD
EARZ

 

Now, get cipher text according to 2413.

Cipher text will be “ELHL MDOY AZER”

Question 33

At a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and “x” V operations were performed on this semaphore. If the final value of semaphore is 7, x will be:

  1. AOption (a)

    8

  2. BOption (b)

    9

  3. COption (c)

    10

  4. DOption (d)

    11

View answer & explanation

Correct answer

Answer: (b)B.

9

Why this answer is correct

Concept:

A semaphore S is an integer variable that apart from initialization is accessed only through two atomic operations: wait and signal. These are termed as wait (P) and signal (V).

Semaphore operation

Wait(S): S.value = S. value – 1;

 If S. value < 0,

then add this process to S.L and block;

End;

Signal (S): S. value = S. value + 1;

If S. value = 0, then begin

remove process from S.L;

Wakeup(P);

End;

Explanation:

counting semaphore: 10

12 P operations are performed, value will be decreased by 1 with each P operation.

x V operations are performed, value will be increased by 1 with each V operation.

Final value of semaphore = 7

So, 10 – 12 + x = 7

-2 + x = 7

x = 7 + 2 = 9

it means 9 V operations are performed on this semaphore.

Question 34

Coupling is a measure of the strength of the interconnections between software modules.

Which of the following are correct statements with respect to module coupling?

P: Common coupling occurs when one module controls the flow of another module by passing it information on what to do.

Q: In data coupling, the complete data structure is passed from one module to another through parameters.

R: Stamp coupling occurs when modules share a composite data structure and use only parts of it.

Code:

  1. AOption (a)

    P and Q only

  2. BOption (b)

    P and R only

  3. COption (c)

    Q and R only

  4. DOption (d)

    All of P, Q and R

View answer & explanation

Correct answer

Answer: (c)C.

Q and R only

Why this answer is correct

Statement P: Common coupling occurs when one module controls the flow of another module by passing it information on what to do.

This statement is incorrect. When one module controls the flow of another module by passing it information on what to do, it is known as control coupling. Common coupling is when two or more modules access same global data. When several modules access same data, then there can be difficulty in controlling the data access.

Statement Q: In data coupling, the complete data structure is passed from one module to another through parameters.

This statement is correct. Data coupling is when complete data structure is passed from one module to another through parameters. In this, there is communication between modules only through data. Data coupling involves all global and local variables to be passed between different modules.

Statement R: Stamp coupling occurs when modules share a composite data structure and use only parts of it.

Code:

Given statement is correct. Stamp coupling occurs when modules share a composite data structure and use only parts of it. In this, data is passed by parameters among different modules. In this complete data structure is passed from one module to another, it depends on modules whether they use complete or part of it.

Question 35

A software design pattern often used to restrict access to an object is:

  1. AOption (a)

    adapter

  2. BOption (b)

    decorator 

  3. COption (c)

    delegation 

  4. DOption (d)

    proxy

View answer & explanation

Correct answer

Answer: (d)D.

proxy

Why this answer is correct

Software design pattern specify the structure of useful software at the architectural level. In terms of object-oriented programming, it means structure expressed in terms of classes and their relationship. Design patterns speeds up the development process.

In order to design a pattern for software, several things should be kept in mind:

  1. Embark on a new design with an awareness of pattern

  2. recognize the need for one of the established patterns

  3. consult the catalog to check the availability of the pattern

  4. use the catalog for information on how to use the pattern

  5. use the pattern as part of design

Structural design patterns have different ways to compose objects so that they can achieve new functionality. These are adapter, bridge, composite, decorator, façade, delegation, factory method, immutable, pipe and filter, proxy.

A proxy object acts instead of some other objects. Its fields requests, passing them on as necessary. A software design pattern often used to restrict access to an object that is known as proxy. The proxy either handles requests itself or passes a request on to an available server.

Question 36

Which of the following is not a key strategy followed by the clean room approach to software development?

  1. AOption (a)

    Formal specification

  2. BOption (b)

    Dynamic verification

  3. COption (c)

    Incremental development

  4. DOption (d)

    Statistical testing of the system

View answer & explanation

Correct answer

Answer: (b)B.

Dynamic verification

Why this answer is correct

Clean room software engineering model is an incremental software paradigm for the development of zero defect and high reliability software using box structure specification, statistical quality control and certification.

It is a practical development and certification approach that uses statistical quality control to reduce software defects, to overcome unconscious copying of copyrighted code.

Characteristics of cleanroom software engineering approach:

  • Incremental development process model
  • Formal methods for specification and design
  • Correctness verification
  • Statistically based, independent testing
<br>

The development life cycle starts with a specification that not only defines function and performance requirements but also identifies operational usage of software and nested sequence of user function subsets that can be developed and tested as increments which accumulate into the final system.

Question 37

The solution of the recurrence relation T(m) = T( 3m/ 4) + 1 is:

  1. AOption (a)

    θ (lg m)

  2. BOption (b)

    θ (m)

  3. COption (c)

    θ (mlg m) 

  4. DOption (d)

    θ (lglg m)

View answer & explanation

Correct answer

Answer: (a)A.

θ (lg m)

Why this answer is correct

Concept:

Master’s theorem:

It is used to solve the recurrence relation of form: T(n) = aT(n/b) + f(n) where n is the size of input, a is number of sub-problems and b is the size of each sub-problem. We have to find out n raised to the power logba, then compare it with given function.

If it is less than f(n), then f(n) is answer. If greater than f(n), then complexity will be the n raised to the power logba, and if it comes equal to the f(n), then append log n with it.

Explanation:

Recurrence relation: T(m) = T(3m/4) + 1

a = 1, b = 4/3, f(n) = 1

\({m^{{{\log }b}a}} = ;{m^{{{\log }{\frac{4}{3}}}1}} = {m^0} = 1 = f(n)\)

T(m)=θ(mlog⁡balog m)=θ(log m)T(m) =\theta({m^{{{\log }_b}a}}log\ m) = \theta(log\ m)

Question 38

A hash function h defined h(key)=key mod 7, with linear probing, is used to insert the keys 44, 45, 79, 55, 91, 18, 63 into a table indexed from 0 to 6. What will be the location of key 18?

  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

Concept:

Hashing is used to uniformly distribute key values into the table using a hash function. In linear probing, when allocating location to the key values, if there occurs a collision, then we linearly probe for the next vacant location and allocate that to the key.

Explanation:

Hash function: h(key) = key mod 7

Keys are 44, 45, 79, 55, 91, 18, 63

Table size = 7( 0 to 6)

index0123456
key

 

Step 1: key is 44 , h(44) = 44 mod 7 = 2,

Key 44 will move into index 2.

index0123456
key44

 

Step 2: Next 45, h(45)= 45 mod 7 = 3

45 will move to index 3.

index0123456
key4445

 

Step 3: key 79, h(79) = 79 mod 7 = 2 (collision as, there is already a key value at index 2).

So, 79 will go for the next empty location, i.e. 4

index0123456
key444579

 

Step 4: next key is 55, h(55) = 55 mod 7 = 6,

Key 55 will go into index 6.

index0123456
key44457955

 

Step 5: key 91, h(91) = 91 mod 7 = 0

index0123456
key9144457955

 

Step 6: key 18, h(18) = 18 mod 7 = 4 (collision , move to next empty location i.e. 5)

index0123456
key914445791855

 

Step 7: key 63, h(63) = 63 mod 7 = 0 (due to collision, it will move into index 1)

index0123456
key91634445791855

 

Therefore, the location of 18 elements is 5

Question 39

Which of the following algorithms solves the single-source shortest paths?

  1. AOption (a)

    Prim’s algorithm

  2. BOption (b)

    Floyd - Warshall algorithm

  3. COption (c)

    Johnson’s algorithm

  4. DOption (d)

    Dijkstra’s algorithm

View answer & explanation

Correct answer

Answer: (d)D.

Dijkstra’s algorithm

Why this answer is correct

Concept:

Single source shortest path problem finds the shortest path from a source node to all other nodes in a graph.

Explanation:

Dijkstra’s algorithm is used to solve the single source shortest path problem.

Key points for this:

  • It is used for both directed and undirected graphs.
  • All edges must have non - negative weights.
  • Graph must be connected

 

Algorithm of dijkstra’s algorithm is:

  1. dis[s] <- 0 // distance to source node is 0

  2. for all vertices v except source vertex

  3. do dist[v] -> infinity

  4. s -> empty // initially there are no visited nodes, set is empty

  5. while Q <- v // queue contains all nodes

  6. while Q is not empty

  7. do u -> mindistance (Q, dist) // select node from queue having minimum distance

  8. S-> S U {node} // add that selected node to the set (list of visited nodes)

  9. for all vertices that are neighbours of node

  10. do if dist[v] > dist[node] + w(u, v)

  11. then d[v] -> d[node] + w[u,v] // new value for shortest path is set

  12. return dist

Question 40

Match the following with respect to algorithm paradigms:

List - IList - II
(a)The 8-Queen’s problem(i)Dynamic programming
(b)Single-Source shortest paths(ii)Divide and conquer
(c)STRASSEN’s Matrix multiplication(iii)Greedy approach
(d)Optimal binary search trees(iv)Backtracking
  1. AOption (a)

    (a) - (iv), (b) - (i), (c) - (iii), (d) - (ii)

  2. BOption (b)

    (a) - (iv), (b) - (iii), (c) - (i), (d) - (ii)

  3. COption (c)

    (a) - (iii), (b) - (iv), (c) - (ii), (d) - (i)

  4. DOption (d)

    (a) - (iv), (b) - (iii), (c) - (ii), (d) - (i)

View answer & explanation

Correct answer

Answer: (d)D.

(a) - (iv), (b) - (iii), (c) - (ii), (d) - (i)

Why this answer is correct

8 - queen’s problem:

  • In this, 8 queens are placed on a 8 × 8 chessboard such that none of them can take same place.
  • It is the backtracking approach. In backtracking approach, all the possible configurations are checked and check whether result is obtained or not.
  • A queen can only be attacked if it is in the same row or column or diagonal of another queen.

 

Single source shortest path:

  • It is used to find the shortest path starting from a source to the all other vertices.
  • It is based on greedy approach.
  • Example of single source shortest path algorithm is Dijkstra’s algorithm which initially consider all the distance to infinity and distance to source is 0.

 

Strassen’s matrix multiplication:

  • It is a method used for matrix multiplication. It uses divide and conquer approach to multiply the matrices.
  • Time consumption is improved by using Strassen’s method as compared to standard multiplication method.
  • It is faster than standard method. Strassen’s multiplication can be performed only on square matrices.

 

Optimal binary search tree:

  • It is also known as weight balanced binary tree. In optimal binary search tree, dummy key is added in the tree by first constructing a binary search tree.
  • It is based on dynamic programming approach. Total cost must be as small as possible.

Question 41

The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5-digit octal number):

  1. AOption (a)

    45

  2. BOption (b)

    72

  3. COption (c)

    360

  4. DOption (d)

    450

View answer & explanation

Correct answer

Answer: (c)C.

360

Why this answer is correct

Concept:

Radix sort: It is a sorting technique which sort the integer values by grouping individual digits. It is not based on comparisons. When key values that are sorted are short, then it works faster. But sometimes it is not flexible as required. Because it depends on digits or letters.

Explanation:

Number of items = 9

Each item is assumed to be octal number of 5 digit.

Base of octal number system = 8

Maximum number of comparisons required to sort these 9 items:

= number of items × number of digits × base of number system

= 9 × 5 × 8

= 360

Question 42

Pushdown automata can recognize language generated by

  1. AOption (a)

    Only context free grammar

  2. BOption (b)

    Only regular grammar

  3. COption (c)

    Context free grammar or regular grammar

  4. DOption (d)

    Only context sensitive grammar

View answer & explanation

Correct answer

Answer: (c)C.

Context free grammar or regular grammar

Why this answer is correct

Concept:

Finite state machine cannot recognize all context free languages because of finite memory. So, there is a need of another machine that has auxiliary memory and can accept all the context free languages.

Relation between grammars and their automaton.

 

Explanation:

Consider an example: Language L = {an bn: n> = 0}

  • Here n is not bounded, counting is not possible with finite memory, in this case there is a need of unlimited counting ability. we use push down automata having an auxiliary memory i.e. stack to accept the context free languages or grammar.
  • All the languages that are accepted by finite automata are known as regular language. Grammar that generates regular languages is regular grammar. So, a push down automata accepts both regular and context free languages.

Question 43

Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instructions privileged. In a CPU with memory mapped I/O, there is no explicit I/O instruction. Which one of the following is true for a CPU with memory mapped I/O?

  1. AOption (a)

    I/O protection is ensured by operating system routines

  2. BOption (b)

    I/O protection is ensured by a hardware trap

  3. COption (c)

    I/O protection is ensured during system configuration

  4. DOption (d)

    I/O protection is not possible

View answer & explanation

Correct answer

Answer: (a)A.

I/O protection is ensured by operating system routines

Why this answer is correct

Concept:

Memory-mapped i/o is a way to exchange the data and instructions between CPU and peripheral devices attached to it. Memory-mapped i/o is one where the processor and i/o device share the same memory location.

Explanation:

Normally user programs are prevented from handling i/o directly by i/o instructions in them. For CPU having explicit i/o instructions, such i/o protection is ensured by having the i/o instructions privileged. But in a CPU with memory-mapped i/o, there is no explicit i/o instruction, in that case, i/o protection is achieved by operating system routines. Memory-mapped i/o improves CPU performance. I/O can be performed simply by accessing bytes of memory and relying on the OS kernel to ensure that changes are propagated to the mapped i/o device.

Performance benefits:

  1. A normal read or write() call involves two transfers. One between i/o and kernel, other between buffer cache and user buffer. Memory-mapped i/o eliminates the second.

  2. Memory mapping lowers memory requirements. It uses less memory to store data.

Question 44

A pushdown automaton behaves like a Turing machine when the number of total memory is:

  1. AOption (a)

    0

  2. BOption (b)

    1

  3. COption (c)

    1 or more

  4. DOption (d)

    2 or more

View answer & explanation

Correct answer

Answer: (d)D.

2 or more

Why this answer is correct

Concept:

A push down automata is like a finite state machine but with one auxiliary memory such as stack so that it can recognize the strings.

Explanation:

  • A push down automata if contains more than one stack i.e. two or more stack or auxiliary memory than it is known as Turing machine.
  • Push down automata can only access top of its stack, it cannot access an infinite tape whereas Turing machine can be used to access an infinite tape. Turing machine can move backward or forward both.
  • A Turing machine can both write and read. It halts when the string is accepted or rejected.
  • A Turing machine consists of 7- tuples (set of states, input alphabet, tape alphabet, start state, final state, reject state, transition function).
  • A language is known as Turing recognizable if there is a Turing machine that accepts it.
  • If Turing machine halts on every input of the language, then it is known as recursive.

Question 45

In a paged memory, the page hit ratio is 0.40. The time required to access a page in secondary memory is equal to 120 ns. The time required to access a page in primary memory is 15 ns.

The average time required to access a page is.

  1. AOption (a)

    105

  2. BOption (b)

    68

  3. COption (c)

    75

  4. DOption (d)

    78

View answer & explanation

Correct answer

Answer: (d)D.

78

Why this answer is correct

Concept:

Hit ratio:

When a page is found in the main memory, then it is known as hit.

Hit radio is defined as the ratio of total number of hits to the sum of total number of hit and misses.

In miss, when a page is not in main memory, it is found in secondary memory.

Formula:

Effective average access time = hit ratio × access time for main memory + miss ratio × access time for secondary memory

Explanation:

Hit ratio = 0. 40

Access time for secondary memory = 120 ns

Access time in primary memory = 15 ns

Effective average access time = 0.40 × 15 + 0.60 × 120

= 6 + 72 = 78 ns

Question 46

In a multi-user operating system, 30 requests are made to use a particular resource per hour, on an average. The probability that no requests are made in 40 minutes, when arrival pattern is a poisson distribution, is.

  1. AOption (a)

    e−15

  2. BOption (b)

    1 − e−15

  3. COption (c)

    1 − e−20

  4. DOption (d)

    e−20

View answer & explanation

Correct answer

Answer: (d)D.

e−20

Why this answer is correct

Concept:

A Poisson process is a stochastic process that counts the number of events and time points at which these events occur in a given time interval. Formula for poisson distribution:

P(x,λ)=e−λλxx!;for;x=0,1,2,…..{\rm{P}}\left( {{\rm{x}},{\rm{\lambda }}} \right) = {\rm{}}\frac{{{{\rm{e}}^{ - {\rm{\lambda }}}}{{\rm{\lambda }}^{\rm{x}}}}}{{{\rm{x}}!}}{\rm{;for;x}} = 0,1,2, \ldots ..

Explanation:

30 requests are sent in 1 hour.

i.e. in 60 min, 30 requests are sent

in 40 min, number of requests sent are 20.

λ = 20.

x = 0

P(0,20)=;e−202000!=;e−20P\left( {0,20} \right) = ;\frac{{{e^{ - 20}}{{20}^0}}}{{0!}} = ;{e^{ - 20}}

Probability that no requests are made in 40 minutes = e-20

Question 47

A software system crashed 20 times in the year 2017 and for each crash, it took 2 minutes to restart. Approximately, what was the software availability in that year?

  1. AOption (a)

    96.9924%

  2. BOption (b)

    97.9924%

  3. COption (c)

    98.9924%

  4. DOption (d)

    99.9924%

View answer & explanation

Correct answer

Answer: (d)D.

99.9924%

Why this answer is correct

Concept:

Software availability:

It means the software is present at the time it is required to do some tasks.

Explanation:

Software availability can be calculated as :

A system crashed 20 times in the year 2017 and takes two minutes every time to restart .

Crash time = 20 × 2 = 40 minutes

As 2017 is not a leap year. So the total days are 365.

There are 1440 minutes in a day.

So, total time = 365 × 1440 = 525600 minutes

Working time of system = 525600 – 40 = 525560 minutes

So, availability of software (in %age) = 525560525600×100=;99.9924%\frac{{525560}}{{525600}} \times 100 = ;99.9924\%

Question 48

Match the 5 CMM Maturity levels/CMMI staged representations in List- I with their characterizations in List-II :

List – IList – II
(a)Initial(i)Processes are improved quantitatively and continually.
(b)Repeatable(ii)The plan for a project comes from a template for plans.
(c)Defined(iii)The plan uses processes that can be measured quantitatively.
(d)Managed(iv)There may not exist a plan or it may be abandoned.
(e)Optimizing(v)There’s a plan and people stick to it.
  1. AOption (a)

    (a) – (iv), (b) – (v), (c) – (i), (d) – (iii), (e) – (ii)

  2. BOption (b)

    (a) – (i), (b) – (ii), (c) – (iv), (d) – (v), (e) – (iii)

  3. COption (c)

    (a) – (v), (b) – (iv), (c) – (ii), (d) – (iii), (e) – (i)

  4. DOption (d)

    (a) – (iv), (b) – (v), (c) – (ii), (d) – (iii), (e) – (i)

View answer & explanation

Correct answer

Answer: (d)D.

(a) – (iv), (b) – (v), (c) – (ii), (d) – (iii), (e) – (i)

Why this answer is correct

Concept:

CMM (capability maturity model) is a set of structured levels that describes how well the behaviour, processes of an organization are and can produce reliable software. There are predefined process areas in maturity model.

Explanation:

Five levels are there in maturity model, these are initial, repeatable, managed, defined, and optimized.

Initial

It is starting of a new process.  There may not exist a plan . These does not provide a stable environment. Organizations have difficulty in making commitments that staff can meet with an orderly engineering process and can result in a crisis. Capability is a characteristic of individuals not the organization.

Repeatable

At this level, policies for managing a software project and procedures to implement the policies are established. Process capability is enhanced by establishing disciplines for a project. Processes may differ between projects. There is a plan and people to stick to it. Tracking of software project is stable in this level.

Defined

At this level, standard process for developing and maintaining software across the organization is documented. There is a group that is responsible for organization’s software process activities. Software process capability is standard and consistent in this level.

Managed

At this level, organization sets quantitative goals for both software product and processes. Projects achieve control over their products. Capability of software process at this level is quantifiable and predictable. Plan uses processes that can be measured quantitatively.

Optimized

Entire organization is focused on continuous process improvement. In this, team analyse defects to determine the causes. Software processes are evaluated to prevent known defects. Processes are improved quantitatively and continuously.

Question 49

Reasons to re-engineer a software include:

P : Allow legacy software to quickly adapt to the changing requirements

Q : Upgrade to newer technologies/platforms/paradigm (for example, object-oriented)

R : Improve software maintainability

S : Allow change in the functionality and architecture of the software code

  1. AOption (a)

    P, R and S only

  2. BOption (b)

    P and R only

  3. COption (c)

    P, Q, R and S

  4. DOption (d)

    P, Q and R only

View answer & explanation

Correct answer

Answer: (c)C.

P, Q, R and S

Why this answer is correct

Concept:

Software reengineering is defines as the examination and alteration of a subject system to reconstitute it to a new form and the subsequent implementation of new form. It consists of reverse engineering and then forward engineering.

Explanation:

Reengineering a system involves not only the process or procedure side but also the data side of an application. It includes CASE (computer aided software engineering) to perform system reengineering.

Reengineering a software retains the software’s value to an organization. It also reduce maintenance costs of software. There are certain reasons to reengineer a software :

  1. It allows legacy software to quickly adapt to the changing requirements.

  2. Upgrade to newer technologies/platforms/paradigm (for example, object-oriented).

  3. It allows change in the functionality and architecture of the software

  4. Extends the capabilities of software to meet business needs.

Activities that are involved in software reengineering are:

  • Inventory analysis
  • Reverse engineering
  • Code restructuring
  • Process reengineering
  • Data reengineering
  • Forward engineering

Question 50

Which of the following statements is/are True ?

P: Refactoring is the process of changing a software system in such a way that it does not alter the external behaviour of the code yet improves the internal architecture.

Q: An example of refactoring is adding new features to satisfy a customer requirement discovered after a project is shipped.

Code:

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

P only

Why this answer is correct

Refactoring:

Refactoring is the process of changing a software system in such a way that it does not alter the external behaviour of the code yet improves the internal structure. It is a disciplined way to clean up code that minimizes the chances of introducing bugs. It improves the design of the code. It can balance the work changes. 

Some points about refactoring:

  • Before start of refactoring, there must have a solid suite of tests. Test must be self- checking.
  • Refactoring changes the program in small steps.
  • It needs decompose and redistributing of statement method.
  • It can remove duplications in the program
<br>

Refactoring methods are extract method, move methods, rename, replace temp with query, self-encapsulate field, replace type code with state. Refactoring improves the under-standability and maintenance of software.

Question 51

Consider the array A = <4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of max-heap are_______ and _____ respectively. (Root is at level 0).

  1. AOption (a)

    3, 14 

  2. BOption (b)

    3, 10

  3. COption (c)

    4, 14

  4. DOption (d)

    4, 10

View answer & explanation

Correct answer

Answer: (b)B.

3, 10

Why this answer is correct

Concept:

Max- heap: In max - heap, root node is always is greater than or equal to the other nodes of the tree.

Explanation:

A = <4, 1, 3, 2, 16, 9, 10, 14, 8, 7>.

STEP 1

Now, As 2 is greater than 1, there is need of rearrangement of nodes.

STEP 2:

Again exchange 16 with 2. Insert remaining nodes as per the property of max- heap.

STEP 3:

STEP 4:

STEP 5:

After inserting all the nodes in this way, final max - heap is:

As, root is at level 0, So, there are total 3 levels in this max - heap. Also, right child of root node is 10.

Question 52

A text is made up of the characters A, B, C, D, E each occurring with the probability 0.08, 0.40, 0.25, 0.15 and 0.12 respectively. The optimal coding technique will have the average length of:

  1. AOption (a)

    2.4

  2. BOption (b)

    1.87

  3. COption (c)

    3.0

  4. DOption (d)

    2.15

View answer & explanation

Correct answer

Answer: (d)D.

2.15

Why this answer is correct

Concept:

Optimal coding technique merge the probabilities one by one starting from the lower one.

Explanation:

Characters are: A, B, C, D and E with probabilities 0.08, 0.40, 0.25, 0.15, 0.12 respectively.

Step 1: Merge 0.08 (A) and 0.12, (E)

Step 2: Merge 0.20 with 0.15(D)

Step 3: Merge 0.35 and 0.25 (C)

Step 4: Merge 0.60 with 0.40 (B), then assign 0 to all left edges and 1 to all right edges.

Code for A (0.08) = 1110 (length 4)

Code for B (0.40) = 0 (length 1)

Code for C (0.25) = 10(length 2)

Code for D (0.15) = 110 (length 3)

Code for E (0.12) = 1111 (length 4)

Average code length = [(0.08 × 4) + (0.40 × 1) + (0.25 × 2) + (0.15 × 3) + (0.12 × 4)] / 1 = 0.32 + 0.40 + 0.50 + 0.45 + 0. 48 = 2.15

Question 53

A binary search tree in which every non-leaf node has non-empty left and right subtrees is called a strictly binary tree. Such a tree with 19 leaves:

  1. AOption (a)

    cannot have more than 37 nodes

  2. BOption (b)

    has exactly 37 nodes

  3. COption (c)

    has exactly 35 nodes

  4. DOption (d)

    cannot have more than 35 nodes

View answer & explanation

Correct answer

Answer: (b)B.

has exactly 37 nodes

Why this answer is correct

Formula:

L = I (n - 1) + 1

where, L = number of leaf nodes

I = number of internal nodes

n = n - ary tree

Explanation:

L = 19

n = 2 (as given tree is strictly binary tree)

19 = I (2 - 1) + 1

I = 18

Number of internal nodes = 18

Number of leaf nodes = 19

Total number of nodes = 18 + 19 = 37

Tips and Trick:

Number of internal node in a binary tree = number leaves - 1 = 19 - 1

Total nodes = number of leaf nodes + internal node = 19 + 18 = 37

Important Point:

Root node is also a internal node.

Question 54

A 5-ary tree is tree in which every internal node has exactly 5 children. The number of leaf nodes in such a tree with 8 internal nodes will be:

  1. AOption (a)

    30

  2. BOption (b)

    33

  3. COption (c)

    45

  4. DOption (d)

    125

View answer & explanation

Correct answer

Answer: (b)B.

33

Why this answer is correct

Formula:

L = I (n - 1) + 1

L =number of leaf nodes

I = number of internal nodes

n = n - ary tree

Calculation:

I = 8

n = 5

L = 8(5 - 1) + 1

L = 32 + 1 = 33

Number of leaf nodes = 33

Number of internal nodes = 8

Total number of nodes = 33 + 8 = 41

Question 55

Consider a Boolean function of ‘n’ variables. The order of an algorithm that determines whether the Boolean function produces a output 1 is:

  1. AOption (a)

    Logarithmic 

  2. BOption (b)

    Linear

  3. COption (c)

    Quadratic 

  4. DOption (d)

    Exponential

View answer & explanation

Correct answer

Answer: (d)D.

Exponential

Why this answer is correct

Concept:

Boolean function: In Boolean function, each argument is represented in form of only 0 or 1.

Explanation:

Given, n Boolean variables.

If there are n Boolean variables, then number of Boolean functions possible are 2n.

Suppose we have 4 Boolean variables, so number of Boolean functions are = 24 = 16

Here, we have to find the order of algorithm which determines whether Boolean function produces an output 1.

For this, we need to check each Boolean function one by one in worst case.

As, there are 2n Boolean functions, we have to check all of these in worst case.

As, it is in exponential form. So, order of the algorithm is also in exponential form.

Diagram representation of Boolean function with n Boolean variables:

 

As, each Boolean variable is mapped with either 0 or 1, that’s why Boolean function are 2n.

Question 56

Two finite state machines are said to be equivalent if they:

  1. AOption (a)

    Have the same number of edges

  2. BOption (b)

    Have the same number of states

  3. COption (c)

    Recognize the same set of tokens

  4. DOption (d)

    Have the same number of states and edges

View answer & explanation

Correct answer

Answer: (c)C.

Recognize the same set of tokens

Why this answer is correct

Concept:

Finite state automata is a machine that can be used to solve computer programs and other sequential logics and have finite number of states at a given time. There are 6 tuples in a finite state machine.

Explanation:

Two finite state machines are said to be equivalent if they recognize the same set of tokens.

Consider two automata M1 and M2, these are called equivalent for an input sequence if they produce the same output result.

Example:

Regular expression: baa*b

NFA: M1

Number of states in NFA: 4

DFA: M2

Number of states in DFA: 5

Above two finite automata are having different number of states and edges, but they are equivalent.

They are said to be equivalent only when they accept same regular language (same set of tokens) whether they have different number of states or edges.

Question 57

Database systems that store each relation in a separate operating system file may use the operating system’s authorization scheme, instead of defining a special scheme themselves.

In this case, which of the following is false?

  1. AOption (a)

    The administrator enjoys more control on the grant option.

  2. BOption (b)

    It is difficult to differentiate among the update, delete and insert authorizations.

  3. COption (c)

    Cannot store more than one relation in a file.

  4. DOption (d)

    Operations on the database are speeded up as the authorization procedure is carried out at the operating system level.

View answer & explanation

Correct answer

Answer: (d)D.

Operations on the database are speeded up as the authorization procedure is carried out at the operating system level.

Why this answer is correct

The correct answer is Operations on the database are speeded up as the authorization procedure is carried out at the operating system level.

Concept:

Operating system authentication is a method for identifying a connection with credentials supplied by the operating system of the connecting computer.

Explanation:

OS authenticated logins are the default logins for SQL databases. This is the only type of login allowed when SQL server is created. Database server uses a digital certificate along with user-name and password to authenticate a user. For this reason, using operating system authorization can be more secure than using database accounts.

Database systems that store each relation in a separate operating system file may use the

operating system’s authorization scheme, instead of defining a special scheme themselves. Authentication may be performed by the database itself in some cases or setup may be changed to allow either the operating system. Some points while using operating system authentication:

  • When database system stores each relation in separate operating system file, then it becomes difficult to update, delete and insert authorizations.
  • Control on grant options becomes difficult
  • It can-not store more than one relation in a file
  • Operations on database performed more fast using authorization process.

Question 58

Let R1(a, b, c) and R2(x, y, z) be two relations in which a is the foreign key of R1 that refers to the primary key of R2. Consider following four options.

(a) Insert into R1

(b) Insert into R2

(c) Delete from R1

(d) Delete from R2

Which of the following is correct about the referential integrity constraint with respect to above?

  1. AOption (a)

    Operations (a) and (b) will cause violation.

  2. BOption (b)

    Operations (b) and (c) will cause violation

  3. COption (c)

    Operations (c) and (d) will cause violation.

  4. DOption (d)

    Operations (d) and (a) will cause violation.

View answer & explanation

Correct answer

Answer: (d)D.

Operations (d) and (a) will cause violation.

Why this answer is correct

Concept:

A foreign key in a table refers to the primary key of another table. It contains subset of entries of primary key of other table. It specifies the referential integrity constraint.

Explanation:

a is the foreign key of R1 that refers to the primary key of R2

(a) Insert into R1

It will cause violation. As a is the foreign key referring to the primary key of R2. If we insert values in R1, then that value must also be present in the primary key of R2 and which is not necessary as while inserting in R1 we are not aware of R2.

(b) Insert into R2

It will not cause violation. Because inserting element in R2 will not effect R1. Values present in R2’s primary key may or may not present in foreign key of R1.

(c) Delete from R1

It has no effect on the relation. It will not cause violation. Values that are deleted from R1 need not be deleted from R2. As R1 contains the foreign key.

(d) Delete from R2

It will cause violation. If we delete tuples from R2 relation, then if that tuple is present in R1­ which is referring to the primary key of R2 must also be deleted.

Question 59

Consider a hash table of size seven, with starting index zero, and a hash function (7x + 3) mod 4. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing? Here “ ” denotes an empty location in the table.

  1. AOption (a)

    3, 10, 1, 8, , ,

  2. BOption (b)

    1, 3, 8, 10, , ,

  3. COption (c)

    1, , 3, , 8, , 10

  4. DOption (d)

    3, 10, , , 8, ,

View answer & explanation

Correct answer

Answer: (a)A.

3, 10, 1, 8, , ,

Why this answer is correct

Concept:

Hashing is used to uniformly distribute key values into the table using a hash function. In linear probing, when allocating location to the key values, if there occurs a collision, then we linearly probe for the next vacant location and allocate that to the key.

Explanation:

Given hash function:

h(x) = (7x + 3) mod 4

Hash table size is seven starts from zero.

0              1             2               3             4             5              6

 

Step 1: Insert 3

h(3) = (21 + 3) mod 4 = 24 mod 4 = 0

location of 3 is at index 0

0              1             2               3             4             5              6

3

 

Step 2: insert 1

h(1) = 10 mod 4 = 2

it will go to index 2

0              1             2               3             4             5              6

31

 

Step 3 : Insert 8

h(8) = 59 mod 4 = 3

it will go to index 3

0              1             2               3             4             5              6

318

 

Step 4 : Insert 10

h(10) = 73 mod 4 = 1

It will go to index 1.

0              1             2               3             4             5              6

31018

Question 60

In Artificial Intelligence (AI), an environment is uncertain if it is.

  1. AOption (a)

    Not fully observable and not deterministic

  2. BOption (b)

    Not fully observable or not deterministic

  3. COption (c)

    Fully observable but not deterministic

  4. DOption (d)

    Not fully observable but deterministic

View answer & explanation

Correct answer

Answer: (b)B.

Not fully observable or not deterministic

Why this answer is correct

In artificial intelligence, environment is that surrounds an agent. Environment is where agent lives, do its work or we can say that surrounding in which agent is present.

Environment is clearly distinguishable from the agent, it is not the part of the agent. An environment can have various attributes from the point of view of the agent. These are :

  1. Observable and partially observable: An agent is considered to be an agent only if it has the ability to observe its environment. In some cases, environment may be partially observable. Uncertain environment is not fully observable.

  2. Deterministic and stochastic: A deterministic environment is one where any future state of the environment can be completely determines from preceding state and actions of agent. It is stochastic if there is some element of uncertainty.

  3. Episodic and sequential: If each of agent’s tasks do not rely on past performance than episodic otherwise it is sequential.

  4. Discrete and continuous: A discrete environment has finite number of possible states whereas number of states in continuous environment is infinite.

Question 61

In Artificial Intelligence (AI), a simple reflex agent selects actions on the basis of.

  1. AOption (a)

    current percept, completely ignoring rest of the percept history.

  2. BOption (b)

    rest of the percept history, completely ignoring current percept.

  3. COption (c)

    both current percept and complete percept history.

  4. DOption (d)

    both current percept and just previous percept.

View answer & explanation

Correct answer

Answer: (a)A.

current percept, completely ignoring rest of the percept history.

Why this answer is correct

Concept:

Agent represent the most important new paradigm for software development. An autonomous agent is a system situated within and a part of an environment that senses the environment and acts on it.

Explanation:

An agent is situated in environment and makes its own decisions. it perceives the environment through sensors and acts on the environment through actuators.

Simple reflex agents selects actions based on the agents current perception or the world and not based on past perceptions. They work when environment if fully observable. It is based on condition action rule which means it maps a state with an action.

Diagram:

Question 62

In heuristic search algorithms in Artificial Intelligence (AI), if a collection of admissible heuristics h1.......hm is available for a problem and none of them dominates any of the others, which should we choose ?

  1. AOption (a)

    h(n)=max{h1(n),....,hm(n)}

  2. BOption (b)

    h(n)=min{h1(n),....,hm(n)}

  3. COption (c)

    h(n)=avg{h1(n),....,hm(n)}

  4. DOption (d)

    h(n)=sum{h1(n),....,hm(n)}

View answer & explanation

Correct answer

Answer: (a)A.

h(n)=max{h1(n),....,hm(n)}

Why this answer is correct

Concept:

Heuristic search refers to a search strategy that attempts to optimize a problem by iteratively improving the solution based on a given heuristic function or cost measure. Several commonly used heuristic search methods include hill climbing, best first search, A* algorithm, simulated annealing.

Explanation:

Real valued hash function are used as a means for constraining search in combinatorial large problem spaces. A strategy is considered to be a function which for a given state in some problem domain returns sequences of states over the problem domain.

A heuristic function h(n) finds the cost of cheapest path from a node to the goal node.

  • The function h(n) is an underestimate if h(n) is less than or equal to the actual cost of a lowest cost path from a node to the goal node
  • The heuristic value of a path is the heuristic value of the node at the end of the path.
  • Two ways are there to use the heuristic function: one is for heuristic depth first search and another for best first search
  • If heuristic function h(n) = max{h1(n),....,hm(n)}, then a collection of admissible heuristics h1.......hm is available for a problem and none of them dominates any of the others.
  • Composite heuristic function dominates all of its component functions and is consistent if none of the components overestimates.

Question 63

Consider following sentences regarding A*, an informed search strategy in Artificial

Intelligence (AI).

(a) A* expands all nodes with f(n) < C*.

(b) A* expands no nodes with f(n) /C*.

(c) Pruning is integral to A*.

Here, C* is the cost of the optimal solution path.

Which of the following is correct with respect to the above statements ?

  1. AOption (a)

    Both statement (a) and statement (b) are true.

  2. BOption (b)

    Both statement (a) and statement (c) are true.

  3. COption (c)

    Both statement (b) and statement (c) are true.

  4. DOption (d)

    All the statements (a), (b) and (c) are true.

View answer & explanation

Correct answer

Answer: (a)A.

Both statement (a) and statement (b) are true.

Why this answer is correct

A* search algorithm finds the shortest path from a node to the goal node. It combines the value of heuristic function h(n) and cost to reach the goal node.

Evaluation is done as : f(n) = g(n) + h(n)

It first goes to the node having the minimum f(n) value. It can be seen as optimal search algorithm.

Some properties of A* search algorithm are mentioned here:

  1. A* generates an optimal solution if h(n) is admissible heuristic and search space is a tree. A function is admissible if it never overestimates the cost to reach the goal node.

  2. A* generates an optimal solution if h(n) is a consistent heuristic and search space is a graph. H(n) is consistent if for every node n and for every successor node n’ :

h(n) <= c(n, n’) + h(n’)

  1. A* expands no nodes with f(n) /C*. Pruning is selectively removing the branches of a tree that are unwanted.

Question 64

Consider the following statements :

(a) False ? True

(b) If α ? (β ∧ γ) then α ? β and α ? γ.

Which of the following is correct with respect to the above statements?

  1. AOption (a)

    Both statement (a) and statement (b) are false.

  2. BOption (b)

    Statement (a) is true but statement (b) is false.

  3. COption (c)

    Statement (a) is false but statement (b) is true.

  4. DOption (d)

    Both statement (a) and statement (b) are true.

View answer & explanation

Correct answer

Answer: (d)D.

Both statement (a) and statement (b) are true.

Why this answer is correct

(a) False ? True

It can be rewritten as : False V True

Truth table for OR:

ABA V B
TrueTrueTrue
TrueFalseTrue
FalseTrueTrue
FalseFalseFalse

 

So, false ? true results in true.

(b) If α ? (β ∧ γ) then α ? β and α ? γ.

It can be rewritten as : α V (β ∧ γ) , (α V β ) ∧ (α V γ)

Truth table for this:

αβγα V βα V γβ ∧ γα V (β ∧ γ)(α V β ) ∧ (α V γ)
TrueTrueTrueTrueTrueTrueTrueTrue
TrueTrueFalseTrueTrueFalseTrueTrue
TrueFalseTrueTrueTrueFalseTrueTrue
TrueFalseFalseTrueTrueFalseTrueTrue
FalseTrueTrueTrueTrueTrueTrueTrue
FalseTrueFalseTrueFalseFalseFalseFalse
FalseFalseTrueFalseTrueFalseFalseFalse
FalseFalseFalsefalsefalsefalsefalsefalse

 

Here if α V (β ∧ γ) is true then (α V β ) ∧ (α V γ) is true.

And if α V (β ∧ γ) is false then (α V β ) ∧ (α V γ) is false.

So, given statement is true.

Question 65

A many-to-one relationship exists between entity sets r1 and r2. How will it be represented using functional dependencies if Pk(r) denotes the primary key attribute of relation r?

  1. AOption (a)

    Pk(r1) → Pk(r2)

  2. BOption (b)

    Pk(r2) → Pk(r1)

  3. COption (c)

    Pk(r2) → Pk(r1) and Pk(r1) → Pk(r2)

  4. DOption (d)

    Pk(r2) → Pk(r1) or Pk(r1) → Pk(r2)

View answer & explanation

Correct answer

Answer: (a)A.

Pk(r1) → Pk(r2)

Why this answer is correct

Concept:

Many to one relationship:  When more than one instance of an entity is associated with a single instance of another entity is called many to one relationship.

Explanation:

There exists many to one relationship between two entities r1 and r­2.

PK(r1)- primary key of relation r1

PK(r2) – primary key of relation r2

Consider attributes of relation r1 are (employee id, employee name)

Consider attributes of relation r2 are (address, department)

From here, employee id can clearly tell us about the employee, it can uniquely identify a person.  But the department cannot uniquely identify the employee.

So, option 1:  Pk(r1) → Pk(r2)

i.e. primary key of r1 can identify each attribute of r2 because it is given that one element of r2 is referring to more than one element of r1.

Question 66

For a database relation R(a, b, c, d) where the domains of a, b, c, and d include only atomic values, and only the following functional dependencies and those that can be inferred from them hold:

a → c

b → d

The relation is in.

  1. AOption (a)

    First normal form but not in second normal form

  2. BOption (b)

    Second normal form but not in third normal form

  3. COption (c)

    Third normal form

  4. DOption (d)

    BCNF

View answer & explanation

Correct answer

Answer: (a)A.

First normal form but not in second normal form

Why this answer is correct

Concept:

2NF: There should not be any partial dependency in the relation.

3NF: There should not be any transitive dependency and right side of functional dependency is a prime attribute

BCNF: Left side of functional dependency is a key

If a functional dependency is in BCNF, then it will also be in lower normal forms (1 NF, 2NF, 3 NF). Also, if any one functional dependency is in the weaker normal form, then relation will be in weaker normal form

Explanation:

Functional dependencies are:

a → c

b → d

Candidate key for the relation R is  {ab}

Because (ab)+ = {a, b, c, d}

  1. a → c

This is not in BCNF, because left side is not the candidate key. Also, not in 3NF because right side is not the prime attribute. It is in not in 2NF, because there exists partial dependency in this functional dependency, as a non-prime attribute is dependent on prime attribute. It is in 1NF.

  1. b → d

Similar case as that of 1st functional dependency. It is in 1NF

So, given relation R (a, b, c, d) is in 1NF.

Question 67

Which UNIX/Linux command is used to make all files and sub-directories in the directory “progs” executable by all users?

  1. AOption (a)

    chmod− R a + x progs

  2. BOption (b)

    chmod −R 222 progs

  3. COption (c)

    chmod−X a + x progs

  4. DOption (d)

    chmod −X 222 progs

View answer & explanation

Correct answer

Answer: (a)A.

chmod− R a + x progs

Why this answer is correct

Command used to make all files and sub- directories in the directory “progs” executable by all users

is: chmod – R a + x progs

chmod – in unix, it is the command and system call which is used to change the access permissions of file system objects such as files and directories.

-R: it is for recursive directory traversal option. Read all the files under each directory recursively.

+x – it is symbolic representation of executable mode that chmod command used to set the executable permission of a file. In this “+” sets the permission and “-” reset the permissions.

File permission are represented in rwx form in UNIX. There are three sections in which permission are assigned which are user, group and others. User is the owner of the file. A user group can contain multiple users.  Three permissions are read, write and execute.

Permission typeSymbol
No permission- - -
Execute- - x
Write- w –
Execute + write- w x
Readr - -
Read + executer – x
Read + writer w -
Read + write + executerwx

Question 68

Which of the following statements are true?

(a) External Fragmentation exists when there is enough total memory space to satisfy a

request but the available space is contiguous.

(b) Memory Fragmentation can be internal as well as external.

(c) One solution to external Fragmentation is compaction.

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

(b) and (c) only

Why this answer is correct

(a) External Fragmentation exists when there is enough total memory space to satisfy a

request but the available space is contiguous.

This statement is incorrect. As process are loaded and removed from memory, the free memory space is  broken into little pieces. External fragmentation exists when enough total memory space exists to satisfy a request but it is not contiguous; storage is fragmented into large number of small holes.  External fragmentation is also known as checker boarding. Suppose we have memory blocks available of size 400KB each. But if request come for 600Kb then it cannot be allocated.

(b) Memory Fragmentation can be internal as well as external.

This statement is correct. There is an important issue related to the contiguous multiple partition allocation scheme is to deal with memory fragmentation. There are two types of fragmentation: internal and external fragmentation. Internal fragmentation exists in the case of memory having multiple fixed partitions when the memory is allocated to a process is not fully used by the process.

c) One solution to external Fragmentation is compaction.

Given statement is correct. To get rid of external fragmentation problem, it is desirable to relocated some or all portions of the memory in order to place all the free holes together at one end of memory to make one large hole. This technique of reforming the storage is known as compaction.

Question 69

Page information in memory is also called as Page Table. The essential contents in each entry of a page table is/are.

  1. AOption (a)

    Page Access information

  2. BOption (b)

    Virtual Page number

  3. COption (c)

    Page Frame number

  4. DOption (d)

    Both virtual page number and Page Frame Number

View answer & explanation

Correct answer

Answer: (c)C.

Page Frame number

Why this answer is correct

The essential content in each entry of a page table is the page frame number.

Explanation:

In paging, physical memory is divided into fixed-size blocks called page frames and logical memory is divided into fixed-size blocks called pages which are of the same size as that of frames. When a process is to be executed, its pages can be loaded into any unallocated frames from the disk.

In paging, mapping of logical addresses to physical addresses is performed at the page level.

  • When CPU generates a logical address, it is divided into two parts: page number and offset
  • Page size is always in the power of 2.
  • Address translation is performed using the page table (mapping table).
  • It stores the frame number allocated to each page and the page number is used as an index to the page table.

 

When the CPU generates a logical address, that address is sent to the MMU (memory management unit). MMU uses the page number to find the corresponding page frame number in the page table. Page frame number if attached to high order end of page offset to form physical address that is sent to the memory.

The mechanism is shown here:

Question 70

Consider a virtual page reference string 1, 2, 3, 2, 4, 2, 5, 2, 3, 4. Suppose LRU page replacement algorithm is implemented with 3 page frames in main memory. Then the number of page faults are ______

  1. AOption (a)

    5

  2. BOption (b)

    7

  3. COption (c)

    9

  4. DOption (d)

    10

View answer & explanation

Correct answer

Answer: (b)B.

7

Why this answer is correct

Concept:

LRU (Least recently used) page replacement algorithm is based on the assumption that the page that has been used in the last few instructions will be referenced in the next few instructions. It replaces the page that has not been referenced for the longest time.

Explanation:

Reference string: 1, 2, 3, 2, 4, 2, 5, 2, 3, 4

Number of frames = 3

12222
23453
34534
Page fault31111

 

Here, total page faults = 3 + 1 + 1 + 1 + 1 = 7

Question 71

In which of the following scheduling criteria, context switching will never take place?

  1. AOption (a)

    ROUND ROBIN

  2. BOption (b)

    Preemptive SJF

  3. COption (c)

    Non-preemptive SJF

  4. DOption (d)

    Preemptive priority

View answer & explanation

Correct answer

Answer: (c)C.

Non-preemptive SJF

Why this answer is correct

Concept:

Transferring the control of CPU from one process to another demands saving the context of currently running process and loading the context of another ready process. This mechanism of saving and restoring the context is known as context switching.

Explanation:

Round robin scheduling:

It is pre-emptive scheduling algorithm which considers all the processes as equally important and treats them in favourable manner. Each process in ready queue gets a fixed amount of CPU time known as time quantum. If the process does not execute completely till end of time quantum, it is pre-empted and CPU is allocated to the next process in the ready queue. Context switching is needed in round robin scheduling.

Preemptive SJF:

It is also known as shortest remaining time first scheduling. Scheduler always chooses the process for execution that has the shortest remaining processing time. While a process is being executed, CPU can be taken back from it and can be assigned to some newly arrived process is burst of new process is shorter than its remaining burst time.

Non – preemptive SJF:

It is also known as shortest process next. In this, at any point of time among all the ready processes, the one having the shortest CPU burst time is scheduled first. There is no context switching in this algorithm.

Preemptive priority:

If the newly arrived process has the higher priority than the currently running process, the pre emptive priority scheduling algorithm pre-empts the currently running process and allocated CPU to the new process. It involves context switching.

Question 72

In a Hierarchical database, a hashing function is used to locate the _______

  1. AOption (a)

    Collision

  2. BOption (b)

    Root

  3. COption (c)

    Foreign Key

  4. DOption (d)

    Records

View answer & explanation

Correct answer

Answer: (b)B.

Root

Why this answer is correct

Concept:

A data model is a collection of concepts that can be used to describe the structure of a database and provides the necessary means to achieve the abstraction.  Types of data model are : hierarchical data model, network data model and relational model.

Explanation:

Hierarchical data model: In this data model, data is organized in the form of tree in which nodes represent the records and branches of tree represent the fields. Parent node or root of three have connection with its child nodes.

During search operation in this data model, search takes place from root and then moves to the children to reach the specific record. That means, searching always starts from root. If we use hashing function for the search operation than hashing function will locate the root of the model.

Diagram for hierarchical database model:

Question 73

Relations produced from E - R Model will always be in ______

  1. AOption (a)

    1 NF

  2. BOption (b)

    2 NF

  3. COption (c)

    3 NF

  4. DOption (d)

    4 NF

View answer & explanation

Correct answer

Answer: (a)A.

1 NF

Why this answer is correct

Concept:

ER model describes data as entities, relationships, and attributes. It is a high-level conceptual data model. This model is used to define the data elements and relationships for a specified system.

Entity:

The entity is a thing in the real world with an independent existence. An entity may be an object with physical existence. For example particular person, car or it may be an object with a conceptual existence For example company, job, etc.

Attributes:

Each entity has attributes – the particular properties that describe it.

Relationship:

It is used to describe the relation between two entities.

Explanation:

E-R Diagram is design level task and Relational model is implementation.

The relational model is implemented from E-R Diagram and in this, it gets rid of the multivalued attributes.

Relations produced from the E - R Model will always be in 1NF, that is, Simple atomic values with non-multivalued attributes.

NOTES:

The relation is also referred to as a table.

Question 74

In RDBMS, which type of Join returns all rows that satisfy the join condition?

  1. AOption (a)

    Inner Join

  2. BOption (b)

    Outer Join

  3. COption (c)

    Semi Join

  4. DOption (d)

    Anti Join

View answer & explanation

Correct answer

Answer: (a)A.

Inner Join

Why this answer is correct

Concept:

Join operation is used to combine related tuples from two relations into single tuples. Join operation can be stated in terms of Cartesian product followed by SELECT operation.

Join condition form: <condition>AND<condition>AND……AND<CONDITION>

Explanation:

There are various variations of join operations such as equi-join, natural join, theta join, inner join, outer join.

  • Natural join is performed by equating all attributes pairs that have the same name in the two relations.
  • Join operation with equality condition is known as equi-join.
  • Join operation which is used to combine data from multiple relations so that related information can be presented in a single table is known as inner join. Inner join is a type of match and merge operations defined as combination of Cartesian product and selection.
  • Outer join can be used when we want to keep all the tuples in the result of join regardless of whether or not they have matching tuples in other relation.

Question 75

Consider a relation book (title, price) which contains the titles and prices of different books.

Assuming that no two books have the same price, what does the following SQL query list ?

Select title

from book as B

where (select count (*)

from book as T

where T.price > B.price) < 7

  1. AOption (a)

    Titles of the six most expensive books

  2. BOption (b)

    Title of the sixth most expensive books

  3. COption (c)

    Titles of the seven most expensive books

  4. DOption (d)

    Title of the seventh most expensive books

View answer & explanation

Correct answer

Answer: (c)C.

Titles of the seven most expensive books

Why this answer is correct

no two books have the same price

Assume table BOOK B :

TitlePrice
A10
B20
C30
D40
E50
F60
G70
H80

 

Book T:

TitlePrice
A10
B20
C30
D40
E50
F60
G70
H80

               

One record is compared with all the records of another table. I.e. if we consider A (10) in Book T, then it is compared against all the records of book B. it is not greater than any record.

Now compare B(20) of book T with all records of book B. So, it is greater than 1 record.

Compare C(30) of book T with all records of book B. So, it is greater than 2 record.

Compare D(40) of book T with all records of book B. So, it is greater than 3 record.

Compare E(50) of book T with all records of book B. So, it is greater than 4 record.

Compare F(60) of book T with all records of book B. So, it is greater than 5 record.

Compare G(70) of book T with all records of book B. So, it is greater than 6 record.

Compare H(80) of book T with all records of book B. So, it is greater than 7 record.

Title
B
C
D
E
F
G
H

 

So, it will result in title of seven most expensive books.

Question 76

Consider the following schedules involving two transactions.

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

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

Which one of the following statements is correct with respect to above?

  1. AOption (a)

    Both S1 and S2 are conflict serializable

  2. BOption (b)

    Both S1 and S2 are not conflict serializable

  3. COption (c)

    S1 is conflict serializable and S2 is not conflict serializable

  4. DOption (d)

    S1 is not conflict serializable and S2 is conflict serializable

View answer & explanation

Correct answer

Answer: (d)D.

S1 is not conflict serializable and S2 is conflict serializable

Why this answer is correct

Concept:

Draw the precedence graph for the above two schedules: 

  1. If precedence graph contains cycle, then that schedule will not be conflict serializable

  2. If graph does not contain any cycle, then schedule will be conflict serializable.

Explanation:

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

There are two transaction involved.

T1T2
r1(x)
r1(y)
r2(x)
r2(y)
w2(y)
w1(x)

 

Precedence graph:

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

T1T2
r1(x)
r2(x)
r2(y)
w2(y)
r1(y)
w1(x)

 

Precedence graph :

From here, it is clear that S1 is not conflict serializable and S2 is conflict serializable.

Question 77

Consider the following English sentence:

“Agra and Gwalior are both in India”.

A student has written a logical sentence for the above English sentence in First-Order Logic

using predicate In(x, y), which means x is in y, as follows :

In(Agra, India) ∨  In(Gwalior, India)

Which one of the following is correct with respect to the above logical sentence?

  1. AOption (a)

    It is syntactically valid but does not express the meaning of the English sentence.

  2. BOption (b)

    It is syntactically valid and expresses the meaning of the English sentence also.

  3. COption (c)

    It is syntactically invalid but expresses the meaning of the English sentence.

  4. DOption (d)

    It is syntactically invalid and does not express the meaning of the English sentence.

View answer & explanation

Correct answer

Answer: (a)A.

It is syntactically valid but does not express the meaning of the English sentence.

Why this answer is correct

Given statement is “Agra and Gwalior are both in India”.

Predicate In(x, y) means x is in y.

So,

  1. In(Agra, India) – It represents Agra is in India.

  2. In(Gwalior, India) – It represents Gwalior is in India.

Given predicate logic means

In(Agra, India) ∨  In(Gwalior, India) : It represents Agra is in India or Gwalior is in India.

It is not representing that both Agra and Gwalior are in India.

So, we can say that It is syntactically valid but does not express the meaning of the English sentence.

Question 78

Consider the following two sentences:

(a) The planning graph data structure can be used to give a better heuristic for a planning

problem.

(b) Dropping negative effects from every action schema in a planning problem results in a

relaxed problem.

Which of the following is correct with respect to the above sentences?

  1. AOption (a)

    Both sentence (a) and sentence (b) are false.

  2. BOption (b)

    Both sentence (a) and sentence (b) are true.

  3. COption (c)

    Sentence (a) is true but sentence (b) is false.

  4. DOption (d)

    Sentence (a) is false but sentence (b) is true.

View answer & explanation

Correct answer

Answer: (b)B.

Both sentence (a) and sentence (b) are true.

Why this answer is correct

(a) The planning graph data structure can be used to give a better heuristic for a planning

problem.

This statement is correct.

Reason:

  • The task of coming up with a sequence of actions that will achieve a goal is called planning.
  • A special data structure known as planning graph can be used to give better heuristic estimates. A planning graph consists of a sequence of levels that correspond to time steps in the plan where 0 is the initial state.
  • A planning graph once constructed is a rich source of information about the problem. A literal that does not appear in the final level of the graph cannot be achieved by any plan.
  • We can estimate the cost of achieving the goal literal as the level at which it first appears in the planning graph. Planning graph allow several actions at each level whereas heuristic counts just the level and not the number of actions.
<br>

(b) Dropping negative effects from every action schema in a planning problem results in a

relaxed problem.

This statement is correct.

Reason:

  • In planning, logical based description of the environment is included. Two possible developments in layered graph are: positive effects which generate facts that are positive and negative effects which are used to mark conflicts.
  • Negative effects should be removed such that we only left with positive preconditions. Negative effects put restrictions on the actions due to which time increases. Dropping of negative effects from every action schema increases the number of actions and results in a relaxed problem.

Question 79

A knowledge base contains just one sentence, ∃x AsHighAs (x, Everest). Consider the

following two sentences obtained after applying existential instantiation.

(a) AsHighAs (Everest, Everest)

(b) AsHighAs (Kilimanjaro, Everest)

Which of the following is correct with respect to the above sentences?

  1. AOption (a)

    Both sentence (a) and sentence (b) are sound conclusions.

  2. BOption (b)

    Both sentence (a) and sentence (b) are unsound conclusions.

  3. COption (c)

    Sentence (a) is sound but sentence (b) is unsound.

  4. DOption (d)

    Sentence (a) is unsound but sentence (b) is sound.

View answer & explanation

Correct answer

Answer: (d)D.

Sentence (a) is unsound but sentence (b) is sound.

Why this answer is correct

Concept:

Predicate logic deals with predicates which are propositions, consists of variables. Two quantifies in predicate logic are there exist (∃) and for all (∀).

Explanation:

Given statement is:

∃x AsHighAs (x, Everest).

It is comparing one element with other element. It means, there exists a element x which is as high as Everest. So, for comparison we have x and Everest should be different.

(a) AsHighAs (Everest, Everest)

After applying existential quantifies, this statement becomes.

∃Everest AsHighAs (Everest, Everest) : it means there exist an Everest which is as high as Everest. There is no meaning of this sentence. As we are comparing same elements. It does not sounds good.

(b) AsHighAs (Kilimanjaro, Everest)

After applying existential quantifies, this statement becomes.

∃Killimanjaro  AsHighAs (Killimanjaro, Everest) : it means there exist a Killimanjaro which is as high as Everest. It is comparing Killimanjaro with Everest which does not have any problem. It sounds good.

Question 80

Consider the set of all possible five-card poker hands dealt fairly from a standard deck of

fifty-two cards. How many atomic events are there in the joint probability distribution?

  1. AOption (a)

    2, 598, 960 

  2. BOption (b)

    3, 468, 960

  3. COption (c)

    3, 958, 590

  4. DOption (d)

    2, 645, 590

View answer & explanation

Correct answer

Answer: (a)A.

2, 598, 960 

Why this answer is correct

Concept:

A joint probability distribution shows a probability distribution for two or more random variables. It looks for a relationship between two variables say x and y. It gives the probability that each x and y falls in a particular range of set of values specified for that variable.

Explanation:

Here, given:

Total cards = 52

We have to deal with 5 cards.

In this question, atomic events possible can be find in the number of ways they can be combined.

Which is represented as C (n, r) = (n!)/ (n-r)! r!

Here n = 52

r = 5

C (52, 5) = (52)! / (5)! (52 - 5)!

C(52, 5) = 52×51×50×49×48×47!5×4×3×2×1×47!\frac{{52 \times 51 \times 50 \times 49 \times 48 \times 47!}}{{5 \times 4 \times 3 \times 2 \times 1 \times 47!}} 

C(52, 5) = 2, 598, 960

Question 81

E is the number of edges in the graph and f is maximum flow in the graph. When the capacities are integers, the runtime of Ford-Fulberson algorithm is bounded by:

  1. AOption (a)

    O (E∗f)

  2. BOption (b)

    O (E2∗f)

  3. COption (c)

    O (E∗f2)

  4. DOption (d)

    O (E2∗f2)

View answer & explanation

Correct answer

Answer: (a)A.

O (E∗f)

Why this answer is correct

Concept:

In graph theory, a flow network is defined as a directed graph involving a source and sink and other nodes ,all connected with edges. Each edge has an individual capacity which is the maximum limit of flow that edge could allow.

Explanation:

Some conditions about flow:

  1. Incoming flow and outgoing flow should be equal.

  2. Flow should be between 0 and capacity of the edge.

  3. Net flow follows skews symmetry i.e. F(u, v) = - F(v, u) where u and v are the vertices.

Ford Fulkerson algorithm:

  1. Initially flow in all edges is 0

  2. while there exists an augmenting path between source and sink, augment flow between source and sink along that path

  3. Update the remaining graph

  4. return

Augmenting path is a simple path from source to sink which do not include any cycle and pass through positive weighted edges. If, no augmenting path, then flow is maximum between source and sink.

In ford Fulkerson algorithm, if E is the number of edges and f is the maximum flow with capacities in integer form, then time complexity for such algorithm is O (E * f).

Question 82

The following LPP

Maximize z = 100x1 + 2x2 + 5x3

Subject to

14x1 + x2 − 6x3 + 3x4 = 7

32x1 + x2 − 12x3 ≤ 10

3x1 − x2 − x3 ≤ 0

x1, x2, x3, x4 ≥ 0

has

  1. AOption (a)

    Solution: x1 = 100, x2 = 0, x3 = 0

  2. BOption (b)

    Unbounded solution

  3. COption (c)

    No solution

  4. DOption (d)

    Solution: x1 = 50, x2 = 70, x3 = 60

View answer & explanation

Correct answer

Answer: (b)B.

Unbounded solution

Why this answer is correct

The unbounded feasible solution can not be determined, instead there are infinite many solutions.

Therefore option 2 is correct.

Question 83

Which of the following statements is false about convex minimization problem?

  1. AOption (a)

    If a local minimum exists, then it is a global minimum

  2. BOption (b)

    The set of all global minima is convex set

  3. COption (c)

    The set of all global minima is concave set

  4. DOption (d)

    For each strictly convex function, if the function has a minimum, then the minimum is unique

View answer & explanation

Correct answer

Answer: (c)C.

The set of all global minima is concave set

Why this answer is correct

A convex optimization problem is one of the form:

Minimize f0(x)

Subject to fi(x)<=bi where i = 1,……..m

Where the functions f0,……….fm : Rn -> R are convex i.e.

Satisfy fi (ax + by) <= afi(x) + bfi(y)

A convex optimization problem is a problem where all of the constraints are convex functions and objective is a convex function if it is minimizing. If function is maximizing, then it is concave function.

Some points about convex problems are:

  • With a convex objective and convex feasible region, there can be only one optimal solution which is globally optimal.
  • Convex problem can be solved efficiently up to large size
  • There are two methods to solve convex problems: interior point or barrier methods.
  • Every local minimum exists in the problem is also a global minimum.
  • Set of all global minima is a convex set.
  • Set of all global maxima is a concave set
  • For each strictly convex function, if the function has a minimum, then the minimum is unique .

Question 84

CMOS is a Computer Chip on the motherboard, which is :

  1. AOption (a)

    RAM 

  2. BOption (b)

    ROM

  3. COption (c)

    EPROM 

  4. DOption (d)

    Auxiliary storage

View answer & explanation

Correct answer

Answer: (a)A.

RAM 

Why this answer is correct

  • CMOS is a type of metal–oxide–semiconductor field-effect transistor.
  • It is alternatively known as non-volatile RAM.
  • CMOS is an onboard, battery powered semiconductor chip inside computers that stores information.
  • This information ranges from the system time and date to system hardware settings for your computer.

Question 85

Perform the following operation for the binary equivalent of the decimal numbers

(−14)10 + (−15)10

The solution in 8 bit representation is:

  1. AOption (a)

    11100011 

  2. BOption (b)

    00011101

  3. COption (c)

    10011101 

  4. DOption (d)

    11110011

View answer & explanation

Correct answer

Answer: (a)A.

11100011 

Why this answer is correct

(−14)10 + (−15)10 = (-29)10

For representing a negative number in binary, 2’s complement technique is used.

  • Converting 29 to binary → 00011101
  • Now taking 1’s complement of 00011101 → 11100010
  • And adding 1 to 11100010 to make 2’s complement → 11100011
  • Hence, Opti on_1 is correct binary representation of (-29)10

Question 86

Match the items in List - I and List - II:

List – IList - II
(a)Interrupts that can be delayed when a much highest priority interrupt has occurred(i)Normal
(b)Unplanned interrupts which occur while executing a program(ii)Synchronous
(c)Source of interrupt is in phase with the system clock(iii)Maskable
(iv)Exception
  1. AOption (a)

    (a) – (ii), (b) – (i), (c) – (iv)

  2. BOption (b)

    (a) – (ii), (b) – (iv), (c) – (iii)

  3. COption (c)

    (a) – (iii), (b) – (i), (c) – (ii)

  4. DOption (d)

    (a) – (iii), (b) – (iv), (c) – (ii)

View answer & explanation

Correct answer

Answer: (d)D.

(a) – (iii), (b) – (iv), (c) – (ii)

Why this answer is correct

  • The hardware interrupts which can be delayed when a much high priority interrupt has occurred at the same time is called a maskable interrupt.
  • Unplanned interrupts while executing a program are called Exception.
  • The Source of interrupt is in phase with the clock is called a synchronous interrupt.

 

Types of Interrupts: 

Hard-ware InterruptsSoft- ware InterruptsAccording to Perio-dicity of Occur-renceAccording to the Temporal Relatio- nship with System Clock
Maskable InterruptNormal InterruptsPeriodic InterruptSynchronous Interrupt
Non-Maskable InterruptExceptionAperiodic InterruptAsyn-chronous Interrupt

Question 87

In 8085 microprocessors, what is the output of following program?

LDA 8000H

MVI B, 30H

ADD B

STA 8001H

  1. AOption (a)

    Read a number from input port and store it in memory

  2. BOption (b)

    Read a number from input device with address 8000H and store it in memory at location 8001H

  3. COption (c)

    Read a number from memory at location 8000H and store it in memory location 8001H

  4. DOption (d)

    Load A with data from input device with address 8000H and display it on the output device with address 8001H

View answer & explanation

Correct answer

Answer: (c)C.

Read a number from memory at location 8000H and store it in memory location 8001H

Why this answer is correct

LDA 8000H – transfers the data from memory location 8000H to Accumulator

MVI B, 30H – moves the value 30H to Register B

ADD B – Adds the value of Register B (30H) to the data in Accumulator which stores data from location 8000H. This instruction basically increments the value as 8000H by 30H.

STA 8001H – stores the content of Accumulator to memory location 8001H

Therefore, the above code reads a number from memory at location 8000H and stores in memory location 8001H after incrementing it by 30H.

Question 88

The equivalence of

¬ ∃ x Q (x) is :

  1. AOption (a)

    ∃ x ¬ Q (x)

  2. BOption (b)

    ∀ x ¬ Q (x)

  3. COption (c)

    ¬ ∃ x ¬ Q (x) 

  4. DOption (d)

    ∀ x Q (x)

View answer & explanation

Correct answer

Answer: (b)B.

∀ x ¬ Q (x)

Why this answer is correct

Solution:

Concept:

Two quantifies used in predicate logic is : universal quantifies which is used to denote sentences with words like “all” or “every” and another is existential quantifier which is used to denote sentence with words like “some” or “there is a”

TrueFalse
∀ x  (universal)AllAtleast one false
∃ x (existential)Atleast one trueFor all x, if P(x) is false, if we are taking predicate as P(x)

 

Explanation:

Given statement is: ¬ ∃ x Q (x) is :

This negation ¬ will change the quantifier and also it negates the element with the quantifier.

So, it becomes.

∀ x ¬ Q (x)

Because negation of existential is universal quantifier or vice versa.

Question 89

Which of the relations on {0, 1, 2, 3} is an equivalence relation?

  1. AOption (a)

    { (0, 0) (0, 2) (2, 0) (2, 2) (2, 3) (3, 2) (3, 3) }

  2. BOption (b)

    { (0, 0) (1, 1) (2, 2) (3, 3) }

  3. COption (c)

    { (0, 0) (0, 1) (0, 2) (1, 0) (1, 1) (1, 2) (2, 0) }

  4. DOption (d)

    { (0, 0) (0, 2) (2, 3) (1, 1) (2, 2) }

View answer & explanation

Correct answer

Answer: (b)B.

{ (0, 0) (1, 1) (2, 2) (3, 3) }

Why this answer is correct

Concept:

Equivalence relation: A relation is said to be equivalence relation if it is reflexive, symmetric and transitive relation.

  • Reflexive relation: a relation in which every element maps to itself.
  • Symmetric relation: a relation is symmetric if there exists (a, b), then (b, a) should also be in relation.
  • Transitive relation: A relation is transitive if there exists (a, b) and (b, c) then there must also exist (a, c) in the relation.
<br>

Explanation:

Given set = {0,1,2, 3}

(1) {(0, 0) (0, 2) (2, 0) (2, 2) (2, 3) (3, 2) (3, 3)}

It is not equivalence relation.  Here, element 1 is not matched to itself. It is not reflexive.

(2) {(0, 0) (1, 1) (2, 2) (3, 3)}

It is equivalence relation. As, it is satisfying property of all three: reflexive, symmetric and transitive.

(3) {(0, 0) (0, 1) (0, 2) (1, 0) (1, 1) (1, 2) (2, 0)}

This relation is neither reflexive nor symmetric so, it cannot be equivalence relation.

(4) {(0, 0) (0, 2) (2, 3) (1, 1) (2, 2)}

This is neither reflexive nor symmetric. So, it cannot be equivalence relation.

Question 90

Which of the following statements is true?

  1. AOption (a)

    (Z, ≤ ) is not totally ordered

  2. BOption (b)

    The set inclusion relation ⊆ is a partial ordering on the power set of a set S

  3. COption (c)

    (Z, ≠ ) is a poset

  4. DOption (d)

    The directed graph 

     is not a partial order

View answer & explanation

Correct answer

Answer: (b)B.

The set inclusion relation ⊆ is a partial ordering on the power set of a set S

Why this answer is correct

Option 1: (Z, ≤) is not totally ordered

This is false. As, ≤ is totally ordered. A partial ordered set with comparison is known as totally ordered set. Consider the set contains elements {1, 2, 3, 4}. This represents as totally ordered set. As 1<= 2, 2<=3, 3< = 4.

Option 2: The set inclusion relation ⊆ is a partial ordering on the power set of a set S

If we consider the set S = {a, b} . So possibilities with this set are {Ø, a, b , ab}. As, subset relation is reflexive, antisymmetric and transitive. So, it is partially ordered. Because if a is subset of b, then b is superset of a.

Option 3: (Z, ≠ ) is a poset

It is not partially ordered set. As, it follows symmetric property. Example if a is not equal to b , then b is also not equal to a. It can not be poset. Given statement is incorrect.

Option 4: The directed graph

 is not a partial order

This statement is incorrect. This graph represents partial order. It can be represented as:

It is satisfying the property of partially ordered set. So, given directed graph is poset. It is reflexive, antisymmetric and transitive.

Question 91

In RS flip-flop, the output of the flip-flop at time (t + 1) is same as the output at time t, after the occurrence of a clock pulse if :

  1. AOption (a)

    S = R = 1 

  2. BOption (b)

    S = 0, R = 1

  3. COption (c)

    S = 1, R = 0

  4. DOption (d)

    S = R = 0

View answer & explanation

Correct answer

Answer: (d)D.

S = R = 0

Why this answer is correct

Truth Table for SR Flip Flop:

SRQ(t)Q(t + 1)
0000No changes
0011
0100reset to 0
0110
1001set to 1
1011
110InvalidDon’t care
111Invalid

 

·  S = R = 0 is the normal resting condition of the SR flip-flop.

·  It has no effect on the output state of the flip-flop. Both Qt and Q(t+1) outputs remain in the logic state they were in prior to this input condition.

Question 92

Simplify the following using K-map:

F (A, B, C, D) = Σ (0, 1, 2, 8, 9, 12, 13)

d (A, B, C, D) = Σ (10, 11, 14, 15)

d stands for don’t care condition.

  1. AOption (a)

    A + B̅.D̅ + BC

  2. BOption (b)

    A + B̅.D̅ + B̅ C̅ 

  3. COption (c)

    A̅ + B̅.C̅ 

  4. DOption (d)

    A̅ + B̅.C̅ + B̅.D̅

View answer & explanation

Correct answer

Answer: (b)B.

A + B̅.D̅ + B̅ C̅ 

Why this answer is correct

F (A, B, C, D) = Σ (0, 1, 2, 8, 9, 12, 13)

d (A, B, C, D) = Σ (10, 11, 14, 15)

Karnaugh map (K-map):

  • The Karnaugh map (K-map) is a method of simplifying Boolean algebra expressions.
  • The Karnaugh map reduces the need for extensive calculations.
  • Karnaugh map can be explained as An array that contains 2k number of cells, where k is the number of variables in the Boolean expression that is to be reduced or optimized.

K - Map:

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

Question 93

Digital data received from a sensor can fill up 0 to 32 buffers. Let the sample space be

S = {0, 1, 2, .........., 32} where the sample j denote that j of the buffers are full and p(i)=1561(33−i)p\left( i \right) = \frac{1}{{561}}\left( {33 - i} \right)

. Let A denote the event that the even number of buffers are full. Then p(A) is :

  1. AOption (a)

    0.515

  2. BOption (b)

    0.785 

  3. COption (c)

    0.758

  4. DOption (d)

    0.485

View answer & explanation

Correct answer

Answer: (a)A.

0.515

Why this answer is correct

Buffers are from 0 to 32

Sample space S = {0, 1, 2…………32}

Probability of ith buffer getting full is denotes by p(i) which is given as : p(i)=1561(33−i)p\left( i \right) = \frac{1}{{561}}\left( {33 - i} \right)

Probability of even number of buffers are full is denote by p(A).

We have to consider only the even numbers from the sample space i.e. 0, 2, 4, …………..32

For this, find the probability for p(0),p(2), p(4), p(6),……….p(32)

p(0)=1561(33−0)=;1561(33)p\left( 0 \right) = \frac{1}{{561}}\left( {33 - 0} \right) = ;\frac{1}{{561}}\left( {33} \right) 

p(2)=1561(33−2)=;1561(31)p\left( 2 \right) = \frac{1}{{561}}\left( {33 - 2} \right) = ;\frac{1}{{561}}\left( {31} \right) 

p(4)=1561(33−4)=;1561(29)p\left( 4 \right) = \frac{1}{{561}}\left( {33 - 4} \right) = ;\frac{1}{{561}}\left( {29} \right) 

p(6)=1561(33−6)=;1561(27)p\left( 6 \right) = \frac{1}{{561}}\left( {33 - 6} \right) = ;\frac{1}{{561}}\left( {27} \right)

…………….

p(32)=1561(33−32)=;1561(1)p\left( {32} \right) = \frac{1}{{561}}\left( {33 - 32} \right) = ;\frac{1}{{561}}\left( 1 \right) 

So, every time bracketed value is decreasing by 2 while outside value remains same.

So, p(A) = p(0 ) + p(2) + p(4) +…………….+ p(32)

P(A) = (1/561) [33 + 31 + 29 + 27 + 25 + 23 + 21 + ………….1]

p(A) = (1/561) × 289

p(A) = 0.515

Question 94

Which of the following is an equivalence relation on the set of all functions from Z to Z ?

  1. AOption (a)

    { (f, g) | f (x) − g (x) = 1 x ϵ  Z }

  2. BOption (b)

    { (f, g) | f (0) = g (0) or f (1) = g (1) }

  3. COption (c)

    { (f, g) | f (0) = g (1) and f (1) = g (0) }

  4. DOption (d)

    { (f, g) | f (x) − g (x) = k for some k ϵ  Z }

View answer & explanation

Correct answer

Answer: (d)D.

{ (f, g) | f (x) − g (x) = k for some k ϵ  Z }

Why this answer is correct

Concept:

Equivalence relation: A relation is said to be an equivalence relation if it is a reflexive, symmetric, and transitive relation.

  • Reflexive relation: a relation in which every element maps to itself.
  • Symmetric relation: a relation is symmetric if there exists (a, b), then (b, a) should also be in relation.
  • Transitive relation: A relation is transitive if there exists (a, b) and (b, c) then there must also exist (a, c) in the relation.
<br>

Explanation:

(1) { (f, g) | f (x) − g (x) = 1 x ϵ  Z }

It is not reflexive. As f(x) – f(x) = 0 it is not 1. It is also not transitive. So, it cannot be an equivalence relation.

(2) {(f, g) | f (0) = g (0) or f (1) = g (1) }

This relation is not transitive. Suppose f(x) = 0, g(x) = x and h(x) = 1. Here f is not related to h. Only we have a relation given between f and g, g and h. but not between f and h. So, it cannot be an equivalence relation.

(3) {(f, g) | f (0) = g (1) and f (1) = g (0) }

It is not always true f(0) = f(1) for reflexive case. So, it is not reflexive. Hence, no equivalence relation.

(4) { (f, g) | f (x) − g (x) = k for some k ϵ  Z }

It is reflexive relation, consider constant as 0. It is also symmetric because the difference will be equal to a constant value. It is also transitive. So, it is an equivalence relation.

Question 95

Match the terms in List - I with the options given in List - II :

List - IList – II
(a)Decoder(i)1 line to 2n lines
(b)Multiplexer(ii)n lines to 2n lines
(c)De multiplexer(iii)2n lines to 1 line
(iv)2n lines to 2n−1 lines
  1. AOption (a)

    (a) – (ii), (b) – (i), (c) – (iii)

  2. BOption (b)

    (a) – (ii), (b) – (iii), (c) – (i)

  3. COption (c)

    (a) – (ii), (b) – (i), (c) – (iv)

  4. DOption (d)

    (a) – (iv), (b) – (ii), (c) – (i)

View answer & explanation

Correct answer

Answer: (b)B.

(a) – (ii), (b) – (iii), (c) – (i)

Why this answer is correct

Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines. Therefore, Decoder - n lines to 2n lines

The multiplexer is a combinational logic circuit designed to switch 1 of several (2n) input lines to a single common output line. Therefore, Multiplexer - 2n lines to 1 line

A de-multiplexer is a device that takes 1 input line and routes it to one of several (2n) digital output lines. Therefore, De multiplexer - 1 line to 2n lines

Question 96

What does the following logic diagram represent?

  1. AOption (a)

    Synchronous Counter 

  2. BOption (b)

    Ripple Counter

  3. COption (c)

    Combinational Circuit 

  4. DOption (d)

    Mod 2 Counter

View answer & explanation

Correct answer

Answer: (b)B.

Ripple Counter

Why this answer is correct

Concept:

As one of the main characteristics of Ripple counter is that only one flip-flop is applied with an external clock pulse and another flip-flop clock is obtained from the output of the previous flip-flop.

The above circuit also uses output of first flip flop drives the clock of another flip flop. Hence, it is ripple counter.

State table of the above circuit

CountQ0Q1
000
101
210
311

 

Timing diagram -

Question 97

The hexadecimal equivalent of the binary integer number 110101101 is:

  1. AOption (a)

    D24 

  2. BOption (b)

    1 B D 

  3. COption (c)

    1 A E 

  4. DOption (d)

    1 A D

View answer & explanation

Correct answer

Answer: (d)D.

1 A D

Why this answer is correct

110101101 can be written as 0001 1010 1101

(0001)2 = 1

(1010)2 = (10)10 = (A)16

(1101)2 = (13)10 = (D)16

Therefore (110101101)2 = (1AD)16

Question 98

Which of the following mapping is not used for mapping process in cache memory?

  1. AOption (a)

    Associative mapping 

  2. BOption (b)

    Direct mapping

  3. COption (c)

    Set-Associative mapping 

  4. DOption (d)

    Segmented - page mapping

View answer & explanation

Correct answer

Answer: (d)D.

Segmented - page mapping

Why this answer is correct

Concept –

Associative mapping, Direct mapping and Set associative mapping are three types of mapping techniques used in cache memory.

Segmented Page mapping is the only option among the four options that is not a technique used in cache memory mapping.

Question 99

If Ai = {−i, ... −2, −1, 0, 1, 2, … i}

Then ∪i=1∞Ai\mathop \cup \limits_{i = 1}^\infty {A_i} is

  1. AOption (a)

    Z

  2. BOption (b)

    Q

  3. COption (c)

    R

  4. DOption (d)

    C

View answer & explanation

Correct answer

Answer: (a)A.

Z

Why this answer is correct

In this question, we have to define which type of numbers are given in the set Ai = {-i, ……-2, -1, 0, 1, 2, ……i}

Various type of number with their representation symbol are:

Rational numbers:

A rational number is any real number that can be written as a fraction or in p/q form where p and q are integers. Rational numbers are denoted by Q.

Complex number:

Complex numbers are represented in the form of a + bi where a and b are real numbers and i stands for iota which has only two values either -1 or 1. Complex numbers are denoted by C.

Real numbers:

Real numbers include both rational and irrational numbers. These are denoted by R.

Integers:

Integers are like whole numbers, but they also include negative numbers. The range is from – infinity to + infinity. They are denoted by Z.

So, set Ai = {−i, ... −2, −1, 0, 1, 2, ..... i}

Is the set of all integers which are denoted by Z.

Question 100

Match the following in List - I and List - II, for a function f:

List – IList - II
(a)∀ x ∀ y (f (x) = f(y) → |x = y)(i)Constant
(b)∀ y ∃ x (f (x) = y)(ii)Injective
(c)∀ x f (x) = k(iii)Surjective
  1. AOption (a)

    (a) – (i), (b) – (ii), (c) – (iii)

  2. BOption (b)

    (a) – (iii), (b) – (ii), (c) – (i)

  3. COption (c)

    (a) – (ii), (b) – (i), (c) – (iii)

  4. DOption (d)

    (a) – (ii), (b) – (iii), (c) – (i)

View answer & explanation

Correct answer

Answer: (d)D.

(a) – (ii), (b) – (iii), (c) – (i)

Why this answer is correct

A function is a way of matching the members of a set A to set B.

Explanation:

Injective function:

A function f: A -> B is injective if each b belongs to B  has at most one preimage in A that is there is at most one a belongs to A such that f(a) = b. An injective function is also known as one to one function.

∀ x ∀ y (f (x) = f(y) → |x = y), here it represents an injective function.

Surjective function:

 A function f: A -> B is surjective if each b belongs to B has at least one preimage that is there is at least one a belongs to A such that f(a) = b. A surjective function is also known as onto function.

∀ y ∃ x (f (x) = y), it represents a surjective function.

Constant function:

A constant function is a function whose value remains the same for every input value.

Here, ∀ x f (x) = k, it represents a constant function.

100 questions in the full paper