Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations

UGC NET Computer Science Previous Year Questions (PYQs)

UGC NET Computer Science 2022 PYQ


UGC NET Computer Science PYQ 2022
Given below are two statements: one is labeled as Assertion A and the other is labeled as Reason R.

Assertion A: Cohesion is a qualitative indication of the degree to which a module can be written more compactly and is able to complete its function in a timely manner.

Reason R: Cohesion is a qualitative indication of the degree to which a module is connected to other modules and the outside world.

In the light of the above statements, choose the most appropriate answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Cohesion means how strongly the elements inside a module are related to each other.

A highly cohesive module performs one clear and well-defined task.

So, Assertion A is taken as correct because it talks about a module completing its function properly.

Reason R says that cohesion is the degree to which a module is connected to other modules and the outside world.

But this is the definition of coupling, not cohesion.

So, Reason R is false.

Therefore,

Assertion A is correct, but Reason R is not correct.

UGC NET Computer Science PYQ 2022
Given the graph below one of the following edges cannot be added in that order to find a minimum spanning tree algorithm.


I. $a-b$
II. $d-f$
III. $b-f$
IV. $d-c$
V. $d-e$

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Using Kruskal's algorithm, edges are selected in increasing order of weight.

From the graph:

$a-b = 1$

$d-f = 1$

$b-f = 2$

$d-c = 2$

$d-e = 3$

So, the valid order must follow:

Weight $1$ edges first:

$I, II$ in any order

Then weight $2$ edges:

$III, IV$ in any order

Then weight $3$ edge:

$V$

Now check option (c):

II, I, III, V, IV

Here, edge $V = d-e$ has weight $3$, but edge $IV = d-c$ has weight $2$.

So, selecting $V$ before $IV$ violates Kruskal's increasing weight rule.

Therefore, this order cannot be used.


UGC NET Computer Science PYQ 2022

What is the safest order while simplifying Context Free Grammar?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

While simplifying a CFG, the safest order is:

First remove $\epsilon$-productions.

Then remove unit productions.

Finally remove useless symbols and productions.

Reason:

After removing $\epsilon$-productions, new unit productions may be created.

After removing unit productions, some symbols may become useless.

So, useless symbols should be removed at the end.

Correct order is:

$\epsilon$-productions → Unit productions → Useless symbols and productions


UGC NET Computer Science PYQ 2022

Rearrange the following sequence in the context of OSI Layers:

I. Transforming the raw bits in the form of frame for transmission
II. Transmission of raw bits over communication channel
III. Handling user interfaces
IV. Control and monitoring of subnet
V. Transmission data through connection oriented or connection less using datagrams

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Physical layer:

Transmission of raw bits over communication channel.

So, II comes first.

Data Link layer:

Transforms raw bits into frames.

So, I comes second.

Network layer:

Controls and monitors subnet.

So, IV comes third.

Transport layer:

Provides connection-oriented or connection-less data transmission.

So, V comes fourth.

Application layer:

Handles user interfaces.

So, III comes last.


UGC NET Computer Science PYQ 2022

Choose the correct option describing the features of Artificial neural network

I. It is essentially machine learning algorithm.
II. It is useful when solving the problems for which the data set is very large.
III. They are able to extract features without input from the programmer.
IV. These are systems modeled on the human brain and nervous system

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement I:

Artificial Neural Network is a machine learning technique.

So, statement I is correct.

Statement II:

ANN is useful for large datasets because it can learn complex patterns from data.

So, statement II is correct.

Statement III:

Neural networks can automatically learn important features from data without manual feature programming.

So, statement III is correct.

Statement IV:

ANN is inspired by the human brain and nervous system.

So, statement IV is correct.

Therefore, all statements are correct.


UGC NET Computer Science PYQ 2022

Four persons: P, Q, R and S are in police custody and one of them has committed a crime. They confess as follows:

A. Person P: Q did it.
B. Person Q: S did it.
C. Person R: I did not do it.
D. Person S: Q lied.

If exactly one of the statements is false, which of the following is the guilty person.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Check each case one by one.

Case 1: Suppose P is guilty.

P says: Q did it → False
Q says: S did it → False
R says: I did not do it → True
S says: Q lied → True

Here, two statements are false. So, P is not guilty.

Case 2: Suppose Q is guilty.

P says: Q did it → True
Q says: S did it → False
R says: I did not do it → True
S says: Q lied → True

Here, exactly one statement is false.

So, Q can be guilty.

Case 3: Suppose R is guilty.

P says: Q did it → False
Q says: S did it → False
R says: I did not do it → False
S says: Q lied → True

Here, three statements are false. So, R is not guilty.

Case 4: Suppose S is guilty.

P says: Q did it → False
Q says: S did it → True
R says: I did not do it → True
S says: Q lied → False

Here, two statements are false. So, S is not guilty.

Therefore, the guilty person is Q.


UGC NET Computer Science PYQ 2022

Assertion A:
A Raster scan device is a CRT graphic device and can use a television monitor for display.

Reason R:
In Raster scan display the picture is composed of a series of dots. These dots are traced out as a series of horizontal lines. Television works in a similar fashion.

In the light of the above statements, choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Raster scan display forms an image using many small dots called pixels.

These pixels are scanned line by line from left to right and top to bottom.

Television display also works in a similar raster scanning manner.

So, Assertion A is true.

Reason R correctly explains why raster scan devices can use television monitors.

So, Reason R is also true and it is the correct explanation of Assertion A.


UGC NET Computer Science PYQ 2022
An OS follows round-robin scheduling with time quantum of $4$ ms. Assuming that the CPU is free now and there are $20$ processes waiting in the ready queue, the maximum amount of time that a process waits before getting into the CPU is _____.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In Round Robin scheduling, each process gets CPU for one time quantum.

Given:

Time quantum $=4$ ms

Number of processes $=20$

Maximum waiting time occurs for the last process in the ready queue.

Before the last process gets CPU, the other $19$ processes will execute.

So,

Maximum waiting time $=19 \times 4$

$=76$ ms


UGC NET Computer Science PYQ 2022

Statement 1:
Given a graph $G=(V,E)$ in which each vertex $v \in V$ has an associated positive weight $w(v)$, we can use linear programming to find the lower bound on the weight of the minimum-weight vertex cover.

Statement 2:
The lower bound can be found by maximizing the following

$ \sum_{v \in V} w(v)x(v) $

subject to

$ x(u)+x(v) \ge 1 $ for each $(u,v) \in E$

$ x(v) \le 1 $ for each $v \in V$

$ x(v) \ge 0 $ for each $v \in V$

In the light of the above statements, choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For minimum-weight vertex cover, we can write an integer linear programming formulation.

Its LP relaxation can be used to find a lower bound.

So, Statement 1 is correct.

But for minimum-weight vertex cover, the objective should be minimized, not maximized.

Correct objective should be:

$ \text{Minimize } \sum_{v \in V} w(v)x(v) $

Statement 2 says maximizing the objective, so Statement 2 is incorrect.


UGC NET Computer Science PYQ 2022

A TCP Server application is programmed to listen on port P on Host S. A TCP Client is connected to the TCP Server over the network. Considered that while TCP Connection is active the server is crashed and rebooted. Assume that the client does not use TCP keepalive timer. Which of the following behaviours is/are possible?

Statement I:
If client is waiting to receive a packet, it may wait indefinitely.

Statement II:
If the client sends a packet after the server reboot, it will receive the FIN segment.

In the light of the above statements, choose the correct answer from the options given below.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

When the server crashes and reboots, the server loses the old TCP connection state.

Statement I:

If the client is only waiting to receive data and TCP keepalive timer is not used, then the client may not immediately know that the server has crashed.

So, the client may wait indefinitely.

Therefore, Statement I is true.

Statement II:

After reboot, if the client sends a packet for the old TCP connection, the server will not recognize that old connection.

In this case, the server sends a reset segment, that is $RST$, not a $FIN$ segment.

$FIN$ is used for normal connection termination.

$RST$ is used when the connection is invalid or not recognized.

Therefore, Statement II is false.


UGC NET Computer Science PYQ 2022
An organization is granted the block $130.56.0.0/16$. The administrator wants to create $1024$ subnets.

Find the number of addresses in each subnet.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given block:

$130.56.0.0/16$

Total host bits:

$32-16=16$

Number of required subnets:

$1024=2^{10}$

So, $10$ bits are borrowed for subnetting.

Remaining host bits:

$16-10=6$

Number of addresses in each subnet:

$2^6=64$


UGC NET Computer Science PYQ 2022
An organization is granted the block $130.56.0.0/16$. The administrator wants to create $1024$ subnets.

Find the subnet prefix.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given network block is:

$130.56.0.0/16$

So, the network prefix part is:

$130.56$


UGC NET Computer Science PYQ 2022
An organization is granted the block $130.56.0.0/16$. The administrator wants to create $1024$ subnets.

Find first and last addresses of First subnet.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$64$ addresses

So, first subnet starts from:

$130.56.0.0$

Since each subnet has $64$ addresses, the first subnet range is:

$130.56.0.0$ to $130.56.0.63$

Therefore, first address is:

$130.56.0.0$

Last address is:

$130.56.0.63$


UGC NET Computer Science PYQ 2022
An organization is granted the block $130.56.0.0/16$. The administrator wants to create $1024$ subnets.

Find subnet mask.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Original prefix is:

$/16$

Required subnets:

$1024=2^{10}$

So, new prefix length is:

$16+10=26$

Therefore, subnet prefix is:

$/26$

Subnet mask for $/26$ is:

$255.255.255.192$


UGC NET Computer Science PYQ 2022
An organization is granted the block $130.56.0.0/16$. The administrator wants to create $1024$ subnets.

Find first and last addresses of last subnet.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given block is:

$130.56.0.0/16$

Number of subnets required:

$1024 = 2^{10}$

So, new prefix is:

$/16 + 10 = /26$

For $/26$, each subnet has:

$2^{32-26} = 2^6 = 64$ addresses

So, subnet block size is:

$64$

In the last octet, subnets will be:

$0, 64, 128, 192$

The last subnet of the whole block $130.56.0.0/16$ will be in the last third octet:

$255$

So, last subnet starts at:

$130.56.255.192$

Since block size is $64$, it ends at:

$130.56.255.255$


UGC NET Computer Science PYQ 2022

A Turing Machine for the language
$L=a^n b^m c^n d^m \mid n \ge 1,\ m \ge 1$ is designed.

The resultant model is

$M=({q_0,q_1,q_2,q_3,q_4,q_5,q_6,q_7,q_f},{a,b,c,d},{a,b,c,d,X_1,X_2,Y_1,Y_2},\delta,q_0,B,{q_f})$

and part of $\delta$ is given in the transition table.

You need to write the following questions based on design of Turing Machine for the given language.

Note that, while designing the Turing Machine $X_1$ and $X_2$ are used to work with $a$'s and $c$'s and $Y_1$ and $Y_2$ are used to handle $b$'s and $d$'s of the given string.


What is the Move in the cell with number 'M1' of the resultant Table ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$M1$ is used when the machine is in state $q1$ and reads symbol $c$.

In this stage, the machine has already marked one $a$ as $X1$ and is searching for the corresponding $c$.

So, when it finds $c$, it marks it as $X2$ and moves left to return back.

Therefore,

$M1=(q2,X2,L)$


UGC NET Computer Science PYQ 2022

A Turing Machine for the language
$L=a^n b^m c^n d^m \mid n \ge 1,\ m \ge 1$ is designed.

The resultant model is

$M=({q_0,q_1,q_2,q_3,q_4,q_5,q_6,q_7,q_f},{a,b,c,d},{a,b,c,d,X_1,X_2,Y_1,Y_2},\delta,q_0,B,{q_f})$

and part of $\delta$ is given in the transition table.

You need to write the following questions based on design of Turing Machine for the given language.

Note that, while designing the Turing Machine $X_1$ and $X_2$ are used to work with $a$'s and $c$'s and $Y_1$ and $Y_2$ are used to handle $b$'s and $d$'s of the given string.


What is the Move in the cell with the number $M2$ of the resultant Table?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$M2$ is in state $q0$ on symbol $X1$.

In standard Turing Machine design for this language, $X1$ represents an already marked $a$.

So, the machine should skip $X1$ and move right to search for the next unmarked $a$.

Correct move should be:

$(q0,X1,R)$

But this option is not present in the given options.


UGC NET Computer Science PYQ 2022

A Turing Machine for the language
$L=a^n b^m c^n d^m \mid n \ge 1,\ m \ge 1$ is designed.

The resultant model is

$M=({q_0,q_1,q_2,q_3,q_4,q_5,q_6,q_7,q_f},{a,b,c,d},{a,b,c,d,X_1,X_2,Y_1,Y_2},\delta,q_0,B,{q_f})$

and part of $\delta$ is given in the transition table.

You need to write the following questions based on design of Turing Machine for the given language.

Note that, while designing the Turing Machine $X_1$ and $X_2$ are used to work with $a$'s and $c$'s and $Y_1$ and $Y_2$ are used to handle $b$'s and $d$'s of the given string.


What is the Move in the cell with number $M3$ of the resultant Table?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$M3$ is in state $q3$ on symbol $a$.

State $q3$ is used after matching all $a$'s with $c$'s. Now the machine works on $b$'s and $d$'s.

So, if the machine sees an unmarked $a$ in state $q3$, it means the string is not in the correct form.

Hence, it is an error entry.


UGC NET Computer Science PYQ 2022

A Turing Machine for the language
$L=a^n b^m c^n d^m \mid n \ge 1,\ m \ge 1$ is designed.

The resultant model is

$M=({q_0,q_1,q_2,q_3,q_4,q_5,q_6,q_7,q_f},{a,b,c,d},{a,b,c,d,X_1,X_2,Y_1,Y_2},\delta,q_0,B,{q_f})$

and part of $\delta$ is given in the transition table.

You need to write the following questions based on design of Turing Machine for the given language.

Note that, while designing the Turing Machine $X_1$ and $X_2$ are used to work with $a$'s and $c$'s and $Y_1$ and $Y_2$ are used to handle $b$'s and $d$'s of the given string.


What is the Move in the cell with number $M4$ of the resultant Table?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$M4$ is in state $q5$ on symbol $Y1$.

Here, $Y1$ represents a marked $b$.

After marking one corresponding $d$ as $Y2$, the machine moves left and reaches $Y1$.

Now it should move right and again go to state $q3$ to search for the next unmarked $b$.

Therefore,

$M4=(q3,Y1,R)$


UGC NET Computer Science PYQ 2022

A Turing Machine for the language
$L=a^n b^m c^n d^m \mid n \ge 1,\ m \ge 1$ is designed.

The resultant model is

$M=({q_0,q_1,q_2,q_3,q_4,q_5,q_6,q_7,q_f},{a,b,c,d},{a,b,c,d,X_1,X_2,Y_1,Y_2},\delta,q_0,B,{q_f})$

and part of $\delta$ is given in the transition table.

You need to write the following questions based on design of Turing Machine for the given language.

Note that, while designing the Turing Machine $X_1$ and $X_2$ are used to work with $a$'s and $c$'s and $Y_1$ and $Y_2$ are used to handle $b$'s and $d$'s of the given string.


What is the Move in the cell with number $M5$ of the resultant Table?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$M5$ is in state $q4$ on symbol $X2$.

Here, $X2$ represents an already marked $c$.

In state $q4$, the machine is moving right to find an unmarked $d$ corresponding to a marked $b$.

So, when it sees $X2$, it simply skips it and moves right.

Therefore,

$M5=(q4,X2,R)$


UGC NET Computer Science PYQ 2022
n a database, a rule is defined as $((P_1 \text{ and } P_2) \text{ or } P_3) \to R_1(0.8)$ and $R_2(0.3)$, where $P_1, P_2, P_3$ are premises and $R_1, R_2$ are conclusions of rules with certainty factors $(CF)$ $0.8$ and $0.3$ respectively. If any running program has produced $P_1, P_2, P_3$ with $CF$ as $0.5, 0.8, 0.2$ respectively, find the $CF$ of results on the basis of premises.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

$CF(P_1)=0.5,\ CF(P_2)=0.8,\ CF(P_3)=0.2$

For AND operation,

$CF(P_1 \text{ and } P_2)=\min(0.5,0.8)=0.5$

For OR operation,

$CF((P_1 \text{ and } P_2) \text{ or } P_3)=\max(0.5,0.2)=0.5$

Now,

$CF(R_1)=0.5 \times 0.8=0.40$

$CF(R_2)=0.5 \times 0.3=0.15$

UGC NET Computer Science PYQ 2022
There are three boxes. First box has $2$ white, $3$ black and $4$ red balls. Second box has $3$ white, $2$ black and $2$ red balls. Third box has $4$ white, $1$ black and $3$ red balls. A box is chosen at random and $2$ balls are drawn out of which $1$ is white, and $1$ is red. What is the probability that the balls came from first box?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Let the boxes be $B_1, B_2, B_3$ and event $E$ be drawing $1$ white and $1$ red ball.

Since one box is chosen randomly,

$P(B_1)=P(B_2)=P(B_3)=\frac{1}{3}$

For first box,

$P(E|B_1)=\frac{\binom{2}{1}\binom{4}{1}}{\binom{9}{2}}=\frac{8}{36}=\frac{2}{9}$

For second box,

$P(E|B_2)=\frac{\binom{3}{1}\binom{2}{1}}{\binom{7}{2}}=\frac{6}{21}=\frac{2}{7}$

For third box,

$P(E|B_3)=\frac{\binom{4}{1}\binom{3}{1}}{\binom{8}{2}}=\frac{12}{28}=\frac{3}{7}$

Using Bayes theorem,

$P(B_1|E)=\frac{P(B_1)P(E|B_1)}{P(B_1)P(E|B_1)+P(B_2)P(E|B_2)+P(B_3)P(E|B_3)}$

$P(B_1|E)=\frac{\frac{1}{3}\times\frac{2}{9}}{\frac{1}{3}\times\frac{2}{9}+\frac{1}{3}\times\frac{2}{7}+\frac{1}{3}\times\frac{3}{7}}$

$P(B_1|E)=\frac{\frac{2}{9}}{\frac{2}{9}+\frac{2}{7}+\frac{3}{7}}$

$P(B_1|E)=\frac{\frac{2}{9}}{\frac{59}{63}}=\frac{14}{59}=0.237$


UGC NET Computer Science PYQ 2022
Consider a memory system having address spaced at a distance of $m$, $T=$ Bank cycle time and $n$ number of banks, then the average data access time per word access in synchronous organization is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In synchronous interleaved memory organization,

For $m\ll n$,

$t=m\cdot \frac{T}{n}$

For $m\gg n$,

$t=T$


UGC NET Computer Science PYQ 2022
For multiprocessor system, interconnection network - cross bar switch is an example of





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

A crossbar switch provides a separate path between processor and memory module.

So, multiple connections can be made at the same time without blocking each other.

Therefore, crossbar switch is a non blocking network.


UGC NET Computer Science PYQ 2022
The representation of $4$ bit code $1101$ into $7$ bit, even parity Hamming code is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

For $7$ bit Hamming code, parity positions are

$1,2,4$

Data positions are

$3,5,6,7$

Given data bits are

$1101$

So,

$D_1=1,\ D_2=1,\ D_3=0,\ D_4=1$

Arrange them as:

$P_1\ P_2\ D_1\ P_4\ D_2\ D_3\ D_4$

$=P_1\ P_2\ 1\ P_4\ 1\ 0\ 1$

For even parity,

$P_1$ checks positions $1,3,5,7$

$P_1+1+1+1=\text{even}$

$P_1=1$

$P_2$ checks positions $2,3,6,7$

$P_2+1+0+1=\text{even}$

$P_2=0$

$P_4$ checks positions $4,5,6,7$

$P_4+1+0+1=\text{even}$

$P_4=0$

Therefore, Hamming code is

$1010101$


UGC NET Computer Science PYQ 2022
The number of gate inputs, required to realize expression $ABC+A\overline{B}CD+E\overline{F}+AD$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given expression:

$ABC+A\overline{B}CD+E\overline{F}+AD$

Number of inputs in product terms:

$ABC=3$

$A\overline{B}CD=4$

$E\overline{F}=2$

$AD=2$

Total inputs for AND gates:

$3+4+2+2=11$

There are $4$ product terms, so OR gate needs $4$ inputs.

Total gate inputs:

$11+4=15$


UGC NET Computer Science PYQ 2022
Consider a logic gate circuit, with 8 input lines $(D_0,D_1,\ldots,D_7)$ and 3 output lines $(A_0,A_1,A_2)$ specified by following operations

$A_2=D_4+D_5+D_6+D_7$

$A_1=D_2+D_3+D_6+D_7$

$A_0=D_1+D_3+D_5+D_0$

Where $+$ indicates logical OR operation. This circuit is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In an octal to binary encoder, there are $8$ input lines and $3$ output lines.

The outputs represent binary form of input lines $D_0$ to $D_7$.

Standard equations are:

$A_2=D_4+D_5+D_6+D_7$

$A_1=D_2+D_3+D_6+D_7$

$A_0=D_1+D_3+D_5+D_7$

So, the given circuit represents an Octal to Binary encoder.

UGC NET Computer Science PYQ 2022
The total storage capacity of a floppy disk having $80$ tracks and storing $128$ bytes / sector is $163,840$ bytes. How many sectors does this disk have?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Total capacity $=$ Number of tracks $\times$ Number of sectors $\times$ Bytes per sector

$163840=80\times \text{Number of sectors}\times 128$

$\text{Number of sectors}=\frac{163840}{80\times128}$

$\text{Number of sectors}=16$

UGC NET Computer Science PYQ 2022
In a cache memory, if address has $9$ bits in Tag field and $12$ bits in index field, the size of main memory and cache memory would be respectively





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Tag bits $=9$

Index bits $=12$

Main memory size $=2^{9+12}=2^{21}$

$2^{21}=2048K$

Cache memory size $=2^{12}=4K$

Therefore, main memory size $=2048K$ and cache memory size $=4K$

UGC NET Computer Science PYQ 2022
Maximize $z=5x_1+12x_2+4x_3$

Subject to $x_1+2x_2+x_3=10$

$2x_1-x_2+3x_3=8$

$x_1,x_2,x_3\ge 0$

its dual problem is

Minimize $w=10y_1+8y_2$

Subject to $y_1+2y_2\ge 5$

$2y_1-y_2\ge 12$

$y_1+3y_2\ge 4$

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In primal maximization problem,

If the constraint is equality type, then the corresponding dual variable is unrestricted.

Here, first constraint is equality type, so

$y_1$ is unrestricted.

The expected condition for second dual variable is

$y_2\ge 0$

UGC NET Computer Science PYQ 2022
The logic expression $(\overline{P}\land Q)\lor(P\land \overline{Q})\lor(P\land Q)$ is equivalent to





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given expression:

$(\overline{P}\land Q)\lor(P\land \overline{Q})\lor(P\land Q)$

Take common $P$ from last two terms:

$=(\overline{P}\land Q)\lor P(\overline{Q}\lor Q)$

Since,

$\overline{Q}\lor Q=1$

So,

$=(\overline{P}\land Q)\lor P$

Using identity,

$P\lor(\overline{P}\land Q)=P\lor Q$

Therefore,

$(\overline{P}\land Q)\lor(P\land \overline{Q})\lor(P\land Q)=P\lor Q$

UGC NET Computer Science PYQ 2022
The reduced grammar equivalent to the grammar, whose production rules are given below, is

$S\to AB\mid CA$

$B\to BC\mid AB$

$A\to a$

$C\to aB\mid b$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given grammar:

$S\to AB\mid CA$

$B\to BC\mid AB$

$A\to a$

$C\to aB\mid b$

Here,

$A\to a$, so $A$ is generating.

$C\to b$, so $C$ is generating.

But $B\to BC\mid AB$ always contains $B$ again.

So, $B$ is non-generating.

Remove all productions containing $B$.

Remaining grammar is:

$S\to CA$

$A\to a$

$C\to b$

UGC NET Computer Science PYQ 2022
Consider the production rules of grammer $G$:

$S\to AbB$

$A\to aAb\mid \lambda$

$B\to bB\mid \lambda$

Which of the following language $L$ is generated by grammer $G$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

$S\to AbB$

$A\to aAb\mid \lambda$

So, $A$ generates equal number of $a$ and $b$.

$A\Rightarrow a^n b^n$

Also,

$B\to bB\mid \lambda$

So, $B$ generates any number of $b$.

$B\Rightarrow b^k$

Now,

$S\Rightarrow AbB$

$S\Rightarrow a^n b^n b b^k$

$S\Rightarrow a^n b^{n+k+1}$

So, number of $b$ is always greater than number of $a$.

Therefore,

$L=\{a^n b^m:n\ge 0,m>n\}$

UGC NET Computer Science PYQ 2022
Consider the language

$L=\{a^n b^m:n\ge 4,m\le 3\}$

Which of the following regular expression represents language $L$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

$n\ge 4$

So, at least $4$ symbols $a$ are compulsory.

This is represented by:

$aaaaa^*$

Also,

$m\le 3$

So, number of $b$ can be $0,1,2,$ or $3$.

This is represented by:

$\lambda+b+bb+bbb$

Therefore, required regular expression is:

$aaaaa^*(\lambda+b+bb+bbb)$

UGC NET Computer Science PYQ 2022
Consider $L=\{ab,aa,baa\}$

Which of the following string is NOT in $L^*$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

$L=\{ab,aa,baa\}$

Check option (b):

$abaabaaabaa=ab\cdot aa\cdot baa\cdot ab\cdot aa$

So, option (b) is in $L^*$.

Check option (c):

$aaaabaaaa=aa\cdot aa\cdot baa\cdot aa$

So, option (c) is in $L^*$.

Check option (d):

$baaaaabaa=baa\cdot aa\cdot ab\cdot aa$

So, option (d) is in $L^*$.

But option (a) cannot be completely divided into strings $ab,aa,baa$.

Therefore, $baaaaabaaaaa$ is NOT in $L^*$.

UGC NET Computer Science PYQ 2022
Consider the following NPDA

$=({q_0,q_1,q_f},\{a,b\},\{1,z\},\delta,q_0,z,\{q_f\})$

$\delta(q_0,\lambda,z)=\{(q_f,z)\}$

$\delta(q_0,a,z)=\{(q_1,11z)\}$

$\delta(q_1,a,1)=\{(q_1,111)\}$

$\delta(q_1,b,1)=\{(q_1,\lambda)\}$

$\delta(q_1,\lambda,z)=\{(q_f,z)\}$

Which of the following Language $L$ is accepted by NPDA?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

For each input $a$, the NPDA pushes $2$ symbols $1$ into the stack.

