Qus : 1
UGC NET Computer Science PYQ 2022
3
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.
1
Both A and R are correct and R is the correct explanation of A. 2
Both A and R are correct but R is NOT the correct explanation of A.
3
A is correct but R is not correct. 4
A is not correct but R 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 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.
Qus : 2
UGC NET Computer Science PYQ 2022
3
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:
1
I, II, III, IV, V 2
I, II, IV, III, V
3
II, I, III, V, IV 4
II, I, IV, III, V 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.
Qus : 3
UGC NET Computer Science PYQ 2022
1
What is the safest order while simplifying Context Free Grammar?
1
Elimination of $\epsilon$-productions, Unit productions, and then Useless symbols and productions. 2
Elimination of useless symbols productions, $\epsilon$-productions, and then Unit productions. 3
Elimination of Unit productions, $\epsilon$-productions and then Useless symbols and productions. 4
Elimination of $\epsilon$-productions, Useless symbols and productions, and then Unit productions. 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
Qus : 4
UGC NET Computer Science PYQ 2022
3
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:
1
I-II-III-IV-V 2
II-III-IV-V-I 3
II-I-IV-V-III 4
I-II-IV-V-III 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.
Qus : 5
UGC NET Computer Science PYQ 2022
1
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:
1
All the statements are correct. 2
Only II and III are correct. 3
Only I and IV are correct. 4
All the statements are not 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 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.
Qus : 6
UGC NET Computer Science PYQ 2022
2
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.
1
P 2
Q 3
R 4
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 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.
Qus : 7
UGC NET Computer Science PYQ 2022
1
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:
1
Both A and R are true and R is the correct explanation of A 2
Both A and R are true but R is not the correct explanation of A 3
A is true but R is false 4
A is false but R 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 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.
Qus : 9
UGC NET Computer Science PYQ 2022
3
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:
1
Both Statement I and Statement II are correct 2
Both Statement I and Statement II are incorrect 3
Statement I is correct but Statement II is incorrect 4
Statement I is incorrect and Statement II 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 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.
Qus : 10
UGC NET Computer Science PYQ 2022
3
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.
1
Both Statement I and Statement II are true 2
Both Statement I and Statement II are false 3
Statement I is true but Statement II is false 4
Statement I is false but Statement II 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 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.
Qus : 15
UGC NET Computer Science PYQ 2022
4
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.
1
$130.56.0.0$ and $130.56.254.255$ 2
$130.56.255.0$ and $130.56.255.255$ 3
$130.56.0.192$ and $130.255.255.255$ 4
$130.56.255.192$ and $130.56.255.255$ 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$
Qus : 16
UGC NET Computer Science PYQ 2022
2
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 ?
1
q2,X2,R 2
q2,x2,L 3
q3,X2,L 4
Error Entry 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)$
Qus : 17
UGC NET Computer Science PYQ 2022
3
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?
1
$(q1,X1,R)$ 2
$(q1,a,R)$ 3
$(q2,X1,R)$ 4
Error Entry 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.
Qus : 18
UGC NET Computer Science PYQ 2022
4
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?
1
$(q1,x1,L)$ 2
$(q4,X1,R)$ 3
$(q1,x1,R)$ 4
Error Entry 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.
Qus : 19
UGC NET Computer Science PYQ 2022
2
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?
1
$(q5,Y1,L)$ 2
$(q3,Y1,R)$ 3
$(q4,Y1,L)$ 4
Error Entry 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)$
Qus : 20
UGC NET Computer Science PYQ 2022
1
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?
1
$(q4,X2,R)$ 2
$(q5,X2,R)$ 3
$(q5,X2,L)$ 4
Error Entry 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)$
Qus : 21
UGC NET Computer Science PYQ 2022
2
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.
1
$CF(R_1 = 0.8), CF(R_2 = 0.3)$ 2
$CF(R_1 = 0.40), CF(R_2 = 0.15)$ 3
$CF(R_1 = 0.15), CF(R_2 = 0.35)$ 4
$CF(R_1 = 0.8), CF(R_2 = 0.35)$ 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$
Qus : 22
UGC NET Computer Science PYQ 2022
1
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?
1
$0.237$ 2
$0.723$ 3
$0.18$ 4
$0.452$ 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$
Qus : 23
UGC NET Computer Science PYQ 2022
1
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
1
$t=\begin{cases}m\cdot \frac{T}{n}\ \text{for }m\ll n\\T\ \text{for }m\gg n\end{cases}$ 2
$t=\begin{cases}\frac{T}{n}\ \text{for }m\ll n\\T\ \text{for }m\gg n\end{cases}$ 3
$t=\begin{cases}m\cdot T\ \text{for }m\ll n\\T\ \text{for }m\gg n\end{cases}$ 4
$t=\begin{cases}m\cdot T\ \text{for }m\ll n\\\frac{m}{T}\ \text{for }m\gg n\end{cases}$ 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$
Qus : 25
UGC NET Computer Science PYQ 2022
1
The representation of $4$ bit code $1101$ into $7$ bit, even parity Hamming code is
1
$(1010101)$ 2
$(1111001)$ 3
$(1011101)$ 4
$(1110000)$ 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$
Qus : 27
UGC NET Computer Science PYQ 2022
3
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
1
$3\times 8$ multiplexer 2
Decimal to BCD converter 3
Octal to Binary encoder 4
Priority encoder 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.
Qus : 30
UGC NET Computer Science PYQ 2022
3
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?
1
$y_1\ge 0,y_2$ unrestricted 2
$y_1\ge 0,y_2\ge 0$ 3
$y_1$ is unrestricted, $y_2\ge 0$ 4
$y_1$ is unrestricted, $y_2$ restricted 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$
Qus : 32
UGC NET Computer Science PYQ 2022
1
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$
1
$S\to CA,\ A\to a,\ C\to b$ 2
$S\to CA\mid B,\ B\to BC\mid B,\ A\to a,\ C\to aB\mid b$ 3
$S\to CA\mid B,\ B\to BC,\ A\to a,\ C\to aB\mid b$ 4
$S\to AB\mid AC,\ B\to BC\mid BA,\ 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$
Qus : 33
UGC NET Computer Science PYQ 2022
1
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$?
1
$L=\{a^n b^m:n\ge 0,m>n\}$ 2
$L=\{a^n b^m:n\ge 0,m\ge 0\}$ 3
$L=\{a^n b^m:n\ge m\}$ 4
$L=\{a^n b^m:n\ge m,m>0\}$ 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\}$
Qus : 35
UGC NET Computer Science PYQ 2022
1
Consider $L=\{ab,aa,baa\}$ Which of the following string is NOT in $L^*$?
1
$baaaaabaaaaa$ 2
$abaabaaabaa$ 3
$aaaabaaaa$ 4
$baaaaabaa$ 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^*$.
Qus : 36
UGC NET Computer Science PYQ 2022
2
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?
1
$L=\{a^{2n}b^n:n\ge 0\}$ 2
$L=\{a^n b^{2n}:n\ge 0\}$ 3
$L=\{a^{2n}b^n:n>0\}$ 4
$L=\{a^n b^{2n}:n>0\}$ 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)\}$
Qus : 38
UGC NET Computer Science PYQ 2022
3
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-
1
$7,4$ 2
$7,1$ 3
$7,46$ 4
$55,1$ 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$
Qus : 44
UGC NET Computer Science PYQ 2022
3
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]$
1
Scaling 2
Shear 3
Homography 4
Steganography 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.
Qus : 45
UGC NET Computer Science PYQ 2022
1
RAD software process model stands for-
1
Rapid Application Development 2
Relative Application Development 3
Rapid Application Design 4
Recent Application Development 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.
Qus : 46
UGC NET Computer Science PYQ 2022
1
If every requirement can be checked by a cost effective process, then SRS is called
1
Verifiable 2
Tracable 3
Modifiable 4
Complete 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.
Qus : 47
UGC NET Computer Science PYQ 2022
4
Fault base testing technique is
1
Unit testing 2
Beta testing 3
Stress testing 4
Mutation testing 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.
Qus : 48
UGC NET Computer Science PYQ 2022
3
Alpha and Beta testing are forms of
1
White-Box Testing 2
Black - Box Testing 3
Acceptance Testing 4
System Testing 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.
Qus : 49
UGC NET Computer Science PYQ 2022
4
The process to gather the software requirements from client, analyze and document is known as -
1
Software Engineering Process 2
User Engineering Process 3
Requirement Elicitation Process 4
Requirement Engineering Process 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.
Qus : 50
UGC NET Computer Science PYQ 2022
4
Size and complexity are a part of
1
People Metrics 2
Project Metrics 3
Process Metrics 4
Product Metrics 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.
Qus : 51
UGC NET Computer Science PYQ 2022
1
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
Sid Sname Rating Age 22 Dustin 7 45.0 29 Brutus 1 33.0 31 Lubber 8 55.5 32 Andy 8 25.5 58 Rusty 10 35.5 64 Horatio 7 35.5 71 Zorba 10 16.0 74 Horatio 9 35.0 85 Art 3 25.5 95 Bob 3 63.5
Table 2: Reserves $R$
Sid Bid day 22 101 10/10/98 22 102 10/10/98 22 103 10/8/98 22 104 10/7/98 31 102 11/10/98 31 103 11/6/98 31 104 11/12/98 64 101 9/5/98 64 102 9/8/98 74 103 9/8/98
Table 3: Boats $B$
Bid Bname Color 101 Interlake blue 102 Interlake red 103 Clipper green 104 Marine red
Which of the following relational algebra query computes the Sid's of sailors with age over $20$ who have not reserved a red boat?
1
$\pi_{sid}(\sigma_{age>20}(Sailors))-\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves\bowtie Sailors)$ 2
$\pi_{sid}((\sigma_{color='red'\land age=20}(Boats\bowtie Sailors\bowtie Reserves)))$ 3
$\pi_{sid}((\sigma_{age<20}(Sailors))-\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves\bowtie Sailors))$ 4
$\pi_{sid}((\sigma_{age>20}(Sailors))\cap \pi_{sid}((\sigma_{color='red'}(Boats))\bowtie 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 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)$
Qus : 52
UGC NET Computer Science PYQ 2022
1
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
Sid Sname Rating Age 22 Dustin 7 45.0 29 Brutus 1 33.0 31 Lubber 8 55.5 32 Andy 8 25.5 58 Rusty 10 35.5 64 Horatio 7 35.5 71 Zorba 10 16.0 74 Horatio 9 35.0 85 Art 3 25.5 95 Bob 3 63.5
Table 2: Reserves $R$
Sid Bid day 22 101 10/10/98 22 102 10/10/98 22 103 10/8/98 22 104 10/7/98 31 102 11/10/98 31 103 11/6/98 31 104 11/12/98 64 101 9/5/98 64 102 9/8/98 74 103 9/8/98
Table 3: Boats $B$
Bid Bname Color 101 Interlake blue 102 Interlake red 103 Clipper green 104 Marine red
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)$
1
Both Q1 and Q2 2
Both Q2 and Q3 3
Only Q1 4
Only Q2 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.
Qus : 53
UGC NET Computer Science PYQ 2022
2
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
Sid Sname Rating Age 22 Dustin 7 45.0 29 Brutus 1 33.0 31 Lubber 8 55.5 32 Andy 8 25.5 58 Rusty 10 35.5 64 Horatio 7 35.5 71 Zorba 10 16.0 74 Horatio 9 35.0 85 Art 3 25.5 95 Bob 3 63.5
Table 2: Reserves $R$
Sid Bid day 22 101 10/10/98 22 102 10/10/98 22 103 10/8/98 22 104 10/7/98 31 102 11/10/98 31 103 11/6/98 31 104 11/12/98 64 101 9/5/98 64 102 9/8/98 74 103 9/8/98
Table 3: Boats $B$
Bid Bname Color 101 Interlake blue 102 Interlake red 103 Clipper green 104 Marine red
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)$
1
Both Q1 and Q3 2
Both Q2 and Q3 3
Only Q3 4
Only Q2 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.
Qus : 54
UGC NET Computer Science PYQ 2022
2
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
Sid Sname Rating Age 22 Dustin 7 45.0 29 Brutus 1 33.0 31 Lubber 8 55.5 32 Andy 8 25.5 58 Rusty 10 35.5 64 Horatio 7 35.5 71 Zorba 10 16.0 74 Horatio 9 35.0 85 Art 3 25.5 95 Bob 3 63.5
Table 2: Reserves $R$
Sid Bid day 22 101 10/10/98 22 102 10/10/98 22 103 10/8/98 22 104 10/7/98 31 102 11/10/98 31 103 11/6/98 31 104 11/12/98 64 101 9/5/98 64 102 9/8/98 74 103 9/8/98
Table 3: Boats $B$
Bid Bname Color 101 Interlake blue 102 Interlake red 103 Clipper green 104 Marine red
Which of the following relational algebra query computes the names of sailor who have reserved all boats?
1
$\rho(Tempsids,((\pi_{bid}Reserves)/(\pi_{bid}Boats)))\ \pi_{sname}((Tempsids)\bowtie Sailors)$ 2
$\rho(Tempsids,((\pi_{sid,bid}Reserves)/(\pi_{bid}Boats)))\ \pi_{sname}((Tempsids)\bowtie Sailors)$ 3
$\rho(Tempsids,((\pi_{sid}Sailors)/(\pi_{bid}Boats)))\ \pi_{sname}((Tempsids)\bowtie Sailors)$ 4
$\rho(Tempsids,((\pi_{sid}Reserves)/(\pi_{bid}Boats)))\ \pi_{sname}((Tempsids)\bowtie 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.
Qus : 55
UGC NET Computer Science PYQ 2022
1
Consider the relational schema of sailors $S$, Reserves $R$ and Boats $B$.Table 1: Sailors $S$
Sid Sname Rating Age 22 Dustin 7 45.0 29 Brutus 1 33.0 31 Lubber 8 55.5 32 Andy 8 25.5 58 Rusty 10 35.5 64 Horatio 7 35.5 71 Zorba 10 16.0 74 Horatio 9 35.0 85 Art 3 25.5 95 Bob 3 63.5
Table 2: Reserves $R$
Sid Bid day 22 101 10/10/98 22 102 10/10/98 22 103 10/8/98 22 104 10/7/98 31 102 11/10/98 31 103 11/6/98 31 104 11/12/98 64 101 9/5/98 64 102 9/8/98 74 103 9/8/98
Table 3: Boats $B$
Bid Bname Color 101 Interlake blue 102 Interlake red 103 Clipper green 104 Marine red
Which of the following relational algebra query computes the names of sailors who have reserved a red and a green boat?
1
$\rho(Tempred,\pi_{sid}((\sigma_{color='red'}(Boats))\bowtie Reserves))\ .\ \rho(Tempgreen,\pi_{sid}((\sigma_{color='green'}(Boats))\bowtie Reserves))\ .\ \pi_{sname}((Tempred\cap Tempgreen)\bowtie Sailors)$ 2
$\rho(Tempboats2,(\sigma_{color='red'}(Boats)\cap\sigma_{color='green'}(Boats)))\ \pi_{sname}(Tempboats2\bowtie Reserves)$ 3
$\pi_{sname}((\sigma_{color='red'}(Boats)\cap\sigma_{color='green'}(Boats))(Tempboats2\bowtie Sailors\bowtie Reserves))$ 4
$\rho(Tempboats2,(\sigma_{color='red'\land color='green'}(Boats)))\ \pi_{sname}(Tempboats2\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 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.
Qus : 56
UGC NET Computer Science PYQ 2022
1
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
1
$T_t=333.33\mu sec,\ T_p=18000\mu sec$ 2
$T_t=300\mu sec,\ T_p=15360\mu sec$ 3
$T_t=33.33\mu sec,\ T_p=1800\mu sec$ 4
$T_t=1800\mu sec,\ T_p=33.33\mu sec$ 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$
Qus : 57
UGC NET Computer Science PYQ 2022
2
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
1
$6$ bits 2
$7$ bits 3
$5$ bits 4
$4$ bits 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.
Qus : 61
UGC NET Computer Science PYQ 2022
4
Which Metrics are derived by normalizing quality and/or productivity measures by considering the size of the software that has been produced?
1
Function - Oriented Metrics 2
Function - Point Metrics 3
Line of Code Metrics 4
Size Oriented Metrics 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.
Qus : 62
UGC NET Computer Science PYQ 2022
4
The model in which the requirements are implemented by its category is
1
Evolutionary Development Model 2
Waterfall Model 3
Prototyping Model 4
Iterative Enhancement Model 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.
Qus : 64
UGC NET Computer Science PYQ 2022
4
Modules X and Y operate on the same input and output, then the cohesion is
1
Logical cohesion 2
Sequential cohesion 3
Procedural cohesion 4
Communicational cohesion 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.
Qus : 66
UGC NET Computer Science PYQ 2022
2
Which mode is a block cipher implementation as a self synchronizing stream cipher?
1
Cipher Block Chaining Mode 2
Cipher Feedback Mode 3
Electronic Codebook Mode 4
Output Feedback Mode 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.
Qus : 67
UGC NET Computer Science PYQ 2022
2
Simplify the following using K-Map.
$F(A,B,C,D)=\sum(3,4,5,6,7,11,15)$
1
$AB+C'D$ 2
$A'B+CD$ 3
$AC+BD$ 4
$A'B+B'C$ 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$
Qus : 68
UGC NET Computer Science PYQ 2022
2
Which one is a connectionless transport-layer protocol that belongs to the Internet protocol family?
1
Transmission Control Protocol (TCP) 2
User Datagram Protocol (UDP) 3
Routing Protocol (RP) 4
Datagram Control Protocol (DCP) 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.
Qus : 70
UGC NET Computer Science PYQ 2022
3
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$?
1
$32$ kbps 2
$48$ kbps 3
$64$ kbps 4
$70$ kbps 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
Qus : 73
UGC NET Computer Science PYQ 2022
2
The coefficient of $x^2y^3z^2$ in the expansion of $(x+y+z)^7$ is
1
$C(7,3)\times C(5,2)$ 2
$C(7,2)\times C(5,3)$ 3
$C(7,3)\times C(7,2)$ 4
$C(5,3)\times C(5,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 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)$
Qus : 74
UGC NET Computer Science PYQ 2022
1
Which layer divides each message into packets at the source and re-assembles them at the destination?
1
Network layer 2
Transport layer 3
Data link layer 4
Physical layer 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.
Qus : 76
UGC NET Computer Science PYQ 2022
2
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
1
$160.5$ ms 2
$165.5$ ms 3
$120.5$ ms 4
$590.5$ ms 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$.
Qus : 77
UGC NET Computer Science PYQ 2022
1
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?
1
$011, 101, 000$ 2
$001, 010, 111$ 3
$011, 101, 111$ 4
$001, 010, 000$ 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$
Qus : 78
UGC NET Computer Science PYQ 2022
1
Which of the following is correct for the destination address $4A:30:10:21:10:1A$?
1
unicast address 2
multicast address 3
broadcast address 4
unicast and broadcast address 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.
Qus : 80
UGC NET Computer Science PYQ 2022
4
Assume that $f(n)$ and $g(n)$ are asymptotically positive. Which of the following is correct?
1
$f(n)=O(g(n))$ and $g(n)=O(h(n))\Rightarrow f(n)=\omega(h(n))$ 2
$f(n)=\Omega(g(n))$ and $g(n)=\Omega(h(n))\Rightarrow f(n)=O(h(n))$ 3
$f(n)=o(g(n))$ and $g(n)=o(h(n))\Rightarrow f(n)=o(h(n))$ 4
$f(n)=\omega(g(n))$ and $g(n)=\omega(h(n))\Rightarrow f(n)=\Omega(h(n))$ 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.
Qus : 82
UGC NET Computer Science PYQ 2022
2
The solution of the recurrence relation $T(n)=3T\left(\frac{n}{4}\right)+n\log n$ is
1
$\theta(n^2\log n)$ 2
$\theta(n\log n)$ 3
$\theta((n\log n)^2)$ 4
$\theta(\log\log n)$ 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)$
Qus : 83
UGC NET Computer Science PYQ 2022
2
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?
1
$arr[3][4][2]$ 2
$*(*(*(arr+2)+3)+1)$
3
$*(arr+2)+*(arr+3)+*(arr+1)$ 4
$arr[2][3][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 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$
Qus : 86
UGC NET Computer Science PYQ 2022
2
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?
1
$h\ge \log_t\frac{n+1}{2}$ 2
$h\le \log_t\frac{n+1}{2}$ 3
$h\ge \log_t\frac{n-1}{2}$ 4
$h\le \log_t\frac{n-1}{2}$ 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}$
Qus : 90
UGC NET Computer Science PYQ 2022
2
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?
1
8 2
7 3
10 4
4 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$.
Qus : 91
UGC NET Computer Science PYQ 2022
1
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?
1
${P,Q,R,S}$ 2
${R,Q,X}$
3
${V,X}$ 4
None of the 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 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.
Qus : 92
UGC NET Computer Science PYQ 2022
4
Consider the traversal of a tree Preorder $\to ABCEIFJDGHKL$ Inorder $\to EICFJBGDKHLA$ Which of the following is correct post order traversal?
1
$EIFJCKGLHDBA$ 2
$FCGKLHDBUAE$ 3
$FCGKLHDBAEIJ$ 4
$IEJFCGKLHDBA$ 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$
Qus : 94
UGC NET Computer Science PYQ 2022
3
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$
1
$2$ left rotations, $2$ right rotations 2
$2$ left rotations, $3$ right rotations 3
$3$ left rotations, $2$ right rotations 4
$3$ left rotations, $1$ right rotation 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.
Qus : 96
UGC NET Computer Science PYQ 2022
4
Consider the following two lists:
List I List 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
1
$(A)-(I), (B)-(II), (C)-(III), (D)-(IV)$ 2
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$ 3
$(A)-(I), (B)-(II), (C)-(IV), (D)-(III)$ 4
$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$ 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)$
Qus : 98
UGC NET Computer Science PYQ 2022
1
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
1
$A\to B,\ ACD\to E,\ EF\to G,\ EF\to H$ 2
$A\to B,\ ACD\to E,\ EF\to G,\ EF\to H,\ ACDF\to G$ 3
$A\to B,\ ACD\to E,\ EF\to G,\ EF\to H,\ ACDF\to E$ 4
$A\to B,\ ABCD\to E,\ EF\to H,\ EF\to 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 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$
Qus : 100
UGC NET Computer Science PYQ 2022
4
A trigger is
1
A statement that enables to start DBMS. 2
A statement that is executed by the user when debugging an application program. 3
A condition the system tests for the validity of the database user. 4
A statement that is executed automatically by the system as a side effect of modification to the database. 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.
Qus : 101
UGC NET Computer Science PYQ 2022
1
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$
1
8 2
7
3
6 4
5 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$
Qus : 102
UGC NET Computer Science PYQ 2022
3
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:
1
6 2
8 3
10 4
12 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$.
Qus : 104
UGC NET Computer Science PYQ 2022
1
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
1
$1.875$ sec 2
$2.6251$ sec 3
$2.0062$ sec 4
$2.6150$ sec 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
Qus : 106
UGC NET Computer Science PYQ 2022
1
Consider two lists A and B of three strings on $\{0,1\}$X:
List A List B 1 111 10111 10 10 0
Y:
List A List B 10 101 011 11 101 011
Which of the following is true?
1
Only PCP in X has solution. 2
Only PCP in Y has solution. 3
PCP in both X and Y has solution. 4
PCP neither in X nor in Y has solution. 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.
Qus : 108
UGC NET Computer Science PYQ 2022
4
Consider the properties of recursively enumerable sets:
(A) Finiteness
(B) Context Freedom
(C) Emptiness
Which of the following is true?
1
Only (A) and (B) are not decidable 2
Only (B) and (C) are not decidable 3
Only (C) and (A) are not decidable 4
All (A), (B) and (C) are not decidable 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.
Qus : 110
UGC NET Computer Science PYQ 2022
1
Consider the following :
List I List 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?
1
$(A)-(III), (B)-(IV), (C)-(II), (D)-(I)$ 2
$(A)-(IV), (B)-(III), (C)-(I), (D)-(II)$ 3
$(A)-(IV), (B)-(III), (C)-(II), (D)-(I)$ 4
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$ 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)$
Qus : 112
UGC NET Computer Science PYQ 2022
4
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:
1
(A) and (B) only 2
(B) and (C) only 3
(C) and (A) only 4
All (A), (B) and (C) 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.
Qus : 114
UGC NET Computer Science PYQ 2022
1
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?
1
All (A), (B) and (C) are true 2
Only (B) is true 3
Only (C) is true 4
Only (A) 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 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.
Qus : 116
UGC NET Computer Science PYQ 2022
3
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:
1
(B) and (C) only 2
(A) and (B) only 3
(A), (B) and (C) only 4
(A) and (D) only 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.
Qus : 118
UGC NET Computer Science PYQ 2022
3
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:
1
(A) and (D) only 2
(B) and (C) only 3
(A) and (C) only 4
(B) and (D) only 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.
Qus : 120
UGC NET Computer Science PYQ 2022
3
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:
1
(A) only true 2
(B) only true 3
Both (A) and (B) true 4
Neither (A) nor (B) 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 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.
Qus : 122
UGC NET Computer Science PYQ 2022
4
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?
1
(A), (B) and (D) only 2
(A), (B), (C) and (D) 3
(B), (C) and (D) only 4
(A), (C) and (D) only 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.
Qus : 124
UGC NET Computer Science PYQ 2022
1
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:
1
(A) and (B) only true 2
(B) and (C) only true 3
(A) and (C) only true 4
(A), (B) and (C) 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
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.
Qus : 126
UGC NET Computer Science PYQ 2022
3
Match List I with List II:
List-I List-II A. BCNF I. It removes multivalued dependency. B. 3NF II. It is not always dependency preserving. C. 2NF III. It removes transitive transparency. D. 4NF IV. It removes partial functional dependency.
Choose the correct answer from the options given below:
1
$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$ 2
$(A)-(II), (B)-(IV), (C)-(I), (D)-(III)$ 3
$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$ 4
$(A)-(II), (B)-(I), (C)-(IV), (D)-(III)$ 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)$
Qus : 127
UGC NET Computer Science PYQ 2022
4
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$?
1
Minimum: $1,1,1,1$; Maximum: $1,(n-1),(n-1),n$ 2
Minimum: $1,0,0,0$; Maximum: $1,(n-1),(n-1),n$
3
Minimum: $1,0,0,n$; Maximum: $1,n,(n-1),(n-1)$ 4
Minimum: $1,0,0,1$; Maximum: $1,(n-1),(n-1),n$ 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}$
Qus : 128
UGC NET Computer Science PYQ 2022
3
Match List I with List II:
List-I List-II A. BCNF I. It removes multivalued dependency. B. 3NF II. It is not always dependency preserving. C. 2NF III. It removes transitive transparency. D. 4NF IV. It removes partial functional dependency.
Choose the correct answer from the options given below:
1
$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$ 2
$(A)-(II), (B)-(IV), (C)-(I), (D)-(III)$ 3
$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$ 4
$(A)-(II), (B)-(I), (C)-(IV), (D)-(III)$ 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)$
Qus : 130
UGC NET Computer Science PYQ 2022
3
Match List I with List II:
List-I List-II A. Localization I. 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:
1
$(A)-(I), (B)-(II), (C)-(III), (D)-(IV)$ 2
$(A)-(II), (B)-(I), (C)-(III), (D)-(IV)$ 3
$(A)-(III), (B)-(I), (C)-(II), (D)-(IV)$ 4
$(A)-(III), (B)-(I), (C)-(IV), (D)-(II)$ 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)$
Qus : 132
UGC NET Computer Science PYQ 2022
2
Match List I with List II:
List I List 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:
1
$(A)-(III), (B)-(IV), (C)-(II), (D)-(I)$ 2
$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$ 3
$(A)-(III), (B)-(IV), (C)-(I), (D)-(II)$ 4
$(A)-(II), (B)-(III), (C)-(II), (D)-(IV)$ 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)$
Qus : 133
UGC NET Computer Science PYQ 2022
2
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 ______
1
6 2
7
3
5 4
4 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}$
Qus : 134
UGC NET Computer Science PYQ 2022
4
Match List I with List II:
List-I List-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:
1
$(A)-(II), (B)-(I), (C)-(IV), (D)-(III)$ 2
$(A)-(I), (B)-(II), (C)-(III), (D)-(IV)$ 3
$(A)-(IV), (B)-(III), (C)-(I), (D)-(II)$ 4
$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$ 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)$
Qus : 136
UGC NET Computer Science PYQ 2022
3
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:
1
$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$ 2
$(A)-(I), (B)-(II), (C)-(III), (D)-(IV)$ 3
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$ 4
$(A)-(II), (B)-(I), (C)-(III), (D)-(IV)$ 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)$
Qus : 138
UGC NET Computer Science PYQ 2022
3
Match List I with List II:
List I List 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:
1
$(A)-(II), (B)-(I), (C)-(IV), (D)-(III)$ 2
$(A)-(II), (B)-(I), (C)-(III), (D)-(IV)$ 3
$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$ 4
$(A)-(IV), (B)-(I), (C)-(II), (D)-(III)$ 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)$
Qus : 140
UGC NET Computer Science PYQ 2022
2
Match List I with List II:
List I List 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:
1
$(A)-(I), (B)-(II), (C)-(IV), (D)-(III)$ 2
$(A)-(III), (B)-(I), (C)-(IV), (D)-(II)$ 3
$(A)-(III), (B)-(IV), (C)-(II), (D)-(I)$ 4
$(A)-(IV), (B)-(II), (C)-(III), (D)-(I)$ 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)$
Qus : 142
UGC NET Computer Science PYQ 2022
2
Match List I with List II:
List I List 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:
1
$(A)-(I), (B)-(III), (C)-(II), (D)-(IV)$ 2
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$ 3
$(A)-(III), (B)-(II), (C)-(I), (D)-(IV)$ 4
$(A)-(I), (B)-(II), (C)-(III), (D)-(IV)$ 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)$
Qus : 144
UGC NET Computer Science PYQ 2022
4
Match List I with List II:
List I List 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:
1
$(A)-(IV), (B)-(III), (C)-(II), (D)-(I)$ 2
$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$ 3
$(A)-(IV), (B)-(III), (C)-(I), (D)-(II)$ 4
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$ 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)$
Qus : 145
UGC NET Computer Science PYQ 2022
1
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.
1
B, C and D are correct 2
Only A and C are correct
3
Only B and C are correct 4
All A, B, C and D are 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 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}}$
Qus : 146
UGC NET Computer Science PYQ 2022
3
Consider the following algorithms and their running times:
List I List 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?
1
$(A)-(III), (B)-(II), (C)-(I), (D)-(IV), (E)-(V)$ 2
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV), (E)-(V)$ 3
$(A)-(II), (B)-(III), (C)-(I), (D)-(V), (E)-(IV)$ 4
$(A)-(III), (B)-(I), (C)-(II), (D)-(IV), (E)-(V)$ 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)$
Qus : 147
UGC NET Computer Science PYQ 2022
2
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}}$
1
A, B and C are only correct 2
A, B and D are only correct
3
B, C and D are only correct 4
A, C and D are only 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 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}}$
Qus : 148
UGC NET Computer Science PYQ 2022
1
Consider the following:
List I List 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?
1
$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$ 2
$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$ 3
$(A)-(III), (B)-(II), (C)-(I), (D)-(IV)$ 4
$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$ 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)$
Qus : 149
UGC NET Computer Science PYQ 2022
4
The relation
$R={(1,3),(1,1),(3,1),(1,2),(3,3),(4,4)}$
defined in ${1,2,3,4}$ is ____
1
Reflexive, Symmetric but not Transitive 2
Symmetric, anti-symmetric and transitive
3
Asymmetric, anti-symmetric and not transitive 4
Not reflexive, not symmetric and not transitive 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.
Qus : 150
UGC NET Computer Science PYQ 2022
1
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?
1
Statement I true and Statement II false 2
Statement I and Statement II true 3
Statement I false and Statement II true 4
Statement I and Statement II 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 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.
Qus : 151
UGC NET Computer Science PYQ 2022
2
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')$
1
A, B and C Only 2
B, C and D Only
3
A, C and D Only 4
A, B and D Only 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}}$
Qus : 152
UGC NET Computer Science PYQ 2022
3
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?
1
Statement I, Statement II true, and Statement III false 2
Statement I, Statement III true, and Statement II false 3
Statement I, Statement II false, and Statement III true 4
Statement I, Statement II, and Statement III 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 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.
Qus : 153
UGC NET Computer Science PYQ 2022
2
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
1
A and B only 2
B and C only
3
A, B and C only 4
A and D Only 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}}$
Qus : 154
UGC NET Computer Science PYQ 2022
4
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?
1
Statement I, Statement II and Statement III are true 2
Statement I true and Statement II, Statement III false 3
Statement I, Statement II true and Statement III false 4
Statement I false and Statement II, Statement III 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 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.
Qus : 155
UGC NET Computer Science PYQ 2022
3
Inheritance provides the benefits of
A. shared interfaces
B. run-time polymorphism
C. less redundant information
D. dynamic binding
1
A, B, C only 2
A, B, D only
3
B, C, D only 4
A, C, D only 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}}$
Qus : 156
UGC NET Computer Science PYQ 2022
3
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?
1
Statement I only 2
Statement I and Statement II only 3
Statement I, Statement II and Statement III only 4
Statement I, Statement II and Statement IV only 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.
Qus : 157
UGC NET Computer Science PYQ 2022
1
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:
1
A, B, D, E only 2
A, B, C only
3
A, B, D only 4
A and B only 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}}$
Qus : 158
UGC NET Computer Science PYQ 2022
3
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?
1
Statement I true and Statement II false 2
Statement I false and Statement II true 3
Both Statement I and Statement II false 4
Both Statement I and Statement II 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 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.
Qus : 159
UGC NET Computer Science PYQ 2022
2
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
1
A, C Only 2
B, C Only
3
B, D only 4
A, D only 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}}$
Qus : 160
UGC NET Computer Science PYQ 2022
1
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?
1
Statement I is true and Statement II is false 2
Statement II is true and Statement I is false 3
Both Statement I and Statement II are true 4
Neither Statement I nor Statement II 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 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.
Qus : 161
UGC NET Computer Science PYQ 2022
2
Let $T_1$ be a transaction that transfer Rs. $50$ from account A to account B. This transaction can be defined as follows:
Step Operation 1 Read (A) 2 A: A-50 3 Write(A) 4 Read(B) 5 B:=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?
1
Always consistent 2
May be temporarily inconsistent
3
Must be abort 4
Always rollback 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}}$
Qus : 162
UGC NET Computer Science PYQ 2022
3
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
1
$X$ is true 2
$Y$ is true 3
Both $X$ and $Y$ are true 4
It does not depend on $X$ and $Y$ 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)}$
Qus : 163
UGC NET Computer Science PYQ 2022
2
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:
1
A, B only 2
A, C only
3
B, C only 4
A, B, C only 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}}$
Qus : 164
UGC NET Computer Science PYQ 2022
4
A good software requirement specification does NOT have the characteristic
1
Completeness 2
Consistency 3
Clarity 4
Reliability 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.
Qus : 165
UGC NET Computer Science PYQ 2022
3
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:
1
A only 2
A, B only
3
B, C only 4
A, B, C only 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.
Qus : 166
UGC NET Computer Science PYQ 2022
1
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:
1
Both (A) and (R) are true and (R) is the correct explanation of (A) 2
Both (A) and (R) are true but (R) is NOT the correct explanation of (A) 3
(A) is true but (R) is false 4
(A) is false but (R) 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 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).
Qus : 167
UGC NET Computer Science PYQ 2022
1
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 A 0 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 ____
1
7.2 2
8.2
3
6 4
9 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}$
Qus : 168
UGC NET Computer Science PYQ 2022
4
Of the following, which is NOT a logical error?
1
Using the $'='$ instead of $'===' $ to determine if two values are equal 2
Divide by zero 3
Failing to initialize counter and total variables before the body of loop 4
Using commas instead of two required semicolon in a for loop header 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.
Qus : 169
UGC NET Computer Science PYQ 2022
3
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
1
A, B, D, C 2
C, D, A, B
3
C, A, D, B 4
A, D, B, C 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}$
Qus : 170
UGC NET Computer Science PYQ 2022
2
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:
1
Both (A) and (R) are true and (R) is the correct explanation of (A) 2
Both (A) and (R) are true but (R) is NOT the correct explanation of (A) 3
(A) is true but (R) is false 4
(A) is false but (R) 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 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).
Qus : 171
UGC NET Computer Science PYQ 2022
1
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.
1
Both Statement I and Statement II are true. 2
Both Statement I and Statement II are false.
3
Statement I is true but Statement II is false. 4
Statement I is false but Statement II 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 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}}$
Qus : 172
UGC NET Computer Science PYQ 2022
3
Which statement is false?
1
All function calls in C pass arguments using call by value. 2
Call by reference enables a called function to modify a variable in calling function. 3
Call by value is always more efficient than call by reference. 4
Programmers use pointers and indirection operation to simulate call by reference. 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).
Qus : 173
UGC NET Computer Science PYQ 2022
2
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:
1
A, B, C only 2
A, B, D only
3
A, C, D only 4
B, C, D only 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}}$
Qus : 174
UGC NET Computer Science PYQ 2022
1
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:
1
Both Statement I and Statement II are correct 2
Both Statement I and Statement II are incorrect 3
Statement I is correct but Statement II is incorrect 4
Statement I is incorrect but Statement II 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 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.
Qus : 175
UGC NET Computer Science PYQ 2022
3
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:
1
A, D only 2
A, C Only
3
A, B, C and D 4
B, C Only 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}}$
Qus : 176
UGC NET Computer Science PYQ 2022
1
Given below are two statements:Statement I: Consider $20$ bit 'Branch' microinstruction code format given below:
F1 F2 F3 CD BR AD $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:
1
Both Statement I and Statement II are correct 2
Both Statement I and Statement II are incorrect 3
Statement I is correct but Statement II is incorrect 4
Statement I is incorrect but Statement II 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 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.
Qus : 177
UGC NET Computer Science PYQ 2022
3
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:
1
A, B, C only 2
B, D, E only
3
A, D, E only 4
A, C, E only 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}}$
Qus : 178
UGC NET Computer Science PYQ 2022
1
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:
1
A, C, E only 2
A, D, E only
3
B, D, E only 4
B, C, D only 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}}$
Qus : 179
UGC NET Computer Science PYQ 2022
4
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
1
A and B 2
A and D
3
A, B and C 4
A, B, C and D 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}^*$.
Qus : 180
UGC NET Computer Science PYQ 2022
1
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.
1
A, B and C 2
A, B and D
3
A, C and D 4
B, C and D 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}}$
Qus : 181
UGC NET Computer Science PYQ 2022
1
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.
1
B and C only 2
A and C only
3
C and D only 4
B and D only 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}}$
Qus : 183
UGC NET Computer Science PYQ 2022
4
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:
1
A and B Only 2
A and C Only
3
C and D Only
4
B and D Only 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
Qus : 188
UGC NET Computer Science PYQ 2022
2
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:
1
A-I, B-III, C-II, D-IV 2
A-III, B-I, C-IV, D-II
3
A-III, B-I, C-II, D-IV
4
A-I, B-II, C-IV, D-III 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
Qus : 189
UGC NET Computer Science PYQ 2022
2
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:
1
A-III, B-IV, C-II, D-I 2
A-III, B-IV, C-I, D-II
3
A-IV, B-III, C-II, D-I
4
A-IV, B-II, C-I, D-III 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
Qus : 190
UGC NET Computer Science PYQ 2022
4
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:
1
A-II, B-I, C-III, D-IV 2
A-II, B-I, C-IV, D-III
3
A-III, B-I, C-II, D-IV
4
A-III, B-I, C-IV, D-II 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
Qus : 191
UGC NET Computer Science PYQ 2022
2
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:
1
A-II, B-III, C-IV, D-I 2
A-III, B-I, C-IV, D-II
3
A-IV, B-I, C-II, D-III
4
A-III, B-IV, C-I, D-II 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
Qus : 192
UGC NET Computer Science PYQ 2022
3
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:
1
A-I, B-II, C-III, D-IV 2
A-I, B-IV, C-II, D-III
3
A-IV, B-I, C-II, D-III
4
A-II, B-III, C-IV, D-I 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
Qus : 193
UGC NET Computer Science PYQ 2022
2
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:
1
A-III, B-IV, C-I, D-II 2
A-III, B-II, C-I, D-IV
3
A-II, B-III, C-IV, D-I
4
A-II, B-IV, C-I, D-III 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}$
Qus : 194
UGC NET Computer Science PYQ 2022
3
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:
1
A-III, B-II, C-I, D-IV 2
A-II, B-III, C-I, D-IV
3
A-III, B-I, C-II, D-IV
4
A-II, B-IV, C-I, D-III 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}$
Qus : 195
UGC NET Computer Science PYQ 2022
2
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:
1
A-I, B-II, C-I, D-II 2
A-II, B-II, C-I, D-II
3
A-I, B-II, C-II, D-I
4
A-II, B-II, C-II, D-I 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}$
Qus : 197
UGC NET Computer Science PYQ 2022
1
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:
1
D, B, A, C 2
B, D, A, C
3
B, D, C, A 4
B, A, D, C 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
Qus : 198
UGC NET Computer Science PYQ 2022
3
Consider the following schedule S.
T1 T2 T3 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.
1
D, B, A, C 2
B, D, A, C
3
B, D, C, A 4
B, A, D, C 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
Qus : 199
UGC NET Computer Science PYQ 2022
1
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$
1
$456$ 2
$450$
3
$458$ 4
$445$ 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}$
Qus : 201
UGC NET Computer Science PYQ 2022
1
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:
1
$A \to C \to F \to D \to E$ 2
$A \to C \to E \to B$
3
$A \to C \to F \to E \to B$ 4
$A \to C \to D \to 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 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}$
Qus : 202
UGC NET Computer Science PYQ 2022
3
The precedence of regular expression operators from lowest to highest precedence is:
1
Star, Concatenation, Union 2
Union, Star, Concatenation
3
Union, Concatenation, Star 4
Star, Union, Concatenation 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}}$
Qus : 203
UGC NET Computer Science PYQ 2022
3
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:
1
A-B-C-D-E 2
D-C-B-E-A
3
D-B-E-A-C 4
A-B-D-E-C 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}$
Qus : 204
UGC NET Computer Science PYQ 2022
1
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:
1
Only sequence A is correct. 2
Only sequence B is correct.
3
Only sequence C is correct. 4
Only sequence D 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 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}}$
Qus : 206
UGC NET Computer Science PYQ 2022
1
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$
1
456 2
450
3
458 4
445 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$
Qus : 207
UGC NET Computer Science PYQ 2022
1
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:
1
Both Statement I and Statement II are true. 2
Statement I is true but Statement II is false.
3
Statement I is true but Statement II is false. 4
Statement I is false but Statement II 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 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}}$
Qus : 208
UGC NET Computer Science PYQ 2022
1
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:
1
All the statements are correct. 2
Only B and C are correct.
3
Only A and E are correct. 4
Only C, D and E are 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 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}}$
Qus : 209
UGC NET Computer Science PYQ 2022
4
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?
1
Statement A is false and Statement B is true. 2
Statement A and Statement B both are false.
3
Statement A is true and Statement B is false. 4
Statement A and Statement B both 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 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}}$
Qus : 210
UGC NET Computer Science PYQ 2022
2
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:
1
Both A and R are correct and R is the correct explanation of A. 2
Both A and R are correct but R is NOT the correct explanation of A.
3
A is correct but R is not correct. 4
A is not correct but R 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 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}}$
Qus : 211
UGC NET Computer Science PYQ 2022
2
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$.
1
43 2
40
3
45 4
44 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}$
Qus : 212
UGC NET Computer Science PYQ 2022
1
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?
1
48.1 2
49
3
47.9 4
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 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}$
Qus : 213
UGC NET Computer Science PYQ 2022
1
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 ______
1
$O(8)$ 2
$O(64)$
3
$O(24)$ 4
$O(56)$ 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)}$
Qus : 214
UGC NET Computer Science PYQ 2022
3
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 ______
1
Divide and Conquer 2
Dynamic Programming
3
Greedy Algorithm 4
C++ 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}}$
Qus : 215
UGC NET Computer Science PYQ 2022
4
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?
1
$0/1$ knapsack can be applied for all kinds of problems but fractional knapsack can be applied only if the problem meets certain conditions. 2
There is no difference between the two. They give the same solution for any problem.
3
We use the greedy algorithm for $0/1$ knapsack and dynamic programming for fractional knapsack. 4
In $0/1$ knapsack problem, items cannot be divided into smaller portions and in fractional knapsack we can divide the item into required proportions of weight. 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}}$
Qus : 216
UGC NET Computer Science PYQ 2022
3
1
Select s.rollno, s.name From student s, enrollment e Where e.rollno = s.rollno and e.courseid = ANY (select precourseid from prerequisite p where p.courseid = "324") 2
Select s.rollno, s.name From student s, enrollment e Where e.rollno = s.rollno and e.courseid = ALL (select precourseid from prerequisite p where p.courseid = "324") 3
Select s.rollno, s.name From student s Where NOT EXISTS (select * prerequisite p where p.courseid = "324") and NOT EXISTS (select * from enrollment e where e.courseid = p.precourseid and e.rollno = s.rollno)) 4
Select s.rollno, s.name From student s Where EXISTS (select * prerequisite p where p.courseid = "324") and EXISTS (select * from enrollment e where e.courseid = p.precourseid and e.rollno = s.rollno)) 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.
Qus : 218
UGC NET Computer Science PYQ 2022
1
1
select deptid, name, sum(credits) as totalcredits from department, course where deptid=deptno group by deptid, name; 2
select deptid, name, count(credits) as totalcredits from department, course where deptid=deptno 3
group by deptid, name; select deptid, name, sum(credits) as totalcredits from department, course 4
select deptid, name, sum(credits) as totalcredits from department, course group by deptid, name having deptid=deptno; 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.
Qus : 219
UGC NET Computer Science PYQ 2022
4
1
select deptid, name, sum(credits) as totalcredits from department, course
where totalcredits >40
group by deptid, name
having deptid = deptno;
2
select deptid, name, sum(credits) as totalcredits from department, course
where deptid = deptno and totalcredits >40
group by deptid, name;
3
select deptid, name, sum(credits) as totalcredits
from department, course
group by deptid, name
having deptid = deptno and totalcredits >40
4
select deptid, name, sum(credits) as totalcredits from department, course
where deptid = deptno
group by deptid, name
having totalcredits >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
Qus : 220
UGC NET Computer Science PYQ 2022
3
1
It retrieves the roll number and names of students who have not enrolled for all course offered by department number 5. 2
It retrieves the roll number and names of students who have enrolled for all course offered by department number 5. 3
It retrieves the roll number and names of students who have enrolled for at least one course offered by department number 5. 4
It retrieves the roll number and names of students who are such that there exists at least one course offered by department number 5 which is not enrolled by the student. 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.
Qus : 222
UGC NET Computer Science PYQ 2022
1
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
1
Neither a partial order nor an equivalence relation 2
A partial order but not a total order 3
A total order 4
An equivalence relation 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.
Qus : 223
UGC NET Computer Science PYQ 2022
3
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?
1
1 2
2 3
3 4
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 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)} $
Qus : 224
UGC NET Computer Science PYQ 2022
2
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$;
1
$x>25$ 2
$x \le 25$ 3
$y>100$ 4
$y \le 100$ 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$
Qus : 227
UGC NET Computer Science PYQ 2022
1
Simplify the following using K-Map
$F(A,B,C,D)=\sum(0,2,5,7,8,10,13,15)$
1
$BD+B'D'$ 2
$AC+A'C'$ 3
$BC+B'C'$ 4
$AD+A'D'$ 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'$
Qus : 228
UGC NET Computer Science PYQ 2022
2
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?
1
$2$ times 2
$4$ times 3
$6$ times 4
$8$ times 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.
Qus : 234
UGC NET Computer Science PYQ 2022
2
Identify the incorrect statement(s).
1
A candidate key is minimal set of one or more attributes that, taken collectively, allows us to uniquely identify any entity in the entity set. 2
A candidate key for which no proper subset is also a candidate key is called a super key. 3
A super key is a set of one or more attributes that, taken collectively, allows us to uniquely identify any entity in the entity set. 4
A super key for which no proper subset is also a super key is called a candidate key. 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:
Qus : 236
UGC NET Computer Science PYQ 2022
3
Which of the following statements is correct,
according to the following instance of the
relational schema R(X, Y, Z)?
1
X → Y, Z → X 2
Y → Z, Z → X 3
X → Y, X → Z 4
Y → X, X → Z
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.
Qus : 239
UGC NET Computer Science PYQ 2022
4
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?
1
50% 2
100% 3
25% 4
0%
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%$
Qus : 246
UGC NET Computer Science PYQ 2022
1
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?
1
$4,\ \left\lfloor \log_2 n \right\rfloor$ 2
$14,\ \left\lfloor \log_2 n \right\rfloor$ 3
$4,\ \left\lfloor \frac{n}{2} \right\rfloor$ 4
$14,\ \left\lfloor \frac{n}{2} \right\rfloor$
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$
Qus : 247
UGC NET Computer Science PYQ 2022
2
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$.
1
$O(n^2)$ 2
$O(n\log_2 n)$ 3
$O(2^n)$ 4
$O(\log_2 n)$ 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)$
Qus : 248
UGC NET Computer Science PYQ 2022
4
Consider the Graph below:
How many spanning trees can be found?
1
10 2
5 3
9 4
8 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$
Qus : 249
UGC NET Computer Science PYQ 2022
3
The transition function $\delta$ in multi-tape Turing machine is defined as:
1
$\delta: 2Q \times \Gamma^k \to 2^Q \times \Gamma^k \times {L,R,S}^k$ 2
$\delta: Q \times Q \times \Gamma^k \to Q \times Q \times \Gamma^k \times {L,R,S}^k$ 3
$\delta: Q \times \Gamma^k \to Q \times \Gamma^k \times {L,R,S}^k$ 4
$\delta: Q \times \Gamma^k \times 2^Q \to Q \times \Gamma^k \times 2^Q \times {L,R,S}^k$ 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$
Qus : 252
UGC NET Computer Science PYQ 2022
2
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$ {} {}
1
0 2
1 3
2
4
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$
Qus : 254
UGC NET Computer Science PYQ 2022
2
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.
1
$25.25\mu s$ and $51.2\mu s$ 2
$51.2\mu s$ and $12.5\mu s$ 3
$10.24\mu s$ and $50.12\mu s$
4
$12.5\mu s$ and $51.2\mu 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 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$.
Qus : 256
UGC NET Computer Science PYQ 2022
1
The $A^*$ algorithm is optimal when,
1
It always finds the solution with the lowest total cost if the heuristic $h$ is admissible. 2
Always finds the solution with the highest total cost if the heuristic $h$ is admissible. 3
Finds the solution with the lowest total cost if the heuristic $h$ is not admissible.
4
It always finds the solution with the highest total cost if the heuristic $h$ is not admissible. 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.
Qus : 257
UGC NET Computer Science PYQ 2022
3
Which Artificial Intelligence technique enables computers to understand the associations and relationships between objects and Events?
1
Heuristic Processing 2
Cognitive Science 3
Relative symbolism
4
Pattern Matching 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.
Qus : 259
UGC NET Computer Science PYQ 2022
4
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
1
120 2
213 3
410
4
507 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$
Qus : 260
UGC NET Computer Science PYQ 2022
4
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?
1
1 2
2 3
3
4
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 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$
Qus : 261
UGC NET Computer Science PYQ 2022
4
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?
1
1 2
2 3
3
4
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 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$
Qus : 262
UGC NET Computer Science PYQ 2022
2
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.
1
Only A and D are correct 2
Only B and D are correct 3
All statements are NOT correct
4
All statements are 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 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.
Qus : 263
UGC NET Computer Science PYQ 2022
4
Which of the statement is not true in regards to virtual memory?
1
The main objective for using virtual memory is to increase the effective capacity of the memory system 2
Size of the program can be as large as the size of the secondary memory 3
Program and data are stored in the secondary memory
4
None of these 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.
Qus : 264
UGC NET Computer Science PYQ 2022
1
Which of the following is/are true for Dynamic RAM $DRAM$?
It is slower than static RAM $SRAM$
Packing Density is higher than Static RAM $SRAM$
It is faster than static RAM $SRAM$
It requires data refreshing
Choose the correct answer from the options given below:
1
1, 2, and 4 Only 2
1, 2, and 3 Only 3
3 and 4 Only 4
2 and 4 Only 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$
Qus : 265
UGC NET Computer Science PYQ 2022
4
Which of the following statement is/are false?
The processor has direct access to both primary and secondary memory
Primary memory stores the active instructions and data for the program being executed on the process
Secondary memory is used as a backup memory
Memory system is implemented on a single-level memory
Choose the correct answer from the options given below:
1
1 and 2 only 2
2 and 3 only 3
1, 2 and 3 only 4
1 and 4 only 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$
Qus : 266
UGC NET Computer Science PYQ 2022
4
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.
Decreases the vertical by three halves
Increases the vertical by three halves
Doubles the horizontal
Halves the horizontal
Choose the correct answer from the options given below:
1
$1$ and $3$ only 2
$1$ and $4$ only 3
$2$ and $3$ only 4
$2$ and $4$ only 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$
Qus : 267
UGC NET Computer Science PYQ 2022
3
Which of the following lists defined in HTML share a similar element
Unordered lists
Ordered lists
Definition Lists
Correlated lists
Enumerated lists
Choose the most appropriate answer from the options given below:
1
$1,2$ only 2
$1,3,5$ only 3
$1,2,3$ only 4
$1,3,4$ only 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$
Qus : 268
UGC NET Computer Science PYQ 2022
4
What are the drawbacks of using file systems to store data?
Data inconsistency
Difficulty in accessing data
Data isolation
Atomicity of updates
Choose the correct answer from the options given below:
1
$1,2$ only 2
$2,3,4$ only 3
$1,2,3$ only 4
$1,2,3,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 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.
Qus : 269
UGC NET Computer Science PYQ 2022
1
Which of the following database model, we have a parent-child relationship?
hierarchical databases
network databases
relational databases
Choose the correct answer from the options below:
1
$1,2$ only 2
$1,3$ 3
$2,3$ 4
$1,2,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 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$
Qus : 270
UGC NET Computer Science PYQ 2022
1
Identify the correct operation that produces the
below-given output based on two relations R1
and R2.
R1
Name Class a1 9 b1 5 c1 6 d1 11
R2
Output
Choose the correct answer from the options below :
1
$R1 \cap R2$ 2
$R1 - R2$ 3
$R1 - (R1 - R2)$ 4
$R1 \cup R2$ 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$
Qus : 271
UGC NET Computer Science PYQ 2022
4
Which of the following statements are true?
Shortest remaining time first scheduling may cause starvation
Preemptive scheduling may cause starvation
Round robin is better than FCFS in terms of response time
Choose the correct answer from the options given below:
1
$1$ only 2
$2,3$ only 3
$1,2$ only 4
$1,2,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 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.
Qus : 272
UGC NET Computer Science PYQ 2022
2
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.
1
entry section, remainder section, exit section 2
entry section, exit section, remainder section 3
remainder section, entry section, exit section 4
remainder section, exit section, entry section 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
Qus : 273
UGC NET Computer Science PYQ 2022
3
How do you create agile processes to manage unpredictability?
Requirements gathering must be conducted very carefully.
Risk analysis must be conducted before planning takes place.
Software increments must be delivered in short time periods.
Software processes must not adapt to changes incrementally.
Choose the correct answer from the options given below:
1
1 2
2 3
3 4
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 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
Qus : 274
UGC NET Computer Science PYQ 2022
4
Mr. X designed open source software which must comply with some criteria. Choose the false statement in respect of the above.
No restriction on redistribution of the software as part or whole.
The integrity of the author's source code must be maintained.
The software can be sold after distribution.
Choose the correct answer from the options given below:
1
1 only 2
2 only 3
3 only 4
All statements are 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 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.
Qus : 275
UGC NET Computer Science PYQ 2022
3
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$.
The circuit satisfiability problem belongs to class NP
The circuit satisfiability problem is at least as hard as any language in NP
The circuit satisfiability is NP-Complete
The size of the circuit is $\theta(K^2+1)$
If $P \ne NP$, this situation would contradict the NP-Completeness of the problem.
Choose the correct answer from the options given below:
1
1, 3, 4 Only 2
2, 4, 5 Only 3
1, 2, 3 Only 4
2, 3, 4 Only 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$
Qus : 276
UGC NET Computer Science PYQ 2022
1
Given an expression
$(A+B*D)/(E-F)+G$
The prefix notation is $+/+A*DB-EFG$
The prefix expression is the reverse of the postfix expression
The order of operands in infix expression and postfix expression are the same.
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:
1
$1,3,$ and $4$ Only 2
$3$ and $4$ Only 3
$1$ and $2$ Only 4
$1$ and $4$ Only 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$
Qus : 277
UGC NET Computer Science PYQ 2022
3
Which of the following is (are) correct about the regular expression?
a a* b b* c c* d d*
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}$
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$
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:
1
Only $1$ is correct 2
Only $2$ is correct 3
Both $1$ and $2$ are correct 4
All the three $1,2$ and $3$ are 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 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$
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^ $.
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$
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.
Qus : 278
UGC NET Computer Science PYQ 2022
2
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:
1
I, II, and III only 2
I and III only 3
III and IV only 4
II and IV only 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
Qus : 279
UGC NET Computer Science PYQ 2022
3
Which of the following statements are correct?
The first three-address instruction in the intermediate code is a leader.
The instruction which is exactly at the middle of the given three address code is a leader.
Any instruction that is the target of a conditional or unconditional jump is a leader.
Any instruction that immediately follows a conditional or unconditional jump is a leader.
Choose the correct answer from the options given below:
1
$1,2$ and $3$ 2
$2,3$ and $4$ 3
$1,3,4$ 4
$1,2,3,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 compiler design, leaders are used to form basic blocks.
Rules for finding leaders:
The first instruction of the intermediate code is always a leader.
So, statement $1$ is true.
The middle instruction is not necessarily a leader.
So, statement $2$ is false.
Any instruction which is the target of a conditional or unconditional jump is a leader.
So, statement $3$ is true.
Any instruction immediately following a conditional or unconditional jump is also a leader.
So, statement $4$ is true.
Correct statements are:
$1,3,4$
Qus : 280
UGC NET Computer Science PYQ 2022
2
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:
1
a, b and d only 2
a, b and c only 3
b and d only 4
a and d only 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
Qus : 281
UGC NET Computer Science PYQ 2022
1
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:
1
I and II only 2
I and III only 3
III and IV only 4
II and IV only 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
Qus : 283
UGC NET Computer Science PYQ 2022
3
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:
1
I and III only 2
II and IV only 3
I and II only 4
III and IV only 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
Qus : 285
UGC NET Computer Science PYQ 2022
4
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:
1
a-IV; b-III; c-I; d-II 2
a-III; b-IV; c-II; d-I 3
a-II; b-IV; c-I; d-III 4
a-III; b-IV; c-I; d-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 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
Qus : 286
UGC NET Computer Science PYQ 2022
3
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:
1
a-I, b-II, c-III, d-IV 2
a-II, b-III, c-IV, d-I 3
a-III, b-IV, c-II, d-I 4
a-IV, b-III, c-I, d-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 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
Qus : 287
UGC NET Computer Science PYQ 2022
2
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:
1
a-I, b-II, c-IV, d-III 2
a-III, b-I, c-II, d-IV 3
a-I, b-III, c-II, d-IV 4
a-II, b-I, c-III, d-IV 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
Qus : 288
UGC NET Computer Science PYQ 2022
3
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:
1
a-II, b-IV, c-I, d-III 2
a-II, b-I, c-IV, d-III 3
a-III, b-I, c-IV, d-II 4
a-I, b-II, c-IV, d-III 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
Qus : 289
UGC NET Computer Science PYQ 2022
2
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:
1
a-II, b-I, c-IV, d-III 2
a-II, b-IV, c-I, d-III 3
a-I, b-II, c-III, d-IV 4
a-II, b-III, c-I, d-IV 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
Qus : 290
UGC NET Computer Science PYQ 2022
3
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:
1
a-II, b-III, c-IV, d-I 2
a-III, b-I, c-IV, d-II 3
a-IV, b-I, c-II, d-III 4
a-III, b-IV, c-I, d-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 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
Qus : 291
UGC NET Computer Science PYQ 2022
2
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:
1
a-I, b-II, c-III, d-IV 2
a-III, b-II, c-I, d-IV 3
a-II, b-I, c-IV, d-III 4
a-III, b-IV, c-II, d-I 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
Qus : 292
UGC NET Computer Science PYQ 2022
2
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:
1
a-IV, b-III, c-I, d-II 2
a-II, b-IV, c-I, d-III 3
a-I, b-IV, c-III, d-II 4
a-II, b-III, c-I, d-IV 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
Qus : 293
UGC NET Computer Science PYQ 2022
2
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:
1
a-III, b-IV, c-II, d-I 2
a-III, b-IV, c-I, d-II 3
a-II, b-III, c-IV, d-I 4
a-II, b-I, c-IV, d-III 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
Qus : 294
UGC NET Computer Science PYQ 2022
4
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:
1
a-I, b-II, c-I, d-II 2
a-II, b-II, c-I, d-II 3
a-I, b-II, c-II, d-I 4
a-II, b-II, c-II, d-I 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
Qus : 295
UGC NET Computer Science PYQ 2022
1
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.
1
I is True; II is True 2
I is True; II is False 3
I is False; II is True 4
I is False; II is 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 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.
Qus : 297
UGC NET Computer Science PYQ 2022
4
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:
1
IV, II, III 2
IV, III, II 3
III, I, II 4
III, II, IV 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
Qus : 298
UGC NET Computer Science PYQ 2022
3
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:
1
II, IV, III, I 2
IV, II, III, I 3
II, IV, I, III 4
IV, II, I, III 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
Qus : 299
UGC NET Computer Science PYQ 2022
2
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:
1
II, III, and I 2
III, I, and II 3
I, II, and III 4
I, III, 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 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
""