For each input $b$, the NPDA pops $1$ symbol $1$ from the stack.

So, number of $b$ must be twice the number of $a$.

Therefore,

$L=\{a^n b^{2n}:n\ge 0\}$

Also, $\lambda$ is accepted because:

$\delta(q_0,\lambda,z)=\{(q_f,z)\}$

UGC NET Computer Science PYQ 2022
Hidden surface removal problem with minimal $3D$ pipeline can be solved with





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Painter's algorithm is used for hidden surface removal.

It works by drawing far objects first and then nearer objects over them.

So, hidden surface removal with minimal $3D$ pipeline can be solved using Painter's algorithm.

UGC NET Computer Science PYQ 2022
Using 'RSA' algorithm, if $p=13,q=5$ and $e=7$, the value of $d$ and cipher value of '$6$' with $(e,n)$ key are-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

$p=13,\ q=5,\ e=7$

$n=pq=13\times 5=65$

$\phi(n)=(p-1)(q-1)$

$\phi(n)=12\times 4=48$

Now,

$ed\equiv 1\pmod{\phi(n)}$

$7d\equiv 1\pmod{48}$

$7\times 7=49\equiv 1\pmod{48}$

So,

$d=7$

Cipher value of $6$ is:

$C=6^e\mod n$

$C=6^7\mod 65$

$C=46$

Therefore, $d=7$ and cipher value $=46$

UGC NET Computer Science PYQ 2022
The condition $num\ !=\ 65$ cannot be replaced by-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

The condition is:

$num\ !=\ 65$

It means $num$ is not equal to $65$.

Option (a):

$num>65\ ||\ num<65$

This is true when $num$ is not equal to $65$.

Option (b):

$!(num==65)$

This also means $num$ is not equal to $65$.

Option (c):

$num-65$

In C language, any non-zero value is treated as true.

So, this is also true when $num\neq 65$.

Option (d):

$!(num-65)$

This becomes true when $num-65=0$, that is $num=65$.

So, it is opposite of $num\ !=\ 65$.

UGC NET Computer Science PYQ 2022
Pointers cannot be used to-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Pointers are used to store addresses of variables.

They can be used to simulate call by reference.

They are also used to manipulate dynamic data structures like linked lists, trees, etc.

But pointers do not reference values directly. They access values indirectly through addresses.

UGC NET Computer Science PYQ 2022
Which mechanism in XML allows organizations to specify globally unique names as element tags in documents?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In XML, namespace is used to provide globally unique names for elements and attributes.

It avoids name conflicts between different XML documents.

UGC NET Computer Science PYQ 2022
If an operating system does not allow a child process to exist when the parent process has been terminated, this phenomenon is called as -





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

When a parent process is terminated, the operating system may terminate all its child processes.

This is called cascading termination.

UGC NET Computer Science PYQ 2022
What is called Journalling in Linux operating system?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In Linux, journalling is a file system feature.

It records file system changes as transactions before applying them permanently.

This helps in recovery after a crash or power failure.

UGC NET Computer Science PYQ 2022
This transformation is called$\left[\matrix{\bar{x}\cr \bar{y}\cr \bar{z}\cr \bar{w}}\right]=\left[\matrix{a_1\quad b_1\quad c_1\quad d_1\cr a_2\quad b_2\quad c_2\quad d_2\cr a_3\quad b_3\quad c_3\quad d_3\cr e\quad f\quad g\quad h}\right]\left[\matrix{x\cr y\cr z\cr 1}\right]$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

The given equation represents a transformation using homogeneous coordinates.Here, the original point is written as:$\left[\matrix{x\cr y\cr z\cr 1}\right]$After transformation, it becomes:$\left[\matrix{\bar{x}\cr \bar{y}\cr \bar{z}\cr \bar{w}}\right]$The transformation is done by multiplying the point with a general $4\times4$ matrix.A general homogeneous coordinate transformation matrix can represent projective transformation.Such a projective transformation is called Homography.Now check the options:Scaling is used only to increase or decrease the size of an object.Shear is used only to slant the shape of an object.Steganography is not a transformation. It is a technique of hiding information.Homography is the correct term for this type of general homogeneous/projective transformation.

UGC NET Computer Science PYQ 2022
RAD software process model stands for-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

RAD stands for Rapid Application Development.

RAD is a software process model used for fast development of software.

In this model, development is done quickly with the help of prototypes, user feedback and reusable components.

Now check the options:

Option (a) Rapid Application Development is the full form of RAD.

Option (b) Relative Application Development is not correct.

Option (c) Rapid Application Design is not the standard full form.

Option (d) Recent Application Development is not correct.

UGC NET Computer Science PYQ 2022
If every requirement can be checked by a cost effective process, then SRS is called





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

SRS means Software Requirement Specification.

A requirement is called verifiable when it can be checked or tested by some practical process.

Here, the question says every requirement can be checked by a cost effective process.

This directly means that the requirement can be verified.

Now check the options:

Traceable means requirements can be traced from source to design or testing.

Modifiable means changes can be made easily in SRS.

Complete means all requirements are present.

Verifiable means each requirement can be checked or tested.

UGC NET Computer Science PYQ 2022
Fault base testing technique is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Fault based testing is a testing technique in which artificial faults are introduced into a program.

The purpose is to check whether the test cases are strong enough to detect those faults.

Mutation testing follows this idea.

In mutation testing, small changes are made in the program to create mutants.

If test cases detect these mutants, then the test cases are considered effective.

Now check the options:

Unit testing checks individual modules.

Beta testing is done by real users before final release.

Stress testing checks system behavior under heavy load.

Mutation testing is a fault based testing technique.

UGC NET Computer Science PYQ 2022
Alpha and Beta testing are forms of





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Alpha testing and Beta testing are performed to check whether the software is acceptable to users.

Alpha testing is usually done at the developer side by internal users or testers.

Beta testing is done by real users in the real environment before final release.

Both are used to validate the software from the user's point of view.

Therefore, Alpha and Beta testing are forms of Acceptance Testing.

Now check the options:

White-Box Testing checks internal code structure.

Black-Box Testing checks functionality without seeing internal code.

System Testing checks the complete system.

Acceptance Testing checks whether the software is acceptable for final use.

UGC NET Computer Science PYQ 2022
The process to gather the software requirements from client, analyze and document is known as -





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Requirement Engineering is the complete process of handling software requirements.

It includes:

Gathering requirements from the client

Analyzing requirements

Documenting requirements

Validating requirements

The question clearly mentions gathering, analyzing and documenting requirements.

So, this is not only requirement elicitation.

Requirement elicitation is only the activity of collecting requirements.

The complete process is called Requirement Engineering Process.

UGC NET Computer Science PYQ 2022
Size and complexity are a part of





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Software metrics are used to measure different aspects of software development.

Product metrics are related to the software product itself.

They measure properties such as:

Size of the software

Complexity of the software

Quality of the software

Performance of the software

Here, size and complexity describe the software product.

So, they are part of Product Metrics.

Now check the options:

People Metrics are related to team members.

Project Metrics are related to project cost, schedule and effort.

Process Metrics are related to software development process.

Product Metrics are related to software size, complexity and quality.

UGC NET Computer Science PYQ 2022
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
SidSnameRatingAge
22Dustin745.0
29Brutus133.0
31Lubber855.5
32Andy825.5
58Rusty1035.5
64Horatio735.5
71Zorba1016.0
74Horatio935.0
85Art325.5
95Bob363.5
Table 2: Reserves $R$
SidBidday
2210110/10/98
2210210/10/98
2210310/8/98
2210410/7/98
3110211/10/98
3110311/6/98
3110411/12/98
641019/5/98
641029/8/98
741039/8/98
Table 3: Boats $B$
BidBnameColor
101Interlakeblue
102Interlakered
103Clippergreen
104Marinered
Which of the following relational algebra query computes the Sid's of sailors with age over $20$ who have not reserved a red boat?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need sailors whose age is over $20$ and who have not reserved a red boat.

First find sailors with age over $20$.

From Sailors table:

$\pi_{sid}(\sigma_{age>20}(Sailors))=\{22,29,31,32,58,64,74,85,95\}$

Now find red boats.

From Boats table, red boats are:

$Bid=102$ and $Bid=104$

Now find sailors who reserved red boats.

From Reserves table:

$Sid=22$ reserved $Bid=102$ and $Bid=104$

$Sid=31$ reserved $Bid=102$ and $Bid=104$

$Sid=64$ reserved $Bid=102$

So,

$\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves\bowtie Sailors)=\{22,31,64\}$

Now subtract sailors who reserved red boats from sailors whose age is over $20$.

$\{22,29,31,32,58,64,74,85,95\}-\{22,31,64\}$

$=\{29,32,58,74,85,95\}$

So, the correct relational algebra expression must be:

$\pi_{sid}(\sigma_{age>20}(Sailors))-\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves\bowtie Sailors)$

UGC NET Computer Science PYQ 2022
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
SidSnameRatingAge
22Dustin745.0
29Brutus133.0
31Lubber855.5
32Andy825.5
58Rusty1035.5
64Horatio735.5
71Zorba1016.0
74Horatio935.0
85Art325.5
95Bob363.5
Table 2: Reserves $R$
SidBidday
2210110/10/98
2210210/10/98
2210310/8/98
2210410/7/98
3110211/10/98
3110311/6/98
3110411/12/98
641019/5/98
641029/8/98
741039/8/98
Table 3: Boats $B$
BidBnameColor
101Interlakeblue
102Interlakered
103Clippergreen
104Marinered
Which of the following relational algebra query/queries computes/compute the names of sailors who have reserved a red boat?Q1 $\pi_{sname}((\sigma_{color='red'}(Boats))\bowtie Reserves\bowtie Sailors)$Q2 $\pi_{sname}((\pi_{sid}((\pi_{bid}(\sigma_{color='red'}(Boats)))\bowtie Reserves))\bowtie Sailors)$Q3 $\pi_{sname}((\sigma_{color='red'}(Reserves))\bowtie Boats\bowtie Sailors)$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need the names of sailors who have reserved a red boat.

First, we must identify red boats from the Boats table.

Red boats are obtained by:

$\sigma_{color='red'}(Boats)$

After this, we need to join these red boats with Reserves table, because Reserves table tells which sailor reserved which boat.

Then we join with Sailors table to get sailor names.

So, Q1 is correct:

$\pi_{sname}((\sigma_{color='red'}(Boats))\bowtie Reserves\bowtie Sailors)$

Now check Q2.

Q2 first finds red boat IDs:

$\pi_{bid}(\sigma_{color='red'}(Boats))$

Then it joins with Reserves to find sailors who reserved those red boats.

Then it projects $sid$ and joins with Sailors to get sailor names.

So, Q2 is also correct.

Now check Q3.

Q3 applies condition $color='red'$ on Reserves.

But Reserves table does not contain the attribute $color$.

The $color$ attribute belongs to Boats table.

So, Q3 is incorrect.

Therefore, both Q1 and Q2 compute the required result.

UGC NET Computer Science PYQ 2022
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
SidSnameRatingAge
22Dustin745.0
29Brutus133.0
31Lubber855.5
32Andy825.5
58Rusty1035.5
64Horatio735.5
71Zorba1016.0
74Horatio935.0
85Art325.5
95Bob363.5
Table 2: Reserves $R$
SidBidday
2210110/10/98
2210210/10/98
2210310/8/98
2210410/7/98
3110211/10/98
3110311/6/98
3110411/12/98
641019/5/98
641029/8/98
741039/8/98
Table 3: Boats $B$
BidBnameColor
101Interlakeblue
102Interlakered
103Clippergreen
104Marinered
Which of the following relational algebra query/queries computes/compute the name of sailors who have reserved boat $103$?Q1 $\pi_{sname}((\sigma_{bid=103}(Boats))\bowtie Sailors)$Q2 $\pi_{sname}((\sigma_{bid=103}(Reserves\bowtie Sailors)))$Q3 $\pi_{sname}((\sigma_{bid=103}(Reserves))\bowtie Sailors)$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need the names of sailors who have reserved boat $103$.

The information about reservation is available in the Reserves table.

So, to find sailors who reserved boat $103$, first select those tuples from Reserves where $bid=103$.

$\sigma_{bid=103}(Reserves)$

Then join this result with Sailors table using $sid$.

Finally, project the sailor names using $\pi_{sname}$.

So, Q3 is correct:

$\pi_{sname}((\sigma_{bid=103}(Reserves))\bowtie Sailors)$

Now check Q2.

In Q2, Reserves is first joined with Sailors.

Then condition $bid=103$ is applied.

After that, sailor names are projected.

This also gives the same correct result.

So, Q2 is also correct.

Now check Q1.

Q1 selects $bid=103$ from Boats and joins it directly with Sailors.

But Boats table and Sailors table do not directly tell which sailor reserved which boat.

The Reserves table is required for this relationship.

So, Q1 is incorrect.

Therefore, both Q2 and Q3 compute the required result.

UGC NET Computer Science PYQ 2022
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
SidSnameRatingAge
22Dustin745.0
29Brutus133.0
31Lubber855.5
32Andy825.5
58Rusty1035.5
64Horatio735.5
71Zorba1016.0
74Horatio935.0
85Art325.5
95Bob363.5
Table 2: Reserves $R$
SidBidday
2210110/10/98
2210210/10/98
2210310/8/98
2210410/7/98
3110211/10/98
3110311/6/98
3110411/12/98
641019/5/98
641029/8/98
741039/8/98
Table 3: Boats $B$
BidBnameColor
101Interlakeblue
102Interlakered
103Clippergreen
104Marinered
Which of the following relational algebra query computes the names of sailor who have reserved all boats?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need the names of sailors who have reserved all boats.

In relational algebra, when we need to find entities related to all values of another relation, we use division operation.

Here,

$Reserves(Sid,Bid,day)$ tells which sailor reserved which boat.

$Boats(Bid,Bname,Color)$ tells all available boats.

First, take only required columns from Reserves:

$\pi_{sid,bid}(Reserves)$

This gives pairs of sailors and boats reserved by them.

Now take all boat IDs from Boats:

$\pi_{bid}(Boats)$

To find sailors who reserved every boat, apply division:

$(\pi_{sid,bid}(Reserves))/(\pi_{bid}(Boats))$

This gives only those $sid$ values which are associated with all $bid$ values.

Now rename this result as $Tempsids$:

$\rho(Tempsids,((\pi_{sid,bid}Reserves)/(\pi_{bid}Boats)))$

Finally, join $Tempsids$ with Sailors table to get sailor names:

$\pi_{sname}((Tempsids)\bowtie Sailors)$

So, the correct query must use:

$\pi_{sid,bid}Reserves$

and

$\pi_{bid}Boats$

with division operation.

Option (b) correctly represents this logic.

UGC NET Computer Science PYQ 2022
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
SidSnameRatingAge
22Dustin745.0
29Brutus133.0
31Lubber855.5
32Andy825.5
58Rusty1035.5
64Horatio735.5
71Zorba1016.0
74Horatio935.0
85Art325.5
95Bob363.5
Table 2: Reserves $R$
SidBidday
2210110/10/98
2210210/10/98
2210310/8/98
2210410/7/98
3110211/10/98
3110311/6/98
3110411/12/98
641019/5/98
641029/8/98
741039/8/98
Table 3: Boats $B$
BidBnameColor
101Interlakeblue
102Interlakered
103Clippergreen
104Marinered
Which of the following relational algebra query computes the names of sailors who have reserved a red and a green boat?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need the names of sailors who have reserved both types of boats:

Red boat

Green boat

First, find sailors who reserved a red boat.

Red boats are selected by:

$\sigma_{color='red'}(Boats)$

Now join this with Reserves table, because Reserves table contains the information about which sailor reserved which boat.

$\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves)$

This gives the $sid$ of sailors who reserved a red boat.

Rename this result as:

$Tempred$

So,

$Tempred=\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves)$

Now, find sailors who reserved a green boat.

Green boats are selected by:

$\sigma_{color='green'}(Boats)$

Join with Reserves table and project $sid$:

$\pi_{sid}((\sigma_{color='green'}(Boats))\bowtie Reserves)$

Rename this result as:

$Tempgreen$

So,

$Tempgreen=\pi_{sid}((\sigma_{color='green'}(Boats))\bowtie Reserves)$

Now, sailors who reserved both red and green boats will be obtained by intersection:

$Tempred\cap Tempgreen$

This gives common $sid$ values.

Finally, join this result with Sailors table to get sailor names:

$\pi_{sname}((Tempred\cap Tempgreen)\bowtie Sailors)$

Therefore, option (a) correctly finds sailors who reserved both a red and a green boat.

UGC NET Computer Science PYQ 2022
A $3000\ km$ long trunk operates at $1.536\ mbps$ and is used to transmit $64$ bytes frames and uses sliding window protocol. The propagation speed is $6\mu sec/km$

The transmission and propagation delays are respectively





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

Frame size $=64$ bytes

Data rate $=1.536\ mbps$

Distance $=3000\ km$

Propagation delay per km $=6\mu sec/km$

First, convert frame size into bits.

$1$ byte $=8$ bits

So,

$64$ bytes $=64\times 8=512$ bits

Now, transmission delay is given by:

$T_t=\frac{\text{Frame size in bits}}{\text{Data rate}}$

$T_t=\frac{512}{1.536\times 10^6}$ seconds

$T_t=333.33\times 10^{-6}$ seconds

$T_t=333.33\mu sec$

Now, propagation delay is given by:

$T_p=\text{Distance}\times \text{Propagation delay per km}$

$T_p=3000\times 6$

$T_p=18000\mu sec$

Therefore,

$T_t=333.33\mu sec$

$T_p=18000\mu sec$

UGC NET Computer Science PYQ 2022
A $3000\ km$ long trunk operates at $1.536\ mbps$ and is used to transmit $64$ bytes frames and uses sliding window protocol. The propagation speed is $6\mu sec/km$

The minimum number of bits required in the sequence number field of the packet is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

$T_t=333.33\mu sec$

$T_p=18000\mu sec$

Now,

$a=\frac{T_p}{T_t}$

$a=\frac{18000}{333.33}$

$a=54$

For sliding window protocol, sender window size required for maximum efficiency is:

$W=1+2a$

$W=1+2(54)$

$W=109$

So, sequence number field must be able to represent at least $109$ different sequence numbers.

Using $k$ bits, number of sequence numbers is:

$2^k$

Now check:

$2^6=64$

$64<109$, so $6$ bits are not sufficient.

$2^7=128$

$128\ge 109$, so $7$ bits are sufficient.

UGC NET Computer Science PYQ 2022
A $3000\ km$ long trunk operates at $1.536\ mbps$ and is used to transmit $64$ bytes frames and uses sliding window protocol. The propagation speed is $6\mu sec/km$

The sender window size to get the maximum efficiency is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

$T_t=333.33\mu sec$

$T_p=18000\mu sec$

Now,

$a=\frac{T_p}{T_t}$

$a=\frac{18000}{333.33}$

$a=54$

For maximum efficiency in sliding window protocol, sender window size should be:

$W=1+2a$

$W=1+2(54)$

$W=109$

So, sender window size required for maximum efficiency is $109$.

UGC NET Computer Science PYQ 2022
A $3000\ km$ long trunk operates at $1.536\ mbps$ and is used to transmit $64$ bytes frames and uses sliding window protocol. The propagation speed is $6\mu sec/km$

If only $6$ bits are reserved for sequence number field, then the efficiency of the system is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

Sequence number field $=6$ bits

So, total sequence numbers are:

$2^6=64$

In sliding window protocol, maximum usable sender window size is:

$W=2^6-1$

$W=64-1=63$

From previous calculation,

$a=54$

Efficiency of sliding window protocol is:

$\eta=\frac{W}{1+2a}$

$\eta=\frac{63}{1+2(54)}$

$\eta=\frac{63}{109}$

$\eta=0.578$

UGC NET Computer Science PYQ 2022
A $3000\ km$ long trunk operates at $1.536\ mbps$ and is used to transmit $64$ bytes frames and uses sliding window protocol. The propagation speed is $6\mu sec/km$

The maximum achievable throughput is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Efficiency of the system is:

$\eta=0.578$

Given data rate is:

$1.536\ Mbps$

Maximum achievable throughput is:

$Throughput=\eta\times \text{Data rate}$

$Throughput=0.578\times1.536$

$Throughput=0.887\ Mbps$

Therefore, the maximum achievable throughput is $0.887\ Mbps$.

UGC NET Computer Science PYQ 2022
Which Metrics are derived by normalizing quality and/or productivity measures by considering the size of the software that has been produced?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Size oriented metrics are derived by considering the size of the software product.

Usually, size is measured in terms of lines of code.

These metrics normalize quality and productivity measures using software size.

For example:

Productivity can be measured as output per line of code.

Quality can be measured as defects per line of code.

Since the question says that quality and/or productivity measures are normalized by considering the size of the software, it refers to Size Oriented Metrics.

UGC NET Computer Science PYQ 2022
 The model in which the requirements are implemented by its category is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In Iterative Enhancement Model, the complete system is not developed at once.

The requirements are divided into parts or categories.

Then each category of requirements is implemented step by step in different iterations.

After every iteration, the software is improved by adding new features or enhancing existing features.

Waterfall model follows a fixed sequence of phases.

Prototyping model focuses on making a prototype first.

Evolutionary model evolves the software with user feedback.

But implementing requirements category-wise is mainly related to Iterative Enhancement Model.

UGC NET Computer Science PYQ 2022
Which of the following is an indirect measure of product?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Software product measures are of two types:

Direct measures

Indirect measures

Direct measures can be measured directly, such as size, cost and effort.

Indirect measures cannot be measured directly.

They are evaluated using other factors.

Quality, complexity and reliability are indirect measures of a software product.

So, all the given options are indirect measures of product.

UGC NET Computer Science PYQ 2022
Modules X and Y operate on the same input and output, then the cohesion is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution


Cohesion means how strongly the elements of a module are related to each other.

Communicational cohesion occurs when different parts of a module operate on the same input data or produce the same output data.

Here, modules X and Y operate on the same input and output.

So, this is an example of Communicational cohesion.

Logical cohesion groups similar logical activities.

Sequential cohesion occurs when output of one part becomes input of another part.

Procedural cohesion occurs when elements follow a particular sequence.

UGC NET Computer Science PYQ 2022
In 16-bit 2's Complementation representation, the decimal number -28 is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For positive number $28$,

$28 = \text{0000 0000 0001 1100}$

Option (c) represents $-28$.

For $-28$:

$28 = \text{0000 0000 0001 1100}$

$1's\ complement = \text{1111 1111 1110 0011}$

$2's\ complement = \text{1111 1111 1110 0100}$

UGC NET Computer Science PYQ 2022
Which mode is a block cipher implementation as a self synchronizing stream cipher?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Cipher Feedback Mode is a block cipher mode that converts a block cipher into a stream cipher.

It is called self synchronizing because if some bits are lost or damaged, the system can automatically resynchronize after some blocks.

Output Feedback Mode is also used like a stream cipher, but it is a synchronous stream cipher, not self synchronizing.

Electronic Codebook Mode encrypts each block independently.

Cipher Block Chaining Mode uses the previous ciphertext block for chaining.

Therefore, the block cipher mode used as a self synchronizing stream cipher is Cipher Feedback Mode.

UGC NET Computer Science PYQ 2022
Simplify the following using K-Map. $F(A,B,C,D)=\sum(3,4,5,6,7,11,15)$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Given minterms are: $3,4,5,6,7,11,15$ Using K-Map grouping: Group 1: $4,5,6,7 \Rightarrow A'B$ Group 2: $3,7,11,15 \Rightarrow CD$ Therefore, $F(A,B,C,D)=A'B+CD$

UGC NET Computer Science PYQ 2022
Which one is a connectionless transport-layer protocol that belongs to the Internet protocol family?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Transport layer protocols are used for end-to-end communication between applications.

TCP is a connection-oriented transport layer protocol.

It establishes a connection before data transfer.

UDP is a connectionless transport layer protocol.

It does not establish a connection before sending data.

UDP sends data in the form of datagrams and is part of the Internet protocol family.

Routing Protocol works at the network layer.

Datagram Control Protocol is not the standard connectionless transport protocol in the TCP/IP family.

UGC NET Computer Science PYQ 2022
Which of the following is NOT logically equivalent to $P \to Q$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We know, $P \to Q \equiv \sim P \vee Q$ Also, contrapositive of $P \to Q$ is $\sim Q \to \sim P$ So, $P \to Q \equiv \sim Q \to \sim P$ Also, $P \to Q \equiv \sim(P \wedge \sim Q)$ Now, $\sim Q \to P \equiv Q \vee P$ This is not equivalent to $P \to Q$.

UGC NET Computer Science PYQ 2022
Consider an error-free $64$ kbps satellite channel used to send $512$-byte data frames in one direction with very short acknowledgments coming back the other way. What is the maximum throughput for a window size of $15$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

Channel bandwidth $=64$ kbps

Frame size $=512$ bytes

Frame size in bits:

$512\times 8=4096$ bits

Transmission time:

$T_t=\frac{4096}{64000}$

$T_t=0.064$ sec

$T_t=64$ ms

For a satellite channel, one-way propagation delay is generally taken as approximately $270$ ms.

So,

$a=\frac{T_p}{T_t}$

$a=\frac{270}{64}$

$a=4.21875$

For sliding window protocol, maximum efficiency is achieved when:

$W\ge 1+2a$

$1+2a=1+2(4.21875)$

$1+2a=9.4375$

Given window size is:

$W=15$

Since,

$15>9.4375$

So, the channel can be fully utilized.

Therefore, maximum throughput is equal to the channel bandwidth.

Maximum throughput $=64$ kbps

UGC NET Computer Science PYQ 2022
Seven people enter a lift. The lift stops only at three floors which are unspecified. At each of the three floors, no one enters the lift, but at least one person leaves the lift. After the three floor stops, the lift is empty. In how many ways this can happen?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Each of the $7$ people can leave at any one of the $3$ stops. Total ways without restriction: $3^7=2187$ But each stop must have at least one person leaving. Using inclusion-exclusion: Required ways $=3^7-\binom{3}{1}2^7+\binom{3}{2}1^7$ $=2187-3(128)+3(1)$ $=2187-384+3$ $=1806$

UGC NET Computer Science PYQ 2022
A classless address is given as $167.199.170.82/27$. The number of addresses in the network is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given classless address:

$167.199.170.82/27$

Here, prefix length is:

$27$

In IPv4, total bits are:

$32$

So, host bits are:

$32-27=5$

Number of addresses in the network is:

$2^{host\ bits}$

$=2^5$

$=32$

So, total number of addresses in this network is $32$.

Note: Usable host addresses would be $30$, but the question asks total number of addresses in the network.

UGC NET Computer Science PYQ 2022
The coefficient of $x^2y^3z^2$ in the expansion of $(x+y+z)^7$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In $(x+y+z)^7$, the general coefficient of $x^ay^bz^c$ is $\frac{7!}{a!b!c!}$ Here, $a=2,\ b=3,\ c=2$ So, coefficient is $\frac{7!}{2!3!2!}$ $=C(7,2)\times C(5,3)$

UGC NET Computer Science PYQ 2022
Which layer divides each message into packets at the source and re-assembles them at the destination?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

The Network layer is responsible for packet formation, routing and delivery of packets from source to destination.

At the source side, it divides data into packets.

At the destination side, it re-assembles packets to form the original message.

Transport layer mainly provides end-to-end communication and segmentation.

Data link layer works with frames.

Physical layer works with bits.

Since the question specifically says packets, the correct layer is Network layer.

UGC NET Computer Science PYQ 2022
What is the minimum number of students in a discrete mathematics class to be sure that at least six will receive the same grade, if there are seven possible grades: S, A, B, C, D, P and F?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

There are $7$ possible grades. To avoid getting $6$ students in the same grade, maximum $5$ students can receive each grade. So, maximum students without guarantee: $7\times 5=35$ Now, one more student will surely make at least $6$ students in one grade. Required number of students: $35+1=36$

UGC NET Computer Science PYQ 2022
A $4$-stage pipeline has a stage delay of $150,120,160$ and $140$ ns respectively. Registers that are used between the stages have a delay of $5$ ns. Assuming constant locking rate, the total time required to process $1000$ data items on this pipeline is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

Number of pipeline stages:

$k=4$

Number of data items:

$n=1000$

Stage delays are:

$150$ ns, $120$ ns, $160$ ns and $140$ ns

Register delay:

$5$ ns

In a pipeline, clock cycle time is decided by the slowest stage.

Slowest stage delay:

$160$ ns

So, pipeline clock cycle time is:

$160+5=165$ ns

Total time required for $n$ tasks in a $k$-stage pipeline is:

$(k+n-1)\times \text{Clock cycle time}$

$=(4+1000-1)\times 165$

$=1003\times 165$

$=165495$ ns

$=165.495\ \mu sec$

Numerically, this is approximately $165.5$.

So, according to the given options, the answer is $165.5$.

UGC NET Computer Science PYQ 2022
Consider a $3$-bit counter, designed using $T$ flip flops as shown below. Assume the initial state of the counter given by $PQR$ as $000$, what are the next three states?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

From the circuit,

$T_P=R$

$T_Q=P'$

$T_R=Q'$

For $T$ flip-flop:

If $T=0$, output remains same.

If $T=1$, output toggles.

Initial state:

$PQR=000$

Step 1:

$T_P=R=0,\ T_Q=P'=1,\ T_R=Q'=1$

So,

$PQR=011$

Step 2:

For $PQR=011$,

$T_P=R=1,\ T_Q=P'=1,\ T_R=Q'=0$

So,

$PQR=101$

Step 3:

For $PQR=101$,

$T_P=R=1,\ T_Q=P'=0,\ T_R=Q'=1$

So,

$PQR=000$

Therefore, next three states are:

$011, 101, 000$

UGC NET Computer Science PYQ 2022
Which of the following is correct for the destination address $4A:30:10:21:10:1A$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given MAC address:

$4A:30:10:21:10:1A$

To identify whether a MAC address is unicast or multicast, we check the least significant bit of the first octet.

First octet is:

$4A$

Convert $4A$ into binary:

$4A=(01001010)_2$

The least significant bit is:

$0$

If the least significant bit of the first octet is $0$, it is a unicast address.

If it is $1$, it is a multicast address.

Broadcast address is:

$FF:FF:FF:FF:FF:FF$

The given address is not broadcast.

Therefore, the given address is a unicast address.

UGC NET Computer Science PYQ 2022
Let $R_1$ and $R_2$ be two $4$-bit registers that store numbers in $2$'s complement form. For the operation $R_1+R_2$, which one of the following values of $R_1$ and $R_2$ gives an arithmetic overflow?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In $4$-bit $2$'s complement, range is

$-8$ to $+7$

Check option (b):

$R_1=1100=-4$

$R_2=1010=-6$

So,

$R_1+R_2=-4+(-6)=-10$

But $-10$ is outside the range $-8$ to $+7$.

Therefore, arithmetic overflow occurs.

UGC NET Computer Science PYQ 2022
Assume that $f(n)$ and $g(n)$ are asymptotically positive. Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

If $f(n)=O(g(n))$ and $g(n)=O(h(n))$, then by transitivity:

$f(n)=O(h(n))$

But option says:

$f(n)=\omega(h(n))$

So, option (a) is incorrect.

Check option (b):

If $f(n)=\Omega(g(n))$ and $g(n)=\Omega(h(n))$, then:

$f(n)=\Omega(h(n))$

But option says:

$f(n)=O(h(n))$

So, option (b) is incorrect.

Check option (c):

If $f(n)=o(g(n))$, then $f(n)$ grows strictly slower than $g(n)$.

If $g(n)=o(h(n))$, then $g(n)$ grows strictly slower than $h(n)$.

Therefore, $f(n)$ also grows strictly slower than $h(n)$.

So,

$f(n)=o(h(n))$

Thus, option (c) is correct.

Check option (d):

If $f(n)=\omega(g(n))$ and $g(n)=\omega(h(n))$, then:

$f(n)=\omega(h(n))$

Since $\omega(h(n))$ is stronger than $\Omega(h(n))$, option (d) is also mathematically correct.

Therefore, mathematically both option (c) and option (d) are correct.

If the exam expects only one answer, then the question has ambiguity.

UGC NET Computer Science PYQ 2022
In the context of Binding which one of the following is incorrect?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Static binding is generally done at compile time.

Absolute addresses can be decided at load time.

In dynamic binding, target of a function may be known at runtime.

But internal functions are usually handled at compile time, not link time.

UGC NET Computer Science PYQ 2022
The solution of the recurrence relation $T(n)=3T\left(\frac{n}{4}\right)+n\log n$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given recurrence is:

$T(n)=3T\left(\frac{n}{4}\right)+n\log n$

Compare with Master Theorem:

$T(n)=aT\left(\frac{n}{b}\right)+f(n)$

Here,

$a=3,\ b=4,\ f(n)=n\log n$

Now,

$n^{\log_b a}=n^{\log_4 3}$

Since,

$\log_4 3<1$

So,

$n^{\log_4 3}<n$

But,

$f(n)=n\log n$

Clearly,

$n\log n$ grows faster than $n^{\log_4 3}$.

So, by Master Theorem Case 3,

$T(n)=\theta(n\log n)$

UGC NET Computer Science PYQ 2022
Given

int arr[3][4][2] =
{
  {{2,4},{7,8},{3,4},{5,6}},
  {{7,6},{3,4},{5,3},{2,3}},
  {{8,9},{7,2},{3,4},{5,1}}
};

Which one of the following can be used to refer to element 1 in the above 3-d array?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In C language, array indexing starts from $0$.

The element $1$ is present at:

$arr[2][3][1]$

Now,

$arr+2$ points to the third $2$-D block.

$*(arr+2)$ gives $arr[2]$.

$*(arr+2)+3$ points to $arr[2][3]$.

$*(*(arr+2)+3)$ gives $arr[2][3]$.

$*(*(arr+2)+3)+1$ points to $arr[2][3][1]$.

Therefore,

$*(*(*(arr+2)+3)+1)=arr[2][3][1]=1$


UGC NET Computer Science PYQ 2022
The number of nodes of height $h$ in any $n$-element heap is atmost:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

In a heap, height of a node means the number of edges on the longest downward path from that node to a leaf.

Leaves have height $0$.

In an $n$-element heap, the number of nodes at height $h$ decreases as $h$ increases.

Standard result:

Number of nodes of height $h$ in an $n$-element heap is at most

$\left\lceil \frac{n}{2^{h+1}}\right\rceil$

Ignoring the ceiling value, it is written as:

$\frac{n}{2^{h+1}}$

So, the required expression is:

$\frac{n}{2^{h+1}}$

UGC NET Computer Science PYQ 2022
Allowing different derived classes to be used interchangeably through the interface provided by a common base class is called ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

When derived class objects are accessed through a common base class interface, the actual method call is decided at runtime.

This concept is called run time polymorphism.

UGC NET Computer Science PYQ 2022
Consider a B-tree of height $h$ minimum degree $t\ge 2$ that contains any $n$-key, where $n\ge 1$. Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

For a B-tree with minimum degree $t$, every internal node except root has at least $t$ children.

Also, every node except root has at least $t-1$ keys.

For a B-tree of height $h$, the minimum number of keys is:

$n\ge 2t^h-1$

Now solve this inequality for $h$.

$n+1\ge 2t^h$

$\frac{n+1}{2}\ge t^h$

Taking logarithm base $t$ on both sides:

$\log_t\frac{n+1}{2}\ge h$

So,

$h\le \log_t\frac{n+1}{2}$

UGC NET Computer Science PYQ 2022
In _____ curve the last and the first vertices of the polygon lie on the curve and all other vertices define the derivatives, order and shape of the curve.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In a Bezier curve, the first and last control points lie on the curve.

The remaining control points control the shape, order and derivatives of the curve.

UGC NET Computer Science PYQ 2022
Which of the following algorithm design approach is used in Quick sort algorithm?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Quick sort uses the divide and conquer technique.

In Quick sort, first we choose a pivot element.

Then the array is divided into two parts:

Elements smaller than pivot

Elements greater than pivot

After partitioning, Quick sort is applied recursively on both parts.

So, the problem is divided into smaller subproblems and then solved recursively.

This is exactly the divide and conquer approach.

UGC NET Computer Science PYQ 2022
A _____ operation combines the rows of the two relations and outputs a new relation that has both input relations' rows in it.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The union operation combines the rows of two relations.

It gives a new relation containing rows from both input relations.

UGC NET Computer Science PYQ 2022
Consider the hash table of size $11$ that uses open addressing with linear probing. Let $h(k)=k\mod 11$ be the hash function. A sequence of records with keys $43,36,92,87,11,47,11,13,14$ is inserted into an initially empty hash table, the bins of which are indexed from $0$ to $10$. What is the index of the bin into which the last record is inserted?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given hash function:

$h(k)=k\mod 11$

Hash table size is $11$, so valid indices are $0$ to $10$.

Now insert keys one by one using linear probing.

For $43$:

$43\mod 11=10$

So, $43$ is inserted at index $10$.

For $36$:

$36\mod 11=3$

So, $36$ is inserted at index $3$.

For $92$:

$92\mod 11=4$

So, $92$ is inserted at index $4$.

For $87$:

$87\mod 11=10$

Index $10$ is already filled, so check next index.

After $10$, next index is $0$.

So, $87$ is inserted at index $0$.

For $11$:

$11\mod 11=0$

Index $0$ is filled, so check next index.

Index $1$ is empty.

So, $11$ is inserted at index $1$.

For $47$:

$47\mod 11=3$

Index $3$ is filled.

Index $4$ is also filled.

Index $5$ is empty.

So, $47$ is inserted at index $5$.

For next $11$:

$11\mod 11=0$

Index $0$ is filled.

Index $1$ is filled.

Index $2$ is empty.

So, this $11$ is inserted at index $2$.

For $13$:

$13\mod 11=2$

Index $2$ is filled.

Index $3$, $4$, $5$ are also filled.

Index $6$ is empty.

So, $13$ is inserted at index $6$.

For last key $14$:

$14\mod 11=3$

Index $3$ is filled.

Index $4$ is filled.

Index $5$ is filled.

Index $6$ is filled.

Index $7$ is empty.

Therefore, the last record is inserted at index $7$.

UGC NET Computer Science PYQ 2022

Consider the relation
$R(P,Q,R,S,T,U,V,W,X,Y)$ and FDs:

${P,Q,S}\to T$

$R\to Y$

${P,Q}\to V$

${R,X}\to X$

$Q\to U$

$V\to {W,X}$

Which of the following is a candidate key?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Find closure of ${P,Q,R,S}$.

${P,Q,S}\to T$

So, we get $T$.

$R\to Y$

So, we get $Y$.

${P,Q}\to V$

So, we get $V$.

$Q\to U$

So, we get $U$.

$V\to {W,X}$

So, we get $W$ and $X$.

Therefore,

$(P,Q,R,S)^+={P,Q,R,S,T,U,V,W,X,Y}$

It contains all attributes of the relation.

UGC NET Computer Science PYQ 2022
Consider the traversal of a tree

Preorder $\to ABCEIFJDGHKL$

Inorder $\to EICFJBGDKHLA$

Which of the following is correct post order traversal?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

Preorder traversal:

$ABCEIFJDGHKL$

Inorder traversal:

$EICFJBGDKHLA$

In preorder traversal, the first element is always the root.

So, root is:

$A$

In inorder traversal, $A$ is at the end.

So, all remaining nodes are in the left subtree of $A$.

Now, after $A$, the next root in preorder is:

$B$

In inorder traversal:

$EICFJBGDKHL$

Here, nodes before $B$ are in left subtree of $B$:

$EICFJ$

Nodes after $B$ are in right subtree of $B$:

$GDKHL$

Now solve left subtree of $B$.

Preorder part is:

$CEIFJ$

Root is $C$.

Inorder part is:

$EICFJ$

Left of $C$ is $EI$ and right of $C$ is $FJ$.

For $EI$, root is $E$, so postorder is:

$IE$

For $FJ$, root is $F$, so postorder is:

$JF$

So, postorder of subtree rooted at $C$ is:

$IEJFC$

Now solve right subtree of $B$.

Preorder part is:

$DGHKL$

Root is $D$.

Inorder part is:

$GDKHL$

Left of $D$ is $G$ and right of $D$ is $KHL$.

So, left postorder is:

$G$

For right part $KHL$, root is $H$.

Left of $H$ is $K$ and right of $H$ is $L$.

So, postorder of subtree rooted at $H$ is:

$KLH$

Thus, postorder of subtree rooted at $D$ is:

$GKLHD$

Now, postorder of subtree rooted at $B$ is:

$IEJFCGKLHDB$

Finally, root $A$ comes at the end.

So, final postorder traversal is:

$IEJFCGKLHDBA$

UGC NET Computer Science PYQ 2022

Which RAID level is appropriate for storing the log file of a ticket booking system where a huge database update is required?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For log files, reliability is very important because logs help in recovery after failure.

RAID Level $1$ uses mirroring, so the same data is stored on another disk also.

Therefore, RAID Level $1$ is suitable for log files.

UGC NET Computer Science PYQ 2022
How many rotations are required during the construction of an AVL tree if the following elements are to be added in the given sequence?

$35,50,40,25,30,60,78,20,28$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Insert elements one by one in AVL tree.

Insert $35$:

Tree is balanced. No rotation.

Insert $50$:

$50$ becomes right child of $35$.

Tree is balanced. No rotation.

Insert $40$:

$40$ goes to left of $50$.

This creates Right-Left imbalance at $35$.

For Right-Left case, we do:

Right rotation at $50$

Left rotation at $35$

So far:

Left rotations $=1$

Right rotations $=1$

Insert $25$:

$25$ goes to left side.

Tree remains balanced. No rotation.

Insert $30$:

$30$ goes to right of $25$.

This creates Left-Right imbalance at $35$.

For Left-Right case, we do:

Left rotation at $25$

Right rotation at $35$

Now total:

Left rotations $=2$

Right rotations $=2$

Insert $60$:

$60$ goes to right side.

Tree remains balanced. No rotation.

Insert $78$:

$78$ goes to right of $60$.

This creates Right-Right imbalance at $50$.

For Right-Right case, we do:

Left rotation at $50$

Now total:

Left rotations $=3$

Right rotations $=2$

Insert $20$:

$20$ goes to left side.

Tree remains balanced. No rotation.

Insert $28$:

$28$ goes to right of $25$.

Tree still remains balanced. No rotation.

Therefore, total rotations are:

$3$ left rotations and $2$ right rotations.

UGC NET Computer Science PYQ 2022

If we convert a decision tree to a set of logical rules, then:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In a decision tree, each path from root to leaf becomes one rule.

Conditions within one branch are connected by AND.

Different branches represent different rules, so they are connected by OR.

UGC NET Computer Science PYQ 2022
Consider the following two lists:
List IList II
(A) Stack overflow(I) Software Interrupt
(B) Timer(II) Internal interrupt
(C) Invalid opcode(III) External interrupt
(D) Superior call(IV) Machine check interrupt





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need to match each interrupt source with its correct interrupt type.

Stack overflow occurs due to an error inside the currently executing program.

So, it is an internal interrupt.

Therefore:

$(A)-(II)$

Timer interrupt is generated by hardware timer from outside the running program.

So, it is an external interrupt.

Therefore:

$(B)-(III)$

Invalid opcode occurs when the processor finds an invalid machine instruction.

In the given matching list, it is matched with machine check interrupt.

Therefore:

$(C)-(IV)$

Superior call means supervisor call.

A supervisor call is generated by software to request operating system service.

So, it is a software interrupt.

Therefore:

$(D)-(I)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ 2022

Model of protection can be viewed as






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In operating system, protection model is commonly represented by an access matrix.

Rows represent domains.

Columns represent objects.

Entries represent access rights.

UGC NET Computer Science PYQ 2022
Let $R(ABCDEFGH)$ be a relation schema and $F$ be the set of dependencies

$F=\{A\to B,\ ABCD\to E,\ EF\to G,\ EF\to H,\ ACDF\to EG\}$

The minimal cover of a set of functional dependencies is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given functional dependencies are:

$A\to B$

$ABCD\to E$

$EF\to G$

$EF\to H$

$ACDF\to EG$

First, split the right hand side having multiple attributes.

$ACDF\to EG$ becomes:

$ACDF\to E$

$ACDF\to G$

So, the set becomes:

$A\to B$

$ABCD\to E$

$EF\to G$

$EF\to H$

$ACDF\to E$

$ACDF\to G$

Now check $ABCD\to E$.

Since,

$A\to B$

So, from $ACD$, we can get $B$ also.

Therefore,

$ACD^+=ACDB$

Now using $ABCD\to E$, we get:

$ACD\to E$

So, $B$ is extraneous in $ABCD\to E$.

Hence,

$ABCD\to E$ reduces to $ACD\to E$

Now check $ACDF\to E$.

Since we already have:

$ACD\to E$

So, $ACDF\to E$ is unnecessary.

Therefore, remove $ACDF\to E$.

Now check $ACDF\to G$.

From $ACDF$, using $ACD\to E$, we get $E$.

Now we have $E$ and $F$.

Using,

$EF\to G$

we get $G$.

So, $ACDF\to G$ is also unnecessary.

Therefore, remove $ACDF\to G$.

The remaining minimal cover is:

$A\to B$

$ACD\to E$

$EF\to G$

$EF\to H$

UGC NET Computer Science PYQ 2022

Process in memory also contain the heap section. What is the use of heap section?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Heap section is used for dynamic memory allocation during program execution.

For example, memory allocated using malloc, calloc, new, etc. is stored in heap.

UGC NET Computer Science PYQ 2022
A trigger is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

A trigger is a special type of database statement or procedure.

It is executed automatically when a specific event occurs in the database.

For example, a trigger may execute automatically when:

A record is inserted

A record is updated

A record is deleted

So, a trigger is not manually executed by the user every time.

It is automatically executed by the DBMS as a side effect of modification to the database.

Now check the options:

Option (a) is incorrect because trigger is not used to start DBMS.

Option (b) is incorrect because trigger is not mainly used for debugging.

Option (c) is incorrect because user validity checking is related to authentication or authorization.

Option (d) is correct because trigger executes automatically after database modification.

UGC NET Computer Science PYQ 2022

How many page faults occur for optimal algorithm for the following reference string, with four frames?


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






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using optimal page replacement algorithm with $4$ frames:

First four pages cause faults:

$1,2,3,4 \Rightarrow 4$ page faults

Next page $5$ causes fault. Replace page $2$ because it is not used again.

Page faults $=5$

Pages $3,4,1$ are already present, so no fault.

Next pages $6,7,8$ cause faults.

Total page faults:

$5+3=8$

UGC NET Computer Science PYQ 2022
For the following page reference string $4,3,2,1,4,3,5,4,3,2,1,5$, the number of page faults that occur in the least Recently Used $(LRU)$ page replacement algorithm with frame size $3$ is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given page reference string is:

$4,3,2,1,4,3,5,4,3,2,1,5$

Frame size $=3$

Using LRU page replacement, the least recently used page is replaced when a page fault occurs.

Now process each page:

$4$ gives page fault.

Frames: $4$

Total faults $=1$

$3$ gives page fault.

Frames: $4,3$

Total faults $=2$

$2$ gives page fault.

Frames: $4,3,2$

Total faults $=3$

$1$ gives page fault. Replace least recently used page $4$.

Frames: $1,3,2$

Total faults $=4$

$4$ gives page fault. Replace least recently used page $3$.

Frames: $1,4,2$

Total faults $=5$

$3$ gives page fault. Replace least recently used page $2$.

Frames: $1,4,3$

Total faults $=6$

$5$ gives page fault. Replace least recently used page $1$.

Frames: $5,4,3$

Total faults $=7$

$4$ is already present.

Frames: $5,4,3$

Total faults $=7$

$3$ is already present.

Frames: $5,4,3$

Total faults $=7$

$2$ gives page fault. Replace least recently used page $5$.

Frames: $2,4,3$

Total faults $=8$

$1$ gives page fault. Replace least recently used page $4$.

Frames: $2,1,3$

Total faults $=9$

$5$ gives page fault. Replace least recently used page $3$.

Frames: $2,1,5$

Total faults $=10$

Therefore, number of page faults $=10$.

UGC NET Computer Science PYQ 2022

Degree of concurrency in thread can be arranged in the manner.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In one-to-one model, each user thread maps to one kernel thread, so concurrency is high.

In many-to-many model, many user threads map to many kernel threads, so concurrency is moderate.

In many-to-one model, many user threads map to only one kernel thread, so concurrency is lowest.

Therefore,

UGC NET Computer Science PYQ 2022
A magnetic tape drive has a transport speed of $200$ inches per second and a recording density of $1600$ bytes per inch. The time required to write $600000$ of data grouped in $100$ characters records with a blocking factor of $10$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

Tape transport speed $=200$ inches/second

Recording density $=1600$ bytes/inch

Total data $=600000$ bytes

First, find the data transfer rate.

Data transfer rate $=$ Transport speed $\times$ Recording density

Data transfer rate $=200\times1600$

Data transfer rate $=320000$ bytes/second

Now, time required to write data is:

$Time=\frac{\text{Total data}}{\text{Data transfer rate}}$

$Time=\frac{600000}{320000}$

$Time=1.875$ seconds

The records are grouped in $100$ characters with blocking factor $10$, so one block has:

$100\times10=1000$ characters

This grouping affects blocking arrangement, but the total amount of data to be written remains $600000$ bytes.

Therefore, required time is:

$1.875$ sec

UGC NET Computer Science PYQ 2022

Degree of concurrency in thread can be arranged in the manner.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In one-to-one model, each user thread maps to one kernel thread, so concurrency is high.

In many-to-many model, many user threads map to many kernel threads, so concurrency is moderate.

In many-to-one model, many user threads map to only one kernel thread, so concurrency is lowest.

Therefore,

UGC NET Computer Science PYQ 2022
Consider two lists A and B of three strings on $\{0,1\}$X:
List AList B
1111
1011110
100
Y:
List AList B
10101
01111
101011
Which of the following is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

PCP means Post Correspondence Problem.

In PCP, we have to choose the same sequence of indices from both lists such that the concatenation of strings from List A and List B becomes exactly equal.

First check list X.

List X pairs are:

$1:(1,111)$

$2:(10111,10)$

$3:(10,0)$

Try the sequence of indices:

$2,1,1,3$

Now concatenate strings from List A:

$10111\cdot 1\cdot 1\cdot 10$

$=101111110$

Now concatenate strings from List B using the same index sequence:

$10\cdot 111\cdot 111\cdot 0$

$=101111110$

Both strings are equal.

So, PCP in X has a solution.

Now check list Y.

List Y pairs are:

$1:(10,101)$

$2:(011,11)$

$3:(101,011)$

A valid PCP solution must start with a pair where the first symbols can match.

Only pair $1$ can start a possible match because:

List A gives $10$

List B gives $101$

Here, List B has one extra $1$ at the end.

So after choosing pair $1$, we have:

List A $=10$

List B $=101$

Now List B is ahead by extra $1$.

To balance it, the next string from List A must start with $1$.

Possible choices are pair $1$ or pair $3$.

If we choose pair $1$ again:

List A $=1010$

List B $=101101$

Here mismatch occurs.

If we choose pair $3$:

List A $=10101$

List B $=101011$

Again List B has extra $1$.

This same situation repeats, and equality is never obtained.

Pair $2$ cannot fix it because its List A string starts with $0$, while the required next symbol should match extra $1$.

Therefore, PCP in Y has no solution.

Hence, only PCP in X has solution.


UGC NET Computer Science PYQ 2022

Which of the following is not one of the principles of good coding?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Good coding includes unit testing, clear layout and code refactoring.

But writing only self-documenting code and avoiding program documentation is not a good coding principle.

UGC NET Computer Science PYQ 2022
Consider the properties of recursively enumerable sets:

(A) Finiteness
(B) Context Freedom
(C) Emptiness
Which of the following is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

For recursively enumerable sets, these properties are related to languages accepted by Turing machines.

Now check each property one by one.

(A) Finiteness:

To decide whether a recursively enumerable language is finite or infinite, we need to know all strings accepted by the Turing machine.

But a Turing machine may not halt on some inputs.

So, finiteness of recursively enumerable sets is not decidable.

(B) Context Freedom:

To decide whether a recursively enumerable language is context-free or not is also not decidable.

This is a non-trivial property of the language accepted by a Turing machine.

By Rice's theorem, every non-trivial property of recursively enumerable languages is undecidable.

So, context freedom is not decidable.

(C) Emptiness:

Emptiness means checking whether the language accepted by a Turing machine is empty or not.

That is, we need to decide whether the Turing machine accepts at least one string.

This is also undecidable for recursively enumerable languages.

Therefore, all three properties are not decidable.

UGC NET Computer Science PYQ 2022
Which of the following is not one of the principles of good coding?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Good coding includes unit testing, clear layout and code refactoring.

But writing only self-documenting code and avoiding program documentation is not a good coding principle.

UGC NET Computer Science PYQ 2022
Consider the following : 
List IList II
(A) Activation record(I) Linker Loader
(B) Location counter(II) Garbage Collection
(C) Reference count(III) Subroutine Call
(D) Address relocation(IV) Assembler
Which of the following is correct matching?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Activation record is related to a subroutine call.

When a function or subroutine is called, an activation record is created to store information like parameters, return address and local variables.

So,

$(A)-(III)$

Location counter is used in assembler.

Assembler uses location counter to keep track of the address of the instruction or data item being assembled.

So,

$(B)-(IV)$

Reference count is related to garbage collection.

In reference counting, the system counts how many references point to an object. If the count becomes zero, that object can be removed.

So,

$(C)-(II)$

Address relocation is done by linker loader.

The linker loader adjusts addresses when a program is loaded into memory.

So,

$(D)-(I)$

Final matching is:

$(A)-(III), (B)-(IV), (C)-(II), (D)-(I)$

UGC NET Computer Science PYQ 2022
If $P$ is the risk probability, $L$ is the loss, then Risk exposure $(RE)$ is computed as ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Risk exposure is calculated by multiplying risk probability and loss.

$RE=P\times L$

UGC NET Computer Science PYQ 2022
 Consider the following related to Fourth Generation Technique $(4GT)$:

(A) It controls efforts.

(B) It controls resources.

(C) It controls cost of development.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution


Fourth Generation Technique $(4GT)$ is a software development approach that uses high-level tools and languages.

It helps in faster software development because less manual coding is required.

Now check each statement:

(A) It controls efforts.

This is correct because $4GT$ reduces manual programming effort.

(B) It controls resources.

This is also correct because fewer resources may be needed due to automation and high-level tools.

(C) It controls cost of development.

This is also correct because reduced effort and better resource usage reduce development cost.

Therefore, all statements are correct.

UGC NET Computer Science PYQ 2022
Which of the following is a technique used for component wrapping?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Component wrapping is used to make an existing component compatible with a new system.

Clear-box wrapping is a component wrapping technique where internal details of the component are available.

UGC NET Computer Science PYQ 2022
Consider the grammar $S\to SbS\mid a$.

Consider the following statements:

The string $abababa$ has

(A) two parse trees

(B) two left most derivations

(C) two right most derivations

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given grammar is:

$S\to SbS\mid a$

This grammar is ambiguous.

The string is:

$abababa$

It contains $4$ symbols $a$ and $3$ symbols $b$.

This is like combining four $a$'s using three $b$ operators.

Because the grammar does not define a fixed grouping rule, the string can be derived in more than one way.

For example, one possible grouping is:

$(((a)b(a))b(a))b(a)$

Another possible grouping is:

$(a)b((a)b((a)b(a)))$

So, the string has more than one parse tree.

For every different parse tree, there is a corresponding different left most derivation.

So, it has more than one left most derivation.

Similarly, for every different parse tree, there is a corresponding different right most derivation.

So, it has more than one right most derivation.

Therefore, all three statements are true in the sense of ambiguity.

UGC NET Computer Science PYQ 2022
The cyclomatic complexity metric provides the designer with information regarding the number of -____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Cyclomatic complexity measures the number of linearly independent paths in a program.

UGC NET Computer Science PYQ 2022
In a game playing search tree, upto which depth $\alpha-\beta$ pruning can be applied?

(A) Root $(0)$ level

(B) $6$ level

(C) $8$ level

(D) Depends on utility value in a breadth first order

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

$\alpha-\beta$ pruning is an optimization technique used with the minimax algorithm in game playing search trees.

It can be applied at any depth of the game tree.

It is not restricted to only one particular level.

Now check each statement:

(A) Root $(0)$ level

At the root level, $\alpha$ and $\beta$ values are initialized and the search starts from this level.

So, $\alpha-\beta$ pruning can be applied from root level.

Therefore, statement (A) is correct.

(B) $6$ level

If the game tree is searched up to depth $6$, then $\alpha-\beta$ pruning can be applied up to level $6$.

Therefore, statement (B) is correct.

(C) $8$ level

Similarly, if the game tree is searched up to depth $8$, then $\alpha-\beta$ pruning can also be applied up to level $8$.

Therefore, statement (C) is correct.

(D) Depends on utility value in a breadth first order

This is incorrect because $\alpha-\beta$ pruning is normally applied using depth first search, not breadth first search.

It depends on $\alpha$ and $\beta$ values during depth first minimax search.

Therefore, only (A), (B) and (C) are correct.

UGC NET Computer Science PYQ 2022
In a ______ the left and right subtrees for any given node, differ in height by more than one.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In a balanced binary tree, height difference is at most $1$.

If left and right subtrees differ in height by more than $1$, then it is an unbalanced binary tree.

UGC NET Computer Science PYQ 2022
Consider $\alpha,\beta,\gamma$ as logical variables. Identify which of the following represents correct logical equivalence:

(A) $(\alpha\land(\beta\lor\gamma))\equiv((\alpha\land\beta)\lor(\alpha\land\gamma))$
(B) $(\alpha\lor\beta)\equiv\neg\alpha\lor\beta$
(C) $(\alpha\Rightarrow\beta)\equiv(\neg\beta\Rightarrow\neg\alpha)$
(D) $(\neg(\alpha\lor\beta))\equiv(\neg\alpha\Rightarrow\neg\beta)$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Check statement (A):

$(\alpha\land(\beta\lor\gamma))\equiv((\alpha\land\beta)\lor(\alpha\land\gamma))$

This is distributive law of logic.

So, statement (A) is true.

Check statement (B):

$(\alpha\lor\beta)\equiv\neg\alpha\lor\beta$

This is not always true.

For example, let $\alpha=True$ and $\beta=False$.

Then,

$\alpha\lor\beta=True\lor False=True$

But,

$\neg\alpha\lor\beta=False\lor False=False$

Both values are different.

So, statement (B) is false.

Check statement (C):

$(\alpha\Rightarrow\beta)\equiv(\neg\beta\Rightarrow\neg\alpha)$

This is contrapositive law.

Also,

$\alpha\Rightarrow\beta\equiv\neg\alpha\lor\beta$

And,

$\neg\beta\Rightarrow\neg\alpha\equiv\beta\lor\neg\alpha$

Since,

$\neg\alpha\lor\beta\equiv\beta\lor\neg\alpha$

So, statement (C) is true.

Check statement (D):

$(\neg(\alpha\lor\beta))\equiv(\neg\alpha\Rightarrow\neg\beta)$

Using De Morgan's law,

$\neg(\alpha\lor\beta)\equiv\neg\alpha\land\neg\beta$

Now,

$\neg\alpha\Rightarrow\neg\beta\equiv\alpha\lor\neg\beta$

These two are not equivalent.

So, statement (D) is false.

Therefore, only (A) and (C) are correct.

UGC NET Computer Science PYQ 2022
FFTs are ______ techniques used to encode digital video and audio information and helps analyse the signal in ____ domain.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

FFT stands for Fast Fourier Transform.

It is used in compression techniques and helps analyze signals in the frequency domain.

UGC NET Computer Science PYQ 2022
Let $(\{a,b\},*)$ be a semigroup, where $a*a=b$.

(A) $a*b=b*a$

(B) $b*b=b$

Choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

$(\{a,b\},*)$ is a semigroup.

So, the operation $*$ is associative.

That means,

$(x*y)*z=x*(y*z)$

Also given,

$a*a=b$

Now check statement (A):

Using associativity,

$(a*a)*a=a*(a*a)$

Since $a*a=b$, we get:

$b*a=a*b$

So,

$a*b=b*a$

Therefore, statement (A) is true.

Now check statement (B):

We need to prove $b*b=b$.

Since $b=a*a$, we can write:

$b*b=(a*a)*b$

Using associativity,

$(a*a)*b=a*(a*b)$

Now, $a*b$ must be either $a$ or $b$ because the set is $\{a,b\}$.

Case 1:

If $a*b=a$, then

$a*(a*b)=a*a=b$

Case 2:

If $a*b=b$, then

$a*(a*b)=a*b=b$

In both cases,

$b*b=b$

Therefore, statement (B) is also true.

Hence, both (A) and (B) are true.

UGC NET Computer Science PYQ 2022
In Pumping Lemma for context-free languages, to say a language is satisfying pumping lemma, what is the minimum length of $vx$ together, if you consider the string as $uvwxy$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For context-free language pumping lemma,

$string = uvwxy$

Conditions are:

$|vwx|\le n$

$|vx|\ge 1$

Here, $v$ and $x$ cannot both be empty.

So, minimum length of $vx$ together is:

$1$

UGC NET Computer Science PYQ 2022
For the graph; the following sequences of depth first search $(DFS)$ are given


(A) $abcghf$

(B) $abfchg$

(C) $abfhgc$

(D) $afghbc$

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Solution:

In DFS, we start from a vertex and keep going deeper through an unvisited adjacent vertex.

From the graph, important edges are:

$a-b,\ a-c,\ a-f,\ b-c,\ b-f,\ b-h,\ c-g,\ g-h,\ f-h,\ f-g$

Now check each DFS sequence.

Check (A): $abcghf$

Path followed:

$a\to b\to c\to g\to h\to f$

All these are valid edges:

$a-b,\ b-c,\ c-g,\ g-h,\ h-f$

So, sequence (A) can be a valid DFS order.

Check (B): $abfchg$

Path starts as:

$a\to b\to f$

After reaching $f$, there are still unvisited adjacent vertices such as $h$ and $g$.

DFS should go deeper from $f$ to one of its unvisited adjacent vertices.

But the next vertex in the sequence is $c$, and $f-c$ is not an edge.

So, sequence (B) cannot be a valid DFS order.

Check (C): $abfhgc$

Path followed:

$a\to b\to f\to h\to g\to c$

All these are valid edges:

$a-b,\ b-f,\ f-h,\ h-g,\ g-c$

So, sequence (C) can be a valid DFS order.

Check (D): $afghbc$

Path followed:

$a\to f\to g\to h\to b\to c$

All these are valid edges:

$a-f,\ f-g,\ g-h,\ h-b,\ b-c$

So, sequence (D) can be a valid DFS order.

Therefore, valid DFS sequences are:

(A), (C) and (D) only.

UGC NET Computer Science PYQ 2022
Which of the following is $\epsilon$-free grammar?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In standard grammar classification, Type-$1$ grammar is context-sensitive grammar.

Context-sensitive grammar is generally $\epsilon$-free because productions do not reduce the length of strings.

So, correct option should be:

$\boxed{(b)\ \text{Type-}1}$

UGC NET Computer Science PYQ 2022
Let $\epsilon=0.0005$ and Let $R_e$ be the relation $\{(x,y)\in R^2:|x-y|<\epsilon\}$, $R_e$ could be interpreted as the relation approximately equal. $R_e$ is
(A) Reflexive
(B) Symmetric
(C) transitive
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution


Solution:

Given relation is:

$R_e=\{(x,y)\in R^2:|x-y|<\epsilon\}$

where,

$\epsilon=0.0005$

Now check each property.

Check reflexive:

A relation is reflexive if every element is related to itself.

For any real number $x$,

$|x-x|=0$

Since,

$0<\epsilon$

So,

$|x-x|<\epsilon$

Therefore, $(x,x)\in R_e$.

Hence, $R_e$ is reflexive.

So, statement (A) is true.

Check symmetric:

A relation is symmetric if $(x,y)\in R_e$ implies $(y,x)\in R_e$.

If,

$(x,y)\in R_e$

then,

$|x-y|<\epsilon$

But,

$|x-y|=|y-x|$

So,

$|y-x|<\epsilon$

Therefore, $(y,x)\in R_e$.

Hence, $R_e$ is symmetric.

So, statement (B) is true.

Check transitive:

A relation is transitive if $(x,y)\in R_e$ and $(y,z)\in R_e$ imply $(x,z)\in R_e$.

Let,

$x=0,\ y=0.0004,\ z=0.0008$

Now,

$|x-y|=|0-0.0004|=0.0004<0.0005$

So, $(x,y)\in R_e$.

Also,

$|y-z|=|0.0004-0.0008|=0.0004<0.0005$

So, $(y,z)\in R_e$.

But,

$|x-z|=|0-0.0008|=0.0008$

Since,

$0.0008>0.0005$

So, $(x,z)\notin R_e$.

Therefore, $R_e$ is not transitive.

So, statement (C) is false.

Hence, only (A) and (B) are true.


UGC NET Computer Science PYQ 2022
While processing a string by an LR parser, the reading of the given string by the parser is-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

LR parser means:

$L =$ Left to right scanning

$R =$ Rightmost derivation in reverse

So, the parser reads the input string from left to right.

So, correct option is:

$\boxed{(b)\ \text{From left to right}}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List-IList-II
A. BCNFI. It removes multivalued dependency.
B. 3NFII. It is not always dependency preserving.
C. 2NFIII. It removes transitive transparency.
D. 4NFIV. It removes partial functional dependency.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need to match each normal form with its correct property.

BCNF:

BCNF is stronger than 3NF.

A decomposition into BCNF is not always dependency preserving.

So,

$(A)-(II)$

3NF:

3NF removes transitive dependency.

In the question, it is written as transitive transparency, but the correct database term is transitive dependency.

So,

$(B)-(III)$

2NF:

2NF removes partial functional dependency.

A relation is in 2NF when it is in 1NF and no non-prime attribute is partially dependent on any candidate key.

So,

$(C)-(IV)$

4NF:

4NF removes multivalued dependency.

It is used when a relation has non-trivial multivalued dependencies.

So,

$(D)-(I)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$


UGC NET Computer Science PYQ 2022
What is the minimum and maximum number of initial, dead, unreachable and final states in a valid $n$ state finite automaton, where the language accepted is not $\varphi$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In a finite automaton:

Number of initial states is always $1$.

Minimum dead states can be $0$.

Minimum unreachable states can be $0$.

Since language accepted is not $\varphi$, at least one final state must be present.

So, minimum values are:

$1,0,0,1$

Maximum initial states $=1$

Maximum dead states $=n-1$

Maximum unreachable states $=n-1$

Maximum final states $=n$

So, correct option is:

$\boxed{(d)\ \text{Minimum: }1,0,0,1;\ \text{Maximum: }1,(n-1),(n-1),n}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List-IList-II
A. BCNFI. It removes multivalued dependency.
B. 3NFII. It is not always dependency preserving.
C. 2NFIII. It removes transitive transparency.
D. 4NFIV. It removes partial functional dependency.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each normal form with the dependency that it removes or the property related to it.

First, consider $BCNF$.

$BCNF$ means Boyce-Codd Normal Form.

It is stronger than $3NF$.

A relation decomposed into $BCNF$ gives lossless decomposition, but it is not always dependency preserving.

So,

$A-(II)$

Now, consider $3NF$.

$3NF$ means Third Normal Form.

It removes transitive dependency.

In the question, it is written as transitive transparency, but the correct database term is transitive dependency.

So,

$B-(III)$

Now, consider $2NF$.

$2NF$ means Second Normal Form.

It removes partial functional dependency.

A relation is in $2NF$ when it is in $1NF$ and no non-prime attribute is partially dependent on a candidate key.

So,

$C-(IV)$

Now, consider $4NF$.

$4NF$ means Fourth Normal Form.

It removes multivalued dependency.

So,

$D-(I)$

Therefore, the correct matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ 2022
Which protocol is used to acquire the MAC Address of a host whose IP address is known?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

ARP is used to find the MAC address when the IP address is known.

ARP stands for Address Resolution Protocol.

So, correct option is:

$\boxed{(b)\ \text{Address Resolution Protocol}}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List-IList-II
A. LocalizationI. Encapsulation
B. Packaging or binding of a collection of items.II. Abstraction
C. Mechanism that enables a designer to focus on essential details of a program component.III. Characteristic of software that indicates in a manner which information is concentrated in the program.
D. Information hiding.IV. Suppressing the operational details of a program component.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each concept with its correct meaning.

First, consider Localization.

Localization means related information or functionality is concentrated in one place or module.

So, it matches with:

III. Characteristic of software that indicates in a manner which information is concentrated in the program.

Therefore,

$(A)-(III)$

Now, consider Packaging or binding of a collection of items.

This is the definition of Encapsulation.

Encapsulation means wrapping data and related operations together in one unit.

Therefore,

$(B)-(I)$

Now, consider the mechanism that enables a designer to focus on essential details of a program component.

This is the definition of Abstraction.

Abstraction hides unnecessary details and shows only essential features.

Therefore,

$(C)-(II)$

Now, consider Information hiding.

Information hiding means hiding or suppressing internal operational details of a program component.

Therefore,

$(D)-(IV)$

Final matching is:

$(A)-(III), (B)-(I), (C)-(II), (D)-(IV)$

UGC NET Computer Science PYQ 2022
In CRC coding if the data word is $111111$, divisor is $1010$ and the remainder is $110$. Which of the following code is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In CRC, the codeword is formed as:

$Codeword = Dataword + Remainder$

Given,

$Dataword = 111111$

$Remainder = 110$

So,

$Codeword = 111111110$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List IList II
(A) Type 0(I) Finite Automata
(B) Type 1(II) Turing Machine
(C) Type 2(III) Linear bound Automata
(D) Type 3(IV) Pushdown Automata
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

This question is based on Chomsky hierarchy.

In Chomsky hierarchy:

Type $0$ grammar is unrestricted grammar.

It is accepted by Turing Machine.

So,

$(A)-(II)$

Type $1$ grammar is context sensitive grammar.

It is accepted by Linear Bounded Automata.

So,

$(B)-(III)$

Type $2$ grammar is context free grammar.

It is accepted by Pushdown Automata.

So,

$(C)-(IV)$

Type $3$ grammar is regular grammar.

It is accepted by Finite Automata.

So,

$(D)-(I)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ 2022
In Go-back-N protocol, the values of $S_f$ (Send window, the first outstanding packet) $=3$, $S_n$ (Send window, the next packet to be send) $=7$, after receiving the packet with AckNo. $6$, the value of $S_n$ is ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In Go-back-N protocol,

$S_f$ = first outstanding packet

$S_n$ = next packet to be sent

Given,

$S_f=3$

$S_n=7$

AckNo. $6$ means packets before $6$ are acknowledged.

So, $S_f$ becomes $6$.

But $S_n$ remains unchanged because next packet to be sent is still $7$.

Therefore,

$S_n=7$

So, correct option is:

$\boxed{(b)\ 7}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List-IList-II
(A) Ontological Engineering(I) Organizing subclass relations
(B) Taxonomy Hierarchy(II) Organizing knowledge into categories and sub-categories
(C) Inheritance(III) Attaches a number with each possibility
(D) Probability Modes(IV) Representing concepts, events, time, and physical concepts of different domains
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each AI concept with its correct meaning.

Ontological Engineering is used for representing knowledge of a domain.

It represents concepts, events, time and physical concepts of different domains.

So,

$(A)-(IV)$

Taxonomy Hierarchy organizes knowledge into categories and sub-categories.

It arranges concepts in a hierarchical structure.

So,

$(B)-(II)$

Inheritance is related to subclass relations.

In inheritance, lower-level classes can inherit properties from higher-level classes.

So,

$(C)-(I)$

Probability Modes are used to attach a number or probability value with each possibility.

So,

$(D)-(III)$

Final matching is:

$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$

UGC NET Computer Science PYQ 2022
What is the minimum Hamming Distance in a block code if we want to be able to detect up to $(S)$ errors?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

To detect up to $S$ errors, minimum Hamming distance should be:

$d_{min}=S+1$

So, correct option is:

$\boxed{(b)\ S+1}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List I List II
(A) Least frequently used (I) Memory is distributed among processors
(B) Critical Section (II) Page replacement policy in cache memory
(C) Loosely coupled multiprocessor system (III) Program section that once begun must complete execution before another processor accesses the same shared resource
(D) Distributed operating system (IV) O/S routines are distributed among available processors
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each term with its correct meaning.

First, consider Least frequently used.

Least frequently used is a replacement policy.

It replaces the page or cache block which is used least number of times.

So,

$(A)-(II)$

Now, consider Critical Section.

Critical section is a part of a program where shared resources are accessed.

Once one process enters the critical section, another process should not access the same shared resource at the same time.

So,

$(B)-(III)$

Now, consider Loosely coupled multiprocessor system.

In a loosely coupled multiprocessor system, each processor generally has its own local memory.

So, memory is distributed among processors.

Therefore,

$(C)-(I)$

Now, consider Distributed operating system.

In a distributed operating system, operating system routines and services are distributed among available processors.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ 2022
Which search technique is complete and optimal, when $h(n)$ is consistent?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

When heuristic function $h(n)$ is consistent, $A^*$ search is complete and optimal.

So, correct option is:

$\boxed{(c)\ A^*\ \text{Search}}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List IList II
(A) Firmware(I) Number of logical records into physical blocks
(B) Batch file(II) ASCII format
(C) Packing(III) Resource allocation
(D) Banker’s Algorithm(IV) ROM
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each term with its correct meaning.

Firmware is a low-level program stored permanently in ROM.

So,

$(A)-(IV)$

A batch file contains a sequence of commands.

Batch files are usually stored as text files in ASCII format.

So,

$(B)-(II)$

Packing means placing a number of logical records into physical blocks.

So,

$(C)-(I)$

Banker’s Algorithm is used for safe resource allocation and deadlock avoidance.

So,

$(D)-(III)$

Final matching is:

$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$

UGC NET Computer Science PYQ 2022
What is the process of capturing inference process as a single inference rule?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Generalized modus ponens captures the inference process as a single inference rule.

UGC NET Computer Science PYQ 2022
Match List I with List II:
List IList II
(A) DES(I) Key size - 256
(B) AES(II) Key size - 1024
(C) 3 DES(III) Key size - 56
(D) RSA(IV) Key size - 168
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

DES stands for Data Encryption Standard.

DES uses a $56$ bit key.

So,

$(A)-(III)$

AES stands for Advanced Encryption Standard.

AES supports different key sizes like $128$, $192$ and $256$ bits. In the given options, AES is matched with key size $256$.

So,

$(B)-(I)$

3 DES means Triple DES.

It applies DES three times, so its effective key size is commonly taken as $168$ bits.

So,

$(C)-(IV)$

RSA is a public key cryptographic algorithm.

In the given options, RSA is matched with key size $1024$.

So,

$(D)-(II)$

Final matching is:

$(A)-(III), (B)-(I), (C)-(IV), (D)-(II)$

UGC NET Computer Science PYQ 2022
Fuzzy logic is a form of ____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Fuzzy logic allows truth values between $0$ and $1$.

So, it is a form of many valued logic.

So, correct option is:

$\boxed{(d)\ \text{Many valued logic}}$

UGC NET Computer Science PYQ 2022
Match List I with List II:
List IList II
(A) BIND(I) Block the caller until a connection attempt arrives
(B) LISTEN(II) Give a local address to a socket
(C) ACCEPT(III) Show willingness to accept connections
(D) SOCKET(IV) Create a new point
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

This question is based on socket system calls.

BIND is used to assign a local address to a socket.

So,

$(A)-(II)$

LISTEN is used by the server to show that it is ready to accept incoming connection requests.

So,

$(B)-(III)$

ACCEPT is used to accept a connection request.

If no connection request is available, it blocks the caller until a connection attempt arrives.

So,

$(C)-(I)$

SOCKET is used to create a new communication endpoint.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ 2022
The $4$ Ws problem canvas helps in identifying the key elements related to the problem. $4$ Ws problem canvas is a part of ____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The $4$ Ws problem canvas is used in the problem scoping stage.

It helps identify key problem elements like who, what, where and why.

UGC NET Computer Science PYQ 2022
Match List I with List II:
List IList II
(A) Physical layer(I) Routing of the signals, divide the outgoing message into packets, act as network controller for routing data
(B) Data link layer(II) Make and break connections, define voltages and data rates, convert data bits into electrical signal
(C) Network layer(III) Synchronization, error detection, and correction, assemble outgoing message into frames
(D) Presentation layer(IV) It works as a translating layer
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each OSI layer with its correct function.

First, consider Physical layer.

Physical layer deals with transmission of raw bits over a physical medium.

It defines voltages, data rates, connectors and converts data bits into electrical signals.

So,

$(A)-(II)$

Now, consider Data link layer.

Data link layer converts packets into frames.

It also handles synchronization, error detection and error correction.

So,

$(B)-(III)$

Now, consider Network layer.

Network layer is responsible for routing.

It divides outgoing messages into packets and controls routing of data from source to destination.

So,

$(C)-(I)$

Now, consider Presentation layer.

Presentation layer works as a translating layer.

It handles data translation, encryption, decryption and compression.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ 2022
Consider the following statements:

A. A group can have zero elements.

B. A group cannot have any element which is idempotent except the identity element.

C. An isomorphism from a group $\langle G,\rangle$ to $\langle G,\rangle$ is called an automorphism.

D. If every element in a group is its own inverse, then the group must be abelian.

Choose the correct answer about the four statements given above.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is false.

A group cannot have zero elements because every group must contain an identity element.

Statement B is true.

If $a$ is idempotent, then

$a*a=a$

Multiplying by $a^{-1}$,

$a=e$

So, only identity element is idempotent.

Statement C is true.

An isomorphism from a group to itself is called an automorphism.

Statement D is true.

If every element is its own inverse, then

$a^{-1}=a$ and $b^{-1}=b$

Now,

$(ab)^{-1}=b^{-1}a^{-1}=ba$

But every element is its own inverse, so

$(ab)^{-1}=ab$

Therefore,

$ab=ba$

Hence, the group is abelian.

So, correct option is:

$\boxed{(a)\ \text{B, C and D are correct}}$

UGC NET Computer Science PYQ 2022
Consider the following algorithms and their running times:
List IList II
(A) Breadth First Search(I) $\theta(V+E)$
(B) Rabin-Karp Algorithm(II) $O(V+E)$
(C) Depth-First Search(III) $\theta((n-m+1)m)$
(D) Heap sort (worst case)(IV) $O(n^2)$
(E) Quick sort (worst case)(V) $O(n\log n)$
Which one of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Breadth First Search visits every vertex and every edge of a graph.

So, its time complexity is:

$O(V+E)$

Therefore,

$(A)-(II)$

Rabin-Karp Algorithm compares the pattern of length $m$ with possible positions in the text.

In the worst case, it may take:

$\theta((n-m+1)m)$

Therefore,

$(B)-(III)$

Depth-First Search also visits every vertex and every edge.

So, its running time is:

$\theta(V+E)$

Therefore,

$(C)-(I)$

Heap sort has worst case time complexity:

$O(n\log n)$

Therefore,

$(D)-(V)$

Quick sort has worst case time complexity:

$O(n^2)$

This happens when partitioning is highly unbalanced.

Therefore,

$(E)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(V), (E)-(IV)$

UGC NET Computer Science PYQ 2022

 Consider the following statements:

A. The number of labelled binary trees possible with $n$ nodes is $\frac{(2n)!}{(n+1)!}$

B. The number of binary search trees possible with $n$ nodes is $\frac{(2n)!}{(n+1)!n!}$

C. The number of unlabeled binary trees possible with $n$ nodes is $\frac{C(2n,n)}{(n+1)!}$

D. The number of simple, undirected and labelled graphs possible with $n$ vertices is $2^{\frac{n(n-1)}{2}}$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

A is correct.

Number of labelled binary trees with $n$ nodes:

$=C_n\times n!$

$=\frac{(2n)!}{(n+1)!n!}\times n!$

$=\frac{(2n)!}{(n+1)!}$

B is correct.

Number of binary search trees with $n$ nodes:

$=C_n=\frac{(2n)!}{(n+1)!n!}$

C is incorrect.

Correct formula for unlabeled binary trees is:

$C_n=\frac{1}{n+1}C(2n,n)$

D is correct.

Number of simple undirected labelled graphs:

$=2^{\frac{n(n-1)}{2}}$

So, correct option is:

$\boxed{(b)\ \text{A, B and D are only correct}}$

UGC NET Computer Science PYQ 2022
Consider the following:
List IList II
(A) Stack algorithm(I) Deadlock
(B) Elevator algorithm(II) Disk scheduling
(C) Priority scheduling algorithm(III) Page replacement
(D) Havender's algorithm(IV) CPU scheduling
Which of the following is the correct matching?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Stack algorithm is related to page replacement.

In page replacement, stack algorithms have the property that the set of pages in memory with fewer frames is always a subset of the set with more frames.

So,

$(A)-(III)$

Elevator algorithm is used in disk scheduling.

It is also known as the SCAN disk scheduling algorithm.

So,

$(B)-(II)$

Priority scheduling algorithm is a CPU scheduling algorithm.

In this algorithm, the process with higher priority is scheduled first.

So,

$(C)-(IV)$

Havender's algorithm is related to deadlock prevention.

It prevents deadlock by denying one of the necessary conditions for deadlock.

So,

$(D)-(I)$

Final matching is:

$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ 2022

The relation


$R={(1,3),(1,1),(3,1),(1,2),(3,3),(4,4)}$


defined in ${1,2,3,4}$ is ____






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For reflexive relation, $(1,1),(2,2),(3,3),(4,4)$ must be present.

But $(2,2)$ is missing.

So, relation is not reflexive.

For symmetric relation, if $(1,2)$ is present, then $(2,1)$ must also be present.

But $(2,1)$ is missing.

So, relation is not symmetric.

For transitive relation, since $(3,1)$ and $(1,2)$ are present, then $(3,2)$ must be present.

But $(3,2)$ is missing.

So, relation is not transitive.

UGC NET Computer Science PYQ 2022
Consider the following statements of approximation algorithm:

Statement I: Vertex-cover is a polynomial time 2-approximation algorithm.
Statement II: TSP-tour is a polynomial time 3-approximation algorithm for travelling salesman problem with the triangle inequality.
Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

For the Vertex Cover problem, there is a standard polynomial time approximation algorithm.

It repeatedly chooses an edge and includes both endpoints in the vertex cover.

This gives a solution whose size is at most $2$ times the optimal solution.

So, Vertex-cover has a polynomial time $2$-approximation algorithm.

Therefore, Statement I is true.

Statement II:

For Travelling Salesman Problem with triangle inequality, the standard MST based TSP-tour approximation algorithm gives a $2$-approximation.

It does not give a $3$-approximation as the standard result.

So, the statement saying it is a polynomial time $3$-approximation algorithm is not correct in the standard form.

Therefore, Statement II is false.

UGC NET Computer Science PYQ 2022

Consider the Boolean expression given by


$F=(X+Y+Z)(X'+Y)(Y'+Z)$


Which of the following Boolean expressions is/are equivalent to $F'$?


A. $(X'+Y'+Z')(X+Y')(Y+Z')$


B. $(XY'+Z')$


C. $(X+Z')(Y'+Z')$


D. $(XY'+YZ'+X'Y'Z')$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

$F=(X+Y+Z)(X'+Y)(Y'+Z)$

Taking complement,

$F'=(X+Y+Z)' + (X'+Y)' + (Y'+Z)'$

Using De Morgan's law,

$F'=X'Y'Z' + XY' + YZ'$

So,

$F'=XY'+YZ'+X'Y'Z'$

This matches statement D.

Now simplify:

$F'=XY'+YZ'+X'Y'Z'$

$=XY'+Z'(Y+X'Y')$

$=XY'+Z'(Y+X')$

$=XY'+YZ'+X'Z'$

This is also equivalent to:

$XY'+Z'$

So, statement B is correct.

Also,

$(X+Z')(Y'+Z')$

$=XY'+XZ'+Y'Z'+Z'$

$=XY'+Z'$

So, statement C is also correct.

Statement A is not equivalent.

Therefore, correct statements are B, C and D.

So, correct option is:

$\boxed{(b)\ \text{B, C and D Only}}$

UGC NET Computer Science PYQ 2022
Consider the following statements:

Statement I: Conservative 2 PL is a deadlock-free protocol.

Statement II: Thomas's write rule enforces conflict serializability.

Statement III: Timestamp ordering protocol ensures serializability based on the order of transaction timestamps.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

Conservative $2PL$ means Conservative Two Phase Locking.

In this protocol, a transaction obtains all required locks before it starts execution.

If all locks are not available, the transaction does not start.

Because a transaction does not hold some locks while waiting for other locks, circular wait cannot occur.

So, Conservative $2PL$ is deadlock-free.

Therefore, Statement I is true.

Statement II:

Thomas's write rule is a modification of timestamp ordering.

It allows some obsolete write operations to be ignored.

Because of this, it can generate schedules that are view serializable but not necessarily conflict serializable.

So, Thomas's write rule does not enforce conflict serializability.

Therefore, Statement II is false.

Statement III:

Timestamp ordering protocol assigns a timestamp to every transaction.

The serial order of transactions is decided according to their timestamps.

So, it ensures serializability based on the timestamp order.

Therefore, Statement III is true.

Hence, Statement I and Statement III are true, and Statement II is false.

UGC NET Computer Science PYQ 2022

Which of the following statement is/are True?

A. The processor has direct access to both primary and secondary memory

B. Primary memory stores the active instructions and data for the program being executed on the process

C. Secondary memory is used as a backup memory

D. Memory system is implemented on a single level memory






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is false because the processor directly accesses primary memory, not secondary memory.

Statement B is true because primary memory stores currently executing instructions and data.

Statement C is true because secondary memory is used for permanent or backup storage.

Statement D is false because memory system is organized in multiple levels.

So, correct option is:

$\boxed{(b)\ \text{B and C only}}$

UGC NET Computer Science PYQ 2022
Consider the following statements:

Statement I: Composite attributes cannot be divided into smaller subparts.

Statement II: Complex attribute is formed by nesting composite attributes and multivalued attributes in an arbitrary way.

Statement III: A derived attribute is an attribute whose values are computed from other attribute.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

Composite attributes are attributes that can be divided into smaller subparts.

For example, Name can be divided into First Name, Middle Name and Last Name.

So, the statement "Composite attributes cannot be divided into smaller subparts" is false.

Therefore, Statement I is false.

Statement II:

Complex attributes are formed by combining composite attributes and multivalued attributes.

They may contain nested structures.

So, complex attributes can be formed by nesting composite attributes and multivalued attributes.

Therefore, Statement II is true.

Statement III:

A derived attribute is an attribute whose value is calculated from another attribute.

For example, Age can be derived from Date of Birth.

So, Statement III is true.

Therefore:

Statement I is false.

Statement II is true.

Statement III is true.

UGC NET Computer Science PYQ 2022

Inheritance provides the benefits of

A. shared interfaces

B. run-time polymorphism

C. less redundant information

D. dynamic binding






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Inheritance helps in code reusability, so it reduces redundant information.
It also supports run-time polymorphism and dynamic binding.
Shared interface is more directly related to interface or abstraction concept.
So, correct option is:
$\boxed{(c)\ \text{B, C, D only}}$

UGC NET Computer Science PYQ 2022
A top down approach to programming calls for:

Statement I: Working from the general to the specific.

Statement II: Postpone the minor decisions.

Statement III: A systematic approach.

Statement IV: Intermediate coding of the problem

Which of the following is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Top down approach is a programming and design method in which a large problem is divided into smaller subproblems.

Statement I:

Top down approach starts from the general problem and then moves toward specific details.

So, Statement I is true.

Statement II:

In top down approach, major design decisions are taken first.

Minor details are postponed until lower-level modules are designed.

So, Statement II is true.

Statement III:

Top down approach follows a systematic method of stepwise refinement.

The problem is refined step by step into smaller and simpler modules.

So, Statement III is true.

Statement IV:

Top down approach does not mean intermediate coding of the problem.

It focuses on design and decomposition before detailed coding.

So, Statement IV is false.

Therefore:

Statement I is true.

Statement II is true.

Statement III is true.

Statement IV is false.

UGC NET Computer Science PYQ 2022

Which of the following is correct using the constructor?

A. string s1;

B. string s2(s1);

C. string s3{7};

D. string s4{'a'};

E. string s5{7,'a'};
Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

A is valid because it calls the default constructor.
B is valid because it calls the copy constructor.
C is not valid as a normal string constructor form.
D is valid because it initializes the string using character value.
E is valid because it initializes string with count and character.
So, correct option is:
$\boxed{(a)\ \text{A, B, D, E only}}$

UGC NET Computer Science PYQ 2022
Consider the following statements:

Statement I: LALR parser is more powerful than canonical LR Parser.

Statement II: SLR parser is more powerful than LALR.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

The power hierarchy of LR parsers is:

$SLR < LALR < Canonical\ LR$

Now check Statement I:

Statement I says that LALR parser is more powerful than canonical LR Parser.

But actually Canonical LR parser is more powerful than LALR parser.

So, Statement I is false.

Now check Statement II:

Statement II says that SLR parser is more powerful than LALR.

But actually LALR parser is more powerful than SLR parser.

So, Statement II is false.

Therefore, both Statement I and Statement II are false.

UGC NET Computer Science PYQ 2022

Suppose that a corporate website appearance varies according to the department that owns various documents. All the documents need to follow the corporate look and feel. The HR department does not need a separate style sheet. It needs only the sheet containing the difference from the corporate sheet.

Which of the following statements justify the above scenario?

A. The styles sheets cannot stack on each other

B. The style sheets can stack on each other

C. The style sheets can override each other

D. The style sheets cannot override each other






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In CSS, multiple style sheets can be applied together.

This is called cascading.

Also, one style sheet can override rules of another style sheet.

So, correct statements are B and C.

So, correct option is:

$\boxed{(b)\ \text{B, C Only}}$

UGC NET Computer Science PYQ 2022
Consider the following statements about Context Free Language (CFL):

Statement I: CFL is closed under homomorphism.

Statement II: CFL is closed under complement.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

Context Free Languages are closed under homomorphism.

It means if a language is context free, then its homomorphic image is also context free.

So, Statement I is true.

Statement II:

Context Free Languages are not closed under complement.

This means if $L$ is a CFL, then complement of $L$ may not be a CFL.

So, Statement II is false.

Therefore, Statement I is true and Statement II is false.

UGC NET Computer Science PYQ 2022

Let $T_1$ be a transaction that transfer Rs. $50$ from account A to account B. This transaction can be defined as follows:

 StepOperation 
1  Read (A)
 2A: A-50 
 3 Write(A)
 4 Read(B)
 5B:=B+50 
 6 Write (B)
What will be the status of a database just after $3^{rd}$ step but before $5^{th}$ step of transaction execution?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

After step $3$, amount Rs. $50$ has been deducted from account A.

But before step $5$, Rs. $50$ has not yet been added to account B.

So, for some time, the total balance may not match the original total balance.

Therefore, the database may be temporarily inconsistent.

So, correct option is:

$\boxed{(b)\ \text{May be temporarily inconsistent}}$

UGC NET Computer Science PYQ 2022
Consider the following in Boolean Algebra

$X:a\lor(b\land(a\lor c))=(a\lor b)\land(a\lor c)$

$Y:a\land(b\lor(a\land c))=(a\land b)\lor(a\land c)$

$a\lor(b\land c)=(a\lor b)\land c$ is satisfied if





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Check $X$:

$X:a\lor(b\land(a\lor c))=(a\lor b)\land(a\lor c)$

This follows the distributive law:

$a\lor(b\land d)=(a\lor b)\land(a\lor d)$

Here,

$d=(a\lor c)$

So,

$a\lor(b\land(a\lor c))=(a\lor b)\land(a\lor(a\lor c))$

$=(a\lor b)\land(a\lor c)$

Therefore, $X$ is true.

Now check $Y$:

$Y:a\land(b\lor(a\land c))=(a\land b)\lor(a\land c)$

Using distributive law:

$a\land(b\lor d)=(a\land b)\lor(a\land d)$

Here,

$d=(a\land c)$

So,

$a\land(b\lor(a\land c))=(a\land b)\lor(a\land a\land c)$

$=(a\land b)\lor(a\land c)$

Therefore, $Y$ is true.

Hence, both $X$ and $Y$ are true.

Hence, the correct answer is $\boxed{(c)}$

UGC NET Computer Science PYQ 2022

onsider the relation

$Student(stuid,dept,clsroll)$

The following functional dependencies are given:

$FD1: stuid \to dept$

$FD2: dept \to stuid$

$FD3: stuid \to clsroll$

$FD4: clsroll \to stuid$

$FD5: dept \to clsroll$

Which functional dependencies should be removed to obtain the canonical cover of the set?

A. FD2 and FD3

B. FD1 and FD5

C. FD5

D. FD1

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Given FDs:

$FD1: stuid \to dept$

$FD2: dept \to stuid$

$FD3: stuid \to clsroll$

$FD4: clsroll \to stuid$

$FD5: dept \to clsroll$

Check redundancy:

$FD5: dept \to clsroll$ can be derived as:

$dept \to stuid$ using $FD2$

$stuid \to clsroll$ using $FD3$

So,

$dept \to clsroll$

Therefore, $FD5$ is redundant.

Also, $FD2$ and $FD3$ can be removed together because:

$dept \to clsroll$ using $FD5$

$clsroll \to stuid$ using $FD4$

So,

$dept \to stuid$

Also,

$stuid \to dept$ using $FD1$

$dept \to clsroll$ using $FD5$

So,

$stuid \to clsroll$

Therefore, $FD2$ and $FD3$ are also removable together.

Hence, correct statements are A and C only.

So, correct option is:

$\boxed{(b)\ \text{A, C only}}$

UGC NET Computer Science PYQ 2022
A good software requirement specification does NOT have the characteristic





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

A good SRS means Software Requirement Specification.

A good SRS should have characteristics like:

Completeness

Consistency

Clarity

Correctness

Verifiability

Modifiability

Traceability

Now check the options:

Completeness is a characteristic of good SRS because all requirements should be included.

Consistency is a characteristic of good SRS because requirements should not conflict with each other.

Clarity is a characteristic of good SRS because requirements should be clearly written and easily understood.

Reliability is mainly a software quality characteristic, not a direct characteristic of SRS.

Therefore, a good SRS does NOT have Reliability as its main SRS characteristic.

UGC NET Computer Science PYQ 2022

Which of the following statements are true?

A. If the time quantum is extremely small, round robin can result in a large number of context switches.

B. The average turnaround time of a set of processes does not necessarily improve as the time-quantum size increases.

C. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is true because very small time quantum causes frequent context switching.

Statement B is true because increasing time quantum does not always improve average turnaround time.

Statement C is true because if most processes finish in one time quantum, turnaround time can improve.

So, all A, B and C are true.

UGC NET Computer Science PYQ 2022
Given below are two statements: one is labelled as Assertion (A) and the other is labelled as Reason (R):

Assertion (A): $\bar{p}$

Reason (R): $(r\to \bar{q},\ r\lor s,\ s\to \bar{q},\ p\to q)$

In the light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution


Given Reason statements are:

$r\to \bar{q}$

$r\lor s$

$s\to \bar{q}$

$p\to q$

From $r\lor s$, either $r$ is true or $s$ is true.

Case 1:

If $r$ is true, then using $r\to \bar{q}$, we get:

$\bar{q}$

Case 2:

If $s$ is true, then using $s\to \bar{q}$, we get:

$\bar{q}$

So, in both cases:

$\bar{q}$ is true.

Now we also have:

$p\to q$

Using modus tollens:

$p\to q$ and $\bar{q}$ imply $\bar{p}$.

Therefore, Assertion (A), that is $\bar{p}$, is true.

Also, Reason (R) correctly explains how $\bar{p}$ is obtained.

Hence, both (A) and (R) are true and (R) is the correct explanation of (A).

UGC NET Computer Science PYQ 2022

Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.

 Process Name Arrival Time  Execution Time
 A0 6 
B 3 2 
C 5 4 
D 7 6 
E 10 3 

Using the shortest remaining time first scheduling algorithm, the average process turnaround (in milliseconds) is ____







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using SRTF scheduling:

$A: 0 \to 3$

$B: 3 \to 5$

$A: 5 \to 8$

$C: 8 \to 12$

$E: 12 \to 15$

$D: 15 \to 21$

Completion times:

$A=8,\ B=5,\ C=12,\ D=21,\ E=15$

Turnaround time $=$ Completion time $-$ Arrival time

$A=8-0=8$

$B=5-3=2$

$C=12-5=7$

$D=21-7=14$

$E=15-10=5$

Average turnaround time:

$=\frac{8+2+7+14+5}{5}$

$=\frac{36}{5}$

$=7.2$

Correct option is:

$\boxed{(a)\ 7.2}$


UGC NET Computer Science PYQ 2022
Of the following, which is NOT a logical error?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

A logical error means the program runs, but it gives wrong output because the logic is incorrect.

Now check each option.

Option (a):

Using $'='$ instead of $'===' $ for comparison is a logical error.

Because $'='$ is used for assignment, while $'===' $ is used for strict comparison.

So, this may give wrong result.

Option (b):

Divide by zero is generally considered a run-time error.

The program may stop during execution.

Option (c):

Failing to initialize counter and total variables before loop execution is a logical error.

Because the program may use garbage or incorrect values and produce wrong output.

Option (d):

Using commas instead of required semicolons in a for loop header is a syntax error.

The program will not compile or run properly.

Since the question asks which is NOT a logical error, the best answer is syntax error.

UGC NET Computer Science PYQ 2022

Select the correct order of basic page replacement.

A. Page replacement algorithm is used in case there is no free frame

B. The process is continued by restarting the instruction caused by TRAP

C. Location of desired frame is found from disk

D. Desired page is brought into newly freed frame and page and frame tables are updated






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Basic page replacement order is:

First, location of desired page is found from disk.

Then, if no free frame is available, page replacement algorithm is applied.

Then, desired page is brought into newly freed frame and page table and frame table are updated.

Finally, the process is restarted from the instruction that caused the trap.

So, correct order is:

$C,A,D,B$

Correct option is:

$\boxed{(c)\ C,A,D,B}$


UGC NET Computer Science PYQ 2022
Given below are two statements: one is labelled as Assertion (A) and the other is labelled as Reason (R):

Assertion (A): A load-and-go assembler avoids the overhead of writing the object program out and reading it back in.

Reason (R): This can be done with either one-pass or two pass assembler.

In the light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Assertion (A):

A load-and-go assembler directly loads the translated machine code into memory for execution.

It does not create a separate object program file first.

So, it avoids two extra steps:

Writing the object program out

Reading the object program back in

Therefore, Assertion (A) is true.

Reason (R):

A load-and-go assembler can be implemented using one-pass assembler or two-pass assembler technique.

So, Reason (R) is also true.

But Reason (R) only tells that load-and-go can be done using one-pass or two-pass assembler.

It does not explain why the overhead of writing and reading the object program is avoided.

The overhead is avoided because the object code is loaded directly into memory.

Therefore, both (A) and (R) are true, but (R) is not the correct explanation of (A).

UGC NET Computer Science PYQ 2022

Given below are two statements:

Statement I: Software testing must be recognized as a significant effort, and its planning must begin at the earliest possible time.

Statement II: The cost of software testing is an important contribution in determining overall software development costs.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement I is true because software testing planning should start early in the software development life cycle.

Statement II is also true because testing cost is a major part of total software development cost.

So, correct option is:

$\boxed{(a)\ \text{Both Statement I and Statement II are true}}$


UGC NET Computer Science PYQ 2022
Which statement is false?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Check option (a):

In C language, function arguments are passed by value.

It means a copy of the actual argument is passed to the function.

So, option (a) is true.

Check option (b):

Call by reference allows a function to modify the original variable of the calling function.

So, option (b) is true.

Check option (c):

Call by value is not always more efficient than call by reference.

For large data structures, passing by reference or using pointers can be more efficient because copying large data is avoided.

So, option (c) is false.

Check option (d):

C does not directly support call by reference.

But programmers use pointers and indirection operators to simulate call by reference.

So, option (d) is true.

Therefore, the false statement is option (c).

UGC NET Computer Science PYQ 2022

Which of the following need not be assessed during unit testing?

A. Algorithmic performance.

B. Number of lines of code.

C. Error handling.

D. Execution paths.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

During unit testing, error handling is important to test.

But algorithmic performance, number of lines of code and execution paths are not the main assessment points in this context.

So, correct option is:

$\boxed{(b)\ \text{A, B, D only}}$


UGC NET Computer Science PYQ 2022
Given below are two statements:

Statement I: "Grandparent is a parent of one's parent".

Statement II: First Order Predicate Logic (FOPL) representation of above statement is

$\forall g,c\ grandparent(g,c)\Leftrightarrow \exists p\ parent(g,p)\land parent(p,c)$

In the light of the above statements, choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I says:

Grandparent is a parent of one's parent.

This is correct.

For example, if $g$ is parent of $p$ and $p$ is parent of $c$, then $g$ is grandparent of $c$.

Now check Statement II:

$\forall g,c\ grandparent(g,c)\Leftrightarrow \exists p\ parent(g,p)\land parent(p,c)$

This means:

For all $g$ and $c$, $g$ is grandparent of $c$ if and only if there exists some $p$ such that $g$ is parent of $p$ and $p$ is parent of $c$.

This is the correct FOPL representation of the grandparent relation.

Therefore, both Statement I and Statement II are correct.

UGC NET Computer Science PYQ 2022

Which of the following rotations are correctly explained in the context of an AVL tree?

A. LL rotation: The new node is inserted in the left sub-tree of the left sub-tree of the critical node.

B. RR rotation: The new node is inserted in the right sub-tree of the right sub-tree of the critical node.

C. LR rotation: The new node is inserted in the right sub-tree of the left sub-tree of the critical node.

D. RL rotation: The new node is inserted in the left sub-tree of the right sub-tree of the critical node.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

All four AVL rotation cases are correctly explained:

LL case: left of left

RR case: right of right

LR case: right of left

RL case: left of right

So, correct option is:

$\boxed{(c)\ \text{A, B, C and D}}$


UGC NET Computer Science PYQ 2022
Given below are two statements:Statement I: Consider $20$ bit 'Branch' microinstruction code format given below:
F1F2F3CDBRAD
$3$ bits$3$ bits$3$ bits$2$ bits$2$ bits$7$ bits
$F1,F2,F3$: Micro-operation fields$CD$: Condition for branching$BR$: Branch field$AD$: Address fieldStatement II: Instruction represented in above format can perform branch in $4$ conditions.In the light of the above statements, choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I gives the format of a branch microinstruction.

The total number of bits in the format is:

$3+3+3+2+2+7=20$

So, the given format is a $20$ bit microinstruction format.

Therefore, Statement I is correct.

Now check Statement II.

The field $CD$ is used for condition selection in branching.

Size of $CD$ field is:

$2$ bits

With $2$ bits, the number of possible conditions is:

$2^2=4$

So, the instruction represented in this format can perform branching based on $4$ possible conditions.

Therefore, Statement II is also correct.

Hence, both Statement I and Statement II are correct.

UGC NET Computer Science PYQ 2022

In the context of a Hamiltonian problem, which of the following are correct?

A. Hamiltonian cycle problem is NP-Complete

B. If $G$ is an undirected Bipartite graph with an odd number of vertices, then $G$ is Hamiltonian.

C. Hamiltonian path problem cannot be solved in polynomial time on directed acyclic graph

D. If $G$ is a connected undirected graph with at least three vertices and $G^3$ is the graph obtained by connecting all pairs of vertices that are connected by a path in $G$ of length at most $3$.

E. If any NP complete problem is polynomial time solvable the $(P=NP)$.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is true.

Hamiltonian cycle problem is NP-Complete.

Statement B is false.

A bipartite graph with odd number of vertices cannot have a Hamiltonian cycle.

Statement C is false.

Hamiltonian path problem can be solved in polynomial time for directed acyclic graph.

Statement D is true.

In graph power concept, $G^3$ connects vertices having distance at most $3$ in $G$.

Statement E is true.

If any NP-Complete problem is solved in polynomial time, then $P=NP$.

So, correct statements are A, D and E.

Correct option is:

$\boxed{(c)\ \text{A, D, E only}}$


UGC NET Computer Science PYQ 2022

For matrix multiplication, if we use divide and conquer algorithm, then ______

A. the running time is $T(n)=\Theta(n^3)$

B. the running time is $T(n)=\Theta(n^2\log n)$

C. The recurrence can be defined as $T(n)=8T(n/2)+\Theta(n^2)$

D. the recurrence relation is $T(n)=8T(2n)+\Theta(n^2\log n)$

E. Masters theorem, one of the cases is applicable

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In divide and conquer matrix multiplication, matrix is divided into smaller submatrices.

There are $8$ recursive multiplications of size $n/2$.

So, recurrence is:

$T(n)=8T(n/2)+\Theta(n^2)$

Using Master Theorem:

$a=8,\ b=2$

$n^{\log_b a}=n^{\log_2 8}=n^3$

So,

$T(n)=\Theta(n^3)$

Therefore, A, C and E are correct.

Correct option is:

$\boxed{(a)\ \text{A, C, E only}}$


UGC NET Computer Science PYQ 2022

Which of the following Finite Automata,

recognizes the language L = {a , b}* ?
A. $M=({q_0},{a,b},\delta,q_0,{q_0})$ where, $\delta$ is







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The language $L={a,b}^*$ means all possible strings over $a$ and $b$, including null string $\epsilon$.


So, an automaton recognizes $L={a,b}^*$ if every string made from $a$ and $b$ is accepted.


In A, $q_0$ is the initial and final state, and both $a$ and $b$ return to $q_0$.


So, A accepts all strings over ${a,b}$.


In B and C, $q_0$ and $q_1$ are final states, so all possible moves remain in final states.


So, B and C also accept all strings over ${a,b}$.


In D, $q_0$ is final and from $q_0$, both $a$ and $b$ return to $q_0$. Other states do not affect acceptance because starting from $q_0$, every input stays at $q_0$.


So, D also accepts all strings over ${a,b}$.


Therefore, A, B, C and D recognize $L={a,b}^*$.


UGC NET Computer Science PYQ 2022
Which of the following statement(s) are correct?
A. Syntax Directed Translation can be applied in Type Checking.
B. Syntax Directed Translation can be used in 3-address code generation.
C. Syntax Directed Translation can be used in construction of syntax tree.
D. Syntax Directed Translation can be used to recognize valid tokens.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Syntax Directed Translation is used in:

Type checking

Intermediate code generation like 3-address code

Construction of syntax tree

But valid tokens are recognized by lexical analyzer, not by syntax directed translation.

So, correct statements are A, B and C.

Correct option is:

$\boxed{(a)\ \text{A, B and C}}$


UGC NET Computer Science PYQ 2022
Which of the following statement(s) are correct?
A. Syntax Directed Translation can be applied in Type Checking.
B. Syntax Directed Translation can be used in 3-address code generation.
C. Syntax Directed Translation can be used in construction of syntax tree.
D. Syntax Directed Translation can be used to recognize valid tokens.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Given distance from router $R$ to its neighbors:

$R\to X=3$

$R\to Y=2$

$R\to Z=5$

For router $P$:

Via $X$: $3+7=10$

Via $Y$: $2+6=8$

Via $Z$: $5+5=10$

Minimum distance from $R$ to $P$ is $8$ via $Y$.

So, statement C is true.

For router $Q$:

Via $X$: $3+4=7$

Via $Y$: $2+6=8$

Via $Z$: $5+8=13$

Minimum distance from $R$ to $Q$ is $7$ via $X$.

So, statement B is true.

Correct statements are B and C only.

Correct option is:

$\boxed{(a)\ \text{B and C only}}$


UGC NET Computer Science PYQ 2022
Consider the routing table of an organization's
router as shown in the table given below
 Subnet NumberSubnet Mask Next Hop 
12.20.164.0  255.255.252.0 R1
 12.20.170.0255.255.254.0 R2 
12.20.168.0 255.255.254.0 Interface 0 
12.20.166.0 255.255.254.0 Interface 1
Default - R3 
Which of the following prefixes in CIDR Notation
can be collectively used to correctly aggregate
all of the subnets in the routing table?
A. (12.20 .164 .0 / 20)
B. (12.20 .164 .0 / 22)
C. (12.20 .164 .0 / 21)
D. (12.20 .168 .0 / 22)
Choose the correct answer from the options
given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

$255.255.252.0 = /22$

So,

$12.20.164.0/22$ covers:

$12.20.164.0$ to $12.20.167.255$

This includes:

$12.20.164.0$ and $12.20.166.0$

Now,

$12.20.168.0/22$ covers:

$12.20.168.0$ to $12.20.171.255$

This includes:

$12.20.168.0$ and $12.20.170.0$

Therefore, all given subnets can be correctly aggregated by:

$12.20.164.0/22$ and $12.20.168.0/22$

So, correct option is:

$\boxed{(d)\ \text{B and D Only}}$


UGC NET Computer Science PYQ 2022
Consider two hosts P and Q are connected through a router R. The maximum transfer unit $(MTU)$ value of the link between P and R is $1500$ bytes and between R and Q is $820$ bytes. A TCP segment of size $1400$ bytes is transferred from P to Q through R with IP identification value of $0x1234$. Assume that IP header size is $20$ bytes. Further, the packet is allowed to be fragmented, meaning the Don't Fragment $(DF)$ flag in the IP Header is not set by P.
Which of the following statements is/are not true?

A. Two fragments are created at R and IP datagram size carrying the second fragment is $620$ bytes

B. If the second fragment is lost then R resend the fragment with IP Identification value of $0x1234$

C. If the second fragment is lost then P is required to resend the entire TCP segment

D. TCP destination port can be determined by analyzing the second fragment only

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

TCP segment size $=1400$ bytes

IP header size $=20$ bytes

So, total IP datagram size:

$1400+20=1420$ bytes

MTU between R and Q is $820$ bytes.

So, maximum data in each fragment:

$820-20=800$ bytes

Now TCP segment data $1400$ bytes is divided as:

First fragment data $=800$ bytes

Second fragment data $=600$ bytes

Second fragment total size:

$600+20=620$ bytes

So, statement A is true.

Statement B is false because router R does not resend lost fragments.

Statement C is true because if a fragment is lost, TCP sender P may retransmit the whole TCP segment.

Statement D is false because TCP header is present only in the first fragment, so TCP destination port cannot be found from the second fragment only.

Therefore, not true statements are B and D.


UGC NET Computer Science PYQ 2022

Consider the following features of Neural networks.

A. It is essentially a machine learning algorithm.

B. It is useful when solving the problems for which the data set is very large.

C. They are able to extract features without input from the programmer.

D. These are systems modeled on the human brain and nervous system.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

All given statements are correct.

Neural networks are machine learning models.

They work well on large data sets.

They can automatically extract features from data.

They are inspired by the human brain and nervous system.

So, correct option is:

$\boxed{(d)\ \text{A, B, C and D}}$


UGC NET Computer Science PYQ 2022

Consider the following draw backs is/are of Rule based approach is/are:

A. The learning is static.

B. Any changes made to the original data will not be considered.

C. Once trained the model cannot improve on the basis of feedback.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In rule based approach, rules are fixed manually.

Learning is static because the system does not automatically update itself.

Changes in original data are not automatically considered.

It cannot improve automatically based on feedback.

So, all statements A, B and C are correct.

Correct option is:

$\boxed{(a)\ \text{All the above statements are correct}}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

 A. Linear Program
 I. Prim's Algorithm
 B. Predicate Logic
II. In order
 
 C. Tree Traversal
 III. Simplex Algorithm
 D. Minimum Spanning Tree Problem

 IV. First order logic






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Linear Program is solved by Simplex Algorithm.

Predicate Logic is also called First order logic.

Tree Traversal includes In order traversal.

Minimum Spanning Tree Problem can be solved by Prim's Algorithm.

So,

A → III
B → IV
C → II
D → I

Correct option is:

$\boxed{(b)\ A-III,\ B-IV,\ C-II,\ D-I}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. DAA
I. Program Control Instruction
B. LXI
II. Interrupt instruction 
 C. RST
 III. Data Movement Instruction
 D. JMP

IV. Arithmetic Instruction






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

DAA means Decimal Adjust Accumulator, so it is an Arithmetic Instruction.

LXI means Load register pair immediate, so it is a Data Movement Instruction.

RST is a Restart instruction, so it is an Interrupt instruction.

JMP is a Jump instruction, so it is a Program Control Instruction.

So,

A → IV
B → III
C → II
D → I

Correct option is:

$\boxed{(b)\ A-IV,\ B-III,\ C-II,\ D-I}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. 2-D Array Input
I. Liquid Crystal Display
B. Transmissive device
II. Flat-bed scanner
C. Binary image
III. Camera

D. 1-D Array input

IV. Inkjet printer

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

2-D Array Input → Camera

Transmissive device → Liquid Crystal Display

Binary image → Inkjet printer

1-D Array input → Flat-bed scanner

So,

A → III
B → I
C → IV
D → II


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. Timestamp protocol
I. As long as the transaction is already running, it will try to obtain the required lock in the first part.
B. Strict two-phase locking protocol
II. Indicates final lock of the schedule.
C. Two-phase locking
III. Ensures freedom from deadlock.

D. Lock point in two-phase locking protocol

IV. Ensures cascade-less rollback

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Timestamp protocol ensures freedom from deadlock.

Strict two-phase locking protocol ensures cascade-less rollback.

Two-phase locking means transaction obtains locks in the first phase.

Lock point indicates the final lock of the schedule.

So,

A → III
B → IV
C → I
D → II

Correct option is:

$\boxed{(b)\ A-III,\ B-IV,\ C-I,\ D-II}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. reference bit = $0$, modify bit = $0$

I. Must write out before replacement.

B. reference bit = $0$, modify bit = $1$

II. Probably will be used again soon and need to write out.

C. reference bit = $1$, modify bit = $0$

III. Best page to replace.

D. reference bit = $1$, modify bit = $1$

IV. Probably will be used again soon.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

If reference bit $=0$ and modify bit $=0$, page is not recently used and not modified, so it is the best page to replace.

If reference bit $=0$ and modify bit $=1$, page is not recently used but modified, so it must be written out before replacement.

If reference bit $=1$ and modify bit $=0$, page is recently used and clean, so it will probably be used again soon.

If reference bit $=1$ and modify bit $=1$, page is recently used and modified, so it will probably be used again soon and needs to be written out.

So,

A → III
B → I
C → IV
D → II

Correct option is:

$\boxed{(d)\ A-III,\ B-I,\ C-IV,\ D-II}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. Condition coverage

I. Black box testing

B. Equivalence class Partitioning

II. System testing

C. Volume testing

III. White box testing

D. Alpha testing

IV. Performance testing

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Condition coverage → White box testing

Equivalence class Partitioning → Black box testing

Volume testing → Performance testing

Alpha testing → System testing

So,

A → III
B → I
C → IV
D → II

Correct option is:

$\boxed{(b)\ A-III,\ B-I,\ C-IV,\ D-II}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. 8-Queens problems

I. Divide and conquer

B. Closest Pair of points

II. Dynamic Programming

C. String Edit problem

III. Greedy Method

D. Knapsack problem

IV. Backtracking

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

8-Queens problem → Backtracking

Closest Pair of points → Divide and conquer

String Edit problem → Dynamic Programming

Knapsack problem → Greedy Method

So,

A → IV
B → I
C → II
D → III

Correct option is:

$\boxed{(c)\ A-IV,\ B-I,\ C-II,\ D-III}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. Initial Configuration of stack and input in the LL Parsing process

I. $w$

B. Final Configuration of stack and input in LL Parsing process

$$

C. Initial Configuration of stack and input in the LR Parsing process

S w

D. Final Configuration of stack and input in LR Parsing process

S

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For LL parsing:

Initial configuration: $$S w$$

Final configuration: $$$$

For LR parsing:

Initial configuration: $$w$$

Final configuration: $$S$$

So,

A → III
B → II
C → I
D → IV

Correct option is:

$\boxed{(b)\ A-III,\ B-II,\ C-I,\ D-IV}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. Physical Layer

I. Transforming the raw bits in the form of a frame for transmission

B. Data Link Layer

II. Control and monitoring of subnet

C. Network Layer

III. Transmission of raw bits over a communication channel

D. Transport Layer

IV. Datagrams transmit data through connection-oriented or connection-less using datagrams.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Physical Layer → Transmission of raw bits over a communication channel

Data Link Layer → Transforming raw bits into frames

Network Layer → Control and monitoring of subnet

Transport Layer → Connection-oriented or connection-less data transmission

So,

A → III
B → I
C → II
D → IV

Correct option is:

$\boxed{(c)\ A-III,\ B-I,\ C-II,\ D-IV}$


UGC NET Computer Science PYQ 2022
Match List I with List II
 List I

 List II

A. Regression

I. Unsupervised Learning

B. KNN

II. Supervised Learning

C. Clustering


D. Decision Tree


Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Regression → Supervised Learning

KNN → Supervised Learning

Clustering → Unsupervised Learning

Decision Tree → Supervised Learning

So,

A → II
B → II
C → I
D → II

Correct option is:

$\boxed{(b)\ A-II,\ B-II,\ C-I,\ D-II}$


UGC NET Computer Science PYQ 2022
Let $G$ be a simple, undirected graph with $n$ vertices and $k$ connected components. What is the minimum possible number of edges of $G$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For a connected component with $m$ vertices, minimum edges required:

$m-1$

If graph has $k$ connected components, then minimum total edges:

$=(n_1-1)+(n_2-1)+...+(n_k-1)$

$=(n_1+n_2+...+n_k)-k$

$=n-k$

Correct option is:

$\boxed{(d)\ n-k}$


UGC NET Computer Science PYQ 2022
Arrange the following search and sort algorithms in ascending order of their worst-case complexities.

A. Merge sort
B. Linear Search
C. Bubble Sort
D. Binary Search

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Worst-case complexities are:

Binary Search $=O(\log n)$

Linear Search $=O(n)$

Merge Sort $=O(n\log n)$

Bubble Sort $=O(n^2)$

Ascending order:

$O(\log n) < O(n) < O(n\log n) < O(n^2)$

So,

D, B, A, C

Correct option is:

$\boxed{(a)\ D,B,A,C}$


UGC NET Computer Science PYQ 2022
Consider the following schedule S.
 T1T2T3 T4 Timestamp 
 R(X) R(Y)  t1 
 W(X) W(Y)  t2 
R(Y)   R(X) t3 
W(Y)   W(X) t4 
  R(X)  t5 
  W(X)  t6 
(R(X)) denotes the read operation on data item X by transaction Ti. W(X) denotes write operation on data item X by transaction Ti. Choose the correct execution order for the above schedule S.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For data item $X$:

$T2$ writes $X$ before $T4$ reads and writes $X$.

So,

$T2 \to T4$

$T4$ writes $X$ before $T3$ reads and writes $X$.

So,

$T4 \to T3$

For data item $Y$:

$T3$ writes $Y$ before $T1$ reads and writes $Y$.

So,

$T3 \to T1$

Therefore, the serial order is:

$T2 \to T4 \to T3 \to T1$

Correct option is:

$\boxed{(c)\ T2-T4-T3-T1}$


UGC NET Computer Science PYQ 2022
A disk has $300$ cylinders $(0$ to $299)$. If the initial position of the read-write head is at cylinder $101$, moving towards the higher end of the disk, calculate the total head movement following C_LOOK policy for the read request sequence:

$123,45,197,87,250,198,280$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Initial head position:

$101$

Direction is towards higher cylinder numbers.

Request sequence in sorted order:

$45,87,123,197,198,250,280$

Using C_LOOK, first serve higher side requests:

$101 \to 123 \to 197 \to 198 \to 250 \to 280$

Then jump to lowest request:

$280 \to 45$

Then continue:

$45 \to 87$

Total head movement:

$=|123-101|+|197-123|+|198-197|+|250-198|+|280-250|+|45-280|+|87-45|$

$=22+74+1+52+30+235+42$

$=456$

Correct option is:

$\boxed{(a)\ 456}$


UGC NET Computer Science PYQ 2022
The incremental model of software development is ____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In incremental model, software is developed and delivered in small parts called increments.

First, a working core product is developed quickly.

Then, more features are added step by step.

So, correct option is:

$\boxed{(b)\ \text{A good approach when a working core product is required quickly}}$


UGC NET Computer Science PYQ 2022
Consider the graph given below. What is the order in which the nodes mentioned in the options are to be traversed to find the shortest path from A to Z using best first search?
A. Node-A
B. Node-B
C. Node-C
D. Node-D
E. Node-E

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using best first search, we always choose the next node with the minimum available cost.

From $A$:

$A \to C = 2$

$A \to F = 7$

So, choose $C$.

From $C$:

$C \to F = 3$

$C \to B = 10$

So, choose $F$.

From $F$:

$F \to D = 1$

$F \to E = 6$

So, choose $D$.

From $D$:

$D \to E = 2$

$D \to Z = 7$

So, choose $E$.

From $E$:

$E \to Z = 4$

Hence, the traversal order before reaching $Z$ is:

$A \to C \to F \to D \to E$

Correct option is:

$\boxed{(a)\ A \to C \to F \to D \to E}$


UGC NET Computer Science PYQ 2022
The precedence of regular expression operators from lowest to highest precedence is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In regular expressions, operator precedence from highest to lowest is:

$Star > Concatenation > Union$

Therefore, from lowest to highest:

$Union < Concatenation < Star$

Correct option is:

$\boxed{(c)\ \text{Union, Concatenation, Star}}$


UGC NET Computer Science PYQ 2022

 Arrange the following in the correct order with respect to key generation for RSA algorithm.

A. Choose an integer $e$ such that $1<e<\lambda(n)$

B. Compute key length $n=p\times q$

C. Find $d$ which is equal to $\frac{1}{e}$

D. Choose two large prime numbers $p$ and $q$

E. Compute $\lambda(n)$

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In RSA key generation:

First choose two large prime numbers $p$ and $q$.

Then compute:

$n=p\times q$

Then compute:

$\lambda(n)$

Then choose public exponent $e$ such that:

$1<e<\lambda(n)$

Then find private key $d$.

So, correct order is:

$D-B-E-A-C$

Correct option is:

$\boxed{(c)\ D-B-E-A-C}$


UGC NET Computer Science PYQ 2022

Which of the following is related to function of layers in a neural network?

A. Information $\to$ Input layer $\to$ Hidden layer

B. Bias $\to$ output layer $\to$ hidden layer.

C. Hidden layer $\to$ algorithm $\to$ output layer.

D. Input layer $\to$ output layer $\to$ algorithms.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In neural network, information first goes to input layer, then it is processed through hidden layer, and finally output is produced.

So, among the given sequences, only sequence A is correct.

Correct option is:

$\boxed{(a)\ \text{Only sequence A is correct}}$


UGC NET Computer Science PYQ 2022

Given below are the two statements:

Statement I: The main objective for using virtual memory is to increase the effective capacity of the memory system.

Statement II: The size of virtual memory can be larger than the main memory.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement I is true because virtual memory increases the effective memory capacity.

Statement II is also true because virtual memory can be larger than main memory.


UGC NET Computer Science PYQ 2022

A disk has $300$ cylinders $(0$ to $299)$. If the initial position of the read-write head is at cylinder $101$, moving towards the higher end of the disk, calculate the total head movement following C_LOOK policy for the read request sequence:

$123,45,197,87,250,198,280$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Initial head position:

$101$

Direction is towards higher cylinder numbers.

Request sequence in sorted order:

$45,87,123,197,198,250,280$

Using C_LOOK, first serve higher side requests:

$101 \to 123 \to 197 \to 198 \to 250 \to 280$

Then jump to lowest request:

$280 \to 45$

Then continue:

$45 \to 87$

Total head movement:

$=|123-101|+|197-123|+|198-197|+|250-198|+|280-250|+|45-280|+|87-45|$

$=22+74+1+52+30+235+42$

$=456$


UGC NET Computer Science PYQ 2022

Given below are the two statements:

Statement I: Any retrieval request that is specified in the basic relational algebra can also be specified in relational calculus.

Statement II: Any retrieval request that is specified in the relational calculus can also be specified in basic relational algebra.

In the light of the above statements, choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Relational algebra and relational calculus have the same expressive power.

Any query written in relational algebra can be written in relational calculus.

Any safe query written in relational calculus can also be written in relational algebra.

So, both statements are true.

Correct option is:

$\boxed{(a)\ \text{Both Statement I and Statement II are true}}$


UGC NET Computer Science PYQ 2022

The primary objectives of the SWE-IPT are to:

A. Solicit stakeholder needs and expectations.

B. Specify the software requirements for the product and post-development processes.

C. Generate the integrated technical plans for accomplishing the software development effort.

D. Translate stakeholder requirements into a complete, specified architectural description.

E. Ensure that the software technical data package is sufficiently detailed to facilitate an efficient and effective software implementation.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

SWE-IPT means Software Engineering Integrated Product Team.

Its objectives include requirement collection, software requirement specification, planning, architectural description and implementation support.

So, all given statements are correct.

Correct option is:

$\boxed{(a)\ \text{All the statements are correct}}$


UGC NET Computer Science PYQ 2022

Consider the following statements:

A. For every regular language, we can design Turing Machine.

B. For every context free language, we can design Turing Machine.

Which of the following is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Every regular language can be accepted by a finite automaton, and every finite automaton can be simulated by a Turing Machine.

So, statement A is true.

Every context free language can be accepted by a pushdown automaton, and every pushdown automaton can also be simulated by a Turing Machine.

So, statement B is also true.

Correct option is:

$\boxed{(d)\ \text{Statement A and Statement B both are true}}$


UGC NET Computer Science PYQ 2022

 Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

A: Artificial Neural Networks are the backbone of deep learning algorithms.

R: Back propagation is one of the techniques used to train an ANN.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Assertion A is correct because deep learning is mainly based on artificial neural networks.

Reason R is also correct because back propagation is commonly used to train artificial neural networks.

But R does not directly explain why ANN is the backbone of deep learning.

Correct option is:

$\boxed{(b)\ \text{Both A and R are correct but R is NOT the correct explanation of A}}$


UGC NET Computer Science PYQ 2022
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$
Find the optimal solution for fractional knapsack problem when its maximum capacity is $15$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

Find profit by weight ratio:

Item 5: $\frac{6}{1}=6$

Item 1: $\frac{9}{2}=4.5$

Item 7: $\frac{9}{3}=3$

Item 6: $\frac{16}{9}=1.77$

Now take items in decreasing ratio:

Total weight $=1+2+3+9=15$

Total profit $=6+9+9+16=40$

Correct option is:

$\boxed{(b)\ 40}$


UGC NET Computer Science PYQ 2022
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$


What is the maximum value of items you can carry if maximum weight allowed is $25$ with a fractional knapsack?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Take items in decreasing profit by weight ratio:

Item 5: weight $1$, profit $6$

Item 1: weight $2$, profit $9$

Item 7: weight $3$, profit $9$

Item 6: weight $9$, profit $16$

Item 2: weight $5$, profit $5$

Total weight used:

$1+2+3+9+5=20$

Total profit:

$6+9+9+16+5=45$

Remaining capacity:

$25-20=5$

Next best item is item 4 with profit $7$ and weight $11$.

Fractional profit:

$5\times \frac{7}{11}=\frac{35}{11}=3.18$

Maximum profit:

$45+3.18=48.18\approx 48.1$

Correct option is:

$\boxed{(a)\ 48.1}$


UGC NET Computer Science PYQ 2022
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

 If new item $(P=5,W=2)$ is added to the list, total items is $8$ and capacity is $25$, then the best-case time of fractional knapsack for this case is ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For fractional knapsack, if items are already arranged according to profit by weight ratio, then best-case selection can be done in linear time.

Here, total items are:

$n=8$

So, best-case time complexity is:

$O(n)=O(8)$

Correct option is:

$\boxed{(a)\ O(8)}$


UGC NET Computer Science PYQ 2022
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

The most efficient solution for the fractional knapsack problem with maximum capacity $15$ can be obtained by using ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Fractional knapsack allows taking fractions of items.

So, we choose items according to highest profit by weight ratio.

This is a greedy approach.

Correct option is:

$\boxed{(c)\ \text{Greedy Algorithm}}$


UGC NET Computer Science PYQ 2022
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

Which of the following statements is correct for a knapsack?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In $0/1$ knapsack, an item is either selected completely or rejected completely.

In fractional knapsack, an item can be divided into smaller parts according to required weight.

So, correct option is:

$\boxed{(d)\ \text{In }0/1\text{ knapsack problem, items cannot be divided into smaller portions and in fractional knapsack we can divide the item into required proportions of weight}}$


UGC NET Computer Science PYQ 2022

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Which of the following queries would retrieve the roll number and names of students who have enrolled for all the prerequisite courses of the course number 324 ?







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We need students who have enrolled in all prerequisite courses of course 324.

This is a “for all” type query.

In SQL, “for all” is usually written using double NOT EXISTS.

Meaning of option (c):

For a student s, there should not exist any prerequisite course p of course 324 such that the student has not enrolled in that prerequisite course.

So, option (c) checks:

No prerequisite course of 324 is missing from the student's enrollment.

Option (a) uses ANY, so it checks only at least one prerequisite course.

Option (b) uses ALL incorrectly, because one enrollment course cannot be equal to all different prerequisite course IDs at the same time.

Option (d) uses EXISTS, so it checks only at least one matching prerequisite enrollment, not all.

UGC NET Computer Science PYQ 2022

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Given query: select s.rollno from students where s.sex = ALL (select f.sex from professor f where f.empid = s.advisor).

Consider the following statements about the given query that retrieves the set of all students whose gender is same as the gender of their advisor:

S1. It has a correlated subquery

S2. It has an uncorrelated subquery

S3. If we replace ALL by ANY in the above query, its result will be different

S4. If we replace ALL by ANY in the above query, its result will be same.

Identify all the statement that are TRUE:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The subquery is:

select f.sex from professor f where f.empid = s.advisor

Here, the subquery uses s.advisor from the outer query.

So, it is a correlated subquery.

Therefore, S1 is true and S2 is false.

Also, advisor refers to empid of professor relation. Since empid is unique, the subquery returns only one professor’s sex.

So,

s.sex = ALL (single value)

and

s.sex = ANY (single value)

will give the same result.

Therefore, S4 is true and S3 is false.


UGC NET Computer Science PYQ 2022

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Which of the following queries would compute, for each department, the total credits of all the courses offered by the department?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We need total credits of courses for each department.

So, we must use:

sum(credits)

Also, department and course must be joined using:

deptid = deptno

Then grouping must be done department-wise using:

group by deptid, name

Option (a) correctly uses join, sum and group by.

Option (b) uses count(credits), so it counts courses, not total credits.

Option (c) is syntactically incorrect.

Option (d) uses the join condition in having instead of where, so it is not the correct standard query.


UGC NET Computer Science PYQ 2022

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Which of the following queries would retrieve the dept id and name of all the departments that are such that the total of the credits of all the offered courses by the department is strictly greater than 40?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We need departments whose total course credits are greater than 40.

First, department and course must be joined:

deptid = deptno

Then courses must be grouped department-wise:

group by deptid, name

After grouping, total credits must be checked using HAVING:

having totalcredits >40

Option (d) correctly uses:

where deptid = deptno
group by deptid, name
having totalcredits >40


UGC NET Computer Science PYQ 2022

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Given query:

select s.rollno, s.name
from student s
where EXISTS (select c.courseid from course c Where c.deptno =5 and
EXISTS (select e.* from enrollment e
where e.courseid = c.courseid and
e.rollno = s.rollno));

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






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The outer query selects students.

Inside the query:

EXISTS checks whether there is at least one course from department number 5.

The inner EXISTS checks whether the same student has enrolled in that course.

So the query means:

Find students who have enrolled in at least one course offered by department number 5.

It does not check all courses. For all courses, double NOT EXISTS would be required.


UGC NET Computer Science PYQ 2022
The negation of "Some students like hockey" is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

"Some students like hockey" means
$ \exists x , [S(x) \land L(x)] $

Its negation is
$ \neg \exists x , [S(x) \land L(x)] $

Using logical rule,
$ \neg \exists x , P(x) \equiv \forall x , \neg P(x) $

So,
$ \forall x , [S(x) \rightarrow \neg L(x)] $

Hence, every student dislikes hockey.

UGC NET Computer Science PYQ 2022
A relation $R$ is defined on ordered pairs of integers as $(x, y) R(u, v)$ if $x < u$ and $y > v$. Then $R$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For reflexive relation, we need
$ (x, y) R(x, y) $

But according to the definition,
$ x < x $ and $ y > y $

Both are false.

So, $R$ is not reflexive.

A partial order relation must be reflexive, antisymmetric, and transitive.
Since $R$ is not reflexive, it is not a partial order.

An equivalence relation must be reflexive, symmetric, and transitive.
Since $R$ is not reflexive, it is not an equivalence relation.

Hence, $R$ is neither a partial order nor an equivalence relation.

UGC NET Computer Science PYQ 2022
Suppose you are married and you and your partner attend a party with three other married couples. Several handshakes took place. No one shook hands with himself or herself or with their partner, and no one shook hands with the same person more than once. After all handshaking was completed, suppose you asked each person, including your partner, how many hands they had shaken. Each person gave a different answer. How many hands did your spouse shake?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

There are $4$ married couples, so total persons are $8$.

You asked $7$ persons, and all gave different answers.

Maximum possible handshakes by one person are $6$ because a person cannot shake hands with himself or herself and cannot shake hands with spouse.

So the $7$ different answers must be:

$0,1,2,3,4,5,6$

Now, the person who shook $6$ hands must be paired with the person who shook $0$ hands.

Similarly,

$5$ is paired with $1$

$4$ is paired with $2$

The only remaining number is $3$.

So your spouse shook $3$ hands.

Final Answer: $ \boxed{(c)} $


UGC NET Computer Science PYQ 2022

Consider the following conditional code, which returns Boolean values

if $((x>25) \land (y>100))$
return $false$;

else if $((x \le 25) \land (y \le 100))$
return $true$;

else if $((x>25) \land (y \le 100))$
return $false$;

else
return $true$;

Simplify it by filling in the following blank with a single Boolean expression without changing the behaviour of the conditional code.

if $($ ________ $)$
return $true$;

else
return $false$;






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given code returns $false$ when:

$((x>25) \land (y>100))$

or

$((x>25) \land (y \le 100))$

So,

$false = (x>25)$

Therefore, the code returns $true$ when:

$x \le 25$

Hence, the required Boolean expression is:

$x \le 25$


UGC NET Computer Science PYQ 2022
Which one of the following types of memory is the fastest?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Register memory is inside the CPU and directly accessed by the processor.

Memory speed order is:

$Register > Cache > Main\ Memory > Secondary\ Memory$

Therefore, the fastest memory is Register Memory.


UGC NET Computer Science PYQ 2022
The memory size for n address lines and m data lines is given by





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

If there are $n$ address lines, then the number of memory locations is:

$2^n$

If there are $m$ data lines, then each location stores:

$m$ bits

So, total memory size is:

$2^n \times m$


UGC NET Computer Science PYQ 2022

Simplify the following using K-Map

$F(A,B,C,D)=\sum(0,2,5,7,8,10,13,15)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given minterms are:

$0,2,5,7,8,10,13,15$

In binary form:

$0=0000,\ 2=0010,\ 8=1000,\ 10=1010$

Here, $B=0$ and $D=0$

So, group gives:

$B'D'$

Also,

$5=0101,\ 7=0111,\ 13=1101,\ 15=1111$

Here, $B=1$ and $D=1$

So, group gives:

$BD$

Therefore,

$F=BD+B'D'$


UGC NET Computer Science PYQ 2022

Consider an unpipelined machine with $10$ nsec clock cycles which uses four cycles for ALU operations and branches where as five cycles for memory operation. Assume that the relative frequencies of these operations are: $40%, 20%$ and $40%$, respectively. Due to clock skew and setup pipeline let us consider that the machine adds one nsec overhead to the clock. How much speedup is observed in the instruction execution rate when a pipelined machine is considered?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Average CPI for unpipelined machine is:

$=4(0.40)+4(0.20)+5(0.40)$

$=1.6+0.8+2$

$=4.4$

Unpipelined average instruction time:

$=4.4 \times 10$

$=44$ nsec

For pipelined machine, clock time becomes:

$10+1=11$ nsec

Speedup:

$=\frac{44}{11}$

$=4$

So, speedup is $4$ times.


UGC NET Computer Science PYQ 2022
Machine Level Language is a/an





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Machine level language directly deals with binary instructions like $0$ and $1$.

It is closest to the hardware, so it is called a low-level language.


UGC NET Computer Science PYQ 2022
Which of the following is wrong about the data types?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For $n$ bits:

Unsigned range is:

$0$ to $2^n-1$

Signed range is:

$-2^{n-1}$ to $2^{n-1}-1$

So, signed data type does not have more range than unsigned data type.


UGC NET Computer Science PYQ 2022
If a constructor 'Date' is declared explicitly and has to be defined outside the class, which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In C++, the keyword $\text{explicit}$ is used only while declaring the constructor inside the class.

When the constructor is defined outside the class, $\text{explicit}$ is not written again.

So, the correct definition is:

$ \text{Date::Date(int dd) { /* ... */ }} $


UGC NET Computer Science PYQ 2022
Which one of the following allows the session to continue?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A session cannot continue if the user logs out, the session is invalidated, or the session times out.

If the user refreshes the browser and a persistent cookie is available, the session can continue.


UGC NET Computer Science PYQ 2022
Overfitting is expected when we observe that?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Overfitting occurs when the model learns the training data too much.

So, training error decreases, but test error increases.


UGC NET Computer Science PYQ 2022
Identify the incorrect statement(s).





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A super key uniquely identifies a tuple.

A candidate key is a minimal super key.

Statement (b) is incorrect because it defines candidate key wrongly as super key.

Therefore, the incorrect statement is:


UGC NET Computer Science PYQ 2022

Consider the two relations below. The primary keys are underlined. Identify all possible foreign key(s) from the options based only on the two relations.

$EMP(eid, ename, did)$

$DEPT(did, dname)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In $DEPT$, $did$ is the primary key.

In $EMP$, $did$ can refer to $DEPT(did)$.

So, $EMP.did$ is a foreign key.


UGC NET Computer Science PYQ 2022
Which of the following statements is correct, according to the following instance of the relational schema R(X, Y, Z)?
 XY Z 
1   1a 
 11  a
 21 b 
 32 b 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Functional dependency $A \to B$ means:

If two rows have the same value of $A$, then they must have the same value of $B$.

Now check each dependency.

For $X \to Y$:

When $X=1$, $Y=1$ in both rows.
When $X=2$, $Y=1$.
When $X=3$, $Y=2$.

So, same $X$ always gives same $Y$.

Therefore, $X \to Y$ is true.

For $X \to Z$:

When $X=1$, $Z=a$ in both rows.
When $X=2$, $Z=b$.
When $X=3$, $Z=b$.

So, same $X$ always gives same $Z$.

Therefore, $X \to Z$ is true.

For $Z \to X$:

When $Z=b$, we have two different values of $X$:

$X=2$ and $X=3$

So, $Z \to X$ is false.

For $Y \to Z$:

When $Y=1$, we get:

$Z=a$ and $Z=b$

So, $Y \to Z$ is false.

For $Y \to X$:

When $Y=1$, we get:

$X=1$ and $X=2$

So, $Y \to X$ is false.

Hence, only $X \to Y$ and $X \to Z$ are true.


UGC NET Computer Science PYQ 2022

In Linux Operating System, when __________ is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In Linux, $clone()$ is used to create a new task.

The important feature of $clone()$ is that it takes different flags.

These flags decide what will be shared between parent and child, such as:

Memory space
File system information
Open files
Signal handlers

So, the system call that is passed a set of flags to decide sharing between parent and child tasks is $clone()$.


UGC NET Computer Science PYQ 2022

The main function of the microkernel is to provide a communication facility between the __________ program and the various _____ that are also running in user space.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a microkernel operating system, most services run in user space.

Examples of services are:

File service
Device driver service
Memory management service

The microkernel mainly provides communication between the client program and these services.

This communication is usually done using message passing.

So, the correct words are:

$Client,\ Services$


UGC NET Computer Science PYQ 2022

Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is first come first served $FCFS$. If $FCFS$ is replaced by shortest seek time first $SSTF$ and the vendor claims $50%$ better benchmark results. What is the expected improvement in the I/O performance of user programs?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The system can execute only one sequential user process at a time.

So, at any time, there will be only one active I/O request from the user process.

Disk scheduling algorithms like $FCFS$ and $SSTF$ are useful when there are multiple pending disk requests.

Here, there is no queue of multiple requests to reorder.

Therefore, $SSTF$ cannot provide any real improvement over $FCFS$ for user programs in this case.

Expected improvement:

$0%$


UGC NET Computer Science PYQ 2022
For the following set of processes scheduled using FCFS policy, determine the average waiting time. Assume that the processes arrived in the order P1, P2, P3, P4.
 ProcessBurst Time 
 P18 
P2 15 
P3 10 
P4 4 
 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In FCFS scheduling, processes execute in the same order in which they arrive.

Order is:

$P1 \to P2 \to P3 \to P4$

Waiting time of $P1$:

$0$

Waiting time of $P2$:

$8$

Waiting time of $P3$:

$8+15=23$

Waiting time of $P4$:

$8+15+10=33$

Total waiting time:

$0+8+23+33=64$

Average waiting time:

$\frac{64}{4}=16$


UGC NET Computer Science PYQ 2022

Which of the following is not a Non-functional requirement?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Non-functional requirements describe the quality features of a software system.

Examples of non-functional requirements are:

Portability
Security
Scalability
Reliability
Performance

User interaction is related to how the user works with the system, so it is more related to functional behaviour.

Therefore, User interaction is not a non-functional requirement.


UGC NET Computer Science PYQ 2022

Topic: Software Engineering → Software Cost Estimation

COCOMO stands for-






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

COCOMO is a software cost estimation model.

The full form of COCOMO is:

Constructive Cost Model

It is used to estimate software development effort, cost, and time.

Therefore, the correct option is Constructive cost model.


UGC NET Computer Science PYQ 2022

Modifying the software to match changes in the ever-changing environment is called as






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Adaptive maintenance means modifying software according to changes in the external environment.

Examples:

Operating system changes
Hardware changes
Database changes
Business rule changes

Here, the question says software is modified to match changes in the ever-changing environment.

So, this is Adaptive maintenance.


UGC NET Computer Science PYQ 2022

For a function of two variables, boundary value analysis yields,






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In boundary value analysis, for $n$ variables, total number of test cases is:

$4n+1$

Here, the function has two variables.

So, $n=2$

Number of test cases:

$4n+1 = 4(2)+1$

$=8+1$

$=9$

Therefore, the general formula is $4n+1$ test cases.


UGC NET Computer Science PYQ 2022
How many different binary trees are possible with $n$ nodes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The number of different binary trees possible with $n$ nodes is given by the Catalan number.

Catalan number formula is:

$C_n=\frac{1}{n+1}\binom{2n}{n}$

So, the number of different binary trees possible with $n$ nodes is:

$\frac{1}{n+1}\binom{2n}{n}$


UGC NET Computer Science PYQ 2022

Let $n$ denote a positive integer. Suppose a function $F$ is defined as

$f(n)=
\begin{cases}
0, & n=1 \
f\left(\left\lfloor \frac{n}{2} \right\rfloor\right)+1, & n>1
\end{cases}$

What is $f(25)$? and what does this function find?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given,

$f(1)=0$

Now find $f(25)$:

$f(25)=f\left(\left\lfloor \frac{25}{2} \right\rfloor\right)+1$

$f(25)=f(12)+1$

$f(12)=f(6)+1$

$f(6)=f(3)+1$

$f(3)=f(1)+1$

$f(1)=0$

Now putting values back:

$f(3)=0+1=1$

$f(6)=1+1=2$

$f(12)=2+1=3$

$f(25)=3+1=4$

So,

$f(25)=4$

This function counts how many times $n$ can be divided by $2$ until it becomes $1$.

So, it finds:

$\left\lfloor \log_2 n \right\rfloor$


UGC NET Computer Science PYQ 2022
Given the FFT we can have ______ time procedure for multiplying two polynomials $A(x)$ and $B(x)$ of degree bound $n$ where input and output representations are in coefficient form, assuming $n$ is a power of $2$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Normally, multiplying two polynomials by the direct method takes:

$O(n^2)$

Using FFT, polynomial multiplication is done in three main steps:

Step 1: Convert coefficient form to point-value form using FFT.

Time complexity:

$O(n\log_2 n)$

Step 2: Multiply corresponding values.

Time complexity:

$O(n)$

Step 3: Convert point-value form back to coefficient form using inverse FFT.

Time complexity:

$O(n\log_2 n)$

Total time complexity:

$O(n\log_2 n)+O(n)+O(n\log_2 n)$

$=O(n\log_2 n)$


UGC NET Computer Science PYQ 2022
Consider the Graph below: 

How many spanning trees can be found? 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The given graph has $4$ vertices.

Let the vertices be:

$A, B, C, D$

Edges are:

$AB, BC, AD, BD, CD$

So, total edges are $5$.

This graph is like complete graph $K_4$ with one edge missing.

Number of spanning trees in $K_4$ is given by Cayley’s formula:

$4^{4-2}=4^2=16$

In $K_4$, each edge appears in equal number of spanning trees.

Total edge appearances in all spanning trees:

$16 \times 3 = 48$

Because each spanning tree of $4$ vertices has $3$ edges.

Since $K_4$ has $6$ edges, each edge appears in:

$\frac{48}{6}=8$

Now, one edge is missing in the given graph.

So, spanning trees containing that missing edge are removed.

Number of spanning trees:

$16-8=8$


UGC NET Computer Science PYQ 2022

The transition function $\delta$ in multi-tape Turing machine is defined as:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a multi-tape Turing machine, suppose there are $k$ tapes.

At any step, the machine reads:

$k$ tape symbols

So, input to transition function is:

$current\ state = Q$

$k\ tape\ symbols = \Gamma^k$

Hence input side is:

$Q \times \Gamma^k$

After transition, the machine decides:

new state $Q$

new symbols to write on $k$ tapes, that is $\Gamma^k$

movement of $k$ tape heads, that is ${L,R,S}^k$

Hence output side is:

$Q \times \Gamma^k \times {L,R,S}^k$

Therefore,

$\delta: Q \times \Gamma^k \to Q \times \Gamma^k \times {L,R,S}^k$


UGC NET Computer Science PYQ 2022
In Pumping Lemma for regular languages, to say a language is satisfying pumping lemma, what is the minimum length of $y$ if you consider the string as $xyz$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In pumping lemma for regular languages, a string is divided as:

$w=xyz$

The conditions are:

$|xy| \le n$

$|y| > 0$

$xy^iz \in L$ for all $i \ge 0$

Here, $|y|>0$ means $y$ cannot be empty.

So, the minimum length of $y$ is:

$1$


UGC NET Computer Science PYQ 2022

The item generated by the production $A \to \epsilon$ is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In LR item notation, a dot is placed somewhere on the right side of a production.

But $\epsilon$ means empty string.

So, for the production:

$A \to \epsilon$

there is actually no symbol on the right side.

Therefore, the LR item is written as:

$A \to .$

This means the production is already complete.


UGC NET Computer Science PYQ 2022
In the $\epsilon$-NFA, $M=({q_0,q_1,q_2,q_3},{a},\delta,q_0,{q_3})$ where $\delta$ is given in the transition table below, what is the minimum length of string to reach to the final state?
   $\epsilon$ 

$a$ 
 $q_0$ {$q_1$}{ } 
 $q_1${$q_2$}  { }
 $q_2${ } {$q_2 , $ $q_3$ }
 $q_3${} {} 






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Initial state is:

$q_0$

From $q_0$, using $\epsilon$ move:

$q_0 \xrightarrow{\epsilon} q_1$

From $q_1$, again using $\epsilon$ move:

$q_1 \xrightarrow{\epsilon} q_2$

So, without reading any input symbol, we can reach:

$q_2$

But final state is:

$q_3$

Now from $q_2$, on input symbol $a$:

$q_2 \xrightarrow{a} {q_2,q_3}$

So, after reading one $a$, we can reach final state $q_3$.

Therefore, the minimum string is:

$a$

Length of $a$ is:

$1$


UGC NET Computer Science PYQ 2022
Given Ethernet address
$010110100001000101010101000110001010101000001111$
in binary, what is the address in hexadecimal notation?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Full transmission rate is:

$10$ Mbps

Token generation rate is:

$2$ Mbps

So, extra tokens are consumed at the rate:

$10-2=8$ Mbps

Bucket capacity is:

$16$ megabits

Maximum time:

$\frac{16}{8}=2$ seconds


UGC NET Computer Science PYQ 2022
In the standard Ethernet with transmission rate of $10$ Mbps, assume that the length of the medium is $2500$ m and size of a frame is $512$ bytes. The propagation speed of a signal in a cable is normally $2 \times 10^8$ m/s. Calculate Transmission delay and propagation delay.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Transmission delay formula:

$\text{Transmission delay}=\frac{\text{Frame size}}{\text{Bandwidth}}$

According to the options, frame size is considered as $512$ bits.

So,

$\text{Transmission delay}=\frac{512}{10 \times 10^6}$

$=51.2\mu s$

Propagation delay formula:

$\text{Propagation delay}=\frac{\text{Distance}}{\text{Propagation speed}}$

$\text{Propagation delay}=\frac{2500}{2 \times 10^8}$

$=12.5 \times 10^{-6}$ seconds

$=12.5\mu s$

So, transmission delay is $51.2\mu s$ and propagation delay is $12.5\mu s$.


UGC NET Computer Science PYQ 2022

In CRC coding if the data word is $111111$, divisor is $1010$ and the remainder is $110$. Which of the following code is true?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In CRC coding,

$\text{Codeword}=\text{Dataword}+\text{Remainder}$

Given dataword:

$111111$

Given remainder:

$110$

So, codeword is:

$111111110$


UGC NET Computer Science PYQ 2022
The $A^*$ algorithm is optimal when,





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$A^*$ algorithm uses the evaluation function:

$f(n)=g(n)+h(n)$

where,

$g(n)$ is the cost from start node to current node.

$h(n)$ is the estimated cost from current node to goal node.

$A^*$ is optimal when the heuristic function $h$ is admissible.

Admissible means:

$h(n)$ never overestimates the actual cost.

So, $A^*$ always finds the solution with the lowest total cost when $h$ is admissible.


UGC NET Computer Science PYQ 2022
Which Artificial Intelligence technique enables computers to understand the associations and relationships between objects and Events?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The question asks about understanding associations and relationships between objects and events.

In Artificial Intelligence, symbolic representation is used to represent facts, objects, events, and their relationships.

Here, "Relative symbolism" means representing relationships among different objects and events using symbols.

Heuristic processing is used for problem-solving using rules of thumb.

Cognitive science studies human thinking and intelligence.

Pattern matching is used to identify similar patterns.

So, the technique related to associations and relationships is Relative symbolism.


UGC NET Computer Science PYQ 2022

Where does the values of alpha-beta search get updated?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In alpha-beta pruning, two values are maintained:

$ \alpha $ = best value found so far for MAX player

$ \beta $ = best value found so far for MIN player

These values are updated while moving along the search path in the game tree.

So, alpha and beta values do not update only at the initial state or only at the end.

They are updated along the path of search.


UGC NET Computer Science PYQ 2022

A 4-input neuron has weights $1,2,3,4$. The transfer function is linear with the constant of proportionality being equal to $3$. The inputs are $5,7,10,30$, respectively. Then the output will be






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given weights are:

$w_1=1,\ w_2=2,\ w_3=3,\ w_4=4$

Given inputs are:

$x_1=5,\ x_2=7,\ x_3=10,\ x_4=30$

Net input is:

$Net = w_1x_1+w_2x_2+w_3x_3+w_4x_4$

$Net = 1(5)+2(7)+3(10)+4(30)$

$Net = 5+14+30+120$

$Net = 169$

The transfer function is linear with constant of proportionality $3$.

So, output is:

$Output = 3 \times 169$

$Output = 507$


UGC NET Computer Science PYQ 2022

Consider the following statements:

P: There exists no simple, undirected and connected graph with $80$ vertices and $77$ edges.

Q: All vertices of Euler graph are of even degree.

R: Every simple, undirected, connected and acyclic graph with $50$ vertices has at least two vertices of degree one.

S: There exits a bipartite graph with more than ten vertices which are $2$-colorable.

What is the number of correct statements among the above statements?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement P:

For a connected graph with $n$ vertices, minimum number of edges must be:

$n-1$

Here,

$n=80$

Minimum edges required:

$80-1=79$

But given edges are only $77$.

So, such a connected graph cannot exist.

Therefore, P is true.

Statement Q:

In an Euler graph, every vertex must have even degree.

So, Q is true.

Statement R:

A simple, undirected, connected and acyclic graph is a tree.

Every tree with more than one vertex has at least two vertices of degree $1$.

Here, vertices are $50$.

So, R is true.

Statement S:

Every bipartite graph is $2$-colorable.

A bipartite graph with more than ten vertices can exist.

So, S is true.

Therefore, all four statements are correct.

Number of correct statements:

$4$


UGC NET Computer Science PYQ 2022

Consider the following statements:

P: There exists no simple, undirected and connected graph with $80$ vertices and $77$ edges.

Q: All vertices of Euler graph are of even degree.

R: Every simple, undirected, connected and acyclic graph with $50$ vertices has at least two vertices of degree one.

S: There exits a bipartite graph with more than ten vertices which are $2$-colorable.

What is the number of correct statements among the above statements?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement P:

For a connected graph with $n$ vertices, minimum number of edges must be:

$n-1$

Here,

$n=80$

Minimum edges required:

$80-1=79$

But given edges are only $77$.

So, such a connected graph cannot exist.

Therefore, P is true.

Statement Q:

In an Euler graph, every vertex must have even degree.

So, Q is true.

Statement R:

A simple, undirected, connected and acyclic graph is a tree.

Every tree with more than one vertex has at least two vertices of degree $1$.

Here, vertices are $50$.

So, R is true.

Statement S:

Every bipartite graph is $2$-colorable.

A bipartite graph with more than ten vertices can exist.

So, S is true.

Therefore, all four statements are correct.

Number of correct statements:

$4$


UGC NET Computer Science PYQ 2022

Consider the following statements:

A. There exists a Boolean algebra with $5$ elements.

B. Every element of Boolean algebra has a unique complement.

C. If a Lattice $L$ is a Boolean algebra then $L$ is not relatively complemented.

D. The direct product of two Boolean Algebras is also a Boolean algebra.

Choose the correct answer about the four statements given above.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement A:

A finite Boolean algebra always has $2^n$ elements.

Possible number of elements can be:

$1,2,4,8,16,\ldots$

But $5$ is not of the form $2^n$.

So, statement A is false.

Statement B:

In Boolean algebra, every element has a unique complement.

So, statement B is true.

Statement C:

A Boolean algebra is complemented and distributive.

Also, every Boolean algebra is relatively complemented.

But statement C says it is not relatively complemented.

So, statement C is false.

Statement D:

The direct product of two Boolean algebras is also a Boolean algebra.

So, statement D is true.

Therefore, only B and D are correct.


UGC NET Computer Science PYQ 2022

Which of the statement is not true in regards to virtual memory?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Virtual memory uses secondary memory to increase the effective capacity of memory.

So, statement (a) is true.

In virtual memory, a program can be larger than the available main memory because secondary memory is used as backing storage.

So, statement (b) is also considered true in this context.

Program and data are stored in secondary memory, and required parts are brought into main memory during execution.

So, statement (c) is true.

Hence, none of the given statements is false.


UGC NET Computer Science PYQ 2022

Which of the following is/are true for Dynamic RAM $DRAM$?

  1. It is slower than static RAM $SRAM$
  2. Packing Density is higher than Static RAM $SRAM$
  3. It is faster than static RAM $SRAM$
  4. It requires data refreshing

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

DRAM stores data using capacitors.

Capacitors lose charge with time, so DRAM requires refreshing.

Statement 1:

DRAM is slower than SRAM.

So, statement 1 is true.

Statement 2:

DRAM uses fewer components per bit, so its packing density is higher than SRAM.

So, statement 2 is true.

Statement 3:

DRAM is not faster than SRAM.

So, statement 3 is false.

Statement 4:

DRAM requires data refreshing.

So, statement 4 is true.

Therefore, correct statements are:

$1,2,4$


UGC NET Computer Science PYQ 2022

Which of the following statement is/are false?

  1. The processor has direct access to both primary and secondary memory
  2. Primary memory stores the active instructions and data for the program being executed on the process
  3. Secondary memory is used as a backup memory
  4. Memory system is implemented on a single-level memory

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement 1:

The processor has direct access to primary memory only.

Secondary memory is accessed through input/output operations.

So, statement 1 is false.

Statement 2:

Primary memory stores active instructions and data required for the currently executing program.

So, statement 2 is true.

Statement 3:

Secondary memory is used for permanent storage and backup.

So, statement 3 is true.

Statement 4:

Memory system is not single-level.

It is implemented as a hierarchy, such as:

Registers, Cache, Main Memory, Secondary Memory

So, statement 4 is false.

Therefore, false statements are:

$1$ and $4$


UGC NET Computer Science PYQ 2022

Given a vector with cartesian components $(x,y)$, if scaling is done with matrix

$M=\left[\matrix{0.5\quad 0\cr 0\quad 1.5}\right]$

which of the following are true.

  1. Decreases the vertical by three halves
  2. Increases the vertical by three halves
  3. Doubles the horizontal
  4. Halves the horizontal

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Scaling matrix is:

$M=\left[\matrix{0.5\quad 0\cr 0\quad 1.5}\right]$

Here,

Horizontal scaling factor is:

$S_x=0.5=\frac{1}{2}$

So, horizontal value becomes half.

Therefore, statement $4$ is true.

Vertical scaling factor is:

$S_y=1.5=\frac{3}{2}$

So, vertical value increases by three halves.

Therefore, statement $2$ is true.

Correct statements are:

$2$ and $4$


UGC NET Computer Science PYQ 2022

Which of the following lists defined in HTML share a similar element

  1. Unordered lists
  2. Ordered lists
  3. Definition Lists
  4. Correlated lists
  5. Enumerated lists

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

HTML mainly supports three types of lists:

Unordered list
Ordered list
Definition list

So,

Statement $1$ is correct.
Statement $2$ is correct.
Statement $3$ is correct.

Correlated lists and enumerated lists are not standard HTML list types.

Therefore, the correct set is:

$1,2,3$


UGC NET Computer Science PYQ 2022

What are the drawbacks of using file systems to store data?

  1. Data inconsistency
  2. Difficulty in accessing data
  3. Data isolation
  4. Atomicity of updates

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Traditional file systems have many drawbacks.

Statement $1$:

Data inconsistency can occur because the same data may be stored in multiple files.

So, statement $1$ is correct.

Statement $2$:

Accessing required data is difficult because special programs may be needed for each task.

So, statement $2$ is correct.

Statement $3$:

Data isolation occurs because data may be stored in different files and formats.

So, statement $3$ is correct.

Statement $4$:

Atomicity problems can occur because updates may be incomplete if a system failure happens.

So, statement $4$ is also correct.

Therefore, all given statements are drawbacks of file systems.


UGC NET Computer Science PYQ 2022

Which of the following database model, we have a parent-child relationship?

  1. hierarchical databases
  2. network databases
  3. relational databases

Choose the correct answer from the options below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a hierarchical database model, data is arranged like a tree.

It clearly follows a parent-child relationship.

So, statement $1$ is correct.

In a network database model, records are connected using links, and it can also represent parent-child type relationships.

So, statement $2$ is also correct.

In a relational database model, data is stored in tables.

It uses relations, primary keys, and foreign keys, but it is not mainly based on a parent-child structure.

So, statement $3$ is not correct.

Therefore, correct statements are:

$1$ and $2$


UGC NET Computer Science PYQ 2022
Identify the correct operation that produces the below-given output based on two relations R1 and R2.
R1
 NameClass 
a1 9 
 b1 5
c1 6 
d1 11 
R2
 Name Class
b1 5 
f1 8 
Output
 Name Class 
b1 5 
Choose the correct answer from the options below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The output contains only the common tuple present in both $R1$ and $R2$.

In $R1$, tuples are:

$(a1,9), (b1,5), (c1,6), (d1,11)$

In $R2$, tuples are:

$(b1,5), (f1,8)$

Common tuple is:

$(b1,5)$

So,

$R1 \cap R2 = {(b1,5)}$

Therefore, the direct correct operation is:

$R1 \cap R2$


UGC NET Computer Science PYQ 2022

Which of the following statements are true?

  1. Shortest remaining time first scheduling may cause starvation
  2. Preemptive scheduling may cause starvation
  3. Round robin is better than FCFS in terms of response time

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement 1:

Shortest Remaining Time First $SRTF$ always gives preference to the process having the shortest remaining burst time.

So, if short processes keep arriving, a long process may wait for a very long time.

Therefore, statement $1$ is true.

Statement 2:

Preemptive scheduling allows a running process to be stopped and replaced by another process.

In some preemptive scheduling algorithms, low-priority or long processes may keep waiting.

Therefore, statement $2$ is true.

Statement 3:

Round Robin gives each process a fixed time quantum.

So, every process gets CPU turn quickly, which improves response time compared to FCFS.

Therefore, statement $3$ is true.


UGC NET Computer Science PYQ 2022

In the design protocol of the critical section problem, each process must ask permission to enter the critical section in ______ code; it then executes in the critical section; once it finishes executing in the critical section it enters the ____ code. The process then enters the ____ code.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In critical section problem, the general structure of a process is:

Entry Section
Critical Section
Exit Section
Remainder Section

Entry section:

A process asks permission to enter the critical section.

Critical section:

The process executes the shared resource code.

Exit section:

The process releases permission or lock.

Remainder section:

The process executes the remaining code.

So, the correct order is:

entry section, exit section, remainder section


UGC NET Computer Science PYQ 2022

How do you create agile processes to manage unpredictability?

  1. Requirements gathering must be conducted very carefully.
  2. Risk analysis must be conducted before planning takes place.
  3. Software increments must be delivered in short time periods.
  4. Software processes must not adapt to changes incrementally.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Agile process is used when requirements may change frequently.

The main idea of agile is to deliver software in small increments within short time periods.

This helps the team take feedback quickly and adapt to changes.

Statement $1$ is more related to traditional requirement gathering.

Statement $2$ is more related to risk-driven models.

Statement $3$ is the main agile principle.

Statement $4$ is false because agile processes must adapt to changes incrementally.

Therefore, the correct statement is:

$3$ only


UGC NET Computer Science PYQ 2022

Mr. X designed open source software which must comply with some criteria. Choose the false statement in respect of the above.

  1. No restriction on redistribution of the software as part or whole.
  2. The integrity of the author's source code must be maintained.
  3. The software can be sold after distribution.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Open source software allows free redistribution.

So, statement $1$ is true.

Open source licenses may require that the integrity of the author's source code is maintained.

So, statement $2$ is also true.

Open source software can also be sold after distribution.

So, statement $3$ is also true.

Therefore, no statement is false.


UGC NET Computer Science PYQ 2022

Circuit satisfiability problem: Given a Boolean combinatorial circuit composed of AND, OR, and NOT gates, is it satisfiable? A one-output Boolean combinatorial circuit is satisfiable means for the given inputs the output will be $1$.

  1. The circuit satisfiability problem belongs to class NP
  2. The circuit satisfiability problem is at least as hard as any language in NP
  3. The circuit satisfiability is NP-Complete
  4. The size of the circuit is $\theta(K^2+1)$
  5. If $P \ne NP$, this situation would contradict the NP-Completeness of the problem.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement $1$:

Circuit satisfiability belongs to NP because if an input assignment is given, we can verify in polynomial time whether the circuit output is $1$.

So, statement $1$ is true.

Statement $2$:

Circuit satisfiability is at least as hard as any problem in NP.

So, it is NP-hard.

Therefore, statement $2$ is true.

Statement $3$:

A problem is NP-Complete if it is both in NP and NP-hard.

Circuit satisfiability is a standard NP-Complete problem.

So, statement $3$ is true.

Statement $4$:

The size $\theta(K^2+1)$ is not a general property of the circuit satisfiability problem.

So, statement $4$ is false.

Statement $5$:

This statement is not a basic defining property needed here for Circuit SAT classification.

So, statement $5$ is not selected.

Therefore, correct statements are:

$1,2,3$


UGC NET Computer Science PYQ 2022

Given an expression

$(A+B*D)/(E-F)+G$

  1. The prefix notation is $+/+A*DB-EFG$
  2. The prefix expression is the reverse of the postfix expression
  3. The order of operands in infix expression and postfix expression are the same.
  4. The order of operands in infix expression, prefix expression, and postfix expression are the same.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given expression is:

$(A+B*D)/(E-F)+G$

First solve according to operator precedence:

$B*D$

So, expression becomes:

$(A+(B*D))/(E-F)+G$

Prefix of $B*D$ is:

$*BD$

Prefix of $A+B*D$ is:

$+A*BD$

Prefix of $E-F$ is:

$-EF$

Now prefix of $\frac{A+B*D}{E-F}$ is:

$/+A*BD-EF$

Finally add $G$:

$+/+A*BD-EFG$

So, statement $1$ is true.

Prefix is not simply the reverse of postfix.

So, statement $2$ is false.

The order of operands in infix and postfix remains:

$A,B,D,E,F,G$

So, statement $3$ is true.

The order of operands in infix, prefix, and postfix also remains the same:

$A,B,D,E,F,G$

So, statement $4$ is true.

Correct statements are:

$1,3,$ and $4$


UGC NET Computer Science PYQ 2022

Which of the following is (are) correct about the regular expression?

a a* b b* c c* d d*

  1. The language for the given expression is:

$L={a^n b^n c^m d^m \mid n\ge 1,\ m\ge 1}\cup{a^n b^m c^m d^n \mid n\ge 1,\ m\ge 1}$

  1. The Context Free Language for the given expression is:

$S\to AB\mid C$

$A\to aAb\mid ab$

$B\to cBd\mid cd$

$C\to aCd\mid aDd$

$D\to bDc\mid bc$

  1. The language generated by this expression is equal number of $a$'s, followed by equal number of $b$'s, followed by equal number of $c$'s and followed by equal number of $d$'s.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The given regular expression is $aa^*bb^*cc^dd^$, where:

  • $a^*$ denotes zero or more occurrences of $a$
  • $b^*$ denotes zero or more occurrences of $b$
  • $c^*$ denotes zero or more occurrences of $c$
  • $d^*$ denotes zero or more occurrences of $d$
  1. The language generated by the regular expression

$L={a^n b^n c^m d^m \mid n \ge 1, m \ge 1}\cup{a^n b^m c^m d^n \mid n \ge 1, m \ge 1}$

consists of strings where $a$'s are followed by $b$'s, which are followed by $c$'s, and then $d$'s.

Each of these letters $a, b, c, d$ can occur one or more times in any order. For example, $abcd$, $aabcdd$, etc. So the language $L$ can generate regular expressions $aa^*bb^*cc^dd^$.

  1. The Context Free Language for the given expression is:

$S \to AB \mid C$

$A \to aAb \mid ab$

$B \to cBd \mid cd$

$C \to aCd \mid aDd$

$D \to bDc \mid bc$

This is true.

For example:

$S \to AB \mid C$

$S \to abcd$

  1. The language generated by this expression is equal number of $a$'s, followed by equal number of $b$'s, followed by equal number of $c$'s and followed by equal number of $d$'s.

This statement is false.

The regular expression $aa^*bb^*cc^dd^$ generates strings where each letter $a, b, c, d$ can occur one or more times, but there is no constraint that the number of occurrences of each letter must be equal.

For example, the regular expression can generate strings like $abcd$, $abccdd$, $aaaabbbccddd$, etc., where the number of occurrences of each letter is not necessarily equal.

So option C is the correct answer.


UGC NET Computer Science PYQ 2022

Consider two hosts P and Q are connected through a router R. The maximum transfer unit $MTU$ value of the link between P and R is $1500$ bytes and between R and Q is $820$ bytes. A TCP segment of size of $1400$ bytes is transferred from P to Q through R with IP identification value of $0x1234$. Assume that IP header size is $20$ bytes. Further, the packet is allowed to be fragmented that is Don't Fragment $DF$ flag in the IP Header is not set by P. Which of the following statements is/are true?

I. Two fragments are created at R and IP datagram size carrying the second fragment is $620$ bytes
II. If the second fragment is lost then R resends the fragment with IP Identification value of $0x1234$
III. If the second fragment is lost then P is required to resend the entire TCP segment
IV. TCP destination port can be determined by analyzing the second fragment only

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

TCP segment size:

$1400$ bytes

IP header size:

$20$ bytes

So, original IP datagram size is:

$1400+20=1420$ bytes

Since $1420 < 1500$, no fragmentation is required between P and R.

Now, between R and Q:

$MTU=820$ bytes

Each fragment will have an IP header of $20$ bytes.

So, maximum data in each fragment is:

$820-20=800$ bytes

Original data size is:

$1400$ bytes

So, fragments will be:

First fragment data:

$800$ bytes

First fragment total size:

$800+20=820$ bytes

Second fragment data:

$1400-800=600$ bytes

Second fragment total size:

$600+20=620$ bytes

So, statement I is true.

Now check statement II:

If the second fragment is lost, router R does not retransmit the fragment. IP is unreliable and does not handle retransmission.

So, statement II is false.

Now check statement III:

If the fragment is lost, TCP at source P will retransmit the TCP segment.

So, statement III is true.

Now check statement IV:

TCP destination port is present in the TCP header.

The TCP header is present only in the first fragment, not in the second fragment.

So, TCP destination port cannot be determined by analyzing only the second fragment.

So, statement IV is false.

Correct statements are:

I and III only


UGC NET Computer Science PYQ 2022

Which of the following statements are correct?

  1. The first three-address instruction in the intermediate code is a leader.
  2. The instruction which is exactly at the middle of the given three address code is a leader.
  3. Any instruction that is the target of a conditional or unconditional jump is a leader.
  4. Any instruction that immediately follows a conditional or unconditional jump is a leader.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In compiler design, leaders are used to form basic blocks.

Rules for finding leaders:

  1. The first instruction of the intermediate code is always a leader.

So, statement $1$ is true.

  1. The middle instruction is not necessarily a leader.

So, statement $2$ is false.

  1. Any instruction which is the target of a conditional or unconditional jump is a leader.

So, statement $3$ is true.

  1. Any instruction immediately following a conditional or unconditional jump is also a leader.

So, statement $4$ is true.

Correct statements are:

$1,3,4$


UGC NET Computer Science PYQ 2022

Which of the following are correct on regular expressions?

a. $\varphi + L = L + \varphi = L$
b. $\epsilon L = L\epsilon = L$
c. $\varphi L = L\varphi = \varphi$
d. $\varphi L = L\varphi = L$

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement a:

Union with empty language gives the same language.

$\varphi + L = L$

So, statement a is true.

Statement b:

Concatenation with empty string does not change the language.

$\epsilon L = L\epsilon = L$

So, statement b is true.

Statement c:

Concatenation with empty language gives empty language.

$\varphi L = L\varphi = \varphi$

So, statement c is true.

Statement d:

This says concatenation with empty language gives $L$, which is false.

So, statement d is false.

Correct statements are:

a, b and c only


UGC NET Computer Science PYQ 2022

The Solution to Silly Window Syndrome problem is/are:

I. Nagle's Algorithm
II. Clark's Algorithm
III. Jacobson's Algorithm
IV. Piggy backing Algorithm

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Silly Window Syndrome happens when very small amounts of data are sent repeatedly, which reduces network efficiency.

Statement I:

Nagle's Algorithm is used to reduce the sending of small packets.

So, statement I is correct.

Statement II:

Clark's Algorithm is used at the receiver side to avoid advertising very small window sizes.

So, statement II is correct.

Statement III:

Jacobson's Algorithm is related to RTT estimation and timeout calculation, not Silly Window Syndrome.

So, statement III is false.

Statement IV:

Piggy backing is used to combine acknowledgment with outgoing data, but it is not a standard solution for Silly Window Syndrome.

So, statement IV is false.

Correct statements are:

I and II only


UGC NET Computer Science PYQ 2022

Which AI System mimics the evolutionary process to generate increasingly better solutions to a problem?

I. Self organizing neural network.
II. Back propagation neural network.
III. Genetic algorithm.
IV. Forward propagation neural network.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A Genetic Algorithm is based on the idea of natural selection and evolution.

It improves solutions using operations like:

Selection
Crossover
Mutation

So, the AI system that mimics the evolutionary process is:

III. Genetic algorithm


UGC NET Computer Science PYQ 2022

Consider the following Learning algorithms.

I. Logistic regression.
II. Back propagation.
III. Linear regression.
IV. Forward propagation.

Which of the following options represents classification algorithm?

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement I:

Logistic regression is a classification algorithm.

So, I is correct.

Statement II:

Back propagation is used for training neural networks, and in such questions it is treated as part of classification learning.

So, II is taken as correct.

Statement III:

Linear regression is used for predicting continuous values, not for classification.

So, III is false.

Statement IV:

Forward propagation is a computation step, not a classification algorithm.

So, IV is false.

Correct answer is:

I and II only


UGC NET Computer Science PYQ 2022

Which Boolean operation on two variables can be represented by a single perception layer?

I. X1 AND X2
II. X1 OR X2
III. X1 NOR X2
IV. X1 XOR X2

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A single perceptron can represent only linearly separable Boolean functions.

Check each operation:

I. AND → linearly separable
II. OR → linearly separable
III. NOR → linearly separable
IV. XOR → not linearly separable

So, a single perceptron can represent:

I, II, and III only


UGC NET Computer Science PYQ 2022
Match the List-I and List-II
 List-I

List-II 

 a. Planar Graph
I. Probabilistic Model
 
 b. Bipartite Graph
 II. Deterministic Model
 c. PERT
 III. 4-Colorable
 d. CPM

 IV. 2-Colorable
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Planar Graph:

According to the four color theorem, every planar graph is $4$-colorable.

So,

a → III

Bipartite Graph:

A bipartite graph can be colored using $2$ colors.

So,

b → IV

PERT:

PERT is used when activity time is uncertain. Hence, it is a probabilistic model.

So,

c → I

CPM:

CPM is used when activity time is fixed and known. Hence, it is a deterministic model.

So,

d → II

Correct matching:

a-III; b-IV; c-I; d-II


UGC NET Computer Science PYQ 2022
Match List-I and List-II
 List-I

List-II 

 a. Direct Addressing
I. MVI A, FFH
 
 b. Indirect addressing
 II. MOV A, B
 c. Register Addressing
 III. STA, FFFFA
 d. Immediate addressing

 IV. MOV A, M

 Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Direct Addressing:

In direct addressing, the memory address is directly given in the instruction.

So, STA, FFFFA is direct addressing.

a → III

Indirect Addressing:

In indirect addressing, the memory address is given indirectly through a register pair.

In MOV A, M, M represents the memory location pointed by HL register pair.

b → IV

Register Addressing:

In register addressing, operands are registers.

MOV A, B uses registers A and B.

c → II

Immediate Addressing:

In immediate addressing, data is directly given in the instruction.

MVI A, FFH means FFH is directly loaded into A.

d → I

Correct matching:

a-III, b-IV, c-II, d-I


UGC NET Computer Science PYQ 2022

Match the List-I and List-II

 List-I

 List-II

 a. If the implementation of generated or derived classes differs only through a parameter we have
 I. to use class hierarchy
 b. If the actual types of objects used cannot be known at compile time, then we have
II. improved run-time efficiency
 
 c. If inline operations are essential and templates are used then we have
 III. to use templates
 d. To gain access to differing instances for derived classes through base we have

 IV. to use explicit casting

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For a:

If implementation differs only through a parameter, templates are useful.

So,

a → III

For b:

If actual object types are not known at compile time, class hierarchy and runtime polymorphism are used.

So,

b → I

For c:

Templates allow inline operations and can improve run-time efficiency.

So,

c → II

For d:

To access derived class instances through base class reference or pointer, explicit casting may be used.

So,

d → IV

Correct matching:

a-III, b-I, c-II, d-IV


UGC NET Computer Science PYQ 2022

Match the List-I and List-II

 List-I

 List-II

a. Apache Kafka
I. Platform for constructing data flows for extract, transform, and load ETL processing and analysis of large datasets
b. Pig
II. General-purpose computing model and runtime system for distributed data analytics
 
c. Apache Mahout
III. Open-source platform that was created by LinkedIn

d. MapReduce

IV. Open-source platform used for creating scalable machine learning algorithms

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Apache Kafka was originally created by LinkedIn.

So,

a → III

Pig is used for constructing data flows for ETL processing and analysis of large datasets.

So,

b → I

Apache Mahout is used for creating scalable machine learning algorithms.

So,

c → IV

MapReduce is a general-purpose computing model for distributed data analytics.

So,

d → II

Correct matching:

a-III, b-I, c-IV, d-II


UGC NET Computer Science PYQ 2022

Match the List-I and List-II

 List-I

 List-II

a. IPC
I. Resource Allocation
b. Demand Paging
II. Computational speedup
 
c. Banker's Algorithm
III. Task Control Block

d. PCB

IV. Virtual Memory

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

IPC means Inter Process Communication. It helps cooperating processes communicate and can provide computational speedup.

So,

a → II

Demand Paging is a technique used in Virtual Memory.

So,

b → IV

Banker's Algorithm is used for safe Resource Allocation and deadlock avoidance.

So,

c → I

PCB means Process Control Block. It is also related to task control information.

So,

d → III

Correct matching:

a-II, b-IV, c-I, d-III


UGC NET Computer Science PYQ 2022

Match the List-I and List-II

 List-I

 List-II

a. Product Complexity
I. System Requirements Design
b. Structured System analysis
II. Software design
 
c. Coupling and Cohesion
III. Validation techniques

d. Symbolic Execution

IV. Software cost estimation

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Product Complexity is an important factor in Software Cost Estimation.

So,

a → IV

Structured System analysis is related to System Requirements Design.

So,

b → I

Coupling and Cohesion are important concepts of Software Design.

So,

c → II

Symbolic Execution is used as a Validation technique.

So,

d → III

Correct matching:

a-IV, b-I, c-II, d-III


UGC NET Computer Science PYQ 2022

Match the List-I and List-II

 List-I

 List-II

a. Dijkstra's Algorithm
I. Calculates path matrix
b. Prim's Algorithm
II. Stores minimum cost edge
 
c. Warshall's Algorithm
III. Stores the total cost from a source node to the current node

d. Kruskal's Algorithm

IV. Finds Minimum Spanning Tree

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Dijkstra's Algorithm is used to find the shortest path from a single source. It stores the total minimum cost from source node to current node.

So,

a → III

Prim's Algorithm selects the minimum cost edge to construct a minimum spanning tree.

So,

b → II

Warshall's Algorithm calculates the path matrix or transitive closure.

So,

c → I

Kruskal's Algorithm is used to find Minimum Spanning Tree.

So,

d → IV

Correct matching:

a-III, b-II, c-I, d-IV


UGC NET Computer Science PYQ 2022
Match the following based on the language accepted by using brute force method of parsing.
 List-I

 List-II

a. $S \to aSa \mid aa$
I. $((2^n$ *3)-4); n > 1
b. $S \to aaSaa \mid aa$
II. $2^n$; n>=1
 
c. $S \to aaaSaaa \mid aa$
III. ((4*$2^n$)-6);n>=1

d. $S \to aaaaSaaaa \mid aa$

IV. $2^n$ - 2; n>= 2

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For $S \to aSa \mid aa$:

It generates strings:

$aa, aaaa, aaaaaa, \ldots$

So, length pattern is:

$2n$

Therefore,

a → II

For $S \to aaSaa \mid aa$:

It generates strings by adding two $a$'s on both sides.

So, it matches the given form IV.

Therefore,

b → IV

For $S \to aaaSaaa \mid aa$:

It generates lengths:

$2,8,14,20,\ldots$

This is:

$6n-4$

or

$((2n*3)-4)$

Therefore,

c → I

For $S \to aaaaSaaaa \mid aa$:

It generates lengths:

$2,10,18,26,\ldots$

This is:

$8n-6$

or

$((4*2n)-6)$

Therefore,

d → III

Correct matching:

a-II, b-IV, c-I, d-III


UGC NET Computer Science PYQ 2022

Match List I with List II

 List-I

 List-II

a. CDMA
I. It provides mobile internet connection with faster data transfer rates
b. GSM
II. It allows users to connect to a network or to other devices over wireless channel
 
c. UMTS
III. Accessing mechanism for multiple transmitters over a single channel

d. WiFi

IV. It is cellular technology employs hybrid of FDMA and TDMA

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

CDMA means Code Division Multiple Access. It is an accessing mechanism for multiple transmitters over a single channel.

So,

a → III

GSM uses a hybrid of FDMA and TDMA.

So,

b → IV

UMTS is a mobile communication technology that provides faster mobile internet data transfer rates.

So,

c → I

WiFi allows users to connect to a network or to other devices over a wireless channel.

So,

d → II

Correct matching:

a-III, b-IV, c-I, d-II


UGC NET Computer Science PYQ 2022

Match List I with List II

 List-I

 List-II

a. Text planning
I. Natural language understanding
b. Sentence planning

II. Natural language generation

 
c. Sentence generation

d. Map the input to useful representations


Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Text planning is a part of Natural Language Generation.

So,

a → II

Sentence planning is also a part of Natural Language Generation.

So,

b → II

Sentence generation is also a part of Natural Language Generation.

So,

c → II

Mapping the input to useful representations is a part of Natural Language Understanding.

So,

d → I

Correct matching:

a-II, b-II, c-II, d-I


UGC NET Computer Science PYQ 2022

Consider the statements:

I. There does not exist a polynomial time algorithm to solve integer linear programming problems.
II. Main focus of PERT is 'minimizing time'.

Choose the correct option about statements I and II.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement I:

Integer Linear Programming is a hard problem because variables are restricted to integer values.

General Integer Linear Programming is considered NP-hard.

So, it is not solved by a general polynomial time algorithm.

Therefore, statement I is true.

Statement II:

PERT stands for Program Evaluation and Review Technique.

PERT is mainly used for project scheduling when activity times are uncertain.

Its main focus is time estimation and completing the project in minimum possible time.

Therefore, statement II is true.

So,

I is True and II is True.


UGC NET Computer Science PYQ 2022

The correct sequence in the fetch-execute cycle is ______.

I. Decode
II. Fetch
III. Execute

Choose the correct answer from the following:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In the instruction cycle, the CPU first fetches the instruction from memory.

After fetching, it decodes the instruction.

After decoding, it executes the instruction.

So, correct order is:

Fetch → Decode → Execute

That is:

II-I-III


UGC NET Computer Science PYQ 2022

In what sequence the initialization, testing and execution of body is done while using do-while loop?

I. Commenting
II. Execution of the body
III. Initialisation
IV. Testing the condition

Choose the correct answer from the following:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a do-while loop, initialization is done first.

Then the loop body executes at least once.

After executing the body, the condition is tested.

So, correct order is:

Initialisation → Execution of the body → Testing the condition

That is:

III, II, IV


UGC NET Computer Science PYQ 2022

I. Find recursively all its density-connected points and assign them to the same cluster as the core point.
II. Find all the neighbor points with EPS and identify the core points with more than MinPts neighbors.
III. Iterate through the remaining unvisited points in the dataset.
IV. For each core point if it is not already assigned to a cluster, create a new cluster.

Choose the correct answer from the following:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In DBSCAN, first we find neighbors within EPS and identify core points.

Then for each unassigned core point, a new cluster is created.

After that, all density-connected points are recursively added to the same cluster.

Finally, the algorithm continues with the remaining unvisited points.

So, correct order is:

II → IV → I → III


UGC NET Computer Science PYQ 2022

Select the correct order of events after power is initialized on a system.

I. Bootstrap loader is loaded from the disk
II. Kernel is loaded onto the memory
III. Firmware ROM loads boot block

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

After power is initialized, the system starts the booting process.

First, the firmware present in ROM starts execution.

So, first step is:

III. Firmware ROM loads boot block

Then the bootstrap loader is loaded from the disk.

So, second step is:

I. Bootstrap loader is loaded from the disk

After that, the bootstrap loader loads the kernel into memory.

So, third step is:

II. Kernel is loaded onto the memory

Correct order is:

III, I, II



UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Limited Seats
× Aspire MCA Promotion

Game Changer NIMCET Test Series 2026

Boost your preparation with mock tests, analysis and rank-focused practice.

JOIN NOW
Ask Your Question or Put Your Review.

loading...