Aspire's Library

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

UGC NET Computer Science Previous Year Questions (PYQs)

UGC NET Computer Science Computer PYQ


UGC NET Computer Science PYQ
According to the Nyquist theorem, to produce the original analog signal, one necessary condition is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Nyquist Sampling Theorem states:


Sampling frequency must be at least twice the maximum frequency present in the signal.


$ f_s \ge 2f_{max} $


UGC NET Computer Science PYQ
Consider a hash table of size seven with starting index zero and a hash function $(6x + 3) \mod 4$. Assuming the hash table is initially empty. Which of the following is the content of the table when the sequence 1, 3, 8, 10, 5 is inserted into the table using closed hashing? Here “_______” denotes an empty location in the table.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Hash function:

$h(x) = (6x + 3) \mod 4$

For 1:

$h(1) = 9 \mod 4 = 1$

So, 1 is placed at index 1.

For 3:

$h(3) = 21 \mod 4 = 1$

Index 1 is occupied, so place 3 at next free index 2.

For 8:

$h(8) = 51 \mod 4 = 3$

So, 8 is placed at index 3.

For 10:

$h(10) = 63 \mod 4 = 3$

Index 3 is occupied, so place 10 at index 4.

For 5:

$h(5) = 33 \mod 4 = 1$

Index 1, 2, 3, 4 are occupied, so place 5 at index 5.

Final table:

_, 1, 3, 8, 10, 5, _

UGC NET Computer Science PYQ
The period of a signal is $100\ ms$. Then the frequency of this signal in kilohertz is ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Period $T=100\ ms=0.1\ sec$

Frequency:

$f=\frac{1}{T}=\frac{1}{0.1}=10\ Hz$

Now convert into kHz:

$10\ Hz=\frac{10}{1000}\ kHz=0.01\ kHz=10^{-2}\ kHz$

UGC NET Computer Science PYQ
Match List-I with List-II:
 List-I (Boolean Expression)List-II (Dual of Boolean Expression) 
 A. $x(y+0)$
 I. $(x+0)(y\cdot z)$
 B. $\bar{x}+(\bar{y}+z)$
 II. $x+y\cdot1$
 C. $\bar{x}(y+0)$
 III. $\bar{x}+\bar{y}\cdot1$
 D. $x+(\bar{y}+z)$

 IV. $(x+0)(y\cdot \bar{z})$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Dual is obtained by interchanging:


$+$ ↔ $\cdot$

$0$ ↔ $1$


Applying dual rule:


A → III

B → IV

C → II

D → I


UGC NET Computer Science PYQ
Consider the following finite automata F1 that accepts a language L.


Let F2 be a finite automata which is obtained by reversal of F1. Then which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In the given automata, transitions are present in both directions among the states. Therefore, reversing the automata does not change the accepted language.

So,

$L(F1) = L(F2)$

UGC NET Computer Science PYQ
The process of removing details from a given state representation is called ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Abstraction means hiding or removing unnecessary details and keeping only important information.

So, removing details from a state representation is called abstraction.

UGC NET Computer Science PYQ

The number of tokens in the following line:

for i in range(begin : end : step) :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Tokens are the smallest meaningful units of a program.


Break the statement:


for | i | in | range | ( | begin | : | end | : | step | ) | :


Tokens:


for


i


in


range


(


begin


:


end


:


step


)


:


Total tokens = 12


UGC NET Computer Science PYQ
The compiler for high level language that runs on one machine and produces code for other machine is called-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A compiler that runs on one machine but generates code for another machine is called a cross compiler.

UGC NET Computer Science PYQ
Which of the following is NOT true in problem solving in artificial intelligence?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

AI problem solving commonly uses heuristic search.

In AI, solution steps may not always be explicit, and knowledge may be imprecise.

Repetition mechanism is mainly a feature of conventional algorithmic programming, not a special feature of AI problem solving.

UGC NET Computer Science PYQ

For the given two machines which of the following is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

From the diagrams:


• Both machines are deterministic (each state has exactly one transition for each input symbol).

• The first machine has states A and B with transitions on a and b.

• The second machine has states A, B, C, but the accepted language behavior matches the first machine.


Both machines accept the same language, even though the number of states differs.


Thus they are equivalent machines.


UGC NET Computer Science PYQ
Which of the following is not a property of a good system for representation of knowledge in a particular domain?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A good knowledge representation system has the following properties:

Representational adequacy

Inferential adequacy

Inferential efficiency

Acquisitional efficiency

Here, “Presentation adequacy” is not a standard property.

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

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

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

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





Go to Discussion

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

Solution

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

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

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

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

But this is the definition of coupling, not cohesion.

So, Reason R is false.

Therefore,

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

UGC NET Computer Science PYQ
If $f(x)=$ $x$ is my friend, and $p(x)=$ $x$ is perfect, then the correct logical translation of the statement “some of my friends are not perfect” is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

“Some” means there exists at least one person.

“my friends” means $f(x)$.

“not perfect” means $\neg p(x)$.

So, the statement becomes:

$\exists x(f(x)\land \neg p(x))$

UGC NET Computer Science PYQ
For the fuzzy set
$A = {(x_1,0.3),(x_2,0.7),(x_3,0.4)}$, the complement of $A$ would be represented as:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Complement of fuzzy set:


$\mu_{A'}(x) = 1 - \mu_A(x)$


Compute:


$x_1$: $1 - 0.3 = 0.7$

$x_2$: $1 - 0.7 = 0.3$

$x_3$: $1 - 0.4 = 0.6$


Thus,


$A' = {(x_1,0.7),(x_2,0.3),(x_3,0.6)}$


UGC NET Computer Science PYQ
What is x in the following program?
#include <stdio.h>

int main()
{
    typedef (*(*arrfptr[3])())[10];

    arrfptr x;

    return 0;
}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

The declaration:

typedef (*(*arrfptr[3])())[10];

means arrfptr is an array of 3 pointers to functions.

So,

arrfptr x;

declares x as an array of three function pointers.

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


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

Choose the correct answer from the options given below:






Go to Discussion

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

Solution

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

From the graph:

$a-b = 1$

$d-f = 1$

$b-f = 2$

$d-c = 2$

$d-e = 3$

So, the valid order must follow:

Weight $1$ edges first:

$I, II$ in any order

Then weight $2$ edges:

$III, IV$ in any order

Then weight $3$ edge:

$V$

Now check option (c):

II, I, III, V, IV

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

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

Therefore, this order cannot be used.


UGC NET Computer Science PYQ
What kind of clauses are available in conjunctive normal form?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In CNF, formula is written as conjunction of clauses.

Each clause is a disjunction of literals.

Example:

$(p\vee \neg q)\wedge(r\vee s)$

Here, $(p\vee \neg q)$ and $(r\vee s)$ are clauses.

So, clauses in CNF are disjunction of literals.

UGC NET Computer Science PYQ
Regarding the subroutines, see the following sequence of tasks to be performed:

A. Turn on the interrupt facility.
B. Service the device whose flag is set.
C. Save the contents of processor registers.
D. Check which flag is set.
E. Restore the contents of processor registers.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Interrupt Service Routine (ISR) steps:


Save processor registers → C


Check which device raised interrupt → D


Service the device → B


Restore processor registers → E


Re-enable interrupt facility → A


Correct sequence:


C, D, B, E, A


UGC NET Computer Science PYQ
The maximum yield length of the following CNF CFG is

S → AB

A → CD

B → e

C → a

D → b





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In CNF, for a finite grammar, if there are n variables, then maximum yield length can be up to:

$2^{n-1}$

Here, the variables considered are:

A, B, C, D

So,

$n = 4$

Maximum yield length:

$2^{4-1} = 2^3 = 8$

UGC NET Computer Science PYQ

What is the safest order while simplifying Context Free Grammar?






Go to Discussion

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

Solution

While simplifying a CFG, the safest order is:

First remove $\epsilon$-productions.

Then remove unit productions.

Finally remove useless symbols and productions.

Reason:

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

After removing unit productions, some symbols may become useless.

So, useless symbols should be removed at the end.

Correct order is:

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


UGC NET Computer Science PYQ
Consider the following properties:

A. Reflexive
B. Antisymmetric
C. Symmetric

Let $A=\{a,b,c,d,e,f,g\}$ and

$R=\{(a,a),(b,b),(c,d),(c,g),(d,g),(e,e),(f,f),(g,g)\}$

be a relation on $A$. Which of the following property/properties is/are satisfied by the relation $R$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For reflexive relation, every element must have pair $(x,x)$.

But $(c,c)$ and $(d,d)$ are missing.

So, relation is not reflexive.

For antisymmetric relation, if $(x,y)$ and $(y,x)$ both exist, then $x=y$.

Here, no reverse pair exists for $(c,d),(c,g),(d,g)$.

So, relation is antisymmetric.

For symmetric relation, if $(x,y)$ exists, then $(y,x)$ must also exist.

But $(c,d)$ exists and $(d,c)$ does not exist.

So, relation is not symmetric.

Therefore, relation satisfies B and not A.

UGC NET Computer Science PYQ
Arrange the following simple graphs based on number of spanning trees they have:
A. $K_3$ (Complete graph with 3 nodes)
B. $K_4$ (Complete graph with 4 nodes)
C. $K_{2,2}$ (Complete bipartite graph with 2 nodes in each partition)
D. $C_5$ (Cycle graph with 5 nodes)





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Number of spanning trees:


For complete graph:

$\tau(K_n)=n^{n-2}$


A: $K_3 = 3^{1} = 3$


B: $K_4 = 4^{2} = 16$


For complete bipartite graph:

$\tau(K_{m,n}) = m^{n-1} n^{m-1}$


C: $K_{2,2} = 2^{1} \times 2^{1} = 4$


For cycle graph:

$\tau(C_n)=n$


D: $C_5 = 5$


Thus:


A = 3

C = 4

D = 5

B = 16


Increasing order:


A, C, D, B


UGC NET Computer Science PYQ
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. The transmission delay and propagation delay are





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Transmission delay:

Frame size = 512 bits

Transmission rate = 10 Mbps

Transmission delay:

$\frac{512}{10 \times 10^6} = 51.2\ \mu s$

Propagation delay:

Distance = 2500 m

Speed = $2 \times 10^8$ m/s

Propagation delay:

$\frac{2500}{2 \times 10^8} = 12.5\ \mu s$

UGC NET Computer Science PYQ

Rearrange the following sequence in the context of OSI Layers:

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

Choose the correct answer from the options given below:






Go to Discussion

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

Solution

Physical layer:

Transmission of raw bits over communication channel.

So, II comes first.

Data Link layer:

Transforms raw bits into frames.

So, I comes second.

Network layer:

Controls and monitors subnet.

So, IV comes third.

Transport layer:

Provides connection-oriented or connection-less data transmission.

So, V comes fourth.

Application layer:

Handles user interfaces.

So, III comes last.


UGC NET Computer Science PYQ
Consider the following argument with premise $\forall x(P(x)\vee Q(x))$ and conclusion $(\forall xP(x))\wedge(\forall xQ(x))$
(A) $\forall x(P(x)\vee Q(x))$Premise
(B) $P(c)\vee Q(c)$Universal instantiation from (A)
(C) $P(c)$Simplification from (B)
(D) $\forall xP(x)$Universal generalization of (C)
(E) $Q(c)$Simplification from (B)
(F) $\forall xQ(x)$Universal generalization of (E)
(G) $(\forall xP(x))\wedge(\forall xQ(x))$Conjunction of (D) and (F)





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

From $\forall x(P(x)\vee Q(x))$, we can get:

$P(c)\vee Q(c)$

So, step (B) is correct.

But from $P(c)\vee Q(c)$, we cannot conclude $P(c)$ alone.

Also, we cannot conclude $Q(c)$ alone.

So, steps (C) and (E) are not correct inferences.

Step (G) would be correct only if (D) and (F) were validly obtained.

Hence, the main error is in steps (C) and (E).

UGC NET Computer Science PYQ
Techniques for performing I/O:

A. Programmed I/O
B. Interrupt-driven I/O
C. Rotational I/O
D. Direct memory access
E. Channelized I/O





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Standard I/O techniques are:


• Programmed I/O

• Interrupt-driven I/O

• Direct Memory Access (DMA)


Rotational I/O and Channelized I/O are not standard CPU I/O techniques.


Thus:


A, B, D are correct.


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

 LIST II

 A. Critical region

 I. Hoare's monitor

 B. Wait signal

 II. Mutual exclusion

 C. Working set

 III. Principle of locality

 D. Deadlock

 IV. Circular wait

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Critical region is related to mutual exclusion.

Wait signal is related to Hoare's monitor.

Working set is based on principle of locality.

Deadlock is related to circular wait.

So,

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


UGC NET Computer Science PYQ

Choose the correct option describing the features of Artificial neural network

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

Choose the correct answer from the options given below:






Go to Discussion

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

Solution

Statement I:

Artificial Neural Network is a machine learning technique.

So, statement I is correct.

Statement II:

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

So, statement II is correct.

Statement III:

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

So, statement III is correct.

Statement IV:

ANN is inspired by the human brain and nervous system.

So, statement IV is correct.

Therefore, all statements are correct.


UGC NET Computer Science PYQ
Which of the following are applications of symbol table?

A. Storage allocation

B. Checking type compatibility

C. Suppressing duplicate error messages

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Symbol table stores information about identifiers like name, type, scope, address and other attributes.

It helps in storage allocation.

It helps in checking type compatibility.

It also helps in avoiding or suppressing duplicate error messages for the same identifier.

So, all A, B and C are correct.

UGC NET Computer Science PYQ
Which of the following is not the most common property in social network?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Common properties of social networks:


• Scale-free degree distribution → True

• Small world property → True

• Short average path length → True


However, most social networks are not necessarily directed; many are modeled as undirected networks.


Thus the statement that is not a common property is:


UGC NET Computer Science PYQ
__________ is intended to show that a system both conforms to its specifications and meets the expectations of the system customer.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Software validation checks whether the software meets the requirements and expectations of the customer.


UGC NET Computer Science PYQ

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

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

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






Go to Discussion

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

Solution

Check each case one by one.

Case 1: Suppose P is guilty.

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

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

Case 2: Suppose Q is guilty.

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

Here, exactly one statement is false.

So, Q can be guilty.

Case 3: Suppose R is guilty.

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

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

Case 4: Suppose S is guilty.

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

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

Therefore, the guilty person is Q.


UGC NET Computer Science PYQ
Simplified expression/s for following Boolean function

$F(A,B,C,D)=\sum(0,1,2,3,6,12,13,14,15)$

is/are

(A) $A'B' + AB + A'C'D'$

(B) $A'B' + AB + A'CD'$

(C) $A'B' + AB + BC'D'$

(D) $A'B' + AB + BCD'$

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Given minterms are:

$0,1,2,3,6,12,13,14,15$

$A'B'$ covers minterms $0,1,2,3$

$AB$ covers minterms $12,13,14,15$

Remaining minterm is $6$

Option (B):

$A'CD'$ covers minterms $2,6$

Both are present in the function.

So, option (B) is correct.

Option (D):

$BCD'$ covers minterms $6,14$

Both are present in the function.

So, option (D) is also correct.

Options (A) and (C) include minterm $4$, which is not present in the function.

UGC NET Computer Science PYQ
An ambiguous grammar is one which has:

A. More than one derivations
B. More than one left most derivations
C. More than one right most derivations
D. More than one Parse tree
E. More than one syntax tree





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A grammar is ambiguous if a string generated by it has more than one parse tree.


Equivalent definitions:


• More than one leftmost derivation

• More than one rightmost derivation


Thus the correct statements are:


B and C.


UGC NET Computer Science PYQ
Which is not the component of the natural language understanding process?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Morphological analysis, semantic analysis and pragmatic analysis are standard components of natural language understanding.


Meaning analysis is not a standard separate component because meaning is covered under semantic analysis.


UGC NET Computer Science PYQ

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

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

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






Go to Discussion

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

Solution

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

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

Television display also works in a similar raster scanning manner.

So, Assertion A is true.

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

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


UGC NET Computer Science PYQ
Which of the following statements with respect to K-segment pipelining are true?

(A) Maximum speedup that a pipeline can provide is k theoretically.

(B) It is impossible to achieve maximum speedup k in k-segment pipeline.

(C) All segments in pipeline take same time in computation.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In a k-segment pipeline, theoretical maximum speedup is $k$.

So, statement A is true.

In practical cases, due to pipeline filling time, emptying time, delays and unequal stages, exact maximum speedup $k$ is not achieved.

So, statement B is true.

All pipeline segments need not take exactly the same computation time.

So, statement C is false.

UGC NET Computer Science PYQ
The sequence of steps for a page replacement algorithm will be:

A. find a frame that is not currently being used
B. change the page table
C. use freed frame
D. no frame is free
E. free a frame





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Steps in page replacement:


No frame is free → D


Find a frame to replace → A


Free that frame → E


Update the page table → B


Use the freed frame for the new page → C


UGC NET Computer Science PYQ
If A = {4n + 2 | n is a natural number} and B = {3n | n is a natural number}. Which of the following is correct for A ∩ B?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A contains numbers of the form:


$4n + 2$


So, numbers in A are:


$6, 10, 14, 18, 22, 26, 30, ...$


B contains multiples of 3:


$3, 6, 9, 12, 15, 18, 21, 24, 27, 30, ...$


Common elements are:


$6, 18, 30, 42, ...$


These can be written as:


$12n - 6$


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





Go to Discussion

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

Solution

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

Given:

Time quantum $=4$ ms

Number of processes $=20$

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

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

So,

Maximum waiting time $=19 \times 4$

$=76$ ms


UGC NET Computer Science PYQ
 Which of the following statements with respect to multiprocessor system are true?

(A) Multiprocessor system is controlled by one operating system.

(B) In Multiprocessor system, multiple computers are connected by the means of communication lines.

(C) Multiprocessor system is classified as multiple instruction stream and multiple data stream system.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

A multiprocessor system has multiple processors controlled by one operating system.

So, statement A is true.

Multiple computers connected through communication lines describes a distributed system or multicomputer system, not a tightly coupled multiprocessor system.

So, statement B is false.

Multiprocessor systems are generally classified as MIMD systems, that means multiple instruction stream and multiple data stream.

So, statement C is true.

Therefore, A and C only are correct.

UGC NET Computer Science PYQ
What will be the ordering of typical steps when processing a high-level query?

A. Query optimizer
B. Runtime database processor
C. Scanning, parsing and validating
D. Query code generator





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Typical DBMS query processing steps:


Scanning, parsing and validating → C


Query optimizer → A


Query code generator → D


Runtime database processor → B


Correct order:


C → A → D → B


UGC NET Computer Science PYQ
The total cost of retrieving records in sorted order using an unclustered B+ tree is

(P – Average number of records per data page

N – Data pages

F – Ratio of the size of a data entry to the size of a data record)






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In an unclustered B+ tree, retrieving records in sorted order requires scanning index entries and then fetching records from data pages.


Cost of scanning leaf level entries:


$F \times N$


Number of records:


$P \times N$


So, total cost:


$FN + PN = (F + P)N$


Final Answer: (b) (F + P) * N


UGC NET Computer Science PYQ

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

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

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

subject to

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

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

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

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






Go to Discussion

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

Solution

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

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

So, Statement 1 is correct.

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

Correct objective should be:

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

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


UGC NET Computer Science PYQ
Which of the following statements regarding XML is/are True?

(A) XML is a set of tags designed to tell browsers how to display text and images in a web page.

(B) XML defines a syntax for representing data, but the meaning of data varies from application to application.

(C) <Letter>, <LETTER>, and <letter> are three different tags in XML.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

XML is used to store and transport data, not to display data like HTML.

So, statement A is false.

XML defines syntax for representing data, but meaning depends on application.

So, statement B is true.

XML tags are case-sensitive.

So, <Letter>, <LETTER>, and <letter> are different tags.

So, statement C is true.

UGC NET Computer Science PYQ
The height of a binary search tree for the words banana, peach, apple, pear, coconut, mango and papaya using alphabetical order is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Insert words sequentially into BST.


banana → root


peach → right of banana


apple → left of banana


pear → right of peach


coconut → left of peach


mango → right of coconut


papaya → right of mango


Longest path:


banana → peach → coconut → mango → papaya


Number of edges = 4


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

A virtual memory system uses first-in first-out page replacement policy and allocates a fixed number of frames to a process.

Assertion A: Increasing number of page frames allocated to a process sometimes increases the page fault rate.

Reason R: Some programs do not exhibit locality of reference.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because FIFO page replacement may show Belady’s anomaly.


In Belady’s anomaly, increasing the number of page frames can sometimes increase the number of page faults.


Reason R is true, but it is not the correct explanation of Assertion A.


UGC NET Computer Science PYQ

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

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

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

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






Go to Discussion

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

Solution

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

Statement I:

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

So, the client may wait indefinitely.

Therefore, Statement I is true.

Statement II:

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

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

$FIN$ is used for normal connection termination.

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

Therefore, Statement II is false.


UGC NET Computer Science PYQ
In the context of 3D Computer graphics, which of the following statements is/are correct?

(A) Under perspective projection, each set of parallel lines in the object do not stay parallel in the image except those that are parallel to the viewplane to start with.

(B) Applying a perspective transformation in the graphics pipeline to a vertex involves dividing by its z coordinate.

(C) Perspective transformation is a linear transformation.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In perspective projection, parallel lines generally meet at vanishing point.

So, statement A is true.

Perspective transformation involves perspective division, commonly by z-coordinate.

So, statement B is true.

Because division is involved, perspective transformation is not linear.

So, statement C is false.

UGC NET Computer Science PYQ
Match List-I with List-II
 List-I
 List-II
 A. Verification
 I. White box Testing
 B. Validation
II. Black box Testing
 
 C. Internal logic exercise
 III. Quality Control
 D. Software requirement exercise

 IV. Quality Assurance






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Verification → Quality Assurance → IV

Validation → Quality Control → III

Internal logic exercise → White box testing → I

Software requirement exercise → Black box testing → II


Matching:


A → IV

B → III

C → I

D → II


UGC NET Computer Science PYQ
At a particular time of computation, the value of a counting semaphore is 7. Then 20 P operations and x V operations were completed on this semaphore. If the final value of semaphore is 5, x will be





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Initial semaphore value = 7


Each P operation decreases the value by 1.


Each V operation increases the value by 1.


So,


$7 - 20 + x = 5$


$x - 13 = 5$


$x = 18$


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

Find the number of addresses in each subnet.






Go to Discussion

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

Solution

Given block:

$130.56.0.0/16$

Total host bits:

$32-16=16$

Number of required subnets:

$1024=2^{10}$

So, $10$ bits are borrowed for subnetting.

Remaining host bits:

$16-10=6$

Number of addresses in each subnet:

$2^6=64$


UGC NET Computer Science PYQ
Concerning Phong shading and Gouraud shading in a 3D scene, which of the following statements are true?

(A) Gouraud shading requires more computation than Phong shading.

(B) Gouraud shading linearly interpolates the color of an interior pixel from the color at the vertices.

(C) Phong shading interpolates over the normal vectors specified at the vertices.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution


Phong shading requires more computation than Gouraud shading.

So, statement A is false.

Gouraud shading computes color at vertices and interpolates color inside the polygon.

So, statement B is true.

Phong shading interpolates normal vectors and then computes illumination.

So, statement C is true.

UGC NET Computer Science PYQ
For making a memory of size $2048 \times 8$ bytes using chips of size $128 \times 4$ bytes, the number of chips required is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Memory required:


$2048 \times 8$


Each chip:


$128 \times 4$


First match word size:


$8 / 4 = 2$ chips per word.


Now match number of words:


$2048 / 128 = 16$


Total chips:


$16 \times 2 = 32$


UGC NET Computer Science PYQ
A processor chip is used for application in which 30% of execution time is spent on floating point addition. For the new model of the processor, the design team has come up with redesign the floating point adder to make it twice as fast. What will be possible maximum speed up by this redesign?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Using Amdahl’s law:


Fraction improved = $0.30$


Speedup of improved part = $2$


Overall speedup:


$S = \frac{1}{(1 - 0.30) + \frac{0.30}{2}}$


$S = \frac{1}{0.70 + 0.15}$


$S = \frac{1}{0.85}$


$S = 1.176 \approx 1.18$


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

Find the subnet prefix.






Go to Discussion

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

Solution

Given network block is:

$130.56.0.0/16$

So, the network prefix part is:

$130.56$


UGC NET Computer Science PYQ
In the context of concurrency control, a given pair of operations in a schedule is called conflict schedule if

(A) At least one of the operations is write operation.

(B) Both the operations are performed on the same data item.

(C) Both the operations are performed by different transactions.

(D) Both the operations are performed on different data items.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Two operations conflict if:

They belong to different transactions.

They operate on the same data item.

At least one operation is write.

So, statements A, B and C are true.

Statement D is false because conflict needs same data item, not different data items.

UGC NET Computer Science PYQ
Which of the following are tautology?

A. $(p \lor r) \rightarrow p$
B. $p \rightarrow (p \land r)$
C. $\sim p \rightarrow (p \rightarrow r)$
D. $(p \land r) \rightarrow (p \rightarrow r)$
E. $\sim(p \rightarrow r) \rightarrow p$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A: False when $r=1, p=0$ → Not tautology

B: False when $p=1, r=0$ → Not tautology


C:

$\sim p \rightarrow (p \rightarrow r)$

Always true → Tautology


D:

$(p \land r) \rightarrow (p \rightarrow r)$

Always true → Tautology


E:

$\sim(p \rightarrow r) \rightarrow p$

Always true → Tautology


Thus tautologies:


C, D, E


UGC NET Computer Science PYQ
Which of the following transforms in 2 dimension is used to resize a 2-dimensional object?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Scaling transformation is used to increase or decrease the size of a 2-dimensional object.


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

Find first and last addresses of First subnet.






Go to Discussion

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

Solution

$64$ addresses

So, first subnet starts from:

$130.56.0.0$

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

$130.56.0.0$ to $130.56.0.63$

Therefore, first address is:

$130.56.0.0$

Last address is:

$130.56.0.63$


UGC NET Computer Science PYQ
Software reliability is described with respect to

(A) Execution Time

(B) Calendar Time

(C) Clock Time

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Software reliability can be described with respect to different time measures such as execution time, calendar time and clock time.

So, all A, B and C are correct.

UGC NET Computer Science PYQ
Which of the followings are sequential circuit?

A. Flip flop
B. Multiplexer
C. Counter
D. Decoder
E. Adder





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Sequential circuits depend on previous state (memory).


• Flip-flop → sequential circuit

• Counter → sequential circuit


Multiplexer, Decoder and Adder are combinational circuits.


UGC NET Computer Science PYQ
A three dimensional array in C++ is declared as int A [a] [b] [c]. Consider that array elements are stored in row major order and indexing begin from 0. Here the address of an item at the location A [r] [s] [t] computed in terms of word length w of an integer is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

For a 3D array $A[a][b][c]$ stored in row major order:


Address of $A[r][s][t]$ is


Base address + $w[(r \times b \times c) + (s \times c) + t]$


So,


Address = $ A[0][0][0] + w(bcr + c*s + t)$


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

Find subnet mask.






Go to Discussion

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

Solution

Original prefix is:

$/16$

Required subnets:

$1024=2^{10}$

So, new prefix length is:

$16+10=26$

Therefore, subnet prefix is:

$/26$

Subnet mask for $/26$ is:

$255.255.255.192$


UGC NET Computer Science PYQ
To create an object-behavioral model, the analyst performs the following steps:

(A) Evaluates all use-cases

(B) Builds state transition diagram for the system.

(C) Reviews the object behaviour model to verify accuracy and consistency

(D) Identifies events that do not derive the interaction sequence.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For object-behavioral modeling, analyst evaluates use-cases.

State transition diagram is also built to show object states and transitions.

The model is reviewed for accuracy and consistency.

Statement D is not correct as written, because events should drive the interaction sequence, not “do not derive” it.

UGC NET Computer Science PYQ
Match List-I with List-II
 List-I
 List-II
 A. Union
I. Virtual Reality
 B. Function
 II. Shadow mask
 C. Interactive Environment
 III. Subroutine
 D. Output device

 IV. User defined data type






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Union → User defined data type → IV

Function → Subroutine → III

Interactive Environment → Virtual Reality → I

Output device → Shadow mask → II


Matching:


A → IV

B → III

C → I

D → II


UGC NET Computer Science PYQ
Which of the following is used to determine the cost performance index?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Cost Performance Index is calculated as:


$CPI = \frac{BCWP}{ACWP}$


That means:


Budgeted cost of work performed ÷ Actual cost of work performed


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

Find first and last addresses of last subnet.






Go to Discussion

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

Solution

Given block is:

$130.56.0.0/16$

Number of subnets required:

$1024 = 2^{10}$

So, new prefix is:

$/16 + 10 = /26$

For $/26$, each subnet has:

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

So, subnet block size is:

$64$

In the last octet, subnets will be:

$0, 64, 128, 192$

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

$255$

So, last subnet starts at:

$130.56.255.192$

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

$130.56.255.255$


UGC NET Computer Science PYQ
Which of the following is/are behavioral testing technique(s)?

(A) Equivalence Partitioning

(B) Graph-Based Testing Method

(C) Boundary Value Analysis

(D) Data flow Testing

(E) Loop Testing

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Behavioral testing means black-box testing.

Equivalence partitioning is a black-box testing technique.

Graph-based testing method is also a behavioral testing technique.

Boundary value analysis is also a black-box testing technique.

Data flow testing and loop testing are white-box testing techniques.

Therefore, A, B and C only are correct.

UGC NET Computer Science PYQ
What is a perceptron in ANN?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A Perceptron is a single-layer feed-forward neural network used for linear classification.


UGC NET Computer Science PYQ
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. Consider 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 behaviour/s is/are possible?

Statement I: The TCP application server on S can listen on P after reboot.

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

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

After reboot, the TCP server can again start listening on port P.


The old TCP connection state is lost after reboot. So, if the client sends a packet for the old connection, the server does not recognize it and sends an RST segment.


UGC NET Computer Science PYQ

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

The resultant model is

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

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

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

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


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






Go to Discussion

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

Solution

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

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

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

Therefore,

$M1=(q2,X2,L)$


UGC NET Computer Science PYQ
The running time of an algorithm is $O(g(n))$ if and only if:

(A) its worst-case running time is $O(g(n))$ and its best-case running time is $\Omega(g(n))$.

(B) its worst-case running time is $\Omega(g(n))$ and its best-case running time is $O(g(n))$.

(C) $O(g(n))=\Omega(g(n))$.

(D) $o(g(n))\cap \omega(g(n))$ is non-empty.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For an algorithm to have tight running time $\Theta(g(n))$, worst-case should be $O(g(n))$ and best-case should be $\Omega(g(n))$.

This condition is given in statement A.

Statement B reverses the required bounds.

Statement C is false because $O(g(n))$ and $\Omega(g(n))$ are not always equal.

Statement D is false because a function cannot be both smaller order and larger order than the same $g(n)$.

UGC NET Computer Science PYQ
Match List-I with List-II:
 List-I
 List-II
A. Back Tracking  I. Automata
 B. Infinite languages with matching numbers
 II. Undecidable Problem
 C. Canonical LR Parser
 III. Predictive Parser
 D. Post Correspondence Problem

 IV. Large number of states






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Backtracking → Predictive parsing may require backtracking → III

Infinite languages with matching numbers → handled using Automata → I

Canonical LR parser → requires large number of states → IV

Post Correspondence Problem → Undecidable problem → II


Matching:


A → III

B → I

C → IV

D → II


UGC NET Computer Science PYQ
Consider a popular sports news site. At a given moment, 20,000 concurrent users submit a request, a transaction T, once every 2 minutes on average. Each transaction requires the webapp to download a new article that on average has 3k bytes in length. What is the throughput?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Number of transactions per second:


$ \frac{20000}{120} = 166.67 $


Size of each article:


$3k$ bytes $= 3000$ bytes


$3000$ bytes $= 3000 \times 8 = 24000$ bits


Throughput:


$166.67 \times 24000 = 4000000$ bits per second


$= 4$ megabits per second


UGC NET Computer Science PYQ

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

The resultant model is

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

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

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

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


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






Go to Discussion

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

Solution

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

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

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

Correct move should be:

$(q0,X1,R)$

But this option is not present in the given options.


UGC NET Computer Science PYQ
Consider the following statements:

(A) Any tree is 2-colorable

(B) A graph G has no cycles of even length if it is bipartite.

(C) A graph G is 2-colorable if it is bipartite.

(D) A graph G can be colored with d+1 colors if d is the maximum degree of any vertex in the graph G.

(E) A graph G can be colored with O(log|V|) colors if it has O(|V|) edges.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

(A) True, because every tree is bipartite, so it is 2-colorable.

(B) False, because a bipartite graph has no odd cycle, but it can have even cycles.

(C) True, because every bipartite graph is 2-colorable.

(D) True, by greedy coloring, any graph with maximum degree $d$ can be colored using at most $d+1$ colors.

(E) False, because having $O(|V|)$ edges does not guarantee coloring with only $O(\log |V|)$ colors.

So, incorrect statements are (B) and (E).

UGC NET Computer Science PYQ

Consider the poset $\left({3,5,9,15,24,45}, \mid\right)$.

Which of the following is correct for the given poset?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In divisibility poset, least element means an element which divides every element.

Here, $3$ does not divide $5$, so $3$ is not the least element.

Similarly, no other element divides all elements of the set.

So, least element does not exist.

Greatest element means an element which is divisible by every element.

Here, $45$ is not divisible by $24$.

Also, no other element is divisible by all elements of the set.

So, greatest element does not exist.

Therefore, there does not exist a greatest element and a least element.


UGC NET Computer Science PYQ
What is the total delay (latency) for a frame size of 10 million bits that is being set up on a link with 20 routers, each having a queuing time of 2 μs and a processing time of 1 μs? The length of link is 5000 km. The speed of light inside the link is $2\times10^8$ m/s. The link has bandwidth of 6 Mbps.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Transmission delay

$= \frac{\text{Frame size}}{\text{Bandwidth}}$


$= \frac{10\times10^6}{6\times10^6}$


$= 1.6667\ s$


Propagation delay

Distance $=5000\ km =5\times10^6\ m$


$= \frac{5\times10^6}{2\times10^8}$


$=0.025\ s$


Router delay

Each router delay $=2\mu s+1\mu s=3\mu s$


Total routers $=20$


Total delay $=20\times3\mu s=60\mu s=0.00006\ s$


Total latency


$=1.6667+0.025+0.00006$


$\approx1.691726\ s$


UGC NET Computer Science PYQ
Consider the following statements:

A. A database design is in BCNF if each member of the set of relation schemas that constitutes the design is in BCNF

B. A BCNF schema can have transitive dependency

C. It is always possible to obtain a 3NF design without sacrificing a lossless join

D. There are multivalued dependencies in 4NF





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is correct because a database design is in BCNF when every relation schema in the design is in BCNF.


B is incorrect because BCNF removes dependency problems caused by non-super-key determinants.


C is correct because 3NF decomposition can be made lossless.


D is correct because 4NF deals with multivalued dependencies.


UGC NET Computer Science PYQ

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

The resultant model is

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

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

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

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


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






Go to Discussion

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

Solution

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

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

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

Hence, it is an error entry.


UGC NET Computer Science PYQ
Which among the following statement(s) is (are) true?

(A) A hash function takes a message of arbitrary length and generates a fixed length code.

(B) A hash function takes a message of fixed length and generates a code of variable length.

(C) A hash function may give same hash value for distinct messages.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

A hash function takes an input message of arbitrary length and produces a fixed length hash value.

So, statement (A) is true.

Statement (B) is false because hash function output is fixed length, not variable length.

Statement (C) is true because two different messages may produce the same hash value. This is called collision.

Therefore, true statements are (A) and (C) only.

UGC NET Computer Science PYQ

How many ways are there to place $8$ indistinguishable balls into four distinguishable bins?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Let the number of balls in four distinguishable bins be $x_1,x_2,x_3,x_4$.

Then,

$x_1+x_2+x_3+x_4=8$

Here, balls are indistinguishable and bins are distinguishable.

So, the number of non-negative integral solutions is

${}^{n+r-1}C_{r-1}$

Here, $n=8$ and $r=4$.

So,

${}^{8+4-1}C_{4-1}={}^{11}C_{3}$

$=\dfrac{11 \times 10 \times 9}{3 \times 2 \times 1}$

$=165$


UGC NET Computer Science PYQ
A bit string of length four is generated at random. What is probability that it contains at least two consecutive 0’s given that first bit is 0 ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

First bit is fixed as 0, so remaining 3 bits are free.


Possible strings:


0000

0001

0010

0011

0100

0101

0110

0111


Total outcomes $=8$


Strings with at least two consecutive 0's:


0000

0001

0010

0011

0100


Favourable outcomes $=5$


Probability


$=\frac{5}{8}$


UGC NET Computer Science PYQ
Which is not a basic approach to the problem of conflict resolution in a production system?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In a production system, conflict resolution can be based on the rule matched, the object matched, or the action of the matched rule.


But assigning preference based on the action that the matched object would perform is not a standard conflict resolution approach.


UGC NET Computer Science PYQ

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

The resultant model is

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

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

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

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


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






Go to Discussion

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

Solution

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

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

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

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

Therefore,

$M4=(q3,Y1,R)$


UGC NET Computer Science PYQ
Let $G_1$ and $G_2$ be arbitrary context free languages and $R$ an arbitrary regular language. Consider the following problems:

$(A)$ Is $L(G_1)=L(G_2)$?

$(B)$ Is $L(G_2)\subseteq L(G_1)$?

$(C)$ Is $L(G_1)=R$?

Which of the problems are undecidable?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For context free languages, equivalence problem is undecidable.

So,

$L(G_1)=L(G_2)$ is undecidable.

Also, inclusion problem for context free languages is undecidable.

So,

$L(G_2)\subseteq L(G_1)$ is undecidable.

Now,

$L(G_1)=R$

is also undecidable because if $R=\Sigma^*$, then this becomes CFL universality problem:

$L(G_1)=\Sigma^*$

which is undecidable.

Therefore, all three problems are undecidable.

UGC NET Computer Science PYQ

How many bit strings of length ten either start with a $1$ bit or end with two bits $00$?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Total length of bit string is $10$.

Let $A$ be the set of bit strings starting with $1$.

So, first bit is fixed and remaining $9$ bits are free.

$n(A)=2^9=512$

Let $B$ be the set of bit strings ending with $00$.

So, last two bits are fixed and remaining $8$ bits are free.

$n(B)=2^8=256$

Now, strings which start with $1$ and end with $00$:

First bit is fixed as $1$ and last two bits are fixed as $00$.

Remaining $7$ bits are free.

$n(A \cap B)=2^7=128$

Therefore,

$n(A \cup B)=n(A)+n(B)-n(A \cap B)$

$=512+256-128$

$=640$


UGC NET Computer Science PYQ
Shift-Reduce conflicts are resolved by :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In LR parsing, shift-reduce conflicts occur when the parser can either shift the next input symbol or reduce using a rule.


These conflicts are resolved using operator precedence and associativity rules.


UGC NET Computer Science PYQ
Consider the following statements:

S1: LRU page replacement algorithm suffers from the Belady's anomaly

S2: Shortest remaining time first scheduling may cause starvations

S3: Stack is shared by all threads in a process





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

S1 is false because LRU does not suffer from Belady’s anomaly.


S2 is true because shortest remaining time first may cause starvation for long processes.


S3 is false because each thread has its own stack.


Final Answer: (b) S1, S3 false and S2 is true


UGC NET Computer Science PYQ

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

The resultant model is

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

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

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

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


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






Go to Discussion

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

Solution

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

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

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

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

Therefore,

$M5=(q4,X2,R)$


UGC NET Computer Science PYQ
Consider the following languages:

$L_1=\{a^{2^z}\mid z\text{ is an integer}\}$

$L_2=\{a^{2z}\mid z\ge 0\}$

$L_3=\{\omega\omega\mid \omega\in\{a,b\}^*\}$

Which of the languages is or are regular?

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For $L_1$:

$L_1=\{a^{2^z}\mid z\text{ is an integer}\}$

The possible lengths are:

$1,2,4,8,16,32,\ldots$

So,

$L_1=\{a,a^2,a^4,a^8,a^{16},\ldots\}$

This is not regular because the gap between consecutive string lengths keeps increasing.

So, $L_1$ is not regular.

For $L_2$:

$L_2=\{a^{2z}\mid z\ge 0\}$

The possible lengths are:

$0,2,4,6,8,\ldots$

So,

$L_2=\{\lambda,a^2,a^4,a^6,\ldots\}$

This language contains all strings of even length over alphabet $\{a\}$.

It can be written as:

$L_2=(aa)^*$

Since $(aa)^*$ is a regular expression, $L_2$ is regular.

For $L_3$:

$L_3=\{\omega\omega\mid \omega\in\{a,b\}^*\}$

In this language, the second half of the string must be exactly the same as the first half.

A finite automaton cannot remember the complete first half and compare it with the second half.

So, $L_3$ is not regular.

Therefore, only $L_2$ is regular.

UGC NET Computer Science PYQ
Suppose that a connected planar graph has six vertices, each of degree four. Into how many regions is the plane divided by a planar representation of this graph?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given,

$V=6$

Each vertex has degree $4$.

So, sum of degrees is

$6 \times 4=24$

By handshaking theorem,

$2E=24$

$E=12$

For a connected planar graph, Euler’s formula is

$V-E+R=2$

Substitute $V=6$ and $E=12$.

$6-12+R=2$

$R=8$


UGC NET Computer Science PYQ
Back propagation is a learning technique that adjusts weights in the neural network by propagating weight changes :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Backpropagation computes error at the output layer (sink) and propagates the error backwards through hidden layers toward the input layer (source) to update weights.


UGC NET Computer Science PYQ
Let $R(A, B, C, D, E)$ be a relational schema with following functional dependencies:

$C \to F,\ E \to A,\ EC \to D,\ A \to B$

Which of the following is a key for R?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Find closure of $EC$:


$EC^+ = {E, C}$


Using $E \to A$,


$EC^+ = {E, C, A}$


Using $A \to B$,


$EC^+ = {E, C, A, B}$


Using $EC \to D$,


$EC^+ = {E, C, A, B, D}$


So, $EC$ determines all attributes.


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





Go to Discussion

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

Solution

Given,

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

For AND operation,

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

For OR operation,

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

Now,

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

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

UGC NET Computer Science PYQ
Which of the following grammars is or are ambiguous?

$(A)\ S\rightarrow SS\mid aSb\mid bSa\mid \lambda$

$(B)\ S\rightarrow aSbS\mid bSaS\mid \lambda$

$(C)\ S\rightarrow aAB$

$A\rightarrow bBb$

$B\rightarrow A\mid \lambda$

where $\lambda$ denotes empty string.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

A grammar is ambiguous if at least one string has more than one parse tree or more than one leftmost derivation.

For grammar $(A)$:

$S\rightarrow SS\mid aSb\mid bSa\mid \lambda$

The string $abab$ can be generated in more than one way.

First derivation:

$S\Rightarrow SS$

$\Rightarrow aSbS$

$\Rightarrow abS$

$\Rightarrow abaSb$

$\Rightarrow abab$

Second derivation:

$S\Rightarrow aSb$

$\Rightarrow abSab$

$\Rightarrow abab$

So, grammar $(A)$ is ambiguous.

For grammar $(B)$:

$S\rightarrow aSbS\mid bSaS\mid \lambda$

The string $abab$ can be generated in more than one way.

First derivation:

$S\Rightarrow aSbS$

$\Rightarrow abS$

$\Rightarrow abaSbS$

$\Rightarrow abab$

Second derivation:

$S\Rightarrow aSbS$

$\Rightarrow a(bSaS)bS$

$\Rightarrow abab$

So, grammar $(B)$ is ambiguous.

For grammar $(C)$:

$S\rightarrow aAB$

$A\rightarrow bBb$

$B\rightarrow A\mid \lambda$

The string $abbbb$ can be generated in two ways.

First way:

$S\Rightarrow aAB$

$\Rightarrow a(bb)(bb)$

$\Rightarrow abbbb$

Second way:

$S\Rightarrow aAB$

$\Rightarrow a(bbbb)(\lambda)$

$\Rightarrow abbbb$

So, grammar $(C)$ is also ambiguous.

Therefore, grammars $(A)$, $(B)$ and $(C)$ all are ambiguous.

UGC NET Computer Science PYQ
For which values of $m$ and $n$ does the complete bipartite graph $K_{m,n}$ have a Hamilton circuit?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In a complete bipartite graph $K_{m,n}$, vertices are divided into two parts.

A Hamilton circuit must visit every vertex exactly once and return to the starting vertex.

In a bipartite graph, every cycle alternates between the two parts.

So, for a Hamilton circuit to include all vertices, both parts must have the same number of vertices.

Therefore,

$m=n$

Also, a cycle needs at least $2$ vertices in each part.

So,

$m,n \ge 2$

Hence, $K_{m,n}$ has a Hamilton circuit when

$m=n,\ m,n \ge 2$


UGC NET Computer Science PYQ
Arrange the following from fastest to slowest in speed:

A. DRAM
B. SRAM
C. CPU Registers
D. Magnetic tapes
E. Hard disk





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Speed hierarchy of memory/storage:


CPU Registers → fastest

SRAM → cache memory

DRAM → main memory

Hard Disk → secondary storage

Magnetic Tape → slowest storage


Order:


C → B → A → E → D


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

LIST II

 
 A. Physical layer

 I. Transforming the raw bits in the form of frame for transmission

 B. Data Link Layer

 II. Control and monitoring of subnet

 C. Network layer

III. Transmission of raw bits over communication channel

 
 D. Transport layer

 IV. Datagrams transmission data through connection oriented or connectionless using datagram

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

hysical layer deals with transmission of raw bits.


Data Link Layer converts raw bits into frames.


Network layer controls and monitors subnet.


Transport layer supports connection-oriented and connectionless transmission.


So,


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


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





Go to Discussion

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

Solution

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

Since one box is chosen randomly,

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

For first box,

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

For second box,

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

For third box,

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

Using Bayes theorem,

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

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

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

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


UGC NET Computer Science PYQ
Which of the following cloud concept or concepts is or are related to pooling and sharing of resources?

$(A)$ Virtual Memory

$(B)$ Service

$(C)$ Virtualization

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In cloud computing, pooling and sharing of resources means multiple users can use shared computing resources like CPU, memory, storage and network.

Virtualization is the main concept that helps in pooling and sharing of resources.

Using virtualization, one physical machine can be divided into multiple virtual machines.

So, many users can share the same physical resources.

Virtual Memory is an operating system concept, not mainly a cloud computing concept for resource pooling.

Service means providing facilities like $IaaS$, $PaaS$ and $SaaS$, but the direct concept related to pooling and sharing is virtualization.

Therefore, only $(C)$ Virtualization is correct.

UGC NET Computer Science PYQ
Which of the following is principal conjunctive normal form for $[(p \vee q)\wedge[p \to q]]$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given statement is

$[(p \vee q)\wedge[p \to q]]$

We know that

$p \to q \equiv \neg p \vee q$

So,

$[(p \vee q)\wedge[p \to q]]=(p \vee q)\wedge(\neg p \vee q)$

Now truth table se false cases:

When $p=0,\ q=0$, expression false hoti hai.
Corresponding maxterm is

$p \vee q$

When $p=1,\ q=0$, expression false hoti hai.
Corresponding maxterm is

$\neg p \vee q$

Therefore, PCNF is

$(p \vee q)\wedge(\neg p \vee q)$

Hence, correct PCNF is $(p \vee q)\wedge(\neg p \vee q)$.


UGC NET Computer Science PYQ
Which of the following statements is/are false?

A. A user can assign privileges to any user on any relation.
B. A user can assign privileges to any user on its own relations only.
C. System error that leads to accessibility to the portion of database is an example of malicious attack.
D. Passwords itself need to be secured from unauthorized access.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A → False (only owner or DBA can grant privileges)

B → True

C → False (system error is not a malicious attack)

D → True


False statements:


A and C


UGC NET Computer Science PYQ
A B-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then maximum number of nodes that could be newly created in the process is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In worst case, insertion causes splitting at every level.


There are 4 levels, so 4 new nodes may be created due to splitting.


If the root also splits, one extra new root node is created.


Maximum newly created nodes:


$4 + 1 = 5$


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





Go to Discussion

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

Solution

In synchronous interleaved memory organization,

For $m\ll n$,

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

For $m\gg n$,

$t=T$


UGC NET Computer Science PYQ
Post office protocol $(POP)$ is a message access protocol which is used to extract message for client. In this regard, which of the following are true?

$(A)$ POP has two modes, Delete mode and keep mode

$(B)$ In Delete mode, mail is deleted from mail box after each retrieval

$(C)$ In Delete mode, mail is deleted from mail box before each retrieval

$(D)$ In keep mode, mail is deleted before retrieval

$(E)$ In keep mode, mail remains in mail box after retrieval

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

POP is used by a client to download emails from the mail server.

POP has two modes:

Delete mode and keep mode.

In Delete mode, after the client retrieves the mail, the mail is deleted from the mailbox.

So, statement $(B)$ is true.

In Delete mode, mail is not deleted before retrieval.

So, statement $(C)$ is false.

In keep mode, mail is not deleted after retrieval.

The mail remains in the mailbox even after retrieval.

So, statement $(E)$ is true.

Statement $(D)$ is false because in keep mode mail is not deleted before retrieval.

Therefore, true statements are $(A)$, $(B)$ and $(E)$.

UGC NET Computer Science PYQ
How many cards must be selected from a standard deck of $52$ cards to guarantee that at least three hearts are present among them?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A standard deck has

$13$ hearts

and

$52-13=39$ non-heart cards.

To guarantee at least $3$ hearts, consider the worst case.

First, we may select all $39$ non-heart cards.

Then, we may select only $2$ hearts.

So, cards selected without guaranteeing $3$ hearts:

$39+2=41$

Now, the next card must be a heart.

So, required number of cards is

$41+1=42$


UGC NET Computer Science PYQ
Match List I with List II
List I List II
A. Count to infinity problem I. Mobile Adhoc Networks
B. IEEE 802.16 II. Distance vector routing
C. IEEE 802.15 III. WiMAX
D. AODV protocol IV. Bluetooth
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Count to infinity → Distance vector routing 
IEEE 802.16 → WiMAX 
IEEE 802.15 → Bluetooth 
AODV → Mobile Adhoc Networks

UGC NET Computer Science PYQ
For the regular languages and context free languages which is not correct?

A. both are closed under union operation
B. both are closed under concatenation operation
C. both are closed under intersection operation
D. both are closed under complementation operation
E. both are closed under kleene star operation





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Regular languages:


Closed under union, concatenation, intersection, complement, kleene star.


Context-free languages:


Closed under union, concatenation, kleene star.

Not closed under intersection and complement.


Thus incorrect statements:


C and D


UGC NET Computer Science PYQ
Suppose a circular queue of capacity $(n - 1)$ elements is implemented with an array of $n$ elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variable respectively. Initially, REAR = FRONT = 0. The conditions to detect queue empty and queue full are





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In a circular queue with capacity $(n - 1)$:

Queue is empty when:

REAR == FRONT

Queue is full when the next position of REAR becomes FRONT:

$(REAR + 1) \mod n == FRONT$

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





Go to Discussion

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

Solution

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

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

Therefore, crossbar switch is a non blocking network.


UGC NET Computer Science PYQ
Firewall is a device that filters access to the protected network from the outside network.

Firewalls can filter the packets on the basis of

(A) Source IP Address

(B) Destination IP Address

(C) TCP Source Port

(D) UDP Source Port

(E) TCP Destination Port

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

A firewall can filter packets using information present in the packet header.

It can filter packets on the basis of Source IP Address.

So, statement (A) is true.

It can filter packets on the basis of Destination IP Address.

So, statement (B) is true.

It can filter packets on the basis of TCP Source Port.

So, statement (C) is true.

It can filter packets on the basis of UDP Source Port.

So, statement (D) is true.

It can also filter packets on the basis of TCP Destination Port.

So, statement (E) is true.

Therefore, all statements (A), (B), (C), (D) and (E) are correct.

UGC NET Computer Science PYQ
List-I List-II
(a) $p \to q$ (i) $\neg(q \to \neg p)$
(b) $p \vee q$ (ii) $p \wedge \neg q$
(c) $p \wedge q$ (iii) $\neg p \to q$
(d) $\neg(p \to q)$ (iv) $\neg p \vee q$
Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

First,

$p \to q \equiv \neg p \vee q$

So,

$(a) \rightarrow (iv)$

Now,

$\neg p \to q \equiv p \vee q$

So,

$(b) \rightarrow (iii)$

Now,

$q \to \neg p \equiv \neg q \vee \neg p$

Therefore,

$\neg(q \to \neg p)=\neg(\neg q \vee \neg p)$

Using De Morgan’s law,

$\neg(\neg q \vee \neg p)=q \wedge p$

$=p \wedge q$

So,

$(c) \rightarrow (i)$

Now,

$\neg(p \to q)=\neg(\neg p \vee q)$

Using De Morgan’s law,

$\neg(\neg p \vee q)=p \wedge \neg q$

So,

$(d) \rightarrow (ii)$

Therefore, the correct matching is

$(a)-(iv);\ (b)-(iii);\ (c)-(i);\ (d)-(ii)$


UGC NET Computer Science PYQ
Match List I with List II
List I List II
A. Digital Signature I. Asymmetric encryption algorithm.
B. Hash Function II. Confirms authenticity and integrity.
C. AES III. Produces a fixed-size digest.
D. RSA IV. Symmetric encryption algorithm.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • Digital Signature → Confirms authenticity and integrity 
  • Hash Function → Produces a fixed-size digest 
  • AES → Symmetric encryption algorithm 
  • RSA → Asymmetric encryption algorithm

UGC NET Computer Science PYQ
The instruction LD ADR(X) which is equivalent to
$AC \leftarrow M[ADR + XR]$ is in:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Effective address:


$EA = ADR + XR$


This is indexed addressing, where the address field is added to the index register.


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

LIST II 

 A. Scenario testing
 I. To verify the I/O behavior of text object
 B. Regression testing
 II. User acceptance methodology
 C. Component testing
 III. No new bugs after changes in program
 D. Beta testing

 IV. The documentation of a use case

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Scenario testing is related to documentation of a use case.

Regression testing checks that no new bugs are introduced after changes.

Component testing verifies input and output behavior of a component.

Beta testing is related to user acceptance methodology.

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





Go to Discussion

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

Solution

For $7$ bit Hamming code, parity positions are

$1,2,4$

Data positions are

$3,5,6,7$

Given data bits are

$1101$

So,

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

Arrange them as:

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

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

For even parity,

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

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

$P_1=1$

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

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

$P_2=0$

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

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

$P_4=0$

Therefore, Hamming code is

$1010101$


UGC NET Computer Science PYQ
Consider the statement below.

A person who is radical $(R)$ is electable $(E)$ if he or she is conservative $(C)$, but otherwise is not electable.

Few probable logical assertions of the above sentence are given below.

(A) $(R\land E)\Leftrightarrow C$

(B) $R\Rightarrow(E\Leftrightarrow C)$

(C) $R\Rightarrow((C\Rightarrow E)\lor \neg E)$

(D) $(\neg R\lor \neg E\lor C)\land(\neg R\lor \neg C\lor E)$

Which of the above logical assertions are true?

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Given statement says that a radical person is electable if he or she is conservative, otherwise not electable.

This means, for a radical person, electability depends exactly on conservativeness.

So, the correct logical form is:

$R\Rightarrow(E\Leftrightarrow C)$

Therefore, statement (B) is true.

Now,

$E\Leftrightarrow C$

can be written as:

$(E\Rightarrow C)\land(C\Rightarrow E)$

So,

$R\Rightarrow[(E\Rightarrow C)\land(C\Rightarrow E)]$

Now convert implications:

$E\Rightarrow C\equiv \neg E\lor C$

$C\Rightarrow E\equiv \neg C\lor E$

Therefore,

$R\Rightarrow[(\neg E\lor C)\land(\neg C\lor E)]$

This is equivalent to:

$(\neg R\lor \neg E\lor C)\land(\neg R\lor \neg C\lor E)$

So, statement (D) is also true.

Statement (A) is not correct because it says that a person is conservative if and only if the person is radical and electable, which is not the meaning of the given sentence.

Statement (C) is not the exact logical assertion of the given sentence.

Therefore, correct statements are (B) and (D).

UGC NET Computer Science PYQ
Find the zero-one matrix of the transitive closure of the relation given by the matrix $A$:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given matrix is

$A=\left[\begin{array}{ccc}1 & 0 & 1\\0 & 1 & 0\\1 & 1 & 0\end{array}\right]$

From the matrix, the relation contains:

$1 \to 1,\ 1 \to 3,\ 2 \to 2,\ 3 \to 1,\ 3 \to 2$

Now, since $1 \to 3$ and $3 \to 2$, therefore $1 \to 2$ must be added.

Also, since $3 \to 1$ and $1 \to 3$, therefore $3 \to 3$ must be added.

So, the transitive closure matrix is

$\left[\begin{array}{ccc}1 & 1 & 1\\0 & 1 & 0\\1 & 1 & 1\end{array}\right]$

Hence, the correct answer is Option 1.


UGC NET Computer Science PYQ
Arrange the following parsers in increasing order of their power (least → most):
  1. LR(0)
  2. LR(1)
  3. LALR(1)
  4. LL(0)
  5. SLR
Choose the correct answer:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • LL(0) is the weakest (no lookahead, top-down).
  • LR(0) is stronger than LL(0) (bottom-up, no lookahead).
  • SLR(1) adds 1-symbol lookahead using FOLLOW sets → accepts more grammars than LR(0).
  • LALR(1) merges LR(1) states; more powerful than SLR(1) but below LR(1).
  • LR(1) is the most powerful among these deterministic bottom-up parsers.

UGC NET Computer Science PYQ
The least values of a signed and unsigned data type variables requiring 8 bits, would be:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

For 8-bit signed integer (two’s complement):


Range = $-2^{7}$ to $2^{7}-1$


Least value = $-128$


For 8-bit unsigned integer:


Range = $0$ to $2^{8}-1$


Least value = $0$


UGC NET Computer Science PYQ
Given below are two statements:

Let $f(n)$ and $g(n)$ be asymptotically positive functions. The following conjectures are given.

Statement I: $f(n) \ge 1$ and $f(n)=O(g(n)) \Rightarrow g(n)=\Omega(f(n))$

Statement II: $f(n)=O(g(n)) \Rightarrow \lg(f(n))=O(\lg(g(n)))$ where $\lg(g(n)) \ge 1$ for all sufficiently large $n$.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

tatement I is correct because $f(n)=O(g(n))$ directly implies $g(n)=\Omega(f(n))$.

Statement II is not always correct, because taking logarithm on both sides of Big-O relation is not valid in all cases unless extra conditions are satisfied.

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





Go to Discussion

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

Solution

Given expression:

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

Number of inputs in product terms:

$ABC=3$

$A\overline{B}CD=4$

$E\overline{F}=2$

$AD=2$

Total inputs for AND gates:

$3+4+2+2=11$

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

Total gate inputs:

$11+4=15$


UGC NET Computer Science PYQ
Which of the following statements are true?

(A) A sentence $\alpha$ entails another sentence $\beta$ if $\beta$ is true in few worlds where $\alpha$ is true.

(B) Forward chaining and backward chaining are very natural reasoning algorithms for knowledge bases in Horn form.

(C) Sound inference algorithms derive all sentences that are entailed.

(D) Propositional logic does not scale to environments of unbounded size.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement (A) is false.

Entailment means if $\alpha$ is true, then $\beta$ must be true in all models where $\alpha$ is true.

Correct definition is:

$\alpha\models\beta$

means $\beta$ is true in every model in which $\alpha$ is true.

But statement (A) says few worlds, so it is false.

Statement (B) is true.

Forward chaining and backward chaining are natural reasoning algorithms for Horn form knowledge bases.

Statement (C) is false.

Sound inference algorithm derives only those sentences that are logically entailed.

But deriving all entailed sentences is the property of completeness, not soundness.

Statement (D) is true.

Propositional logic does not scale well to environments of unbounded size because it cannot represent general rules using variables and quantifiers.

Therefore, true statements are (B) and (D).

UGC NET Computer Science PYQ

Consider an LPP given as:

$\text{Max } Z=2x_1-x_2+2x_3$

subject to the constraints:

$2x_1+x_2\le 10$

$x_1+2x_2-2x_3\le 20$

$x_1+2x_3\le 5$

$x_1,x_2,x_3\ge 0$

What shall be the solution of the LPP after applying first iteration of the Simplex Method?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given objective function is

$\text{Max } Z=2x_1-x_2+2x_3$

In the objective function, the positive coefficient of $x_3$ is $2$.

Taking $x_3$ as the entering variable, we apply the minimum ratio test.

From the constraints:

$2x_1+x_2\le 10$

$x_1+2x_2-2x_3\le 20$

$x_1+2x_3\le 5$

Only the third constraint has positive coefficient of $x_3$.

So,

$2x_3=5$

$x_3=\dfrac{5}{2}$

At the first iteration,

$x_1=0,\ x_2=0,\ x_3=\dfrac{5}{2}$

Now,

$Z=2x_1-x_2+2x_3$

$Z=2(0)-0+2\left(\dfrac{5}{2}\right)$

$Z=5$


UGC NET Computer Science PYQ
Maintaining a graph in memory by means of its adjacency matrix is known as





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • An adjacency matrix represents a graph using a 2D array (matrix).
  • This type of storage uses sequential memory allocation — rows and columns are stored in contiguous memory.
  • Hence, this method is called a Sequential Representation of a graph.

UGC NET Computer Science PYQ
Arrange the following sets in increasing order, on the basis of their cardinality :

A. $A_1 = {{1,2},{3}}$
B. $A_2 = {{1},{2},{3},{4}}$
C. $A_3 = {{1,2,3,4,5,6}}$
D. $A_4 = {{1,2},{2,3,4},{5}}$
E. $A_5 = {{1},{2},{3},{4},{5}}$

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Cardinality means number of elements in the set.


$|A_1| = 2$

$|A_2| = 4$

$|A_3| = 1$

$|A_4| = 3$

$|A_5| = 5$


Increasing order:


$1 < 2 < 3 < 4 < 5$


So order becomes:


$A_3, A_1, A_4, A_2, A_5$


UGC NET Computer Science PYQ
Consider the rectangle with vertices $(0,0)$, $(0,2)$, $(3,0)$, $(3,2)$. There is scaling of 2 towards x-axis and 3 towards y-axis. The new coordinates of the rectangle are





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Scaling factor along x-axis = $2$

Scaling factor along y-axis = $3$

So,

$(0,0) \to (0,0)$

$(0,2) \to (0,6)$

$(3,0) \to (6,0)$

$(3,2) \to (6,6)$

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

$A_2=D_4+D_5+D_6+D_7$

$A_1=D_2+D_3+D_6+D_7$

$A_0=D_1+D_3+D_5+D_0$

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





Go to Discussion

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

Solution

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

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

Standard equations are:

$A_2=D_4+D_5+D_6+D_7$

$A_1=D_2+D_3+D_6+D_7$

$A_0=D_1+D_3+D_5+D_7$

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

UGC NET Computer Science PYQ
Which of the following statements are true?

(A) Minimax search is breadth-first; it processes all the nodes at a level before moving to a node in next level.

(B) The effectiveness of the alpha-beta pruning is highly dependent on the order in which the states are examined.

(C) The alpha-beta search algorithm computes the same optimal moves as minimax algorithm.

(D) Optimal play in games of imperfect information does not require reasoning about the current and future belief states of each player.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Minimax search is generally implemented using depth-first search, not breadth-first search.

Statement (B) is true.

Alpha-beta pruning depends highly on the order in which states are examined.

If the best moves are examined first, more pruning is possible.

Statement (C) is true.

Alpha-beta pruning does not change the final result of minimax.

It only reduces the number of nodes examined.

So, alpha-beta search computes the same optimal move as minimax.

Statement (D) is false.

In games of imperfect information, optimal play requires reasoning about current and future belief states of each player.

Therefore, true statements are (B) and (C).

UGC NET Computer Science PYQ

Which type of addressing mode requires the least number of memory references?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In implied addressing mode, the operand is already implied in the instruction.

So, there is no need to specify any operand address separately.

Therefore, implied addressing mode requires the least number of memory references.


UGC NET Computer Science PYQ
Consider the following interrupt protection levels in Linux, and arrange them in the increasing order of their priorities:
  • A. User-Mode Programs (Preemptible)
  • B. Bottom Half Interrupt Handlers
  • C. Top Half Interrupt Handlers
  • D. Kernel System Service Routines (Preemptible)
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • User-Mode Programs have the lowest priority and are preemptible.
  • Kernel System Service Routines run in kernel mode and can be preempted by higher priority tasks like interrupts.
  • Bottom Half Interrupt Handlers execute after the top half and have higher priority than kernel threads.
  • Top Half Interrupt Handlers handle immediate hardware responses and have the highest priority.

UGC NET Computer Science PYQ
Which of the following have truth values if universe of discourse consists of all integers?

A. $\forall n \exists m (n^2 < m)$
B. $\exists m \forall n (n < m^2)$
C. $\exists n \exists m (n^2 + m^2 = 5)$
D. $\exists n \exists m (n^2 + m^2 = 6)$
E. $\exists n \exists m (n+m=4 \land n-m=1)$

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A:

For every integer $n$, choose $m=n^2+1$

Then $n^2<m$ → True


B:

$\exists m$ such that $n<m^2$ for all integers $n$.

But integers are unbounded → False


C:

$n^2+m^2=5$


Example: $1^2+2^2=5$ → True


D:

$n^2+m^2=6$


No integer solution → False


E:

$n+m=4$

$n-m=1$


Add equations:


$2n=5$ → $n=2.5$ (not integer) → False


True statements: A and C


UGC NET Computer Science PYQ
What is the $(4+4)$ bit binary fixed point equivalent of $-(3.72)_{10}$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

First convert positive $3.72$ approximately in $(4+4)$ fixed point form.

$3.72 \approx 3.75$

$3 = 0011$

$0.75 = .1100$

So,

$3.75 = 0011.1100$

For negative number, take 2’s complement:

$0011.1100 \to 1100.0100$

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





Go to Discussion

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

Solution

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

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

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

$\text{Number of sectors}=16$

UGC NET Computer Science PYQ
Match List I with List II.Let $R_1=\{(1,1),(2,2),(3,3)\}$ and$R_2=\{(1,1),(1,2),(1,3),(1,4)\}$
List I List II
(A) $R_1\cup R_2$ I. $\{(1,1),(1,2),(1,3),(1,4),(2,2),(3,3)\}$
(B) $R_1-R_2$ II. $\{(1,1)\}$
(C) $R_1\cap R_2$ III. $\{(1,2),(1,3),(1,4)\}$
(D) $R_2-R_1$ IV. $\{(2,2),(3,3)\}$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Given,

$R_1=\{(1,1),(2,2),(3,3)\}$

$R_2=\{(1,1),(1,2),(1,3),(1,4)\}$

Now,

$R_1\cup R_2$

means all elements of $R_1$ and $R_2$.

So,

$R_1\cup R_2=\{(1,1),(1,2),(1,3),(1,4),(2,2),(3,3)\}$

Therefore, (A) matches with I.

Now,

$R_1-R_2$

means elements that are in $R_1$ but not in $R_2$.

Common element is $(1,1)$.

So,

$R_1-R_2=\{(2,2),(3,3)\}$

Therefore, (B) matches with IV.

Now,

$R_1\cap R_2$

means common elements of $R_1$ and $R_2$.

So,

$R_1\cap R_2=\{(1,1)\}$

Therefore, (C) matches with II.

Now,

$R_2-R_1$

means elements that are in $R_2$ but not in $R_1$.

So,

$R_2-R_1=\{(1,2),(1,3),(1,4)\}$

Therefore, (D) matches with III.

Final matching is:

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

UGC NET Computer Science PYQ
Suppose that the register $A$ and the register $K$ have the bit configuration. Only the three leftmost bits of $A$ are compared with memory words because $K$ has $1$'s in these positions. Because of its organization, this type of memory is uniquely suited to parallel searches by data association. This type of memory is known as:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Content addressable memory is also called associative memory.

In this memory, data is searched by content instead of address.

Register $A$ contains the bit pattern and register $K$ decides which bits are to be compared.

Since this memory supports parallel searching by data association, it is called content addressable memory.


UGC NET Computer Science PYQ
Arrange the following examples of Artificial Intelligence (AI) in the order of increasing complexity:

A. Spam email detection using rule-based systems
B. Handwritten digit recognition using shallow neural networks
C. Image classification using convolutional neural networks
D. Autonomous driving using reinforcement learning algorithms

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Complexity increases as follows:


Rule-based system → simplest

Shallow neural network → moderate complexity

CNN image classification → more complex

Autonomous driving → highly complex system


Thus increasing order:


A → B → C → D


UGC NET Computer Science PYQ
Consider following statements:

A. A context free language is generated by LR(0) grammar if and only if it is accepted by a deterministic pushdown automata and has prefix property.

B. If M1 is the single tape TM simulating multitape TM M, then time taken by M1 to simulate n moves is $(n^3)$.

C. Push down automata behaves like a Turing machine when it has one auxiliary memory.

D. $L={a^n b^n c^n : n \ge 1}$ is not context free but context sensitive.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is incorrect because LR(0) is a restricted class and the statement is not generally true.

B is incorrect because a single-tape TM can simulate a multitape TM with quadratic overhead, not cubic.

C is incorrect because a pushdown automata with one stack is not equivalent to a Turing machine.

D is correct because $L={a^n b^n c^n : n \ge 1}$ is not context free, but it is context sensitive.

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





Go to Discussion

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

Solution

Tag bits $=9$

Index bits $=12$

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

$2^{21}=2048K$

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

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

UGC NET Computer Science PYQ
Match List I with List II.
List I List II
(A) Handshaking (I) I/O interface informs the CPU that device is ready for transfer
(B) Programmed I/O (II) Requires two control signals working in opposite directions
(C) Interrupt-initiated I/O (III) Has local memory and controls large set of I/O devices
(D) I/O processor (IV) Requires CPU to check the I/O flag and perform transfer
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Handshaking requires two control signals working in opposite directions.

So, (A) matches with II.

Programmed I/O requires the CPU to continuously check the I/O flag and perform the transfer.

So, (B) matches with IV.

In interrupt-initiated I/O, the I/O interface informs the CPU that the device is ready for transfer.

So, (C) matches with I.

An I/O processor has local memory and controls a large set of I/O devices.

So, (D) matches with III.

Final matching is:

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

UGC NET Computer Science PYQ

How many different Boolean functions of degree $n$ are there?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

For a Boolean function of $n$ variables, the number of possible input combinations is

$2^n$

For each input combination, the output can be either $0$ or $1$.

So, total number of Boolean functions is

$2^{2^n}$


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
 List-II
 A. Complement
 I. Adder
 B. Ex-OR
 II. Instruction decoding
 C. Accumulator
 III. Negative number representation
 D. Control Unit

 IV. Arithmetic and Logic operations

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Complement → used in negative number representation → III

Ex-OR → used in arithmetic and logic operations → IV

Accumulator → used with adder → I

Control Unit → instruction decoding → II


Correct Matching:


A → III

B → IV

C → I

D → II


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

LIST II 

 A. PERT

 I. Used for non repetitive jobs

 B. Optimistic time

 II. Used for repetitive jobs

 C. CPM

 III. The shortest possible time to complete the activity if all goes well

 D. Pessimistic time

 IV. The longest time that an activity takes

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

PERT is used for non repetitive jobs.

Optimistic time means the shortest possible time if everything goes well.

CPM is used for repetitive jobs.

Pessimistic time means the longest possible time an activity may take.

So,

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


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

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

$2x_1-x_2+3x_3=8$

$x_1,x_2,x_3\ge 0$

its dual problem is

Minimize $w=10y_1+8y_2$

Subject to $y_1+2y_2\ge 5$

$2y_1-y_2\ge 12$

$y_1+3y_2\ge 4$

Which of the following is correct?





Go to Discussion

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

Solution

In primal maximization problem,

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

Here, first constraint is equality type, so

$y_1$ is unrestricted.

The expected condition for second dual variable is

$y_2\ge 0$

UGC NET Computer Science PYQ
Match List-I with List-II.List I gives $3\times 3$ matrices representing $2D$ transformations and List-II shows the corresponding transformation diagrams.



Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For (A),

$\left[[2,0,0],[0,2,0],[0,0,1]\right]$

This is a scaling matrix.

Here, $S_x=2$ and $S_y=2$.

So, (A) matches with (II).

For (B),

$\left[[1,0,2],[0,1,2],[0,0,1]\right]$

This is a translation matrix.

Here, $T_x=2$ and $T_y=2$.

So, (B) matches with (IV).

For (C),

$\left[[0.5,-0.866,0],[0.866,0.5,0],[0,0,1]\right]$

The standard rotation matrix is:

$\left[[\cos\theta,-\sin\theta,0],[\sin\theta,\cos\theta,0],[0,0,1]\right]$

Here,

$\cos 60^\circ=0.5$

and

$\sin 60^\circ=0.866$

So, this matrix represents rotation by $60^\circ$.

Therefore, (C) matches with (III).

For (D),

$\left[[1,2,0],[0,1,0],[0,0,1]\right]$

This is shear in $x$ direction.

Here, shear factor is $2$.

So, (D) matches with (I).

Final matching is:

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

UGC NET Computer Science PYQ

The fault can be easily diagnosed in the micro-program control unit using diagnostic tools by maintaining the contents of:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In a micro-program control unit, diagnostic tools help in detecting faults by observing and maintaining important internal states.

These internal states include flags, registers and counters.

Flags store status information, registers store intermediate data and counters help in tracking sequence or control steps.

Therefore, fault diagnosis becomes easier by maintaining the contents of flags, registers and counters.


UGC NET Computer Science PYQ
The sequence of fields in an IP datagram will be:

A. flags
B. options
C. protocol
D. identification
E. service type

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

IPv4 header order (relevant fields):


Type of Service → Identification → Flags → Protocol → Options


Thus order:


E → D → A → C → B


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

LIST II 

A. Bezier curves

I. 3 dim objects that have translation rotational symmetry

B. B-Splines

II. Fractal geometry

C. Sweep representations

III. Bias and tension

D. Natural objects

IV. Painting drawing CAD

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Bezier curves are commonly used in painting, drawing and CAD.


B-Splines are related to bias and tension.


Sweep representations are used for 3D objects having translational or rotational symmetry.


Natural objects are represented using fractal geometry.


So,


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


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





Go to Discussion

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

Solution

Given expression:

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

Take common $P$ from last two terms:

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

Since,

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

So,

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

Using identity,

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

Therefore,

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

UGC NET Computer Science PYQ
Match List I with List II.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In E-R diagram, double rectangle represents weak entity type.

So, (A) matches with (II).

Oval with underlined attribute represents key attribute type.

So, (B) matches with (I).

Double oval represents multivalue attribute type.

So, (C) matches with (IV).

Double line between entity and relationship represents total participation of entity in a relation.

So, (D) matches with (III).

Final matching is:

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

UGC NET Computer Science PYQ
What will be the number of states when a $MOD-2$ counter is followed by a $MOD-5$ counter?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

When one counter is followed by another counter, the total number of states is the product of their mod values.

Here,

First counter is $MOD-2$

Second counter is $MOD-5$

So, total number of states is

$2 \times 5=10$


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
 List-II
 A. RAID level-2
 I. block-interleaved
 B. RAID level-3
 II. error-correcting-codes
 C. RAID level-4
 III. reed-solomon codes
 D. RAID level-6

 IV. bit-interleaved

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

RAID-2 → error correcting codes (Hamming) → II

RAID-3 → bit interleaved parity → IV

RAID-4 → block interleaved parity → I

RAID-6 → Reed–Solomon codes → III


Correct Matching:


A → II

B → IV

C → I

D → III


UGC NET Computer Science PYQ
Given below are two statements:

Statement I: If f and g are two functions and f = O(g) but g ≠ o(f), we say that the growth rate of g is smaller than that of f.

Statement II: The class of all decision problems decided by a TM in exponential time, that is O(2^k), k being a constant.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Statement I is incorrect because if f = O(g), then f grows no faster than g. So, g is not smaller than f.

Statement II is also incorrect because exponential time is generally represented as exponential in input size, not O(2^k) where k is a constant.


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

$S\to AB\mid CA$

$B\to BC\mid AB$

$A\to a$

$C\to aB\mid b$





Go to Discussion

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

Solution

Given grammar:

$S\to AB\mid CA$

$B\to BC\mid AB$

$A\to a$

$C\to aB\mid b$

Here,

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

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

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

So, $B$ is non-generating.

Remove all productions containing $B$.

Remaining grammar is:

$S\to CA$

$A\to a$

$C\to b$

UGC NET Computer Science PYQ
Match List I with List II.With reference to CMM developed by Software Engineering Institute (SEI)
List I List II
(A) INITIAL (I) Process measurement
(B) REPEATABLE (II) Process definition
(C) DEFINED (III) Project management
(D) MANAGED (IV) ADHOC
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

CMM has different maturity levels.

INITIAL level means the process is ad hoc.

So, (A) matches with IV.

REPEATABLE level focuses on project management.

So, (B) matches with III.

DEFINED level focuses on process definition.

So, (C) matches with II.

MANAGED level focuses on process measurement.

So, (D) matches with I.

Final matching is:

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

UGC NET Computer Science PYQ
For a magnetic disk with concentric circular tracks, the seek latency is not linearly proportional to the seek distance due to:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Seek latency is the time taken by the disk arm to move the read/write head to the required track.

The arm does not move with uniform speed throughout the seek operation.

It takes time to start moving and also takes time to stop at the required track due to inertia.

Because of this starting and stopping inertia, seek latency is not linearly proportional to the seek distance.


UGC NET Computer Science PYQ
The cyclomatic complexity of the following flow graph is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Cyclomatic complexity formula:


$V(G) = E - N + 2P$


Where

$E$ = number of edges

$N$ = number of nodes

$P$ = number of connected components (here $P=1$)


From the graph:


Nodes = 10


Edges = 12


So,


$V(G) = 12 - 10 + 2(1)$


$V(G) = 4$


UGC NET Computer Science PYQ
What is the output of following code?

main()
{
static float a[] = {13.24, 1.5, 4.5, 5.4, 3.5}

float *j, *k;

j = a;

k = a + 4

j = j * 2;

k = k/2;

printf("% f% f", *j, *k);

}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In C, pointer multiplication and pointer division are not allowed.


Here,


j = j * 2;


and


k = k / 2;


are invalid operations.


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

$S\to AbB$

$A\to aAb\mid \lambda$

$B\to bB\mid \lambda$

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





Go to Discussion

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

Solution

Given,

$S\to AbB$

$A\to aAb\mid \lambda$

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

$A\Rightarrow a^n b^n$

Also,

$B\to bB\mid \lambda$

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

$B\Rightarrow b^k$

Now,

$S\Rightarrow AbB$

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

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

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

Therefore,

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

UGC NET Computer Science PYQ
Match List I with List II.
List I List II
(A) Branch-and-bound (I) Keeps track of all partial paths which can be candidate for further exploration.
(B) Steepest-accent hill climbing (II) Detects difference between current state and goal state.
(C) Constraint satisfaction (III) Discover problem state(s) that satisfy a set of constraints.
(D) Means-end-analysis (IV) Consider all moves from current state and select best move.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Branch-and-bound keeps track of partial paths which can be candidates for further exploration.

So, (A) matches with I.

Steepest-accent hill climbing considers all possible moves from the current state and selects the best move.

So, (B) matches with IV.

Constraint satisfaction means finding state or states that satisfy a given set of constraints.

So, (C) matches with III.

Means-end-analysis detects the difference between current state and goal state.

So, (D) matches with II.

Final matching is:

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

UGC NET Computer Science PYQ
The parallel bus arbitration technique uses an external priority encoder and a decoder. Suppose, a parallel arbiter has $5$ bus arbiters. What will be the size of the priority encoder and decoder respectively?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

For $5$ bus arbiters, we need at least $3$ bits because

$2^2=4<5$

and

$2^3=8\ge 5$

So, the priority encoder must handle $8$ inputs and produce $3$ outputs.

Thus, priority encoder size is

$8 \times 3$

The decoder will take $3$ inputs and produce $8$ outputs.

Thus, decoder size is

$3 \times 8$


UGC NET Computer Science PYQ
Which of the following is not the goal of reverse engineering?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Goals of reverse engineering:


• Recover lost design information

• Understand system structure

• Detect side effects

• Manage system complexity


Data flow itself is not a goal, but rather a representation or analysis technique.


UGC NET Computer Science PYQ
There are M points on one straight line AB and n points on another straight line AC none of them being A. How many triangles can be formed with these points as vertices?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

To form a triangle, we can choose:


2 points from line AB and 1 point from line AC


or


2 points from line AC and 1 point from line AB


Number of triangles:


$ {m \choose 2}n + {n \choose 2}m $


$ = \frac{m(m-1)}{2}n + \frac{n(n-1)}{2}m $


$ = \frac{mn}{2}[(m-1)+(n-1)] $


$ = \frac{1}{2}mn(m+n-2) $


UGC NET Computer Science PYQ
Consider the language

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

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





Go to Discussion

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

Solution

$n\ge 4$

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

This is represented by:

$aaaaa^*$

Also,

$m\le 3$

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

This is represented by:

$\lambda+b+bb+bbb$

Therefore, required regular expression is:

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

UGC NET Computer Science PYQ
Match List I with List II.
List I List II
(A) Topological sort of DAG (I) $O(V+E)$
(B) Kruskal's MST algorithm (II) $O(VE)$
(C) Bellman-Ford's single-source shortest path algorithm (III) $\theta(V+E)$
(D) Floyd-Warshall's all pair shortest path algorithm (IV) $\theta(V^3)$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Topological sorting of a DAG takes $\theta(V+E)$ time.

So, (A) matches with III.

Bellman-Ford single-source shortest path algorithm takes $O(VE)$ time.

So, (C) matches with II.

Floyd-Warshall all pair shortest path algorithm takes $\theta(V^3)$ time.

So, (D) matches with IV.

Now, from the given matching list, Kruskal's MST algorithm is matched with $O(V+E)$.

So, (B) matches with I.

Final matching is:

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

UGC NET Computer Science PYQ
Consider the equation$(146)_b+(313)_{b-2}=(246)_8$. Which of the following is the value of $b$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given equation is

$(146)b+(313){b-2}=(246)_8$

Now,

$(146)_b=1\cdot b^2+4\cdot b+6$

$=b^2+4b+6$

Also,

$(313)_{b-2}=3(b-2)^2+1(b-2)+3$

$=3(b^2-4b+4)+b-2+3$

$=3b^2-12b+12+b+1$

$=3b^2-11b+13$

Now,

$(246)_8=2\cdot 8^2+4\cdot 8+6$

$=128+32+6$

$=166$

So,

$b^2+4b+6+3b^2-11b+13=166$

$4b^2-7b+19=166$

$4b^2-7b-147=0$

Now factorizing,

$4b^2-28b+21b-147=0$

$4b(b-7)+21(b-7)=0$

$(b-7)(4b+21)=0$

So,

$b=7$


UGC NET Computer Science PYQ
Which of the followings are true for a complete binary tree?
A. It always has odd number of vertices.
B. With $n$ internal vertices, it has $n+1$ leaves.
C. With $l$ leaves it has $l-1$ internal vertices.
D. With $2n-1$ vertices, it has $n$ leaves.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Properties of complete/full binary tree:


• If internal nodes = $n$ → leaves = $n+1$ ✔

• If leaves = $l$ → internal nodes = $l-1$ ✔

• Total vertices = $2n-1$ when leaves = $n$ ✔

• Such trees always have odd number of vertices ✔


Thus all statements are correct.


UGC NET Computer Science PYQ
Consider two hosts P and Q that 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, that is Don't fragment (DF) flag in the IP Header is not set by P. Which of the following statement/s is/are 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 resends the fragment with IP identification value of 0x1234

C. If the second fragment lost, then P requires to resend the entire TCP segment.

D. TCP destination port can be determined by analyzing the second fragment only.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

TCP segment size = 1400 bytes

IP header size = 20 bytes

MTU between R and Q = 820 bytes

Maximum data per fragment:

$820 - 20 = 800$ bytes

So fragments will be:

First fragment data = $800$ bytes

Second fragment data = $600$ bytes

Second IP datagram size:

$600 + 20 = 620$ bytes

So, A is true.

Router does not resend lost fragments, so B is false.

If a fragment is lost, source P retransmits the whole TCP segment, so C is true.

TCP header is present only in the first fragment, so destination port cannot be determined from the second fragment only. Hence D is false.

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

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





Go to Discussion

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

Solution

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

Check option (b):

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

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

Check option (c):

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

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

Check option (d):

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

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

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

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

UGC NET Computer Science PYQ
Match List I with List II.$L_R$ : Regular language, $L_{CF}$ : Context free language$L_{REC}$ : Recursive language, $L_{RE}$ : Recursively enumerable language.
List I List II
(A) Recursively Enumerable language (I) $\overline{L_{REC}}\cup L_{RE}$
(B) Recursive language (II) $\overline{L_{CF}}\cup L_{REC}$
(C) Context Free language (III) $L_R^*\cap L_{CF}$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For (I),

$\overline{L_{REC}}\cup L_{RE}$

Recursive languages are closed under complement.

So, $\overline{L_{REC}}$ is also recursive.

Every recursive language is recursively enumerable.

Union of a recursively enumerable language with a recursive language is recursively enumerable.

So, (I) represents recursively enumerable language.

Therefore, (A) matches with I.

For (II),

$\overline{L_{CF}}\cup L_{REC}$

Every context free language is recursive.

Recursive languages are closed under complement.

So, $\overline{L_{CF}}$ is recursive.

Union of two recursive languages is recursive.

So, (II) represents recursive language.

Therefore, (B) matches with II.

For (III),

$L_R^*\cap L_{CF}$

Regular languages are closed under Kleene star.

So, $L_R^*$ is regular.

Intersection of a regular language with a context free language is context free.

So, (III) represents context free language.

Therefore, (C) matches with III.

Final matching is:

A-I, B-II, C-III

UGC NET Computer Science PYQ

How many address lines and data lines are required to provide a memory capacity of $16K \times 16$?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Memory capacity is

$16K \times 16$

Here, $16K$ means number of memory locations.

$16K=16 \times 1024$

$=2^4 \times 2^{10}$

$=2^{14}$

So, number of address lines required is

$14$

Each memory location stores $16$ bits.

So, number of data lines required is

$16$

Therefore, address lines and data lines are

$14,\ 16$


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
 List-II
 A. Thread spawn
 I. to convert a blocking system call into a nonblocking call
 B. Block thread
 II. to reclaim pages
 C. Jacketing
 III. processor turn to the execution of another ready thread
 D. Flush

 IV. thread is provided with its own register context






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Thread spawn → thread gets its own register context → IV

Block thread → CPU switches to another ready thread → III

Jacketing → convert blocking system call to nonblocking → I

Flush → reclaim pages → II


Matching:


A → IV

B → III

C → I

D → II


UGC NET Computer Science PYQ
Which of the following is not a mutation operator in a genetic algorithm?

A. Random resetting

B. Scramble

C. Inversion

D. Difference

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Random resetting, scramble and inversion are mutation operators in genetic algorithms.

Difference is not a standard mutation operator.

UGC NET Computer Science PYQ
Consider the following NPDA

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

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

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

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

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

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

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





Go to Discussion

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

Solution

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

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

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

Therefore,

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

Also, $\lambda$ is accepted because:

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

UGC NET Computer Science PYQ
Match List I with List II.
List I List II
(A) Serial Line IP $(SLIP)$ (I) Application layer
(B) Border Gateway Protocol $(BGP)$ (II) Transport layer
(C) User Data Protocol $(UDP)$ (III) Data Link layer
(D) Simple Network Management Protocol (IV) Network layer
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Serial Line IP $(SLIP)$ is used for transmitting IP packets over serial links.

It works at the Data Link layer.

So, (A) matches with III.

Border Gateway Protocol $(BGP)$ is used for routing between autonomous systems.

So, it is associated with the Network layer.

So, (B) matches with IV.

User Data Protocol $(UDP)$ is a Transport layer protocol.

So, (C) matches with II.

Simple Network Management Protocol $(SNMP)$ is an Application layer protocol.

So, (D) matches with I.

Final matching is:

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

UGC NET Computer Science PYQ
Suppose that a computer program takes $100$ seconds of execution time on a computer with multiplication operation responsible for $80$ seconds of this time. How much do you have to improve the speed of multiplication operation if you are asked to execute this program four times faster?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Total execution time is

$100$ seconds

Time taken by multiplication operation is

$80$ seconds

Time taken by other operations is

$100-80=20$ seconds

Now, the program is required to run $4$ times faster.

So, new execution time should be

$\dfrac{100}{4}=25$ seconds

Other operations still take

$20$ seconds

So, time left for multiplication operation is

$25-20=5$ seconds

Originally multiplication operation takes

$80$ seconds

Now it should take

$5$ seconds

So, required improvement in multiplication speed is

$\dfrac{80}{5}=16$

Hence, multiplication operation must be improved by $16$ times.


UGC NET Computer Science PYQ
How much time does an algorithm using $2^{50}$ bit operations need if each bit operation takes $2^{-38}$ second?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

$2^{50} \times 2^{-38} = 2^{12}$ seconds

$2^{12} = 4096$ seconds

Convert to minutes:

$4096/60 \approx 68.27$ minutes

$\approx 1.14$ hours


UGC NET Computer Science PYQ
Consider the following statements:

A. If some NP-complete problem P is in P that P = NP

B. TSP is in NP

C. SAT is in NP

D. Hamilton circuit problem is not NP-complete

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is true because if any NP-complete problem is solved in polynomial time, then $P = NP$.

B is true because TSP decision problem is in NP.

C is true because SAT is in NP.

D is false because Hamilton circuit problem is NP-complete.

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





Go to Discussion

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

Solution

Painter's algorithm is used for hidden surface removal.

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

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

UGC NET Computer Science PYQ
Match List I with List II.
List I List II
(A) Greedy Best-First Search (I) Space complexity is $O(d)$ where $d$ is depth of the deepest optimal solution.
(B) $A^*$ (II) Incomplete even if the search space is finite.
(C) Recursive Best-First Search (III) Optimal if the optimal solution is reachable; otherwise, returns the best reachable optimal solution.
(D) $SMA^*$ (IV) Computation and space complexity are too high.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Greedy Best-First Search selects the node that appears closest to the goal according to heuristic value.

It may get trapped and can be incomplete even if the search space is finite.

So, (A) matches with II.

$A^*$ search is optimal and complete under proper conditions, but its computation and space complexity are very high because it stores many generated nodes.

So, (B) matches with IV.

Recursive Best-First Search uses limited memory and its space complexity is linear in depth.

So, (C) matches with I.

$SMA^*$ means Simplified Memory-Bounded $A^*$.

It is optimal if the optimal solution is reachable within available memory; otherwise, it returns the best reachable solution.

So, (D) matches with III.

Final matching is:

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

UGC NET Computer Science PYQ

Consider the following pseudo-code fragment in which an invariant for the loop is $m \times x^k=p^n$ and $k\ge 0$.

Pre-conditions: $p\ge 1$ and $n\ge 0$

Assume that overflow never occurs.

int x = p;
int k = n;
int m = 1;

while (k != 0) {
if (k is odd) then m = m * x;
x = x * x;
k = floor(k / 2);
}

Which of the following must be true at the end of the while loop?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given loop invariant is

$m \times x^k=p^n$

At the end of the while loop, condition becomes false.

So,

$k=0$

Putting $k=0$ in invariant,

$m \times x^0=p^n$

Since,

$x^0=1$

Therefore,

$m=p^n$


UGC NET Computer Science PYQ
The chairs of an auditorium are to be labelled with a letter followed by a positive two digits integer where labelling is starting with A01. How many maximum possible chairs could be labelled in this way?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Letters: 26 (A to Z)


Two digit positive integers:

01 to 99 → 99 numbers


Total combinations:


$26 \times 99 = 2574$


UGC NET Computer Science PYQ
Consider the following statements about heap sort algorithm:

A. The MAX-HEAPIFY procedure which runs in $O(\lg n)$ time, is the key to maintaining the max heap property

B. The BUILD-MAX-HEAP procedure, which runs in $O(\lg n)$ time, produces max-heap from an unordered input array

C. The MAX-HEAP-INSERT, which runs in $O(\lg n)$ time, implements the insertion operation

D. The HEAP-INCREASE-KEY procedure runs in $O(n \lg n)$ time, to set the key of new node of its correct value

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is true because MAX-HEAPIFY takes $O(\lg n)$ time.

B is false because BUILD-MAX-HEAP takes $O(n)$ time, not $O(\lg n)$.

C is true because MAX-HEAP-INSERT takes $O(\lg n)$ time.

D is false because HEAP-INCREASE-KEY takes $O(\lg n)$ time, not $O(n \lg n)$.

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





Go to Discussion

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

Solution

Given,

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

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

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

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

Now,

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

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

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

So,

$d=7$

Cipher value of $6$ is:

$C=6^e\mod n$

$C=6^7\mod 65$

$C=46$

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

UGC NET Computer Science PYQ
In lexicographic ordering, comparison is done from left to right.

Given order is:

$0<1$

Now compare the given strings:

$0001$ comes before $001$ because at the third position, $0<1$.

So,

$0001<001$

Now,

$001<010$ because at the second position, $0<1$.

Also,

$010<0101$ because $010$ is a prefix of $0101$.

Now compare $0101$ and $011$:

First digit is same.

Second digit is same.

Third digit gives:

$0<1$

So,

$0101<011$

Therefore, the correct lexicographic order is:

$0001<001<010<0101<011$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Greedy Best-First Search selects the node that appears closest to the goal according to heuristic value.

It may get trapped and can be incomplete even if the search space is finite.

So, (A) matches with II.

$A^*$ search is optimal and complete under proper conditions, but its computation and space complexity are very high because it stores many generated nodes.

So, (B) matches with IV.

Recursive Best-First Search uses limited memory and its space complexity is linear in depth.

So, (C) matches with I.

$SMA^*$ means Simplified Memory-Bounded $A^*$.

It is optimal if the optimal solution is reachable within available memory; otherwise, it returns the best reachable solution.

So, (D) matches with III.

Final matching is:

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

UGC NET Computer Science PYQ

Consider the following C-code fragment running on a $32$-bit x86 machine:

typedef struct {
union {
unsigned char a;
unsigned short b;
} U;
unsigned char c;
} S;

S B[10];
S *p = address of B[4];
S *q = address of B[5];

p->U.b = 0x1234;

If $M$ is the value of $q-p$ and $N$ is the value of address of $(p->c)$ minus address of $p$, then $(M,N)$ is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given that structure $S$ takes $32$ bits.

So,

$32\text{ bits}=4\text{ bytes}$

Now,

$p$ points to $B[4]$

$q$ points to $B[5]$

Since $p$ and $q$ are pointers of type $S$, pointer subtraction gives the difference in number of structures.

So,

$q-p=1$

Therefore,

$M=1$

Now, union $U$ contains $unsigned\ char\ a$ and $unsigned\ short\ b$.

Size of union $U$ is $2$ bytes.

After union $U$, variable $c$ is stored.

So, offset of $c$ from the beginning of structure is $2$ bytes.

Therefore,

$N=2$

Hence,

$(M,N)=(1,2)$


UGC NET Computer Science PYQ
Arrange the steps of Mathematical Modeling:

A. Solution fitting with data
B. Formulation mathematically
C. Solve mathematically
D. Repeat formulation if it fits worst with data
E. Interpretation results





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Typical modeling steps:


Formulate model mathematically → B


Solve mathematically → C


Fit solution with data → A


If poor fit, reformulate → D


Interpret results → E


Correct sequence:


B → C → A → D → E


UGC NET Computer Science PYQ
Consider the following statements about the software product line system:

Statement I: At the interaction level, components provide an operator display interface and an interface with the communication system used.

Statement II: At the I/O management level, components handle operator authentication, report generator and query manager.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Statement I is correct because interaction level provides operator display interface and communication interface.

Statement II is also correct because I/O management level handles authentication, report generation and query management.

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





Go to Discussion

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

Solution

The condition is:

$num\ !=\ 65$

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

Option (a):

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

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

Option (b):

$!(num==65)$

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

Option (c):

$num-65$

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

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

Option (d):

$!(num-65)$

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

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

UGC NET Computer Science PYQ
Arrange the following types of machine in descending order of complexity.

(A) SISD

(B) MIMD

(C) SIMD

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

SISD means Single Instruction Single Data.

It is the simplest type of machine.

SIMD means Single Instruction Multiple Data.

It is more complex than SISD.

MIMD means Multiple Instruction Multiple Data.

It is the most complex because multiple processors can execute different instructions on different data.

So, descending order of complexity is:

$MIMD>SIMD>SISD$

According to given symbols:

$B>C>A$

UGC NET Computer Science PYQ

What is the output of the following JAVA program?

public class Good {
private int m;

public Good(int m) {
this.m = m;
}

public Boolean equals(Good n) {
return n.m == m;
}

public static void main(String args[]) {
Good m1 = new Good(22);
Good m2 = new Good(22);
Object s1 = new Good(22);
Object s2 = new Good(22);

System.out.println(m1.equals(m2));
System.out.println(s1.equals(s2));
System.out.println(m1.equals(s2));
System.out.println(s1.equals(m2));
}






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Here, the class has a method

$equals(Good\ n)$

This method does not override the original $equals(Object)$ method of Java because the parameter type is $Good$, not $Object$.

For Line 1:

$m1.equals(m2)$

Here both are objects of class $Good$, so $equals(Good\ n)$ is called.

Both values are $22$, so output is

$True$

For Line 2:

$s1.equals(s2)$

Here $s1$ and $s2$ are declared as $Object$ type.

So, Java calls $Object$ class $equals()$ method, which compares references.

Since both are different objects, output is

$False$

For Line 3:

$m1.equals(s2)$

Here $s2$ is of type $Object$, so $equals(Good\ n)$ is not called.

It calls $equals(Object)$, so reference comparison is done.

Output is

$False$

For Line 4:

$s1.equals(m2)$

Here $s1$ is of type $Object$, so again $Object$ class $equals()$ method is called.

Output is

$False$

Therefore, output is:

$True,\ False,\ False,\ False$


UGC NET Computer Science PYQ
The following code:

stmt → if expr then stmt else stmt
      | if expr then stmt

suffers from:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

This grammar produces the dangling-else problem.

In such cases the else can be associated with more than one if, producing more than one parse tree.


Thus the grammar is ambiguous.


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

Assertion A: The AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion.

Reason R: A Red Black tree with n nodes has height that is greater than $2\log_2(n+1)$ and the AVL tree with n nodes has height less than $\log_\phi(\sqrt{5}(n+2))-2$ where $\phi$ is golden ratio.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because AVL trees are more strictly balanced than Red Black trees.

Reason R is false because the height of a Red Black tree is at most $2\log_2(n+1)$, not greater than it.

UGC NET Computer Science PYQ
Pointers cannot be used to-





Go to Discussion

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

Solution

Pointers are used to store addresses of variables.

They can be used to simulate call by reference.

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

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

UGC NET Computer Science PYQ
Given below are different properties of $3D$ projections from A-D. Identify the correct order on the basis of property true of:

$(i)$ a perspective projection only,

$(ii)$ an orthographic projection only,

$(iii)$ both orthographic and projective transformations,

$(iv)$ neither orthographic nor projective transformation, respectively.

(A) Straight lines are mapped to straight lines.

(B) Distances and angles are in general preserved.

(C) Far away objects appear the same size as closer ones.

(D) Requires homogeneous coordinates in order for it to be encoded into a linear transformation.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For perspective projection only:

Perspective projection needs homogeneous coordinates to represent it using matrix form.

So, $(i)$ matches with D.

For orthographic projection only:

In orthographic projection, far away objects appear the same size as closer objects.

So, $(ii)$ matches with C.

For both orthographic and projective transformations:

Both transformations map straight lines to straight lines.

So, $(iii)$ matches with A.

For neither orthographic nor projective transformation:

Distances and angles are not preserved in general by these projections.

So, $(iv)$ matches with B.

Final order is:

D, C, A, B

UGC NET Computer Science PYQ

Consider the following C++ function $f()$:

unsigned int f(unsigned int n) {
unsigned int b = 0;
while (n) {
b = b + (n bitwise AND 1);
n = n shifted right by 1;
}
return b;
}

The function $f()$ returns the integer that represents the $P$ in the binary representation of positive integer $n$, where $P$ is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

The expression $n$ bitwise AND $1$ checks the last bit of $n$.

If the last bit is $1$, then $b$ increases by $1$.

After that, $n$ is shifted right by one bit.

So, the loop checks each bit of $n$ one by one.

Therefore, $b$ counts the total number of $1$'s in the binary representation of $n$.


UGC NET Computer Science PYQ
Match List-I with List-II:
 List-I
 List-II
 A. Batch Multiprogramming
I. allows more efficient use of main memory
 
 B. Time sharing
II. user no longer has direct access to the processor
 
 C. Monitor
 III. Maximize processor use
 D. Reentrant Procedures

 IV. minimize response time






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Batch Multiprogramming → maximize CPU utilization → III

Time sharing → minimize response time → IV

Monitor → user does not directly control processor → II

Reentrant procedures → efficient use of memory → I


Matching:


A → III

B → IV

C → II

D → I


UGC NET Computer Science PYQ
256 Mb DRAM is organized as a 32M × 8 memory externally and as a 16K × 16K square array internally. Each row must be refreshed at least once every 50 millisecond to forestall loss of data; refreshing one row takes 100 nanoseconds. What fraction of the total memory bandwidth is lost to refresh cycles?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Number of rows = $16K = 16384$

Refresh time for one row = $100$ ns

Total refresh time:

$16384 \times 100 = 1638400$ ns

$= 1.6384$ ms

Fraction of time lost:

$\frac{1.6384}{50} \times 100 = 3.2768% \approx 3.3%$

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





Go to Discussion

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

Solution

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

It avoids name conflicts between different XML documents.

UGC NET Computer Science PYQ
Arrange the following types of Cohesion from best to worst type.

(A) Logical Cohesion

(B) Sequential Cohesion

(C) Communication Cohesion

(D) Temporal Cohesion

(E) Procedural Cohesion

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

The strength of cohesion from best to worst is generally:

Functional Cohesion

Sequential Cohesion

Communication Cohesion

Procedural Cohesion

Temporal Cohesion

Logical Cohesion

Coincidental Cohesion

Here, Functional Cohesion and Coincidental Cohesion are not given.

So, from the given options, best to worst order is:

Sequential Cohesion $\rightarrow$ Communication Cohesion $\rightarrow$ Procedural Cohesion $\rightarrow$ Temporal Cohesion $\rightarrow$ Logical Cohesion

According to given symbols:

$B\rightarrow C\rightarrow E\rightarrow D\rightarrow A$

UGC NET Computer Science PYQ

Which of the following statements is/are true?

$P$: In a scripting language like JavaScript, types are typically associated with values, not variables.

$Q$: It is not possible to show images on a web page without the &lt;img&gt; tag of HTML.

Select the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $P$ is true.

JavaScript is dynamically typed. In JavaScript, variables can store values of different types at different times.

So, types are associated with values, not fixed permanently with variables.

Statement $Q$ is false.

Images can also be shown on a web page using CSS background images, SVG, canvas, object tag, embed tag, etc.

So, it is possible to show images without using the &lt;img&gt; tag.

Therefore, only $P$ is true.


UGC NET Computer Science PYQ
In Genetic Algorithm’s cross over operation, mask is used in?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In uniform crossover, a mask (binary mask) determines which parent contributes each gene.


Thus mask-based crossover = uniform crossover.


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

Assertion A: Validity checks real need of system users.

Reason R: Completeness checks system user defined requirements.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because validity checks whether requirements match the real needs of users.

Reason R is also true because completeness checks whether all user-defined requirements are included.

But Reason R does not explain Assertion A.

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





Go to Discussion

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

Solution

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

This is called cascading termination.

UGC NET Computer Science PYQ
Consider the undirected graph below.



Using Prim's algorithm to construct a minimum spanning tree starting with node $a$, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Using Prim's algorithm, we always select the minimum weight edge that connects the current tree with a new vertex.

Start from vertex $a$.

From $a$, possible edges are:

$(a,b)=4$

$(a,h)=8$

Minimum edge is:

$(a,b)=4$

So, first edge is $(a,b)$.

Now current tree is:

$\{a,b\}$

Possible crossing edges are:

$(a,h)=8$

$(b,c)=8$

$(b,h)=11$

Here, $(a,h)$ and $(b,c)$ both have the same minimum weight $8$.

So, there is a tie.

If we choose $(a,h)$, then the sequence can be:

$(a,b),(a,h),(g,h),(f,g),(c,f),(c,i),(c,d),(d,e)$

This matches option (A).

Now check option (A):

After adding $(a,h)$, minimum edge from tree to outside is:

$(h,g)=1$

Then,

$(g,f)=2$

Then,

$(f,c)=4$

Then,

$(c,i)=2$

Then,

$(c,d)=7$

Then,

$(d,e)=9$

So, option (A) is a valid possible order.

But because of the tie at weight $8$, we may also choose $(b,c)$ instead of $(a,h)$.

If we choose $(b,c)$, then the sequence can be:

$(a,b),(b,c),(c,i),(c,f),(f,g),(g,h),(c,d),(d,e)$

This matches option (C).

So, option (C) is also a valid possible order.

Option (B) is not correct because after $(a,b)$, edge $(b,h)=11$ cannot be selected since edges of weight $8$ are available.

Option (D) is not correct because $(g,h)$ cannot be selected immediately after $(a,b)$ as it does not connect the current tree to a new vertex.

Therefore, both options (A) and (C) are possible due to tie in Prim's algorithm.

Correct Answer: (A) and (C) both are possible

Note: If the question expects only one answer, then it is ambiguous because Prim's algorithm can give different valid edge orders when equal weight edges are present.

UGC NET Computer Science PYQ

Which of the following statements is/are true?

$P$: An XML document with correct syntax as specified by W3C is called "Well Formed".

$Q$: An XML document validated against a DTD is both "Well formed" and "Valid".

$R$: An XML declaration written without the required question-mark based declaration format is syntactically correct for an XML document.

Select the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $P$ is true.

An XML document with correct syntax is called a well-formed XML document.

Statement $Q$ is also true.

If an XML document is validated against a DTD, then it is well formed and valid.

Statement $R$ is false.

An XML declaration must follow the proper XML declaration format. Without the required question-mark based syntax, it is not syntactically correct.

Therefore, only $P$ and $Q$ are true.


UGC NET Computer Science PYQ
The ratio of error found before software delivery and to the total errors (before and after) is called:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Defect Removal Efficiency (DRE):


$\text{DRE} = \frac{\text{Errors found before delivery}}{\text{Errors before + after delivery}}$


Thus the metric described is Defect Removal Efficiency.


UGC NET Computer Science PYQ
Given the basic E R diagram and relational model, which of the following is incorrect?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In the E R model, an attribute can be multivalued or composite.

But in the relational model, each cell of a table should contain a single atomic value or NULL.

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





Go to Discussion

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

Solution

In Linux, journalling is a file system feature.

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

This helps in recovery after a crash or power failure.

UGC NET Computer Science PYQ
Consider the following regular expressions:

(a) $r=a(b+a)^*$

(b) $s=a(a+b)^+$

(c) $t=aa^*b$

Choose the correct answer from the options given below based on the relation between the languages generated by the regular expressions above:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For $r=a(b+a)^*$:

This represents all strings over $\{a,b\}$ that start with $a$.

So,

$L(r)=\{a,aa,ab,aaa,aab,aba,\ldots\}$

For $s=a(a+b)^+$:

Here, after first $a$, at least one more symbol from $\{a,b\}$ must be present.

So, $s$ represents all strings over $\{a,b\}$ that start with $a$ and have length at least $2$.

Therefore,

$L(s)\subseteq L(r)$

For $t=aa^*b$:

This represents strings of the form:

$ab,aab,aaab,aaaab,\ldots$

So, every string of $L(t)$ starts with $a$ and has length at least $2$.

Therefore,

$L(t)\subseteq L(s)$

Hence,

$L(r)\supseteq L(s)\supseteq L(t)$

UGC NET Computer Science PYQ

Consider a raster system with resolution $640$ by $480$. What size is frame buffer in bytes for this system to store $12$ bits per pixel?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Resolution of raster system is

$640 \times 480$

Total number of pixels is

$640 \times 480=307200$

Each pixel requires $12$ bits.

So, total memory required is

$307200 \times 12=3686400$ bits

Convert bits into bytes:

$\dfrac{3686400}{8}=460800$ bytes

Now,

$1\text{ KB}=1024\text{ bytes}$

So,

$\dfrac{460800}{1024}=450\text{ KB}$


UGC NET Computer Science PYQ
Arrange in appropriate order, the construction of a finite automata:

A. Minimum State DFA
B. Regular Expression
C. NFA-ε
D. Problem Statement
E. DFA





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Typical construction steps:


Problem statement → D


Convert to regular expression → B


Convert to NFA-ε → C


Convert to DFA → E


Minimize DFA → A


Order:


D → B → C → E → A


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

LIST II 

 A. Expert system

 I. Decision tree

 B. Fuzzy system

 II. Scramble

 C. Operator in genetic algorithm

 III. Inference engine

 D. Supervised technique

 IV. Mycin

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Expert system is related to Mycin.

Fuzzy system uses an inference engine.

Scramble is an operator in genetic algorithm.

Decision tree is a supervised learning technique.

So,

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

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





Go to Discussion

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

Solution

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

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: $5$ divides $n^5-n$ whenever $n$ is a nonnegative integer.

Statement II: $6$ divides $n^3-n$ whenever $n$ is a nonnegative integer.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I:

We need to check whether $5$ divides $n^5-n$.

By Fermat's theorem,

$n^5\equiv n\pmod 5$

So,

$n^5-n\equiv 0\pmod 5$

Therefore, $5$ divides $n^5-n$.

So, Statement I is correct.

Statement II:

$n^3-n=n(n-1)(n+1)$

This is the product of three consecutive integers.

In any three consecutive integers, one number is divisible by $3$ and at least one number is divisible by $2$.

So, the product is divisible by $6$.

Therefore, $6$ divides $n^3-n$.

So, Statement II is also correct.

UGC NET Computer Science PYQ
Consider the following statements regarding $2D$ transforms in computer graphics:

$S1$: [
1 0
0 -1
]
is a $2 \times 2$ matrix that reflects any $2D$ point about the $X$-axis.

$S2$: A $2 \times 2$ matrix which mirrors any $2D$ point about the $X$-axis, is a rotation matrix.

What can you say about the statements $S1$ and $S2$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given matrix is

[
1 0
0 -1
]

When this matrix is applied on point $(x,y)$, then the point becomes $(x,-y)$.

This means the sign of $x$ remains same and the sign of $y$ changes.

So, this represents reflection about the $X$-axis.

Therefore, statement $S1$ is true.

But reflection about the $X$-axis is not a rotation matrix.

Therefore, statement $S2$ is false.

Hence, the correct answer is Option 2.


UGC NET Computer Science PYQ
The output of the following C++ Program is:
#include <stdio.h>
int main(void)
{
    int x, *p;
    x = 30;
    p = x;
    printf("%d", *p);
    return 0;
}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

p is a pointer variable and must store the address of x, written as:


p = &x;


But the program assigns:


p = x;


which means an integer is assigned to a pointer, causing a compilation error (type mismatch).


UGC NET Computer Science PYQ
In a multi user operating system, 20 requests are made to use a particular resource per hour, on an average. The probability that no request is made in 45 minutes is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Average requests per hour = $20$

Time = $45$ minutes $= \frac{3}{4}$ hour

Mean number of requests in $45$ minutes:

$\lambda = 20 \times \frac{3}{4} = 15$

Using Poisson distribution:

$P(X=0)=e^{-\lambda}\frac{\lambda^0}{0!}$

$P(X=0)=e^{-15}$

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





Go to Discussion

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

Solution

RAD stands for Rapid Application Development.

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

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

Now check the options:

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

Option (b) Relative Application Development is not correct.

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

Option (d) Recent Application Development is not correct.

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: Hardwired control unit can be optimized to produce fast mode of operation.

Statement II: Indirect addressing mode needs two memory reference to fetch the operand.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

Hardwired control unit uses fixed logic circuits.

So, it is faster than microprogrammed control unit and can be optimized for fast operation.

Statement II is also true.

In indirect addressing mode, the address field of the instruction contains the address of the memory location where the effective address is stored.

So, first memory reference is used to get the effective address.

Second memory reference is used to fetch the actual operand.

Therefore, indirect addressing needs two memory references to fetch the operand.

UGC NET Computer Science PYQ

In the context of $3D$ computer graphics, which of the following statements is/are true?

$P$: Orthographic transformations keep parallel lines parallel.

$Q$: Orthographic transformations are affine transformations.

Select the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Orthographic transformation preserves parallelism.

So, parallel lines remain parallel after orthographic projection.

Therefore, statement $P$ is true.

Orthographic transformation is also an affine transformation because it preserves points, lines and parallelism.

Therefore, statement $Q$ is also true.


UGC NET Computer Science PYQ
The Cardinality of a fuzzy set is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In fuzzy set theory, cardinality is the sum of membership values:

$|A| = \sum \mu_A(x)$

The result depends on membership values and may vary.


UGC NET Computer Science PYQ
Given below are two statements:

Statement I: Subsystem models show logical grouping of objects into coherent subsystem

Statement II: State machine models show how objects change their states in response to events.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Statement I is correct because subsystem models represent logical grouping of objects into subsystems.

Statement II is correct because state machine models show state changes of objects due to events.

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





Go to Discussion

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

Solution

SRS means Software Requirement Specification.

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

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

This directly means that the requirement can be verified.

Now check the options:

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

Modifiable means changes can be made easily in SRS.

Complete means all requirements are present.

Verifiable means each requirement can be checked or tested.

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: Bezier curves are curves that interpolate all of their control points.

Statement II: A cubic Bezier curve has four control points.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Solution:
Statement I is false.

Bezier curves do not interpolate all of their control points.

A Bezier curve passes through the first and last control points, but the intermediate control points generally control the shape of the curve.

So, it does not pass through all control points.

Statement II is true.

A cubic Bezier curve has degree $3$.

For a Bezier curve of degree $n$, number of control points is $n+1$.

So, for cubic Bezier curve:

$n+1=3+1=4$

Therefore, a cubic Bezier curve has four control points.

UGC NET Computer Science PYQ
Using the Phong reflectance model, the strength of the specular highlight is determined by the angle between:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In the Phong reflectance model, specular reflection depends on how close the viewer direction is to the reflected light direction.

If the reflected vector and the view vector are close to each other, the specular highlight becomes stronger.

So, the strength of the specular highlight is determined by the angle between the reflected vector and the view vector.


UGC NET Computer Science PYQ
Which of the following is not correct about the virtual memory segmentation?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Properties of segmentation:


• Segments can be loaded independently → True

• No internal fragmentation → True

• Large virtual address space → True


Segmentation does not reduce multiprogramming; it usually supports better memory utilization.


Thus incorrect statement:


UGC NET Computer Science PYQ
How many integral solutions are there to $x+y+z+w=29$, where $x \ge 1$, $y \ge 2$, $z \ge 3$ and $w \ge 0$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Let

$x'=x-1,\ y'=y-2,\ z'=z-3,\ w'=w$

Then,

$x'+y'+z'+w'=29-1-2-3=23$

Number of non-negative integral solutions:

${23+4-1 \choose 4-1}={26 \choose 3}$

$= \frac{26 \times 25 \times 24}{3 \times 2 \times 1}$

$=2600$

UGC NET Computer Science PYQ
Fault base testing technique is





Go to Discussion

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

Solution

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

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

Mutation testing follows this idea.

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

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

Now check the options:

Unit testing checks individual modules.

Beta testing is done by real users before final release.

Stress testing checks system behavior under heavy load.

Mutation testing is a fault based testing technique.

UGC NET Computer Science PYQ
Given below are two statements:

If two variables $V_1$ and $V_2$ are used for clustering, then consider the following statements for $k$ means clustering with $k=3$.

Statement I: If $V_1$ and $V_2$ have correlation of $1$, the cluster centroid will be in straight line.

Statement II: If $V_1$ and $V_2$ have correlation of $0$, the cluster centroid will be in straight line.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

If $V_1$ and $V_2$ have correlation $1$, then they have perfect positive linear relationship.

So, all data points lie on a straight line.

In $k$ means clustering, centroids are calculated as the mean of points in each cluster.

Mean of points lying on a straight line also lies on the same straight line.

Therefore, the cluster centroids will be in a straight line.

Statement II is false.

If $V_1$ and $V_2$ have correlation $0$, then there is no linear relationship between them.

So, the data points are not necessarily on a straight line.

Therefore, the cluster centroids will not necessarily be in a straight line.

UGC NET Computer Science PYQ

Which of the following has same expressive power with regard to relational query language?

$(a)$ Relational algebra and domain relational calculus

$(b)$ Relational algebra and tuple relational calculus

$(c)$ Relational algebra and domain relational calculus restricted to safe expression

$(d)$ Relational algebra and tuple relational calculus restricted to safe expression






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Relational algebra has the same expressive power as relational calculus only when relational calculus expressions are restricted to safe expressions.

Safe expressions ensure that the query result is finite and depends only on the database.

So,

Relational algebra is equivalent to domain relational calculus restricted to safe expressions.

Also,

Relational algebra is equivalent to tuple relational calculus restricted to safe expressions.

Therefore, $(c)$ and $(d)$ are correct.


UGC NET Computer Science PYQ
The parameter Actual count is used in Genetic Algorithm (GA) for:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In genetic algorithms, Actual Count refers to the expected number of copies of a chromosome in the next generation, used in selection (fitness proportionate selection).


UGC NET Computer Science PYQ
Let $\oplus$ denote XOR operation. Let 1 and 0 denote the binary constants and F is the Boolean expression over two variables P and Q

$F(P,Q)=((1\oplus P)\oplus(P\oplus Q))+((P\oplus Q)\oplus(Q\oplus0))$

Which of the following is equivalent expression to F?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

$((1\oplus P)\oplus(P\oplus Q))$

$=1\oplus P\oplus P\oplus Q$

$=1\oplus Q$

$=\overline{Q}$

Second part:

$((P\oplus Q)\oplus(Q\oplus0))$

$=P\oplus Q\oplus Q\oplus0$

$=P$

So,

$F=\overline{Q}+P$

$F=P+\overline{Q}$

This expression is not matching exactly with the given options. So, the correct simplified expression should be:

$P+\overline{Q}$

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





Go to Discussion

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

Solution

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

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

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

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

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

Now check the options:

White-Box Testing checks internal code structure.

Black-Box Testing checks functionality without seeing internal code.

System Testing checks the complete system.

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

UGC NET Computer Science PYQ
Assuming that the system call $fork()$ never fails, consider the following C programs $P1$ and $P2$ executed on a UNIX or Linux system:
Program $P1$ Program $P2$
/* P1 */int main() {    fork();    fork();    fork();    print("Happy\n");}
/* P2 */int main() {    fork();    print("Happy\n");    fork();    print("Happy\n");    fork();    print("Happy\n");}
Statement I: $P1$ displays "Happy" $8$ times.Statement II: $P2$ displays "Happy" $12$ times.In the light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For program $P1$:

There are $3$ fork calls before the print statement.

Each $fork()$ doubles the number of processes.

So, total number of processes after $3$ fork calls is:

$2^3=8$

Each process executes the print statement.

Therefore, $P1$ displays "Happy" $8$ times.

So, Statement I is true.

For program $P2$:

Initially, there is $1$ process.

After first $fork()$:

Number of processes $=2$

So, first print statement executes $2$ times.

After second $fork()$:

Number of processes $=4$

So, second print statement executes $4$ times.

After third $fork()$:

Number of processes $=8$

So, third print statement executes $8$ times.

Total number of times "Happy" is printed:

$2+4+8=14$

So, $P2$ displays "Happy" $14$ times, not $12$ times.

Therefore, Statement II is false.

UGC NET Computer Science PYQ

With respect to relational algebra, which of the following operations are included for mathematical set theory?

$(a)$ Join
$(b)$ Intersection
$(c)$ Cartesian product
$(d)$ Project






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In relational algebra, some operations are based on mathematical set theory.

Intersection is a set operation.

Cartesian product is also a set operation.

Join and project are relational algebra operations, but they are not basic mathematical set theory operations.

So, the operations included for mathematical set theory are:

$(b)$ Intersection

$(c)$ Cartesian product


UGC NET Computer Science PYQ

For the software quality assurance, which of the followings are correct?

A. Execution of code
B. No execution of code
C. Preventive technique
D. A corrective technique






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Software Quality Assurance (SQA):


• Focuses on process improvement

• Works as a preventive technique

• Usually involves reviews, audits and standards

• Does not require execution of code


Thus:


B → True

C → True

A → False

D → False (corrective is more related to debugging/testing)


UGC NET Computer Science PYQ
Let $(Z,+)$ denote the group of all integers under addition. Then the number of all automorphisms of $(Z,+)$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

An automorphism of $(Z,+)$ is completely determined by the image of $1$.

The image of $1$ must be a generator of $Z$.

The generators of $Z$ are:

$1$ and $-1$

So, there are only two automorphisms:

$f(n)=n$

$f(n)=-n$

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





Go to Discussion

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

Solution

Requirement Engineering is the complete process of handling software requirements.

It includes:

Gathering requirements from the client

Analyzing requirements

Documenting requirements

Validating requirements

The question clearly mentions gathering, analyzing and documenting requirements.

So, this is not only requirement elicitation.

Requirement elicitation is only the activity of collecting requirements.

The complete process is called Requirement Engineering Process.

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: Quality control involves the series of inspections, reviews and tests used throughout the software process, to ensure each work product meets the requirements placed upon it.

Statement II: Quality assurance consists of auditing and reporting functions of management.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

Quality control is related to inspections, reviews and testing of software products.

Its main purpose is to check whether the work product satisfies the given requirements or not.

Statement II is also true.

Quality assurance is a management activity.

It includes auditing and reporting functions to ensure that proper software processes are being followed.

Therefore, both statements are true.

UGC NET Computer Science PYQ

In relational databases, if relation $R$ is in $BCNF$, then which of the following is true about relation $R$?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

If a relation is in $BCNF$, then it is also in $3NF$.

Also, if a relation is in $3NF$, then it is already in $2NF$.

So, if $R$ is in $BCNF$, then $R$ must be in $2NF$ and $3NF$.


UGC NET Computer Science PYQ

For the following Parents in figure (1) and (2):

Which is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

The right parts of the parents are exchanged:


Parent₁: 10110 | 010

Parent₂: 10101 | 111


After crossover:


Child₁: 10110 | 111

Child₂: 10101 | 010


This is exactly what is shown in figure (2).


Thus it represents one-point crossover.


UGC NET Computer Science PYQ
Which one of the following is NOT a part of ACID properties of a database transaction?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

ACID properties are:

Atomicity

Consistency

Isolation

Durability

Deadlock-freedom is not a part of ACID properties.

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





Go to Discussion

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

Solution

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

Product metrics are related to the software product itself.

They measure properties such as:

Size of the software

Complexity of the software

Quality of the software

Performance of the software

Here, size and complexity describe the software product.

So, they are part of Product Metrics.

Now check the options:

People Metrics are related to team members.

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

Process Metrics are related to software development process.

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

UGC NET Computer Science PYQ
Let $G$ be a simple undirected graph, $T_D$ be a DFS tree on $G$, and $T_B$ be the BFS tree on $G$.

Consider the following statements.

Statement I: No edge of $G$ is a cross with respect to $T_D$.

Statement II: For every edge $(u,v)$ of $G$, if $u$ is at depth $i$ and $v$ is at depth $j$ in $T_B$, then $|i-j|=1$.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

In DFS of an undirected graph, there are no cross edges.

Edges are generally tree edges or back edges.

So, no edge of $G$ is a cross edge with respect to DFS tree $T_D$.

Statement II is false.

In BFS tree, for every edge $(u,v)$, the depths of $u$ and $v$ differ by at most $1$.

So, the correct condition is:

$|i-j|\le 1$

But the statement says:

$|i-j|=1$

This is not always true because two adjacent vertices can also be at the same level in a BFS tree.

Therefore, Statement I is true and Statement II is false.

UGC NET Computer Science PYQ

Which of the following key constraints is required for functioning of foreign key in the context of relational databases?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A foreign key is used to create a relationship between two tables.

A foreign key in one table generally refers to the primary key of another table.

This ensures referential integrity between the two tables.


UGC NET Computer Science PYQ
$Z$ is set of integers. $(Z,)$ forms group if * is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

$a*b=a+b+2$


Associativity


$(a*b)*c=(a+b+2)+c+2=a+b+c+4$


$a*(b*c)=a+(b+c+2)+2=a+b+c+4$


Identity element:


$a*e=a$


$a+e+2=a$


$e=-2$


Inverse:


$a*b=-2$


$a+b+2=-2$


$b=-a-4$


UGC NET Computer Science PYQ
Consider the following statements:

A. The set of Turing machine codes for TM's that accept all inputs that are palindromes possible along with some other inputs is decidable

B. The language of codes for TM's M that when started with blank tape, eventually write a 1 somewhere on the tape is undecidable

C. The language accepted by a TM M is L(M) is always recursive

D. Post's correspondence problem is undecidable

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is false because checking whether a TM accepts all palindromes is an undecidable property.

B is true because checking whether a TM writes 1 on a blank tape is undecidable.

C is false because the language accepted by a TM is recursively enumerable, but not always recursive.

D is true because Post's correspondence problem is undecidable.

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





Go to Discussion

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

Solution

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

First find sailors with age over $20$.

From Sailors table:

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

Now find red boats.

From Boats table, red boats are:

$Bid=102$ and $Bid=104$

Now find sailors who reserved red boats.

From Reserves table:

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

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

$Sid=64$ reserved $Bid=102$

So,

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

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

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

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

So, the correct relational algebra expression must be:

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

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: The problem "Is $L_1\cap L_2=\phi$?" is undecidable for context sensitive languages $L_1$ and $L_2$.

Statement II: The problem "Is $W\in L$?" is decidable for context sensitive language $L$, where $W$ is a string.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

For context sensitive languages, the emptiness problem is undecidable.

Since context sensitive languages are closed under intersection, checking whether:

$L_1\cap L_2=\phi$

is also undecidable.

So, Statement I is true.

Statement II is also true.

Membership problem for context sensitive languages is decidable.

This is because context sensitive languages are accepted by Linear Bounded Automata, and for a fixed input there are only finitely many configurations.

Therefore, we can decide whether $W\in L$ or not.

So, both statements are true.

UGC NET Computer Science PYQ

In relational database management, which of the following is/are property/properties of candidate key?

$P$: Uniqueness

$Q$: Irreducibility






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A candidate key must uniquely identify each tuple in a relation.

So, uniqueness is a property of candidate key.

Also, a candidate key must be minimal. It means no proper subset of it can uniquely identify tuples.

This property is called irreducibility.

Therefore, both $P$ and $Q$ are true.


UGC NET Computer Science PYQ
Which of the following sequence ${a_n}$ are solution of recurrence relation

$a_n=8a_{n-1}-16a_{n-2}$

A. $a_n=1$
B. $a_n=2^n$
C. $a_n=4^n$
D. $a_n=n4^n$
E. $a_n=(-4)^n$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Characteristic equation


$r^2-8r+16=0$


$(r-4)^2=0$


$r=4$


General solution


$a_n=(c_1+c_2n)4^n$


Thus valid sequences:


$4^n$


$n4^n$


UGC NET Computer Science PYQ
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 user 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 a cellular technology that employs hybrid of FDMA and TDMA

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

CDMA is an accessing mechanism for multiple transmitters over a single channel.

GSM uses a hybrid of FDMA and TDMA.

UMTS provides faster mobile internet connection.

WiFi allows users to connect to a network over a wireless channel.

So,

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

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





Go to Discussion

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

Solution

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

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

Red boats are obtained by:

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

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

Then we join with Sailors table to get sailor names.

So, Q1 is correct:

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

Now check Q2.

Q2 first finds red boat IDs:

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

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

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

So, Q2 is also correct.

Now check Q3.

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

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

The $color$ attribute belongs to Boats table.

So, Q3 is incorrect.

Therefore, both Q1 and Q2 compute the required result.

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: The laws of nature put two fundamental limits on the data rate of a channel. The H. Nyquist limit restricts the number of independent samples per second to twice the bandwidth in a noiseless channel.

Statement II: Shannon's major result about noisy channel is that the maximum data rate of a channel whose bandwidth is $H$ Hz, and whose signal-to-noise ratio is $\frac{S}{N}$ is given by:

Maximum number of bits/sec $=H\log_2\left(1+\frac{S}{N}\right)$

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

Nyquist theorem gives the limit for a noiseless channel.

It says that for a channel of bandwidth $H$, the maximum number of independent samples per second is $2H$.

So, Statement I is true.

Statement II is also true.

Shannon capacity theorem gives the maximum data rate of a noisy channel as:

$C=H\log_2\left(1+\frac{S}{N}\right)$

where $H$ is bandwidth and $\frac{S}{N}$ is signal-to-noise ratio.

Therefore, both statements are true.

UGC NET Computer Science PYQ

Which of the following statements are DML statements?

$(a)$ Update $[tablename]$ Set $[columnname]=VALUE$

$(b)$ Delete $[tablename]$

$(c)$ Select $*$ from $[tablename]$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A candidate key must uniquely identify each tuple in a relation.

So, uniqueness is a property of candidate key.

Also, a candidate key must be minimal. It means no proper subset of it can uniquely identify tuples.

This property is called irreducibility.

Therefore, both $P$ and $Q$ are true.


UGC NET Computer Science PYQ
Which of the following is not an Object Oriented Programming language?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Python → OOP

Smalltalk → pure OOP

Perl → supports OOP


SQL Plus → database query interface.


UGC NET Computer Science PYQ
Consider universe positive integer $X = {1 \le n \le 8}$, proposition P = "n is an even integers", Q = "$(3 \le n \le 7) \land (n \ne 6)$". Then truth set of $P \leftrightarrow Q$ is






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Universe:

$X = {1,2,3,4,5,6,7,8}$

P is true for even integers:

$P = {2,4,6,8}$

Q is true for:

$Q = {3,4,5,7}$

$P \leftrightarrow Q$ is true when both P and Q have same truth value.

Both true:

$P \cap Q = {4}$

Both false:

Elements not in $P \cup Q = {1}$

Therefore,

Truth set = ${1,4}$

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





Go to Discussion

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

Solution

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

The information about reservation is available in the Reserves table.

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

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

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

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

So, Q3 is correct:

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

Now check Q2.

In Q2, Reserves is first joined with Sailors.

Then condition $bid=103$ is applied.

After that, sailor names are projected.

This also gives the same correct result.

So, Q2 is also correct.

Now check Q1.

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

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

The Reserves table is required for this relationship.

So, Q1 is incorrect.

Therefore, both Q2 and Q3 compute the required result.

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: In Caesar Cipher each letter of Plain text is replaced by another letter for encryption.

Statement II: The Diffie-Hellman algorithm is used for the exchange of secret keys.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

Caesar Cipher is a substitution cipher.

In Caesar Cipher, each letter of the plain text is replaced by another letter by shifting it by a fixed number of positions.

So, Statement I is true.

Statement II is also true.

Diffie-Hellman algorithm is used for secure key exchange between two parties.

It helps two users to agree on a common secret key over an insecure channel.

So, Statement II is true.

Therefore, both statements are true.

UGC NET Computer Science PYQ

Hadoop, a big data tool, works with a number of related tools. Choose from the following, the common tools included into Hadoop:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Hadoop ecosystem includes several tools used for big data storage and processing.

Map Reduce is used for distributed data processing.

HBase is a NoSQL database used in the Hadoop ecosystem.

Hive is used for querying large datasets stored in Hadoop.

Therefore, the common Hadoop tools are Map Reduce, HBase and Hive.


UGC NET Computer Science PYQ
Which of the following structures of knowledge representation are the most purely syntactic?

A. Conceptual dependency
B. Predicate logic
C. Slot-and-filler
D. Nonmonotonic systems





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Predicate logic → symbolic syntactic structure

Slot-and-filler → symbolic frame representation


Conceptual dependency → semantic

Nonmonotonic systems → reasoning method


UGC NET Computer Science PYQ
An observational technique that can be used to understand operational process and help to derive requirement for software to support operational process is known as





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Ethnography is an observational technique used to understand real work practices and operational processes.

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





Go to Discussion

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

Solution

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

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

Here,

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

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

First, take only required columns from Reserves:

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

This gives pairs of sailors and boats reserved by them.

Now take all boat IDs from Boats:

$\pi_{bid}(Boats)$

To find sailors who reserved every boat, apply division:

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

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

Now rename this result as $Tempsids$:

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

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

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

So, the correct query must use:

$\pi_{sid,bid}Reserves$

and

$\pi_{bid}Boats$

with division operation.

Option (b) correctly represents this logic.

UGC NET Computer Science PYQ
Given below are two statements:

Statement I: A genetic algorithm is a stochastic hill-climbing search in which a large population of states is maintained.

Statement II: In nondeterministic environments, agents can apply AND-OR search to generate contingent plans that reach the goal regardless of which outcomes occur during execution.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is incorrect.

A genetic algorithm maintains a population of states, but it is generally considered a variant of stochastic beam search, not simple stochastic hill-climbing.

Hill-climbing usually works with one current state, while genetic algorithm works with a population of states and uses selection, crossover and mutation.

So, Statement I is false.

Statement II is true.

In nondeterministic environments, actions may have more than one possible outcome.

AND-OR search is used to handle such situations.

It generates contingent plans, where the next action depends on the outcome that actually occurs.

So, Statement II is true.

Therefore, Statement I is incorrect but Statement II is true.

UGC NET Computer Science PYQ

Which of the following features is supported in the relational database model?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In the relational database model, data is stored in the form of relations or tables.

Complex data-types are not directly supported in the basic relational model because values are generally atomic.

Multivalued attributes are also not directly stored in a single attribute; they are usually represented by creating another relation.

Generalization relationships are mainly part of the ER model or enhanced ER model.

But associations between entities can be represented using relations, primary keys and foreign keys. Multiplicity like one-to-one or one-to-many can also be represented using constraints.

Therefore, the supported feature is associations with multiplicities.


UGC NET Computer Science PYQ
Match List-I with List-II
 List-I

List-II 

 A. $A\rightarrow aB\ |\ a,\ a\in T,\ A,B\in V$
I. Recursive Descent Parser
 
 B. $A\rightarrow BC\ |\ a,\ a\in T,\ A,B,C\in V$
 II. Turing Machine
 C. $LL(1)$ grammar
 III. Chomsky Normal Form
 D. Halting problem

 IV. Finite Automata






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

$A\rightarrow aB|a$ → Regular grammar → Finite Automata → IV


$A\rightarrow BC|a$ → Chomsky Normal Form → III


$LL(1)$ grammar → Recursive Descent Parser → I


Halting problem → Turing Machine → II


Matching:


$A\rightarrow IV$

$B\rightarrow III$

$C\rightarrow I$

$D\rightarrow II$


UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0.....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is least recently used. If T is stored in the virtual address space in row major format.

What is the main memory hit ratio?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In row major format, each row has 1024 elements.

Page size = 1024 words

So, each row occupies exactly 1 page.

There are 17 rows, so there are 17 pages.

For each column, access pattern is:

$T[0][j], T[1][j], T[2][j], ..., T[16][j]$

This means 17 different pages are accessed repeatedly.

But main memory can hold only 16 pages.

Using LRU, every access causes a page fault.

So, hit ratio = 0

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





Go to Discussion

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

Solution

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

Red boat

Green boat

First, find sailors who reserved a red boat.

Red boats are selected by:

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

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

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

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

Rename this result as:

$Tempred$

So,

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

Now, find sailors who reserved a green boat.

Green boats are selected by:

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

Join with Reserves table and project $sid$:

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

Rename this result as:

$Tempgreen$

So,

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

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

$Tempred\cap Tempgreen$

This gives common $sid$ values.

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

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

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

UGC NET Computer Science PYQ
concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds.

If $T$ is the capacity of a track in bytes, and $S$ is the capacity of each surface in bytes, then $(T,S)=$ _____






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Sector size $=512$ bytes

Number of sectors per track $=50$

So, capacity of one track is:

$T=512\times 50$

$T=25600$ bytes

Since,

$1K=1024$ bytes

So,

$T=\frac{25600}{1024}=25K$

Now, each surface has $2000$ tracks.

Capacity of each surface is:

$S=25K\times 2000$

$S=50000K$

Therefore,

$(T,S)=(25K,50000K)$

UGC NET Computer Science PYQ
The following table has two attributes Employee_id and Manager_id, where Employee_id is a primary key and Manager_id is a foreign key referencing Employee_id with on-delete cascade:

Employee_id Manager_id
20 40
25 40
30 35
35 20
40 45
45 25

On deleting the tuple $(20,40)$, the set of other tuples that must be deleted to maintain the referential integrity of the table is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Deleting tuple $(20,40)$ means employee id $20$ is deleted.

Since $Manager_id$ is a foreign key referencing $Employee_id$ with on-delete cascade, all tuples having $Manager_id=20$ must also be deleted.

So, tuple $(35,20)$ must be deleted.

Now, deleting employee id $35$ will again affect tuples having $Manager_id=35$.

So, tuple $(30,35)$ must also be deleted.

No tuple has $Manager_id=30$, so the cascade stops here.

Therefore, the other tuples that must be deleted are

$(35,20)$ and $(30,35)$


UGC NET Computer Science PYQ
For line drawing, which of the following algorithms are used?

A. DDA algorithm
B. Bresenham algorithm
C. Mid-point algorithm
D. Curve algorithm

Choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Line drawing algorithms used in computer graphics are:


DDA algorithm

Bresenham algorithm


Mid-point algorithm is generally used for circle drawing.


UGC NET Computer Science PYQ
Consider again that T is stored in column major format, what is the main memory hit ratio?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In column major format, elements of each column are stored continuously.

Each column has 17 elements.

Total elements:

$17 \times 1024 = 17408$

Page size = 1024 words

Total pages:

$\frac{17408}{1024}=17$

Since access is column-wise, memory access is almost sequential.

Only 1 page fault occurs per page.

Total page faults = 17

Total memory references = 17408

Hits:

$17408 - 17 = 17391$

Hit ratio:

$\frac{17391}{17408} \times 100 \approx 99.9%$

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

The transmission and propagation delays are respectively





Go to Discussion

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

Solution

Given,

Frame size $=64$ bytes

Data rate $=1.536\ mbps$

Distance $=3000\ km$

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

First, convert frame size into bits.

$1$ byte $=8$ bits

So,

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

Now, transmission delay is given by:

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

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

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

$T_t=333.33\mu sec$

Now, propagation delay is given by:

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

$T_p=3000\times 6$

$T_p=18000\mu sec$

Therefore,

$T_t=333.33\mu sec$

$T_p=18000\mu sec$

UGC NET Computer Science PYQ
concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds.

What is the capacity of the disk, in bytes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Given,

Sector size $=512$ bytes

Sectors per track $=50$

Tracks per surface $=2000$

Number of double-sided platters $=5$

So, number of surfaces:

$5\times 2=10$

Capacity of one track:

$512\times 50=25600$ bytes

Since,

$1K=1024$ bytes

So,

$\frac{25600}{1024}=25K$

Capacity of one surface:

$25K\times 2000=50000K$

Capacity of total disk:

$50000K\times 10=500000K$

UGC NET Computer Science PYQ

$K$-mean clustering algorithm has clustered the given $8$ observations into $3$ clusters after $1^{st}$ iteration as follows:

$C1:{(3,3),(5,5),(7,7)}$

$C2:{(0,6),(6,0),(3,0)}$

$C3:{(8,8),(4,4)}$

What will be the Manhattan distance for observation $(4,4)$ from cluster centroid $C1$ in second iteration?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Cluster $C1$ contains the points

$(3,3),(5,5),(7,7)$

Centroid of $C1$ is

$\left(\dfrac{3+5+7}{3},\dfrac{3+5+7}{3}\right)$

$=(5,5)$

Now, Manhattan distance between $(4,4)$ and $(5,5)$ is

$|4-5|+|4-5|$

$=1+1$

$=2$


UGC NET Computer Science PYQ
Arrange the following so that they can be placed in perfect/appropriate order.

A. Planning
B. Construction
C. Modeling
D. Communication
E. Deployment

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Software development process:


Communication → Planning → Modeling → Construction → Deployment


Order:


$D \rightarrow A \rightarrow C \rightarrow B \rightarrow E$


UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0.....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is least recently used.

Consider that T is stored in column major format, how many page faults will be encountered?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Total elements in table T:

$17 \times 1024 = 17408$

Page size:

$1024$ words

Number of pages required:

$\frac{17408}{1024}=17$

In column major format, the program accesses elements column by column, so memory access is sequential.

Each page will cause one page fault.

Therefore,

Total page faults = $17$

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

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





Go to Discussion

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

Solution

$T_t=333.33\mu sec$

$T_p=18000\mu sec$

Now,

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

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

$a=54$

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

$W=1+2a$

$W=1+2(54)$

$W=109$

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

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

$2^k$

Now check:

$2^6=64$

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

$2^7=128$

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

UGC NET Computer Science PYQ
concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds.

Given below are two statements:

Statement I: The disk has a total number of $2000$ cylinders.

Statement II: $51200$ bytes is not a valid block size for the disk.

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Statement I is true.

Number of cylinders is equal to the number of tracks per surface.

Given,

Tracks per surface $=2000$

So, total number of cylinders $=2000$.

Therefore, Statement I is true.

Statement II is false.

Given sector size is:

$512$ bytes

A valid block size should be a multiple of sector size.

Now,

$51200=512\times 100$

So, $51200$ bytes is a valid block size.

But Statement II says that $51200$ bytes is not a valid block size.

Therefore, Statement II is false.

UGC NET Computer Science PYQ

Consider a disk system with $100$ cylinders. The requests to access the cylinders occur in the following sequence:

$4,34,10,7,19,73,2,15,6,20$

Assuming that the head is currently at cylinder $50$, what is the time taken to satisfy all requests if it takes $1$ ms to move from one cylinder to adjacent one and the shortest seek time first policy is used?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Using shortest seek time first policy, the head always moves to the nearest request.

Initial head position is

$50$

Request sequence in SSTF order will be:

$50 \to 34 \to 20 \to 19 \to 15 \to 10 \to 7 \to 6 \to 4 \to 2 \to 73$

Now, total head movement is

$|50-34|+|34-20|+|20-19|+|19-15|+|15-10|+|10-7|+|7-6|+|6-4|+|4-2|+|2-73|$

$=16+14+1+4+5+3+1+2+2+71$

$=119$

Since $1$ cylinder movement takes $1$ ms,

Total time taken is

$119$ ms


UGC NET Computer Science PYQ
Which of the following is not a characteristic of a specialized embedded OS?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Embedded OS features:


• real-time scheduling

• interrupt handling

• memory partitioning


File system features like non-sequential files are typical for general purpose OS.


UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used", if T is stored in the virtual address space in row major format.

How many page faults will be encountered?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

T has 17 rows and 1024 columns.

Page size = 1024 words

Since memory is word addressable and each element is 1 word, each row contains:

$1024$ words

So, in row major format, each row occupies exactly one page.

Total pages for T:

$17$ pages

Main memory can hold only 16 pages.

The program accesses elements column-wise:

$T[0][j], T[1][j], T[2][j], \ldots, T[16][j]$

So, for each column, it accesses 17 different pages.

Since memory can hold only 16 pages and LRU is used, every access causes a page fault.

Total memory accesses:

$17 \times 1024 = 17408$

Therefore, total page faults:

$17408$

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

The sender window size to get the maximum efficiency is





Go to Discussion

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

Solution

$T_t=333.33\mu sec$

$T_p=18000\mu sec$

Now,

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

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

$a=54$

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

$W=1+2a$

$W=1+2(54)$

$W=109$

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

UGC NET Computer Science PYQ
concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds.

If the disk platters rotate at $5400$ rpm, then approximately what is the maximum rotational delay?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Given,

Rotational speed $=5400$ rpm

It means:

$5400$ revolutions in $60$ seconds

So, revolutions per second:

$\frac{5400}{60}=90$

Time taken for one revolution:

$\frac{1}{90}$ seconds

$=0.0111$ seconds

Maximum rotational delay is equal to time for one full revolution.

So, maximum rotational delay is approximately:

$0.011$ seconds

UGC NET Computer Science PYQ
Match List-I with List-II:
List-I List-II
(a) Disk (i) Thread
(b) CPU (ii) Signal
(c) Memory (iii) File system
(d) Interrupt (iv) Virtual address space
Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Disk is related to file system because files are stored and managed on disk.

So,

$(a) \rightarrow (iii)$

CPU is related to thread because a thread is the basic unit of CPU scheduling.

So,

$(b) \rightarrow (i)$

Memory is related to virtual address space.

So,

$(c) \rightarrow (iv)$

Interrupt is related to signal because signals are software-level notifications similar to interrupts.

So,

$(d) \rightarrow (ii)$

Therefore, correct matching is

$(a)-(iii);\ (b)-(i);\ (c)-(iv);\ (d)-(ii)$


UGC NET Computer Science PYQ
The order of steps of Address Translation in Linux Virtual Memory Scheme will be:

A. register
B. offset
C. Page directory
D. Page table
E. Page middle directory

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Linux 4-level paging:


register → page directory → page middle directory → page table → offset


Order:


$A \rightarrow C \rightarrow E \rightarrow D \rightarrow B$


UGC NET Computer Science PYQ
Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen, where i is row index and j is column index:

for j = [0.....1023] {

temp = 0;

for i = [0.....16]:

temp = temp + T[i][j];

print(temp/17.0);

}

T[i][j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is paged and holds 16 pages of size 1024 words, the page replacement policy is "least recently used", if T is stored in the virtual address space in row major format.

What is fault ratio of row major to column major arrangements?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

For row major arrangement:

Each row has 1024 elements.

Page size = 1024 words

So, each row occupies 1 page.

Total rows = 17, so total pages = 17.

Main memory can hold only 16 pages.

The program accesses column-wise:

$T[0][j], T[1][j], T[2][j], ..., T[16][j]$

So, every access causes a page fault.

Row major page faults:

$17 \times 1024 = 17408$

For column major arrangement:

Elements of each column are stored continuously.

Total elements:

$17 \times 1024 = 17408$

Page size = 1024 words

Column major page faults:

$\frac{17408}{1024} = 17$

Fault ratio:

$17408 : 17 = 1024 : 1$

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

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





Go to Discussion

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

Solution

Given,

Sequence number field $=6$ bits

So, total sequence numbers are:

$2^6=64$

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

$W=2^6-1$

$W=64-1=63$

From previous calculation,

$a=54$

Efficiency of sliding window protocol is:

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

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

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

$\eta=0.578$

UGC NET Computer Science PYQ
concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds.

If one track of data can be transferred per revolution, then what is the data transfer rate?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

From previous calculation, capacity of one track is:

$25K$ bytes

Given rotational speed:

$5400$ rpm

Revolutions per second:

$\frac{5400}{60}=90$

If one track of data is transferred per revolution, then data transferred per second is:

$25K\times 90$

$=2250K$ bytes/second

So, data transfer rate is:

$2250$ KBytes/second

UGC NET Computer Science PYQ

Which of the following are NOT shared by the threads of the same process?

$(a)$ Stack
$(b)$ Registers
$(c)$ Address space
$(d)$ Message queue






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Threads of the same process share resources like address space, code section, data section and other process resources.

But each thread has its own stack.

Also, each thread has its own register set because the CPU state of each thread must be stored separately.

So, stack and registers are not shared by threads of the same process.


UGC NET Computer Science PYQ
If $f(n) = 5f(n/2) + 3$ and $f(1) = 7$ is a recurrence relation where $k$ is a positive integer, then $f(2^k) =$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Let


$f(2^k) = g(k)$


Then recurrence becomes


$g(k) = 5g(k-1) + 3$


with


$g(0) = f(1) = 7$


Solve recurrence.


Homogeneous solution:


$g_h(k) = C5^k$


Particular solution:


Assume constant $A$


$A = 5A + 3$


$-4A = 3$


$A = -\frac{3}{4}$


General solution:


$g(k) = C5^k - \frac{3}{4}$


Use initial condition


$g(0) = 7$


$C - \frac{3}{4} = 7$


$C = \frac{31}{4}$


Thus


$f(2^k) = \frac{31}{4}5^k - \frac{3}{4}$


UGC NET Computer Science PYQ
IP datagram has arrived with following partial information in the header in hexadecimal:

45000054000300002006.....

What is the header size?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

First byte is 45.

Here, 4 represents IPv4 and 5 represents IHL.

Header size = 5 × 4 bytes = 20 bytes

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

The maximum achievable throughput is





Go to Discussion

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

Solution

Efficiency of the system is:

$\eta=0.578$

Given data rate is:

$1.536\ Mbps$

Maximum achievable throughput is:

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

$Throughput=0.578\times1.536$

$Throughput=0.887\ Mbps$

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

UGC NET Computer Science PYQ
Consider the following table structures related to a university for the below questions. EMPLOYEE
NAME VARCHAR(30) NOT NULL
EID VARCHAR(10) NOT NULL
DEPTNO INT(5) NOT NULL
HODEID VARCHAR(10)
SALARY INT(10)
PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT
DID INT(5) NOT NULL
DNAME VARCHAR(30) NOT NULL
HODID VARCHAR(10) NOT NULL
HODNAME VARCHAR(30)
PRIMARY KEY (DID), UNIQUE (DNAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK
EMPID VARCHAR(10) NOT NULL
PROJNO INT(5) NOT NULL
PROJECTLOC VARCHAR(30) NOT NULL
PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID);

On the basis of above given table structures, retrieve the distinct employee ID $(EMPID)$ of all employees of university who are working on project No. $20$, $30$ and $40$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

We need to retrieve distinct employee IDs.

So, we must use:

SELECT DISTINCT EMPID

Now, the project number can be $20$, $30$ or $40$.

For checking multiple possible values in SQL, we use IN operator.

So, correct condition is:

WHERE PROJNO IN (20,30,40)

Therefore, correct SQL query is:

SELECT DISTINCT EMPID
FROM PROJECTWORK
WHERE PROJNO IN (20,30,40);

Option (A) is incorrect because PROJNO=(20,30,40) is not valid SQL syntax.

Option (B) is incorrect because it does not use DISTINCT.

Option (D) is incorrect because PROJNO=20,30,40 is not valid SQL syntax.

Correct Answer: (C)
SELECT DISTINCT EMPID
FROM PROJECTWORK
WHERE PROJNO IN (20,30,40);

UGC NET Computer Science PYQ
Consider that a process has been allocated $3$ frames and has a sequence of page referencing as $1,2,1,3,7,4,5,6,3,1$. What shall be the difference in page faults for the above string using the algorithms of LRU and optimal page replacement for referencing the string?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given reference string is

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

Number of frames is

$3$

Using LRU page replacement, total page faults are

$9$

Using optimal page replacement, total page faults are

$7$

Therefore, required difference is

$9-7=2$


UGC NET Computer Science PYQ
IP datagram has arrived with following partial information in the header in hexadecimal:

45000054000300002006.....

What is the efficiency of this datagram?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Total length field = 0054 hexadecimal

0054 hex = 84 bytes

Header size = 20 bytes

Data size = 84 - 20 = 64 bytes

Efficiency = Data size / Total size × 100

Efficiency = 64 / 84 × 100 = 76.19%

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





Go to Discussion

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

Solution

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

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

These metrics normalize quality and productivity measures using software size.

For example:

Productivity can be measured as output per line of code.

Quality can be measured as defects per line of code.

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

UGC NET Computer Science PYQ
Consider the following table structures related to a university for the below questions. EMPLOYEE
NAME VARCHAR(30) NOT NULL
EID VARCHAR(10) NOT NULL
DEPTNO INT(5) NOT NULL
HODEID VARCHAR(10)
SALARY INT(10)
PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT
DID INT(5) NOT NULL
DNAME VARCHAR(30) NOT NULL
HODID VARCHAR(10) NOT NULL
HODNAME VARCHAR(30)
PRIMARY KEY (DID), UNIQUE (DNAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK
EMPID VARCHAR(10) NOT NULL
PROJNO INT(5) NOT NULL
PROJECTLOC VARCHAR(30) NOT NULL
PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID);

Given below are two statements to find the sum of salaries of all employees of the English department as well as the maximum, minimum and average salary in English department.

Statement I:

SELECT SUM(SALARY), MAX(SALARY), MIN(SALARY), AVG(SALARY)
FROM EMPLOYEE, DEPARTMENT
WHERE DEPTNO=DID
AND DNAME='ENGLISH';

Statement II:

SELECT SUM(SALARY), MAX(SALARY), MIN(SALARY), AVG(SALARY)
FROM EMPLOYEE, DEPARTMENT
WHERE DNAME='ENGLISH';

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

We need to find salary details of employees who belong to the English department.

For this, EMPLOYEE table and DEPARTMENT table must be joined.

In Statement I:

DEPTNO=DID

This condition joins EMPLOYEE table with DEPARTMENT table.

Also,

DNAME='ENGLISH'

filters only English department employees.

So, Statement I is correct.

In Statement II:

Only condition is:

DNAME='ENGLISH'

There is no join condition between EMPLOYEE and DEPARTMENT.

So, it will not correctly connect employees with their department.

It may produce incorrect result due to Cartesian product.

Therefore, Statement II is false.

UGC NET Computer Science PYQ
Consider three CPU intensive processes, which require $10,20$ and $30$ units of time and arrive at times $0,2$ and $6$ respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Let the processes be $P_1,P_2,P_3$.

$P_1$: arrival time $0$, burst time $10$
$P_2$: arrival time $2$, burst time $20$
$P_3$: arrival time $6$, burst time $30$

At time $0$, $P_1$ starts executing.

At time $2$, $P_2$ arrives, but remaining time of $P_1$ is $8$, which is less than $20$. So, $P_1$ continues.

At time $6$, $P_3$ arrives, but remaining time of $P_1$ is $4$, which is less than $30$. So, $P_1$ continues.

$P_1$ completes at time $10$.

Then context switch occurs from $P_1$ to $P_2$.

$P_2$ completes at time $30$.

Then context switch occurs from $P_2$ to $P_3$.

So, total context switches are

$2$


UGC NET Computer Science PYQ
IP datagram has arrived with following partial information in the header in hexadecimal:

45000054000300002006.....

What is the protocol of the payload being carried by the packet?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In IPv4 header, protocol field is after TTL.

Given header part:

45 00 00 54 00 03 00 00 20 06

Here, protocol field = 06

Protocol number 06 represents TCP.

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





Go to Discussion

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

Solution

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

The requirements are divided into parts or categories.

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

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

Waterfall model follows a fixed sequence of phases.

Prototyping model focuses on making a prototype first.

Evolutionary model evolves the software with user feedback.

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

UGC NET Computer Science PYQ
Consider the following table structures related to a university for the below questions. EMPLOYEE
NAME VARCHAR(30) NOT NULL
EID VARCHAR(10) NOT NULL
DEPTNO INT(5) NOT NULL
HODEID VARCHAR(10)
SALARY INT(10)
PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT
DID INT(5) NOT NULL
DNAME VARCHAR(30) NOT NULL
HODID VARCHAR(10) NOT NULL
HODNAME VARCHAR(30)
PRIMARY KEY (DID), UNIQUE (DNAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK
EMPID VARCHAR(10) NOT NULL
PROJNO INT(5) NOT NULL
PROJECTLOC VARCHAR(30) NOT NULL
PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID);

Which of the following query or queries return the employee ID and name of employees whose salary is greater than the salary of all employees in department number $20$ of university?
Order results by employee ID.

(A)
SELECT EID, NAME
FROM EMPLOYEE
WHERE SALARY > (SELECT SALARY FROM EMPLOYEE WHERE DEPTNO = 20)
ORDER BY EID;

(B)
SELECT EID, NAME
FROM EMPLOYEE
WHERE SALARY > (SELECT SALARY FROM EMPLOYEE WHERE DEPTNO = 20);

(C)
SELECT EID, NAME
FROM EMPLOYEE
WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE WHERE DEPTNO = 20)
ORDER BY EID;

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

We need employees whose salary is greater than the salary of all employees in department number $20$.

For comparing one value with all values returned by a subquery, we use:

SALARY > ALL (subquery)

So, the correct condition is:

SALARY > ALL (SELECT SALARY FROM EMPLOYEE WHERE DEPTNO = 20)

Also, the question asks to order results by employee ID.

So, ORDER BY EID is also required.

Option (A) is incorrect because the subquery may return more than one salary value. So, direct comparison using $>$ is not correct.

Option (B) is incorrect because it also uses direct comparison with a subquery that may return multiple values, and it does not use ORDER BY EID.

Option (C) is correct because it uses ALL and also orders the result by EID.

Therefore, only query (C) is correct.

UGC NET Computer Science PYQ
At a particular time of computation, the value of a counting semaphore is $7$. Then $20$ $P$ wait operations and $15$ $V$ signal operations are completed on this semaphore. What is the resulting value of the semaphore?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Initial value of semaphore is

$7$

Each $P$ wait operation decreases the semaphore value by $1$.

So, after $20$ $P$ operations:

$7-20=-13$

Each $V$ signal operation increases the semaphore value by $1$.

So, after $15$ $V$ operations:

$-13+15=2$

Therefore, resulting value of semaphore is

$2$


UGC NET Computer Science PYQ
IP datagram has arrived with following partial information in the header in hexadecimal:

45000054000300002006.....

What is the size of datagram?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Total length field = 0054 hexadecimal

0054 hex = 84 decimal

So, size of datagram = 84 bytes

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





Go to Discussion

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

Solution

Software product measures are of two types:

Direct measures

Indirect measures

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

Indirect measures cannot be measured directly.

They are evaluated using other factors.

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

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

UGC NET Computer Science PYQ
Consider the following table structures related to a university for the below questions. EMPLOYEE
NAME VARCHAR(30) NOT NULL
EID VARCHAR(10) NOT NULL
DEPTNO INT(5) NOT NULL
HODEID VARCHAR(10)
SALARY INT(10)
PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT
DID INT(5) NOT NULL
DNAME VARCHAR(30) NOT NULL
HODID VARCHAR(10) NOT NULL
HODNAME VARCHAR(30)
PRIMARY KEY (DID), UNIQUE (DNAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK
EMPID VARCHAR(10) NOT NULL
PROJNO INT(5) NOT NULL
PROJECTLOC VARCHAR(30) NOT NULL
PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID);

In reference to the above given table structures, which of the following query or queries will drop the 'SALARY' column from 'EMPLOYEE' table?

(A)
ALTER TABLE EMPLOYEE DROP SALARY CASCADE;

(B)
ALTER TABLE EMPLOYEE DROP SALARY RESTRICT;

(C)
ALTER EMPLOYEE DROP SALARY;

Choose the correct answer from the options given below::





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

To drop a column from a table, correct SQL syntax is:

ALTER TABLE table_name DROP column_name;

In Statement (A):

ALTER TABLE EMPLOYEE DROP SALARY CASCADE;

This query is valid because it uses ALTER TABLE and drops the SALARY column.

CASCADE means if there are dependent objects, they may also be removed.

So, Statement (A) is correct.

In Statement (B):

ALTER TABLE EMPLOYEE DROP SALARY RESTRICT;

This query is also valid because it uses ALTER TABLE and drops the SALARY column.

RESTRICT means the column will be dropped only if there is no dependent object.

Here, SALARY is not used as a primary key or foreign key.

So, Statement (B) is also correct.

In Statement (C):

ALTER EMPLOYEE DROP SALARY;

This query is incorrect because the keyword TABLE is missing.

Correct syntax should have ALTER TABLE, not only ALTER.

So, Statement (C) is incorrect.

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

UGC NET Computer Science PYQ
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

The minimum number of page frames required depends on the maximum number of pages that may be referenced by a single instruction.

This depends on the instruction format and addressing modes.

Therefore, it is determined by the instruction set architecture.


UGC NET Computer Science PYQ
IP datagram has arrived with following partial information in the header in hexadecimal:

45000054000300002006.....

How many more routers can the packet travel to?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

TTL field is 20 hexadecimal.

20 hex = 32 decimal

TTL shows how many more routers or hops the packet can travel.

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





Go to Discussion

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

Solution


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

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

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

So, this is an example of Communicational cohesion.

Logical cohesion groups similar logical activities.

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

Procedural cohesion occurs when elements follow a particular sequence.

UGC NET Computer Science PYQ
Consider the following table structures related to a university for the below questions. EMPLOYEE
NAME VARCHAR(30) NOT NULL
EID VARCHAR(10) NOT NULL
DEPTNO INT(5) NOT NULL
HODEID VARCHAR(10)
SALARY INT(10)
PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN KEY (DEPTNO) REFERENCES DEPARTMENT (DID); DEPARTMENT
DID INT(5) NOT NULL
DNAME VARCHAR(30) NOT NULL
HODID VARCHAR(10) NOT NULL
HODNAME VARCHAR(30)
PRIMARY KEY (DID), UNIQUE (DNAME), FOREIGN KEY (HODID) REFERENCES EMPLOYEE (EID); PROJECT WORK
EMPID VARCHAR(10) NOT NULL
PROJNO INT(5) NOT NULL
PROJECTLOC VARCHAR(30) NOT NULL
PRIMARY KEY (EMPID, PROJNO), FOREIGN KEY (EMPID) REFERENCES EMPLOYEE (EID);

Refer table structures given above. The university decided to give all employees in the 'SCIENCE' department a $20\%$ rise in salary. Which of the following query or queries will compute the above results?

(A)
UPDATE EMPLOYEE
SET SALARY = SALARY * 1.20
WHERE DEPTNO IN (SELECT DID FROM DEPARTMENT WHERE DNAME='SCIENCE');

(B)
UPDATE TABLE EMPLOYEE
SET SALARY = SALARY * 1.20
WHERE DNAME='SCIENCE';

(C)
ALTER TABLE EMPLOYEE
SET SALARY = SALARY * 1.20
WHERE DEPTNO IN (SELECT DNAME FROM DEPARTMENT WHERE DNAME='SCIENCE');

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

We need to increase the salary of all employees who belong to the 'SCIENCE' department.

The salary is stored in EMPLOYEE table.

The department name is stored in DEPARTMENT table.

So, first we need to find the DID of the 'SCIENCE' department.

This can be done by:

SELECT DID FROM DEPARTMENT WHERE DNAME='SCIENCE'

Then update salary of employees whose DEPTNO matches that DID.

So, correct query is:

UPDATE EMPLOYEE
SET SALARY = SALARY * 1.20
WHERE DEPTNO IN (SELECT DID FROM DEPARTMENT WHERE DNAME='SCIENCE');

Therefore, query (A) is correct.

Query (B) is incorrect because UPDATE TABLE is not valid syntax.

Also, DNAME is not present in EMPLOYEE table.

Query (C) is incorrect because ALTER TABLE is used to change table structure, not to update data.

Also, it compares DEPTNO with DNAME, which is wrong.

Therefore, only query (A) is correct.

UGC NET Computer Science PYQ
A computer has six tape drives with $n$ processes competing for them. Each process may need two drives. What is the maximum value of $n$ for the system to be deadlock free?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Total tape drives are

$6$

Each process may need maximum $2$ tape drives.

For deadlock free condition:

$R \ge n(m-1)+1$

Here,

$R=6$ and $m=2$

So,

$6 \ge n(2-1)+1$

$6 \ge n+1$

$n \le 5$

Therefore, maximum value of $n$ is

$5$


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





Go to Discussion

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

Solution

For positive number $28$,

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

Option (c) represents $-28$.

For $-28$:

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

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

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

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





Go to Discussion

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

Solution

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

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

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

Electronic Codebook Mode encrypts each block independently.

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

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

UGC NET Computer Science PYQ
A basic feasible solution of an $m \times n$ transportation problem is said to be non-degenerate, if basic feasible solution contains exactly $...............$ number of individual allocation in $...............$ positions.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In an $m \times n$ transportation problem, a basic feasible solution is called non-degenerate when it has exactly $m+n-1$ occupied cells or allocations.

These allocations should be in independent positions, means they should not form a closed loop.

So, the required blanks are $m+n-1$ and independent.


UGC NET Computer Science PYQ
A processor can support a maximum memory of $4GB$ where memory is word addressable and a word is $2$ bytes. What will be the size of the address bus of the processor?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Maximum memory supported is

$4GB=2^{32}$ bytes

One word is

$2$ bytes

Since memory is word addressable, number of addressable words is

$\dfrac{2^{32}}{2}=2^{31}$

So, number of address lines required is

$31$


UGC NET Computer Science PYQ
A company is implementing a new database system to manage its customer information. The database contains tables for customers, orders, products and sales representatives. Each customer can place multiple orders and each order can contain multiple products. Each order is associated with a specific sales representative who manages the customer account. The system keeps records of customers, their orders, the products included in each order, and the sales representatives responsible for handling the accounts. The database is designed to improve efficiency in tracking sales and customer interactions.

Which SQL query retrieves the total number of distinct customers who have placed orders?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

We need the number of distinct customers who placed orders, so we count unique customer_id from orders table.


Correct query:


Select COUNT(DISTINCT customer_id) As total_customers From orders;


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





Go to Discussion

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

Solution

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

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





Go to Discussion

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

Solution

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

TCP is a connection-oriented transport layer protocol.

It establishes a connection before data transfer.

UDP is a connectionless transport layer protocol.

It does not establish a connection before sending data.

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

Routing Protocol works at the network layer.

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

UGC NET Computer Science PYQ

Consider the following Linear Programming Problem $($LPP$)$:

Maximize $z=x_1+x_2$

Subject to the constraints:

$x_1+2x_2\le 2000$

$x_1+x_2\le 1500$

$x_2\le 600$

and $x_1,x_2\ge 0$

The solution of the above LPP is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

$x_1=1000,\ x_2=500$

Now,

$x_1+2x_2=1000+2(500)=2000\le 2000$

$x_1+x_2=1000+500=1500\le 1500$

$x_2=500\le 600$

Also,

$z=x_1+x_2=1000+500=1500$

So, all constraints are satisfied.


UGC NET Computer Science PYQ
Which of the following UNIX/Linux pipes will count the number of lines in all the files having $.c$ and $.h$ as their extension in the current working directory?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

To select files with extension $.c$ and $.h$, we use the pattern

star dot bracket ch bracket

Here, bracket ch bracket means either $c$ or $h$.

So, it selects files ending with $.c$ and $.h$.

Then, the output is passed to $wc-l$ to count the number of lines.

Therefore, the correct command is:

cat star dot bracket ch bracket pipe wc hyphen l


UGC NET Computer Science PYQ
Which of the following tables is likely to have a foreign key referencing another table in the database system implemented by the company?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Orders table usually contains:


customer_id → referencing Customers table


Thus it contains a foreign key.


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





Go to Discussion

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

Solution

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

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





Go to Discussion

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

Solution

Given,

Channel bandwidth $=64$ kbps

Frame size $=512$ bytes

Frame size in bits:

$512\times 8=4096$ bits

Transmission time:

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

$T_t=0.064$ sec

$T_t=64$ ms

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

So,

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

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

$a=4.21875$

For sliding window protocol, maximum efficiency is achieved when:

$W\ge 1+2a$

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

$1+2a=9.4375$

Given window size is:

$W=15$

Since,

$15>9.4375$

So, the channel can be fully utilized.

Therefore, maximum throughput is equal to the channel bandwidth.

Maximum throughput $=64$ kbps

UGC NET Computer Science PYQ
The Boolean expression $AB+A\overline{B}+\overline{A}C+AC$ is unaffected by the value of the Boolean variable $...............$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

$AB+A\overline{B}+\overline{A}C+AC$

Take $A$ common from first two terms:

$A(B+\overline{B})+\overline{A}C+AC$

Since,

$B+\overline{B}=1$

So,

$A(1)+\overline{A}C+AC$

$=A+\overline{A}C+AC$

Now,

$A+AC=A$

So,

$A+\overline{A}C$

Using identity $A+\overline{A}C=A+C$

Therefore, the simplified expression is:

$A+C$

The final expression does not contain $B$, so it is unaffected by the value of $B$.


UGC NET Computer Science PYQ

Which of the following statements is/are true?

$P$: In software engineering, defects that are discovered earlier are more expensive to fix.

$Q$: A software design is said to be a good design, if the components are strongly cohesive and weakly coupled.

Select the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $P$ is false.

Defects discovered earlier are generally less expensive to fix. Defects found in later phases become more costly to correct.

Statement $Q$ is true.

A good software design should have high cohesion and low coupling.

So, only $Q$ is true.


UGC NET Computer Science PYQ
A company is implementing a new database system to manage its customer information. The database contains tables for customers, orders, products and sales representatives. Each customer can place multiple orders and each order can contain multiple products. Each order is associated with a specific sales representative who manages the customer account. The system keeps records of customers, their orders, the products included in each order, and the sales representatives responsible for handling the accounts. The database is designed to improve efficiency in tracking sales and customer interactions.

Based on the passage, which of the following statements is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

From passage:


• customers can place multiple orders

• orders can contain multiple products

• representatives manage customer accounts


Thus correct statement:


Each sales representative can manage multiple customer accounts.


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





Go to Discussion

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

Solution

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

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





Go to Discussion

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

Solution

Given classless address:

$167.199.170.82/27$

Here, prefix length is:

$27$

In IPv4, total bits are:

$32$

So, host bits are:

$32-27=5$

Number of addresses in the network is:

$2^{host\ bits}$

$=2^5$

$=32$

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

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

UGC NET Computer Science PYQ
What are the greatest lower bound $($GLB$)$ and the least upper bound $($LUB$)$ of the sets $A={3,9,12}$ and $B={1,2,4,5,10}$ if they exist in poset $(Z^+,/)$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In the poset $(Z^+,/)$, the relation is based on divisibility.

Here,

$GLB=$ greatest common divisor $($GCD$)$

$LUB=$ least common multiple $($LCM$)$

For set $A={3,9,12}$:

$GLB(A)=GCD(3,9,12)=3$

$LUB(A)=LCM(3,9,12)=36$

For set $B={1,2,4,5,10}$:

$GLB(B)=GCD(1,2,4,5,10)=1$

$LUB(B)=LCM(1,2,4,5,10)=20$

So,

$A(GLB-3,\ LUB-36)$

and

$B(GLB-1,\ LUB-20)$


UGC NET Computer Science PYQ
The $M$ components in MVC are responsible for:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $P$ is false.

Defects discovered earlier are generally less expensive to fix. Defects found in later phases become more costly to correct.

Statement $Q$ is true.

A good software design should have high cohesion and low coupling.

So, only $Q$ is true.


UGC NET Computer Science PYQ
A company is implementing a new database system to manage its customer information. The database contains tables for customers, orders, products and sales representatives. Each customer can place multiple orders and each order can contain multiple products. Each order is associated with a specific sales representative who manages the customer account. The system keeps records of customers, their orders, the products included in each order, and the sales representatives responsible for handling the accounts. The database is designed to improve efficiency in tracking sales and customer interactions.

Which SQL query retrieves the total number of orders placed by a specific customer?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

From passage:


• customers can place multiple orders

• orders can contain multiple products

• representatives manage customer accounts


Thus correct statement:


Each sales representative can manage multiple customer accounts.


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





Go to Discussion

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

Solution

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

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





Go to Discussion

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

Solution

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

At the source side, it divides data into packets.

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

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

Data link layer works with frames.

Physical layer works with bits.

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

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Relation $R$ is defined as:

$(a,b)\in R$ if $a$ is a brother of $b$.

Symmetric:

If $a$ is brother of $b$, then it is not necessary that $b$ is brother of $a$.

For example, $b$ can be female. So, $b$ will not be brother of $a$.

Therefore, $R$ is not symmetric.

Transitive:

If $a$ is brother of $b$ and $b$ is brother of $c$, then $a$ is also brother of $c$.

Therefore, $R$ is transitive.

Equivalence relation:

For equivalence relation, relation must be reflexive, symmetric and transitive.

Here, $R$ is not symmetric and not reflexive.

So, $R$ is not an equivalence relation.

Partial order relation:

For partial order relation, relation must be reflexive, antisymmetric and transitive.

Here, $R$ is not reflexive.

So, $R$ is not a partial order relation.


UGC NET Computer Science PYQ

In the context of software testing, which of the following statements is/are NOT correct?

$P$: A minimal test set that achieves $100%$ path coverage will also achieve $100%$ statement coverage.

$Q$: A minimal test set that achieves $100%$ path coverage will generally detect more faults than one that achieves $100%$ statement coverage.

$R$: A minimal test set that achieves $100%$ statement coverage will generally detect more faults than one that achieves $100%$ branch coverage.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $P$ is correct.

If all paths are covered, then all statements will also be covered.

Statement $Q$ is correct.

Path coverage is stronger than statement coverage, so it generally detects more faults.

Statement $R$ is NOT correct.

Branch coverage is stronger than statement coverage, so statement coverage generally cannot detect more faults than branch coverage.

Therefore, only $R$ is not correct.


UGC NET Computer Science PYQ
A company is implementing a new database system to manage its customer information. The database contains tables for customers, orders, products and sales representatives. Each customer can place multiple orders and each order can contain multiple products. Each order is associated with a specific sales representative who manages the customer account. The system keeps records of customers, their orders, the products included in each order, and the sales representatives responsible for handling the accounts. The database is designed to improve efficiency in tracking sales and customer interactions.

Which of the following best describes the relationship between the orders table and the customers table?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

One customer can place multiple orders.


Thus relationship:


Customer → Orders


$1 : N$


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





Go to Discussion

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

Solution

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

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





Go to Discussion

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

Solution

Given,

Number of pipeline stages:

$k=4$

Number of data items:

$n=1000$

Stage delays are:

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

Register delay:

$5$ ns

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

Slowest stage delay:

$160$ ns

So, pipeline clock cycle time is:

$160+5=165$ ns

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

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

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

$=1003\times 165$

$=165495$ ns

$=165.495\ \mu sec$

Numerically, this is approximately $165.5$.

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

UGC NET Computer Science PYQ
The weight of minimum spanning tree in graph $G$, calculated using Kruskal's algorithm is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Using Kruskal’s algorithm, arrange all edges in increasing order of weight:

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

Now select the minimum weight edges without forming a cycle.

Selected edges are:

$2,\ 3,\ 4,\ 6$

Here, edge $5$ is skipped because it forms a cycle.

So, total weight of minimum spanning tree is:

$2+3+4+6=15$


UGC NET Computer Science PYQ
Software reuse is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Software reuse means using already existing software components, artifacts, designs, code, libraries or knowledge to develop new software.

It saves time, reduces cost and improves reliability.

Option 1 and Option 4 are related to reverse engineering.

Option 3 is related to software re-engineering.


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





Go to Discussion

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

Solution

From the circuit,

$T_P=R$

$T_Q=P'$

$T_R=Q'$

For $T$ flip-flop:

If $T=0$, output remains same.

If $T=1$, output toggles.

Initial state:

$PQR=000$

Step 1:

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

So,

$PQR=011$

Step 2:

For $PQR=011$,

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

So,

$PQR=101$

Step 3:

For $PQR=101$,

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

So,

$PQR=000$

Therefore, next three states are:

$011, 101, 000$

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





Go to Discussion

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

Solution

Given MAC address:

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

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

First octet is:

$4A$

Convert $4A$ into binary:

$4A=(01001010)_2$

The least significant bit is:

$0$

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

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

Broadcast address is:

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

The given address is not broadcast.

Therefore, the given address is a unicast address.

UGC NET Computer Science PYQ
A tree has $2n$ vertices of degree $1$, $3n$ vertices of degree $2$, $n$ vertices of degree $3$. Determine the number of vertices and edges in tree.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Total number of vertices:

$V=2n+3n+n=6n$

For a tree,

$E=V-1=6n-1$

Sum of degrees:

$2n(1)+3n(2)+n(3)$

$=2n+6n+3n=11n$

By handshaking theorem,

$2E=\text{sum of degrees}$

$2(6n-1)=11n$

$12n-2=11n$

$n=2$

So,

$V=6n=6(2)=12$

$E=V-1=12-1=11$


UGC NET Computer Science PYQ
Which of the following terms best describes Git?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Git is used to track changes in source code during software development.

It allows multiple developers to work on the same project and maintain different versions of files.

Git is distributed because every user has a complete copy of the repository.

Therefore, Git is a distributed version control system.


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





Go to Discussion

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

Solution

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

$-8$ to $+7$

Check option (b):

$R_1=1100=-4$

$R_2=1010=-6$

So,

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

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

Therefore, arithmetic overflow occurs.

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





Go to Discussion

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

Solution

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

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

But option says:

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

So, option (a) is incorrect.

Check option (b):

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

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

But option says:

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

So, option (b) is incorrect.

Check option (c):

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

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

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

So,

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

Thus, option (c) is correct.

Check option (d):

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

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

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

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

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

UGC NET Computer Science PYQ
How many reflexive relations are there on a set with $4$ elements?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

For a set with $n$ elements, total ordered pairs are:

$n^2$

Here,

$n=4$

So, total ordered pairs:

$4^2=16$

For a reflexive relation, all diagonal pairs must be present.

Number of compulsory diagonal pairs:

$4$

Remaining pairs:

$16-4=12$

Each remaining pair can be either selected or not selected.

So, number of reflexive relations:

$2^{12}$


UGC NET Computer Science PYQ
A Web application and its support environment has not been fully fortified against attack. Web engineers estimate that the likelihood of repelling an attack is only $30%$. The application does not contain sensitive or controversial information, so the threat probability is $25%$. What is the integrity of the web application?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Likelihood of repelling an attack is

$30%=0.30$

So, likelihood of not repelling an attack is

$1-0.30=0.70$

Threat probability is

$25%=0.25$

Now,

$Risk=Threat\ probability \times Attack\ success\ probability$

$Risk=0.25 \times 0.70$

$Risk=0.175$

Integrity is

$1-Risk$

$=1-0.175$

$=0.825$


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





Go to Discussion

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

Solution

Static binding is generally done at compile time.

Absolute addresses can be decided at load time.

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

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

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





Go to Discussion

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

Solution

Given recurrence is:

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

Compare with Master Theorem:

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

Here,

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

Now,

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

Since,

$\log_4 3<1$

So,

$n^{\log_4 3}<n$

But,

$f(n)=n\log n$

Clearly,

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

So, by Master Theorem Case 3,

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

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Time taken by non-pipelined system for $100$ tasks:

$100\times 30=3000\ ns$

For pipeline,

Number of stages:

$k=4$

Number of tasks:

$n=100$

Clock cycle time:

$10\ ns$

Pipeline time:

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

$=(4+100-1)\times 10$

$=103\times 10$

$=1030\ ns$

Speed up:

$\dfrac{3000}{1030}=2.91$


UGC NET Computer Science PYQ

Match List-I with List-II:

List-I (Software Process Models) List-II (Software Systems)
(a) Waterfall model (i) e-business software that starts with only the basic functionalities and then moves on to advanced features
(b) Incremental development (ii) An inventory control system for a supermarket to be developed within three months
(c) Prototyping (iii) A virtual reality system for simulating vehicle navigation in a highway
(d) RAD (iv) Automate the manual system for student record maintenance in a school
Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Waterfall model is suitable when requirements are clear and well understood. Automating a manual student record maintenance system is a clear and structured requirement.

So,

$(a) \rightarrow (iv)$

Incremental development is used when basic functionality is developed first and advanced features are added later.

So,

$(b) \rightarrow (i)$

Prototyping is useful when the system is complex and requirements need to be understood through a working model. A virtual reality simulation system is suitable for prototyping.

So,

$(c) \rightarrow (iii)$

RAD means Rapid Application Development. It is suitable when software needs to be developed quickly within a short time.

So,

$(d) \rightarrow (ii)$

Therefore, the correct matching is

$(a)-(iv);\ (b)-(i);\ (c)-(iii);\ (d)-(ii)$


UGC NET Computer Science PYQ
Given

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

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






Go to Discussion

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

Solution

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

The element $1$ is present at:

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

Now,

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

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

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

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

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

Therefore,

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


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





Go to Discussion

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

Solution

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

Leaves have height $0$.

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

Standard result:

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

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

Ignoring the ceiling value, it is written as:

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

So, the required expression is:

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

UGC NET Computer Science PYQ

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






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Memory size is $512K$ words.

$512K=512\times 1024=2^9\times 2^{10}=2^{19}$

So, address part requires $19$ bits.

There are $2$ addressing modes, direct and indirect.

So, addressing mode part requires:

$\log_2 2=1$ bit

There are $256$ registers.

So, register code part requires:

$\log_2 256=8$ bits

Total instruction size is $32$ bits.

Opcode bits:

$32-(1+8+19)$

$=32-28$

$=4$

So, bits are:

$1,4,8,19$


UGC NET Computer Science PYQ
Software products need adaptive maintenance for which of the following reasons?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Adaptive maintenance is done when software needs to adapt to a changed environment.

For example, if the software must run on a new operating system, new hardware or new platform, adaptive maintenance is required.

So, the correct reason is that customers need the product to run on new platforms.


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





Go to Discussion

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

Solution

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

This concept is called run time polymorphism.

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





Go to Discussion

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

Solution

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

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

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

$n\ge 2t^h-1$

Now solve this inequality for $h$.

$n+1\ge 2t^h$

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

Taking logarithm base $t$ on both sides:

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

So,

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

UGC NET Computer Science PYQ

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






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Each subfield $F1$ and $F2$ has $15$ microoperations.

To represent $15$ operations, we need:

$\lceil \log_2 15 \rceil=4$ bits

So,

$F1=4$ bits

$F2=4$ bits

Condition field $CD$ has $4$ options/status bits:

$\log_2 4=2$ bits

Branch field $BR$ has $4$ options:

$\log_2 4=2$ bits

Address space is $128$ memory words:

$\log_2 128=7$ bits

Total size of microinstruction:

$4+4+2+2+7=19$ bits


UGC NET Computer Science PYQ

Which of the following are the primary objectives of risk monitoring in software project tracking?

$P$: To assess whether predicted risks do, in fact, occur

$Q$: To ensure that risk aversion steps defined for the risk are being properly applied

$R$: To collect information that can be used for future risk analysis






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Risk monitoring is used to track risks during a software project.

It checks whether predicted risks actually occur.

It also checks whether risk avoidance or risk reduction steps are being applied properly.

It also collects risk-related information so that it can be used in future risk analysis.

Therefore, all $P,Q,R$ are correct.


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





Go to Discussion

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

Solution

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

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

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





Go to Discussion

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

Solution

Quick sort uses the divide and conquer technique.

In Quick sort, first we choose a pivot element.

Then the array is divided into two parts:

Elements smaller than pivot

Elements greater than pivot

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

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

This is exactly the divide and conquer approach.

UGC NET Computer Science PYQ
$(142)_b+(112)_{b-2}=(75)_8$, find base $b$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Convert each number into decimal form.

$(142)_b=1\cdot b^2+4\cdot b+2$

$=b^2+4b+2$

Now,

$(112)_{b-2}=1\cdot (b-2)^2+1\cdot (b-2)+2$

$=(b-2)^2+(b-2)+2$

$=b^2-4b+4+b-2+2$

$=b^2-3b+4$

Also,

$(75)_8=7\cdot 8+5=56+5=61$

Now,

$(142)b+(112){b-2}=(75)_8$

$(b^2+4b+2)+(b^2-3b+4)=61$

$2b^2+b+6=61$

$2b^2+b-55=0$

$2b^2+11b-10b-55=0$

$b(2b+11)-5(2b+11)=0$

$(b-5)(2b+11)=0$

So,

$b=5$


UGC NET Computer Science PYQ

Software validation mainly checks for inconsistencies between:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Software validation checks whether the software specification actually satisfies the user's real requirements.

It answers the question:

Are we building the right product?

So, validation mainly checks inconsistencies between detailed specifications and user requirements.


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





Go to Discussion

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

Solution

The union operation combines the rows of two relations.

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

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





Go to Discussion

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

Solution

Given hash function:

$h(k)=k\mod 11$

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

Now insert keys one by one using linear probing.

For $43$:

$43\mod 11=10$

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

For $36$:

$36\mod 11=3$

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

For $92$:

$92\mod 11=4$

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

For $87$:

$87\mod 11=10$

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

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

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

For $11$:

$11\mod 11=0$

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

Index $1$ is empty.

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

For $47$:

$47\mod 11=3$

Index $3$ is filled.

Index $4$ is also filled.

Index $5$ is empty.

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

For next $11$:

$11\mod 11=0$

Index $0$ is filled.

Index $1$ is filled.

Index $2$ is empty.

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

For $13$:

$13\mod 11=2$

Index $2$ is filled.

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

Index $6$ is empty.

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

For last key $14$:

$14\mod 11=3$

Index $3$ is filled.

Index $4$ is filled.

Index $5$ is filled.

Index $6$ is filled.

Index $7$ is empty.

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

UGC NET Computer Science PYQ
The following program is stored in the memory unit of the basic computer. Give the content of accumulator register in hexadecimal after the execution of the program.
Location Instruction
010 CLA
011 ADD 016
012 BUN 014
013 HLT
014 AND 017
015 BUN 013
016 C1A5
017 93C6





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Initially, accumulator register is cleared by instruction $CLA$.

So,

$AC=0000$

Next instruction is:

$ADD\ 016$

At location $016$, data is:

$C1A5$

So,

$AC=0000+C1A5=C1A5$

Next instruction is:

$BUN\ 014$

So, control goes to location $014$.

At location $014$, instruction is:

$AND\ 017$

At location $017$, data is:

$93C6$

Now,

$AC=C1A5\ AND\ 93C6$

Convert into binary:

$C1A5=1100\ 0001\ 1010\ 0101$

$93C6=1001\ 0011\ 1100\ 0110$

Now perform bitwise AND:

$1100\ 0001\ 1010\ 0101$

$AND$

$1001\ 0011\ 1100\ 0110$

$=1000\ 0001\ 1000\ 0100$

Now convert back to hexadecimal:

$1000\ 0001\ 1000\ 0100=8184$

So, final content of accumulator is:

$AC=8184$


UGC NET Computer Science PYQ
Match List-I with List-II:
List-I List-II
(a) Prim's algorithm (i) $O(V^3\log V)$
(b) Dijkstra's algorithm (ii) $O(VE^2)$
(c) Faster all-pairs shortest path (iii) $O(E\log V)$
(d) Edmonds-Karp algorithm (iv) $O(V^2)$
Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Prim's algorithm has time complexity:

$O(E\log V)$

So,

$(a)\rightarrow(iii)$

Dijkstra's algorithm has time complexity:

$O(V^2)$

So,

$(b)\rightarrow(iv)$

Faster all-pairs shortest path algorithm has time complexity:

$O(V^3\log V)$

So,

$(c)\rightarrow(i)$

Edmonds-Karp algorithm has time complexity:

$O(VE^2)$

So,

$(d)\rightarrow(ii)$

Therefore, the correct matching is

$(a)-(iii);\ (b)-(iv);\ (c)-(i);\ (d)-(ii)$


UGC NET Computer Science PYQ
Which of the following relations cannot be decomposed into BCNF with a lossless join and dependency-preserving decomposition?

R(V, W, X, Y, Z)





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

BCNF condition:
For every functional dependency $X \rightarrow Y$, X must be a superkey.

Check option (3)

FDs:

$VW \rightarrow X$

$X \rightarrow YV$

Here:

$X$ determines $V$ and $Y$

UGC NET Computer Science PYQ

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

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

$R\to Y$

${P,Q}\to V$

${R,X}\to X$

$Q\to U$

$V\to {W,X}$

Which of the following is a candidate key?






Go to Discussion

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

Solution

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

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

So, we get $T$.

$R\to Y$

So, we get $Y$.

${P,Q}\to V$

So, we get $V$.

$Q\to U$

So, we get $U$.

$V\to {W,X}$

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

Therefore,

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

It contains all attributes of the relation.

UGC NET Computer Science PYQ
Consider the traversal of a tree

Preorder $\to ABCEIFJDGHKL$

Inorder $\to EICFJBGDKHLA$

Which of the following is correct post order traversal?





Go to Discussion

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

Solution

Given,

Preorder traversal:

$ABCEIFJDGHKL$

Inorder traversal:

$EICFJBGDKHLA$

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

So, root is:

$A$

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

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

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

$B$

In inorder traversal:

$EICFJBGDKHL$

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

$EICFJ$

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

$GDKHL$

Now solve left subtree of $B$.

Preorder part is:

$CEIFJ$

Root is $C$.

Inorder part is:

$EICFJ$

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

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

$IE$

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

$JF$

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

$IEJFC$

Now solve right subtree of $B$.

Preorder part is:

$DGHKL$

Root is $D$.

Inorder part is:

$GDKHL$

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

So, left postorder is:

$G$

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

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

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

$KLH$

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

$GKLHD$

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

$IEJFCGKLHDB$

Finally, root $A$ comes at the end.

So, final postorder traversal is:

$IEJFCGKLHDBA$

UGC NET Computer Science PYQ
What is the output of following C program?
#include <stdio.h>

main()
{
    int i, j, x = 0;

    for (i = 0; i < 5; ++i)
        for (j = 0; j < i; ++j)
        {
            x += (i + j - 1);
            break;
        }

    printf("%d", x);
}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Outer loop runs for:

$i=0,1,2,3,4$

Inner loop runs only when $j<i$.

But inside inner loop, there is a $break$ statement, so inner loop executes only one time for each valid value of $i$.

For $i=0$:

$j<0$ is false, so inner loop does not execute.

For $i=1$:

$x=x+(1+0-1)=0+0=0$

For $i=2$:

$x=x+(2+0-1)=0+1=1$

For $i=3$:

$x=x+(3+0-1)=1+2=3$

For $i=4$:

$x=x+(4+0-1)=3+3=6$

So, final value of $x$ is:

$x=6$


UGC NET Computer Science PYQ
There are many sorting algorithms based on comparison. The running time of heapsort algorithm is $O(n\lg n)$. Like $P$, but unlike $Q$, heapsort sorts in place where $(P,Q)$ is equal to:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Heapsort is an in-place sorting algorithm.

Insertion sort is also an in-place sorting algorithm.

But merge sort is not considered in-place because it requires extra memory for merging.

So, heapsort sorts in place like insertion sort, but unlike merge sort.

Therefore,

$(P,Q)=(Insertion\ sort,\ Merge\ sort)$


UGC NET Computer Science PYQ
Arrange the following recurrence relations in increasing order of their time complexity.

(A) $T(n) = T(n/2) + 1$

(B) $T(n) = 2T(n/2) + n$

(C) $T(n) = 3T(n/3) + n$

(D) $T(n) = 2T(n/2) + \sqrt{n}$

(E) $T(n) = T(n-1) + 1$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Using Master Theorem / recurrence expansion:

(A)
$T(n) = T(n/2) + 1$
Complexity → $O(\log n)$

(E)
$T(n) = T(n-1) + 1$
Complexity → $O(n)$

(D)
$T(n) = 2T(n/2) + \sqrt{n}$

$n^{\log_2 2} = n$

Since $\sqrt{n} < n$

→ $O(n)$

(B)
$T(n) = 2T(n/2) + n$

$n^{\log_2 2} = n$

→ $O(n \log n)$

(C)
$T(n) = 3T(n/3) + n$

$n^{\log_3 3} = n$

→ $O(n \log n)$

Increasing order

$O(\log n) < O(n) < O(n) < O(n\log n) < O(n\log n)$


UGC NET Computer Science PYQ

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






Go to Discussion

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

Solution

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

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

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

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

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





Go to Discussion

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

Solution

Insert elements one by one in AVL tree.

Insert $35$:

Tree is balanced. No rotation.

Insert $50$:

$50$ becomes right child of $35$.

Tree is balanced. No rotation.

Insert $40$:

$40$ goes to left of $50$.

This creates Right-Left imbalance at $35$.

For Right-Left case, we do:

Right rotation at $50$

Left rotation at $35$

So far:

Left rotations $=1$

Right rotations $=1$

Insert $25$:

$25$ goes to left side.

Tree remains balanced. No rotation.

Insert $30$:

$30$ goes to right of $25$.

This creates Left-Right imbalance at $35$.

For Left-Right case, we do:

Left rotation at $25$

Right rotation at $35$

Now total:

Left rotations $=2$

Right rotations $=2$

Insert $60$:

$60$ goes to right side.

Tree remains balanced. No rotation.

Insert $78$:

$78$ goes to right of $60$.

This creates Right-Right imbalance at $50$.

For Right-Right case, we do:

Left rotation at $50$

Now total:

Left rotations $=3$

Right rotations $=2$

Insert $20$:

$20$ goes to left side.

Tree remains balanced. No rotation.

Insert $28$:

$28$ goes to right of $25$.

Tree still remains balanced. No rotation.

Therefore, total rotations are:

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

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In protected inheritance:

Public members of base class become protected members in derived class.

Protected members of base class also remain protected in derived class.

Private members of base class are not directly accessible in derived class.

So, member functions of class $B$ can access public and protected members of class $A$.

But object of class $B$ cannot access public base class data directly, because it becomes protected after protected inheritance.


UGC NET Computer Science PYQ

Consider the Euler's phi function given by

$\phi(n)=n\prod\left(1-\dfrac{1}{p}\right)$

where $p$ runs over all the primes dividing $n$. What is the value of $\phi(45)$?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

We have,

$45=3^2\times 5$

So, prime divisors of $45$ are $3$ and $5$.

Using Euler's phi function,

$\phi(45)=45\left(1-\dfrac{1}{3}\right)\left(1-\dfrac{1}{5}\right)$

$=45\times \dfrac{2}{3}\times \dfrac{4}{5}$

$=24$


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
List-II 
 A. Representation of bits
 I. Transport layer
 B. Physical Address
 II. Physical layer
 C. Logical Address
III. Network layer
 
 D. Segmentation and reassembly

 IV. Data link layer

Choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

A. Representation of bits → Physical layer


B. Physical Address → Data Link Layer

(MAC address)


C. Logical Address → Network Layer

(IP address)


D. Segmentation and reassembly → Transport Layer


Thus:


A → II

B → IV

C → III

D → I


UGC NET Computer Science PYQ

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






Go to Discussion

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

Solution

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

Conditions within one branch are connected by AND.

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

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





Go to Discussion

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

Solution

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

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

So, it is an internal interrupt.

Therefore:

$(A)-(II)$

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

So, it is an external interrupt.

Therefore:

$(B)-(III)$

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

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

Therefore:

$(C)-(IV)$

Superior call means supervisor call.

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

So, it is a software interrupt.

Therefore:

$(D)-(I)$

Final matching is:

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

UGC NET Computer Science PYQ
Which tag is used to enclose any number of javascript statements in HTML document?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

<script>

    // JavaScript code

</script>


UGC NET Computer Science PYQ
Which of the following is best running time to sort $n$ integers in the range $0$ to $n^2-1$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

The numbers are in the range

$0$ to $n^2-1$

Using radix sort with base $n$, each number can be represented using $2$ digits.

Radix sort takes

$O(d(n+b))$

Here,

$d=2$ and $b=n$

So,

$O(2(n+n))=O(n)$

Hence, the best running time is $O(n)$.


UGC NET Computer Science PYQ
Find the correct sequence of the storage devices in ascending order based on their access time.

A. Registers
B. Magnetic Disk
C. Magnetic Tapes
D. Main Memory
E. Optical Disk





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Access time order (slowest → fastest):


Magnetic Tape → Optical Disk → Magnetic Disk → Main Memory → Registers


Thus ascending order:


C → E → B → D → A


UGC NET Computer Science PYQ

Model of protection can be viewed as






Go to Discussion

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

Solution

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

Rows represent domains.

Columns represent objects.

Entries represent access rights.

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

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

The minimal cover of a set of functional dependencies is





Go to Discussion

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

Solution

Given functional dependencies are:

$A\to B$

$ABCD\to E$

$EF\to G$

$EF\to H$

$ACDF\to EG$

First, split the right hand side having multiple attributes.

$ACDF\to EG$ becomes:

$ACDF\to E$

$ACDF\to G$

So, the set becomes:

$A\to B$

$ABCD\to E$

$EF\to G$

$EF\to H$

$ACDF\to E$

$ACDF\to G$

Now check $ABCD\to E$.

Since,

$A\to B$

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

Therefore,

$ACD^+=ACDB$

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

$ACD\to E$

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

Hence,

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

Now check $ACDF\to E$.

Since we already have:

$ACD\to E$

So, $ACDF\to E$ is unnecessary.

Therefore, remove $ACDF\to E$.

Now check $ACDF\to G$.

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

Now we have $E$ and $F$.

Using,

$EF\to G$

we get $G$.

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

Therefore, remove $ACDF\to G$.

The remaining minimal cover is:

$A\to B$

$ACD\to E$

$EF\to G$

$EF\to H$

UGC NET Computer Science PYQ
A rectangle is bound by the lines $x=0,\ y=0,\ x=5$ and $y=3$. The line segment joining $(-1,0)$ and $(4,5)$, if clipped against this window will connect the points $...............$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Given line segment joins the points:

$(-1,0)$ and $(4,5)$

Slope of line:

$m=\dfrac{5-0}{4-(-1)}=\dfrac{5}{5}=1$

Equation of line using point $(-1,0)$:

$y-0=1(x+1)$

$y=x+1$

Window boundaries are:

$x=0,\ y=0,\ x=5,\ y=3$

At $x=0$:

$y=0+1=1$

So, first clipped point is:

$(0,1)$

At $y=3$:

$3=x+1$

$x=2$

So, second clipped point is:

$(2,3)$


UGC NET Computer Science PYQ

Which of the following is application of depth-first search?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Depth-first search is used in topological sorting of directed acyclic graphs.

DFS is also used in finding strongly connected components, such as in Kosaraju's algorithm and Tarjan's algorithm.

So, both topological sort and strongly connected components are applications of DFS.


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I (Testing Type)
 List-II (Description)
 A. Unit testing
 I. Testing individual components of the software
 B. Integration testing
 II. Testing the interaction between integrated components
 C. System testing
III. Testing to verify the system meets business needs
 
 D. Acceptance testing

 IV. Testing the complete system to ensure it meets requirements

Choose the correct answer from the options given below.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Unit Testing → Testing individual components


Integration Testing → Testing interaction between modules


System Testing → Testing the complete system


Acceptance Testing → Verifying business/user requirements


Thus mapping:


A → I

B → II

C → IV

D → III


UGC NET Computer Science PYQ

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






Go to Discussion

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

Solution

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

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

UGC NET Computer Science PYQ
A trigger is





Go to Discussion

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

Solution

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

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

For example, a trigger may execute automatically when:

A record is inserted

A record is updated

A record is deleted

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

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

Now check the options:

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

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

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

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

UGC NET Computer Science PYQ
Which of the following algorithms is not used for line clipping?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Cohen-Sutherland algorithm is used for line clipping.

Liang-Barsky algorithm is used for line clipping.

Nicholl-Lee-Nicholl algorithm is also used for line clipping.

But Sutherland-Hodgeman algorithm is mainly used for polygon clipping, not line clipping.


UGC NET Computer Science PYQ

Consider double hashing of the form

$h(k,i)=(h_1(k)+ih_2(k))\ \text{mod}\ m$

where

$h_1(k)=k\ \text{mod}\ m$

$h_2(k)=1+(k\ \text{mod}\ n)$

where $n=m-1$ and $m=701$.

For $k=123456$, what is the difference between first and second probes in terms of slots?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In double hashing, the difference between the first and second probe is decided by $h_2(k)$.

Here,

$m=701$

So,

$n=m-1=700$

Now,

$h_2(k)=1+($remainder when $123456$ is divided by $700)$

$123456=700\times 176+256$

So, remainder is $256$.

Therefore,

$h_2(k)=1+256=257$


UGC NET Computer Science PYQ

Arrange the following Language Classes in ascending order according to their expressive power, as defined by Chomsky hierarchy.

(A) Context-free languages
(B) Context-sensitive languages
(C) Regular languages
(D) Unrestricted grammars






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Chomsky hierarchy order:


Regular Languages

< Context-Free Languages

< Context-Sensitive Languages

< Recursively Enumerable (Unrestricted) Languages


Thus order:


C → A → B → D


UGC NET Computer Science PYQ

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


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






Go to Discussion

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

Solution

Using optimal page replacement algorithm with $4$ frames:

First four pages cause faults:

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

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

Page faults $=5$

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

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

Total page faults:

$5+3=8$

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





Go to Discussion

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

Solution

Given page reference string is:

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

Frame size $=3$

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

Now process each page:

$4$ gives page fault.

Frames: $4$

Total faults $=1$

$3$ gives page fault.

Frames: $4,3$

Total faults $=2$

$2$ gives page fault.

Frames: $4,3,2$

Total faults $=3$

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

Frames: $1,3,2$

Total faults $=4$

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

Frames: $1,4,2$

Total faults $=5$

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

Frames: $1,4,3$

Total faults $=6$

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

Frames: $5,4,3$

Total faults $=7$

$4$ is already present.

Frames: $5,4,3$

Total faults $=7$

$3$ is already present.

Frames: $5,4,3$

Total faults $=7$

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

Frames: $2,4,3$

Total faults $=8$

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

Frames: $2,1,3$

Total faults $=9$

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

Frames: $2,1,5$

Total faults $=10$

Therefore, number of page faults $=10$.

UGC NET Computer Science PYQ
If we want to resize a $1024 \times 768$ pixels image to one that is $640$ pixels wide with the same aspect ratio, what would be the height of the resized image?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Original image size is:

$1024 \times 768$

New width is:

$640$

Since aspect ratio remains same,

$\dfrac{\text{New Height}}{\text{New Width}}=\dfrac{\text{Original Height}}{\text{Original Width}}$

So,

$\dfrac{h}{640}=\dfrac{768}{1024}$

$h=\dfrac{768}{1024}\times 640$

$h=480$


UGC NET Computer Science PYQ

Consider the complexity class $CO-NP$ as the set of languages $L$ such that $\overline{L}\in NP$, and the following two statements:

$S_1: P\subseteq CO-NP$

$S_2:$ If $NP\ne CO-NP$, then $P\ne NP$

Which of the following is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $S_1$ is true.

Class $P$ is closed under complement. Also, $P\subseteq NP$.

So,

$P\subseteq CO-NP$

Statement $S_2$ is also true.

If $P=NP$, then since $P$ is closed under complement, we would get

$NP=CO-NP$

But the statement says $NP\ne CO-NP$.

Therefore, $P\ne NP$.

Hence, both $S_1$ and $S_2$ are correct.


UGC NET Computer Science PYQ

Arrange the following Language Classes in ascending order according to their expressive power, as defined by Chomsky hierarchy.

(A) Context-free languages
(B) Context-sensitive languages
(C) Regular languages
(D) Unrestricted grammars






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Chomsky hierarchy order:


Regular Languages

< Context-Free Languages

< Context-Sensitive Languages

< Recursively Enumerable (Unrestricted) Languages


Thus order:


C → A → B → D


UGC NET Computer Science PYQ

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






Go to Discussion

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

Solution

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

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

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

Therefore,

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





Go to Discussion

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

Solution

Given,

Tape transport speed $=200$ inches/second

Recording density $=1600$ bytes/inch

Total data $=600000$ bytes

First, find the data transfer rate.

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

Data transfer rate $=200\times1600$

Data transfer rate $=320000$ bytes/second

Now, time required to write data is:

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

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

$Time=1.875$ seconds

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

$100\times10=1000$ characters

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

Therefore, required time is:

$1.875$ sec

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





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In DBMS, the query optimizer is responsible for choosing the most efficient way to execute a query.

It performs tasks like:

Rearranging operations

Choosing proper order of operations

Removing redundant operations

Using efficient algorithms and indexes

So, the required component is:

$query\ optimizer$


UGC NET Computer Science PYQ

Consider the following steps:

$S_1$: Characterize the structure of an optimal solution

$S_2$: Compute the value of an optimal solution in bottom-up fashion

Which of the step(s) is/are common to both dynamic programming and greedy algorithms?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Both dynamic programming and greedy algorithms use the idea of optimal substructure.

So, characterizing the structure of an optimal solution is common to both.

Therefore, $S_1$ is common.

But computing the value of an optimal solution in bottom-up fashion is mainly a dynamic programming approach.

It is not a necessary step in greedy algorithms.

So, $S_2$ is not common.


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
 List-II

 A. Dijkstra’s Algorithm
 I. Find the shortest path between all pairs of vertices in a graph with positive or negative edge weights
 B. Floyd-Warshall Algorithm
 II. Finds the shortest path in a weighted graph with non-negative edge weights

 C. Bellman-Ford Algorithm

III. Sorts elements by repeatedly moving them past neighboring elements that are smaller

 
 D. Prim’s Algorithm

IV. Determines the strongly connected components in a directed graph

 
Choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Dijkstra Algorithm → shortest path with non-negative weights

Floyd-Warshall → all pairs shortest paths

Bellman-Ford → handles negative edge weights

Prim → Minimum Spanning Tree

Thus correct matching:

A → II
B → I

Remaining pair becomes

C → IV
D → III


UGC NET Computer Science PYQ

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






Go to Discussion

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

Solution

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

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

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

Therefore,

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





Go to Discussion

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

Solution

PCP means Post Correspondence Problem.

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

First check list X.

List X pairs are:

$1:(1,111)$

$2:(10111,10)$

$3:(10,0)$

Try the sequence of indices:

$2,1,1,3$

Now concatenate strings from List A:

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

$=101111110$

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

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

$=101111110$

Both strings are equal.

So, PCP in X has a solution.

Now check list Y.

List Y pairs are:

$1:(10,101)$

$2:(011,11)$

$3:(101,011)$

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

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

List A gives $10$

List B gives $101$

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

So after choosing pair $1$, we have:

List A $=10$

List B $=101$

Now List B is ahead by extra $1$.

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

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

If we choose pair $1$ again:

List A $=1010$

List B $=101101$

Here mismatch occurs.

If we choose pair $3$:

List A $=10101$

List B $=101011$

Again List B has extra $1$.

This same situation repeats, and equality is never obtained.

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

Therefore, PCP in Y has no solution.

Hence, only PCP in X has solution.


UGC NET Computer Science PYQ

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

$(*-$ Natural Join$)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Tables are:

$R1(x,y)$ has $50$ tuples

$R2(y,z)$ has $30$ tuples

Natural join will be performed on the common attribute:

$y$

Maximum number of tuples will occur when every tuple of $R1$ matches with every tuple of $R2$ on attribute $y$.

So, maximum number of tuples:

$50 \times 30=1500$


UGC NET Computer Science PYQ

Consider the following properties with respect to a flow network $G=(V,E)$ in which a flow is a real-valued function $f:V\times V\to R$:

$P_1$: For all $u,v\in V,\ f(u,v)=-f(v,u)$

$P_2$: $\sum_{v\in V} f(u,v)=0$ for all $u\in V$

Which one of the following is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Property $P_1$ is the skew-symmetry property of flow.

So, $P_1$ is correct.

Property $P_2$ represents flow conservation, but in a flow network, flow conservation holds for all vertices except the source and sink.

The statement says it holds for all $u\in V$, which is not correct.

So, $P_2$ is false.


UGC NET Computer Science PYQ
Arrange the given steps required for a Direct Memory Access (DMA) transfer in the correct order.

(A) Initiate DMA transfer request
(B) Transfer data directly between peripheral and memory
(C) Processor grants DMA control over the system bus
(D) DMA controller completes data transfer and signals completion







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

DMA transfer sequence:


Device initiates DMA request


CPU grants bus control to DMA controller


DMA transfers data between memory and device


DMA signals completion


Order:


A → C → B → D


UGC NET Computer Science PYQ

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






Go to Discussion

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

Solution

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

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

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

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





Go to Discussion

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

Solution

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

Now check each property one by one.

(A) Finiteness:

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

But a Turing machine may not halt on some inputs.

So, finiteness of recursively enumerable sets is not decidable.

(B) Context Freedom:

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

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

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

So, context freedom is not decidable.

(C) Emptiness:

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

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

This is also undecidable for recursively enumerable languages.

Therefore, all three properties are not decidable.

UGC NET Computer Science PYQ

Given two tables $EMPLOYEE(EID,ENAME,DEPTNO)$ and $DEPARTMENT(DEPTNO,DEPTNAME)$.

Find the most appropriate statement of the given query:

Select count(*) 'total'

from EMPLOYEE

where DEPTNO IN (D1, D2)

group by DEPTNO

having count(*) > 5;






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

The query first selects employees whose department number is either $D1$ or $D2$.

Then,

$group\ by\ DEPTNO$

means employees are grouped department-wise.

After that,

$having\ count(*)>5$

means only those department groups will be displayed whose employee count is greater than $5$.

So, the query displays the total number of employees of departments $D1$ and $D2$ only if their count is greater than $5$.


UGC NET Computer Science PYQ

Consider the following statements:

$S_1$: For any integer $n>1$, $a^{\phi(n)}\equiv 1\ (\text{mod }n)$ for all $a\in Z_n^*$, where $\phi(n)$ is Euler's phi function.

$S_2$: If $p$ is prime, then $a^p\equiv 1\ (\text{mod }p)$ for all $a\in Z_p^*$.

Which one of the following is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $S_1$ is true by Euler's theorem.

If $a\in Z_n^*$, then $a$ and $n$ are relatively prime.

So,

$a^{\phi(n)}\equiv 1\ (\text{mod }n)$

Now consider $S_2$.

For prime $p$, Fermat's theorem gives

$a^{p-1}\equiv 1\ (\text{mod }p)$

for $a\in Z_p^*$.

But $S_2$ says

$a^p\equiv 1\ (\text{mod }p)$

This is not generally true.

Actually,

$a^p\equiv a\ (\text{mod }p)$

So, $S_2$ is false.


UGC NET Computer Science PYQ
A graph $G$ with number of vertices greater and equal than three i.e. $(n \ge 3)$ is a Hamiltonian graph, if the degree of each vertex is greater and equal to …





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Dirac’s theorem states that if a simple graph with $n \ge 3$ vertices satisfies


$deg(v) \ge \frac{n}{2}$


for every vertex $v$, then the graph is Hamiltonian.


Thus the degree of each vertex must be at least half of the number of vertices.


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





Go to Discussion

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

Solution

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

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

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





Go to Discussion

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

Solution

Activation record is related to a subroutine call.

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

So,

$(A)-(III)$

Location counter is used in assembler.

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

So,

$(B)-(IV)$

Reference count is related to garbage collection.

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

So,

$(C)-(II)$

Address relocation is done by linker loader.

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

So,

$(D)-(I)$

Final matching is:

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

UGC NET Computer Science PYQ

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







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In the given ER diagram:

Entity $R_1$ has attributes $A$, $B$, and $C$.

Here, $B$ is shown as a double oval, so $B$ is a multivalued attribute.

A multivalued attribute requires a separate table.

So, for $R_1$:

One table for entity $R_1$

One separate table for multivalued attribute $B$

Entity $R_2$ has attributes $X$ and $Y$.

So, one table is required for $R_2$.

The relationship between $R_1$ and $R_2$ is $1:M$.

For a $1:M$ relationship, no separate relationship table is required. We can add the primary key of the $1$ side as a foreign key in the $M$ side table.

Total number of tables:

$1$ table for $R_1$

$1$ table for multivalued attribute $B$

$1$ table for $R_2$

Total:

$1+1+1=3$


UGC NET Computer Science PYQ

Which data structure is used by the compiler for managing variables and their attributes?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A compiler stores information about variables, functions, identifiers and their attributes in a symbol table.

Attributes may include name, type, scope, address and value.

Therefore, the data structure used for managing variables and their attributes is symbol table.


UGC NET Computer Science PYQ
Arrange the following steps in a proper sequence for the typical process of a DNS query :

(A) Query authoritative DNS Server
(B) Query local DNS Server
(C) Local DNS Server Check Cache
(D) Query root DNS Server
(E) Query TLD DNS Server

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical DNS resolution process:


Client queries Local DNS Server


Local DNS server checks cache


If not found → Root DNS server queried


Root server refers to TLD DNS server


TLD server refers to Authoritative DNS server


Thus the correct order is


(B) → (C) → (D) → (E) → (A)


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





Go to Discussion

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

Solution

Risk exposure is calculated by multiplying risk probability and loss.

$RE=P\times L$

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

(A) It controls efforts.

(B) It controls resources.

(C) It controls cost of development.

Choose the correct answer from the options given below:





Go to Discussion

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

Solution


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

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

Now check each statement:

(A) It controls efforts.

This is correct because $4GT$ reduces manual programming effort.

(B) It controls resources.

This is also correct because fewer resources may be needed due to automation and high-level tools.

(C) It controls cost of development.

This is also correct because reduced effort and better resource usage reduce development cost.

Therefore, all statements are correct.

UGC NET Computer Science PYQ
A counting semaphore is initialized to $8$. $3$ wait $()$ operations and $4$ signal $()$ operations are applied. Find the current value of the semaphore variable.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Initial value of semaphore:

$S=8$

Each wait $()$ operation decreases semaphore value by $1$.

After $3$ wait $()$ operations:

$S=8-3=5$

Each signal $()$ operation increases semaphore value by $1$.

After $4$ signal $()$ operations:

$S=5+4=9$


UGC NET Computer Science PYQ
On translating the expression given below into quadruple representation, how many operations are required?

$(ij)+(e+f)(a*b+c)$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given expression is

$(ij)+(e+f)(a*b+c)$

Count each arithmetic operation:

$i*j$ gives $1$ operation.

$e+f$ gives $1$ operation.

$a*b$ gives $1$ operation.

$a*b+c$ gives $1$ operation.

$(e+f)(ab+c)$ gives $1$ operation.

Finally,

$(ij)+[(e+f)(a*b+c)]$ gives $1$ operation.

Total operations:

$1+1+1+1+1+1=6$


UGC NET Computer Science PYQ
In a schema $R(A, B, C, D, E, F, G, H)$, each field of $R$ contains only atomic values.
$F = {CH \rightarrow C, A \rightarrow BC, B \rightarrow CEH, E \rightarrow A, A \rightarrow EFG}$ is a set of functional dependencies so that $F^+$ is exactly the set of FDs that holds $R$. The relation $R$ is :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Given FDs


$CH \rightarrow C$

$A \rightarrow BC$

$B \rightarrow CEH$

$E \rightarrow A$

$A \rightarrow EFG$


From


$A \rightarrow BC$

$A \rightarrow EFG$


we get


$A \rightarrow BCFG E$


Then


$B \rightarrow CEH$


Thus


$A^+ = {A,B,C,D,E,F,G,H}$


So $A$ is a candidate key.


Now check dependency


$E \rightarrow A$


Since $E$ is not a superkey, but RHS contains a prime attribute, it satisfies 3NF but violates BCNF.


Therefore the relation is


in 3NF but not in BCNF.


UGC NET Computer Science PYQ
Which of the following is a technique used for component wrapping?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Component wrapping is used to make an existing component compatible with a new system.

Clear-box wrapping is a component wrapping technique where internal details of the component are available.

UGC NET Computer Science PYQ
Consider the grammar $S\to SbS\mid a$.

Consider the following statements:

The string $abababa$ has

(A) two parse trees

(B) two left most derivations

(C) two right most derivations

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given grammar is:

$S\to SbS\mid a$

This grammar is ambiguous.

The string is:

$abababa$

It contains $4$ symbols $a$ and $3$ symbols $b$.

This is like combining four $a$'s using three $b$ operators.

Because the grammar does not define a fixed grouping rule, the string can be derived in more than one way.

For example, one possible grouping is:

$(((a)b(a))b(a))b(a)$

Another possible grouping is:

$(a)b((a)b((a)b(a)))$

So, the string has more than one parse tree.

For every different parse tree, there is a corresponding different left most derivation.

So, it has more than one left most derivation.

Similarly, for every different parse tree, there is a corresponding different right most derivation.

So, it has more than one right most derivation.

Therefore, all three statements are true in the sense of ambiguity.

UGC NET Computer Science PYQ
Which of the following is not needed by an encryption algorithm used in Cryptography?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

An encryption algorithm mainly needs:

Plain message

Key

Encryption method

After encryption, it produces ciphertext.

But user details are not required for the encryption algorithm.


UGC NET Computer Science PYQ

Replacing the expression $4*2.14$ by $8.56$ is known as:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Constant folding is a compiler optimization technique.

In this technique, constant expressions are evaluated at compile time.

Here,

$4*2.14=8.56$

So, replacing $4*2.14$ by $8.56$ is constant folding.


UGC NET Computer Science PYQ
Consider the Grammar :

$S \rightarrow A$
$A \rightarrow S B S \mid id$
$B \rightarrow B, A \mid A$

If $I_0 = CLOSURE({[S' \rightarrow .A]})$, then how many items be in the set for $GOTO(I_0, S)$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Initial item

$S' \rightarrow .A$

Closure adds productions of $A$

$A \rightarrow .SBS$
$A \rightarrow .id$

Now the item containing $S$ after dot:

$A \rightarrow .SBS$

Applying GOTO on $S$ gives

$A \rightarrow S.BS$

Now closure for $B$ adds

$B \rightarrow .B,A$
$B \rightarrow .A$

Also expand $A$

$A \rightarrow .SBS$
$A \rightarrow .id$

Total items in $GOTO(I_0,S)$ = 4

UGC NET Computer Science PYQ
The cyclomatic complexity metric provides the designer with information regarding the number of -____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Cyclomatic complexity measures the number of linearly independent paths in a program.

UGC NET Computer Science PYQ
In a game playing search tree, upto which depth $\alpha-\beta$ pruning can be applied?

(A) Root $(0)$ level

(B) $6$ level

(C) $8$ level

(D) Depends on utility value in a breadth first order

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

$\alpha-\beta$ pruning is an optimization technique used with the minimax algorithm in game playing search trees.

It can be applied at any depth of the game tree.

It is not restricted to only one particular level.

Now check each statement:

(A) Root $(0)$ level

At the root level, $\alpha$ and $\beta$ values are initialized and the search starts from this level.

So, $\alpha-\beta$ pruning can be applied from root level.

Therefore, statement (A) is correct.

(B) $6$ level

If the game tree is searched up to depth $6$, then $\alpha-\beta$ pruning can be applied up to level $6$.

Therefore, statement (B) is correct.

(C) $8$ level

Similarly, if the game tree is searched up to depth $8$, then $\alpha-\beta$ pruning can also be applied up to level $8$.

Therefore, statement (C) is correct.

(D) Depends on utility value in a breadth first order

This is incorrect because $\alpha-\beta$ pruning is normally applied using depth first search, not breadth first search.

It depends on $\alpha$ and $\beta$ values during depth first minimax search.

Therefore, only (A), (B) and (C) are correct.

UGC NET Computer Science PYQ
Which of the following CPU scheduling algorithms is/are supported by LINUX operating system?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Linux operating system supports preemptive priority scheduling.

Linux also supports time-sharing CPU scheduling for normal user processes.

So, both preemptive priority scheduling and time-sharing CPU scheduling are supported by Linux.


UGC NET Computer Science PYQ

Shift-reduce parser consists of:

$(a)$ Input buffer
$(b)$ Stack
$(c)$ Parse table

Choose the correct option from those given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A shift-reduce parser uses an input buffer to read the input string.

It uses a stack to store grammar symbols during parsing.

In table-driven shift-reduce parsing, a parse table is also used to decide shift and reduce actions.

Therefore, shift-reduce parser consists of input buffer, stack and parse table.


UGC NET Computer Science PYQ
Which of the following statements about pointers in C are TRUE.

(A) Pointers can be used to access array elements
(B) Pointers can store the address of another pointer
(C) Pointers are automatically dereferenced in expression
(D) Pointers cannot be used to access structure members

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True — pointers can access array elements because arrays and pointers are closely related in C.

(B) True — a pointer can store the address of another pointer (pointer to pointer).

(C) False — pointers are not automatically dereferenced, we must use *.

(D) False — pointers can access structure members using ->.

Thus correct statements are A and B.

UGC NET Computer Science PYQ
In a ______ the left and right subtrees for any given node, differ in height by more than one.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In a balanced binary tree, height difference is at most $1$.

If left and right subtrees differ in height by more than $1$, then it is an unbalanced binary tree.

UGC NET Computer Science PYQ
Consider $\alpha,\beta,\gamma$ as logical variables. Identify which of the following represents correct logical equivalence:

(A) $(\alpha\land(\beta\lor\gamma))\equiv((\alpha\land\beta)\lor(\alpha\land\gamma))$
(B) $(\alpha\lor\beta)\equiv\neg\alpha\lor\beta$
(C) $(\alpha\Rightarrow\beta)\equiv(\neg\beta\Rightarrow\neg\alpha)$
(D) $(\neg(\alpha\lor\beta))\equiv(\neg\alpha\Rightarrow\neg\beta)$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Check statement (A):

$(\alpha\land(\beta\lor\gamma))\equiv((\alpha\land\beta)\lor(\alpha\land\gamma))$

This is distributive law of logic.

So, statement (A) is true.

Check statement (B):

$(\alpha\lor\beta)\equiv\neg\alpha\lor\beta$

This is not always true.

For example, let $\alpha=True$ and $\beta=False$.

Then,

$\alpha\lor\beta=True\lor False=True$

But,

$\neg\alpha\lor\beta=False\lor False=False$

Both values are different.

So, statement (B) is false.

Check statement (C):

$(\alpha\Rightarrow\beta)\equiv(\neg\beta\Rightarrow\neg\alpha)$

This is contrapositive law.

Also,

$\alpha\Rightarrow\beta\equiv\neg\alpha\lor\beta$

And,

$\neg\beta\Rightarrow\neg\alpha\equiv\beta\lor\neg\alpha$

Since,

$\neg\alpha\lor\beta\equiv\beta\lor\neg\alpha$

So, statement (C) is true.

Check statement (D):

$(\neg(\alpha\lor\beta))\equiv(\neg\alpha\Rightarrow\neg\beta)$

Using De Morgan's law,

$\neg(\alpha\lor\beta)\equiv\neg\alpha\land\neg\beta$

Now,

$\neg\alpha\Rightarrow\neg\beta\equiv\alpha\lor\neg\beta$

These two are not equivalent.

So, statement (D) is false.

Therefore, only (A) and (C) are correct.

UGC NET Computer Science PYQ

Consider a paging system where translation lookaside buffer $($TLB$)$, a special type of associative memory, is used with a hit ratio of $80%$.

Assume that memory reference takes $80$ nanoseconds and reference time to TLB is $20$ nanoseconds. What will be the effective memory access time given an $80%$ hit ratio?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

TLB access time $=20$ ns

Memory access time $=80$ ns

Hit ratio $=80%=0.8$

Miss ratio $=20%=0.2$

For TLB hit:

Effective time $=20+80=100$ ns

For TLB miss:

First TLB is checked, then page table is accessed from memory, then actual memory is accessed.

Effective time $=20+80+80=180$ ns

Now,

Effective memory access time:

$EAT=0.8(100)+0.2(180)$

$EAT=80+36$

$EAT=116$ ns


UGC NET Computer Science PYQ

How many states are there in a minimum state automata equivalent to regular expression given below?

Regular expression is $a^*b(a+b)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

The regular expression is

$a^*b(a+b)$

It means:

Any number of $a$'s, followed by one $b$, followed by either $a$ or $b$.

So, strings accepted are like:

$ba,\ bb,\ aba,\ abb,\ aaba,\ aabb$

Minimum DFA states needed:

State $q_0$: Initial state, reads any number of $a$'s.
State $q_1$: After reading required $b$.
State $q_2$: Final state after reading last symbol $a$ or $b$.
State $q_d$: Dead state for extra or invalid symbols.

Thus, total minimum states are

$4$


UGC NET Computer Science PYQ
Arrange the following steps in proper sequence involved in a Genetic Algorithm :

(A) Selection
(B) Initialization
(C) Crossover
(D) Mutation
(E) Evaluation

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical steps of Genetic Algorithm:

Initialization

Evaluation

Selection

Crossover

Mutation

Thus order:

(B) → (E) → (A) → (C) → (D)

UGC NET Computer Science PYQ
FFTs are ______ techniques used to encode digital video and audio information and helps analyse the signal in ____ domain.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

FFT stands for Fast Fourier Transform.

It is used in compression techniques and helps analyze signals in the frequency domain.

UGC NET Computer Science PYQ
Let $(\{a,b\},*)$ be a semigroup, where $a*a=b$.

(A) $a*b=b*a$

(B) $b*b=b$

Choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Given,

$(\{a,b\},*)$ is a semigroup.

So, the operation $*$ is associative.

That means,

$(x*y)*z=x*(y*z)$

Also given,

$a*a=b$

Now check statement (A):

Using associativity,

$(a*a)*a=a*(a*a)$

Since $a*a=b$, we get:

$b*a=a*b$

So,

$a*b=b*a$

Therefore, statement (A) is true.

Now check statement (B):

We need to prove $b*b=b$.

Since $b=a*a$, we can write:

$b*b=(a*a)*b$

Using associativity,

$(a*a)*b=a*(a*b)$

Now, $a*b$ must be either $a$ or $b$ because the set is $\{a,b\}$.

Case 1:

If $a*b=a$, then

$a*(a*b)=a*a=b$

Case 2:

If $a*b=b$, then

$a*(a*b)=a*b=b$

In both cases,

$b*b=b$

Therefore, statement (B) is also true.

Hence, both (A) and (B) are true.

UGC NET Computer Science PYQ
Suppose a system has $12$ magnetic tape drives and at the time $t_0$, three processes are allotted tape drives out of their need as given below:
Process Maximum Needs Current Needs
$p_0$ $10$ $5$
$p_1$ $4$ $2$
$p_2$ $9$ $2$
At time $t_0$, the system is in a safe state. Which of the following is a safe sequence so that deadlock is avoided?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Total tape drives $=12$

Current allocated tape drives:

$5+2+2=9$

Available tape drives:

$12-9=3$

Now calculate remaining need:

For $p_0$:

$10-5=5$

For $p_1$:

$4-2=2$

For $p_2$:

$9-2=7$

Initially available tape drives are $3$.

Since $p_1$ needs only $2$ tape drives, so $p_1$ can execute first.

After completion of $p_1$, it releases $2$ tape drives.

Available tape drives become:

$3+2=5$

Now $p_0$ needs $5$ tape drives, so $p_0$ can execute.

After completion of $p_0$, it releases $5$ tape drives.

Available tape drives become:

$5+5=10$

Now $p_2$ needs $7$ tape drives, so $p_2$ can execute.

Hence, the safe sequence is:

&lt;$p_1$ , $p_0$ , $p_2$&gt;

Therefore, the correct answer is option (B).

UGC NET Computer Science PYQ
Match List-I with List-II:
List-I List-II
(a) $\overline{L_3}\cup L_4$ (i) Context-free language
(b) $\overline{L_2}\cup L_3$ (ii) Recursively enumerable language
(c) $L_1^*\cap L_2$ (iii) Recursive language
where $L_1$: Regular language $L_2$: Context-free language $L_3$: Recursive language $L_4$: Recursively enumerable language Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

For $(a)$:

$L_3$ is a recursive language.

Complement of a recursive language is also recursive.

So,

$\overline{L_3}$ is recursive.

Also, $L_4$ is recursively enumerable.

Union of a recursive language and a recursively enumerable language is recursively enumerable.

Therefore,

$\overline{L_3}\cup L_4$ is recursively enumerable.

So,

$(a)\rightarrow(ii)$

For $(b)$:

$L_2$ is context-free language.

Every context-free language is recursive.

So, complement of $L_2$ is also recursive.

Also, $L_3$ is recursive.

Union of two recursive languages is recursive.

Therefore,

$\overline{L_2}\cup L_3$ is recursive.

So,

$(b)\rightarrow(iii)$

For $(c)$:

$L_1$ is regular.

Regular languages are closed under Kleene star.

So,

$L_1^*$ is regular.

Intersection of a regular language and a context-free language is context-free.

Therefore,

$L_1^*\cap L_2$ is context-free.

So,

$(c)\rightarrow(i)$

Hence, correct matching is

$(a)-(ii);\ (b)-(iii);\ (c)-(i)$


UGC NET Computer Science PYQ
Arrange the following steps in a proper sequence for the process of training a neural network.

(A) Weight initialization
(B) Feed forward
(C) Back Propagation
(D) Loss Calculation
(E) Weight update

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical neural network training sequence:

Initialize weights

Perform feed forward

Compute loss

Backpropagate error

Update weights

Thus the order is:

(A) → (B) → (D) → (C) → (E)

UGC NET Computer Science PYQ
In Pumping Lemma for context-free languages, to say a language is satisfying pumping lemma, what is the minimum length of $vx$ together, if you consider the string as $uvwxy$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For context-free language pumping lemma,

$string = uvwxy$

Conditions are:

$|vwx|\le n$

$|vx|\ge 1$

Here, $v$ and $x$ cannot both be empty.

So, minimum length of $vx$ together is:

$1$

UGC NET Computer Science PYQ
For the graph; the following sequences of depth first search $(DFS)$ are given


(A) $abcghf$

(B) $abfchg$

(C) $abfhgc$

(D) $afghbc$

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Solution:

In DFS, we start from a vertex and keep going deeper through an unvisited adjacent vertex.

From the graph, important edges are:

$a-b,\ a-c,\ a-f,\ b-c,\ b-f,\ b-h,\ c-g,\ g-h,\ f-h,\ f-g$

Now check each DFS sequence.

Check (A): $abcghf$

Path followed:

$a\to b\to c\to g\to h\to f$

All these are valid edges:

$a-b,\ b-c,\ c-g,\ g-h,\ h-f$

So, sequence (A) can be a valid DFS order.

Check (B): $abfchg$

Path starts as:

$a\to b\to f$

After reaching $f$, there are still unvisited adjacent vertices such as $h$ and $g$.

DFS should go deeper from $f$ to one of its unvisited adjacent vertices.

But the next vertex in the sequence is $c$, and $f-c$ is not an edge.

So, sequence (B) cannot be a valid DFS order.

Check (C): $abfhgc$

Path followed:

$a\to b\to f\to h\to g\to c$

All these are valid edges:

$a-b,\ b-f,\ f-h,\ h-g,\ g-c$

So, sequence (C) can be a valid DFS order.

Check (D): $afghbc$

Path followed:

$a\to f\to g\to h\to b\to c$

All these are valid edges:

$a-f,\ f-g,\ g-h,\ h-b,\ b-c$

So, sequence (D) can be a valid DFS order.

Therefore, valid DFS sequences are:

(A), (C) and (D) only.

UGC NET Computer Science PYQ
Which of the following interprocess communication model is used to exchange messages among co-operative processes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Co-operating processes can communicate with each other using two main IPC models:

Shared memory model

Message passing model

In shared memory, processes communicate by sharing a common memory area.

In message passing, processes communicate by sending and receiving messages.

So, interprocess communication can be done using both shared memory and message passing model.


UGC NET Computer Science PYQ

How can the decision algorithm be constructed for deciding whether context-free language $L$ is finite?

$(a)$ By constructing redundant CFG $G$ in CNF generating language $L$

$(b)$ By constructing non-redundant CFG $G$ in CNF generating language $L$

$(c)$ By constructing non-redundant CFG $G$ in CNF generating language $L-{\Lambda}$, where $\Lambda$ stands for null

Which of the following is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

To decide whether a context-free language is finite or infinite, we can convert the CFG into a non-redundant CFG in CNF.

Usually, the CNF grammar is considered for $L-{\Lambda}$.

After converting into CNF, we check whether there is any recursive derivation or cycle among variables.

If such a recursive structure exists, then the language is infinite.

If no such recursive structure exists, then the language is finite.

So, the correct construction is given in statement $(c)$.


UGC NET Computer Science PYQ
Which of the following C++ statements correctly declares an abstract class ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

In C++, an abstract class must contain at least one pure virtual function.

Syntax of pure virtual function:

virtual return_type function() = 0;

Only option (1) correctly declares a pure virtual function.

UGC NET Computer Science PYQ
Which of the following is $\epsilon$-free grammar?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In standard grammar classification, Type-$1$ grammar is context-sensitive grammar.

Context-sensitive grammar is generally $\epsilon$-free because productions do not reduce the length of strings.

So, correct option should be:

$\boxed{(b)\ \text{Type-}1}$

UGC NET Computer Science PYQ
Let $\epsilon=0.0005$ and Let $R_e$ be the relation $\{(x,y)\in R^2:|x-y|<\epsilon\}$, $R_e$ could be interpreted as the relation approximately equal. $R_e$ is
(A) Reflexive
(B) Symmetric
(C) transitive
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution


Solution:

Given relation is:

$R_e=\{(x,y)\in R^2:|x-y|<\epsilon\}$

where,

$\epsilon=0.0005$

Now check each property.

Check reflexive:

A relation is reflexive if every element is related to itself.

For any real number $x$,

$|x-x|=0$

Since,

$0<\epsilon$

So,

$|x-x|<\epsilon$

Therefore, $(x,x)\in R_e$.

Hence, $R_e$ is reflexive.

So, statement (A) is true.

Check symmetric:

A relation is symmetric if $(x,y)\in R_e$ implies $(y,x)\in R_e$.

If,

$(x,y)\in R_e$

then,

$|x-y|<\epsilon$

But,

$|x-y|=|y-x|$

So,

$|y-x|<\epsilon$

Therefore, $(y,x)\in R_e$.

Hence, $R_e$ is symmetric.

So, statement (B) is true.

Check transitive:

A relation is transitive if $(x,y)\in R_e$ and $(y,z)\in R_e$ imply $(x,z)\in R_e$.

Let,

$x=0,\ y=0.0004,\ z=0.0008$

Now,

$|x-y|=|0-0.0004|=0.0004<0.0005$

So, $(x,y)\in R_e$.

Also,

$|y-z|=|0.0004-0.0008|=0.0004<0.0005$

So, $(y,z)\in R_e$.

But,

$|x-z|=|0-0.0008|=0.0008$

Since,

$0.0008>0.0005$

So, $(x,z)\notin R_e$.

Therefore, $R_e$ is not transitive.

So, statement (C) is false.

Hence, only (A) and (B) are true.


UGC NET Computer Science PYQ
Given a CPU time slice of $2$ ms and the following list of processes.
Process Burst time $($ms$)$ Arrival time
$P1$ $3$ $0$
$P2$ $4$ $2$
$P3$ $5$ $5$
Find average turnaround time and average waiting time using round-robin CPU scheduling.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Time quantum $=2$ ms

Gantt chart:

$P1(0-2),\ P2(2-4),\ P1(4-5),\ P2(5-7),\ P3(7-9),\ P3(9-11),\ P3(11-12)$

Completion time:

$CT(P1)=5$

$CT(P2)=7$

$CT(P3)=12$

Turnaround time:

$TAT=CT-AT$

For $P1$:

$TAT=5-0=5$

For $P2$:

$TAT=7-2=5$

For $P3$:

$TAT=12-5=7$

Average turnaround time:

$\dfrac{5+5+7}{3}=\dfrac{17}{3}=5.66$

Waiting time:

$WT=TAT-BT$

For $P1$:

$WT=5-3=2$

For $P2$:

$WT=5-4=1$

For $P3$:

$WT=7-5=2$

Average waiting time:

$\dfrac{2+1+2}{3}=\dfrac{5}{3}=1.66$


UGC NET Computer Science PYQ

Consider the following grammar:

$S\to XY$

$X\to YaY\mid a$

$Y\to bbX$

Which of the following statements is/are true about the above grammar?

$(a)$ Strings produced by the grammar can have consecutive three $a$'s.

$(b)$ Every string produced by the grammar has alternate $a$ and $b$.

$(c)$ Every string produced by the grammar has at least two $a$'s.

$(d)$ Every string produced by the grammar has $b$'s in multiple of $2$.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given grammar is

$S\to XY$

$X\to YaY\mid a$

$Y\to bbX$

Since $S\to XY$, the string contains one part from $X$ and one part from $Y$.

Now, $X$ can generate at least one $a$.

Also, $Y\to bbX$, so $Y$ also contains one $X$, which again gives at least one $a$.

Therefore, every string generated by $S$ has at least two $a$'s.

So, statement $(c)$ is true.

Also, every use of $Y$ contributes $bb$, that is $2$ occurrences of $b$.

So, the number of $b$'s is always in multiple of $2$.

Therefore, statement $(d)$ is true.

The grammar contains $bb$, so alternate $a$ and $b$ condition is false.

Also, consecutive three $a$'s are not necessarily produced.


UGC NET Computer Science PYQ
Match List-I with List-II.
 List-I
(computing systems)

List-II
(working/output) 

 (A) Half Adder
 (I) Has $n$ input and $2^n$ output
 (B) Decoder
 (II) CPU Storage unit
 (C) Register
 (III) Used to store program at runtime
 (D) Main memory

 (IV) 2-bit addition circuit

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Half Adder → performs addition of two bits → 2-bit addition circuit → (IV)

Decoder → has $n$ inputs and $2^n$ outputs → (I)

Register → CPU internal storage → (II)

Main memory → stores program during execution → (III)

Thus

(A) → (IV)
(B) → (I)
(C) → (II)
(D) → (III)

UGC NET Computer Science PYQ
While processing a string by an LR parser, the reading of the given string by the parser is-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

LR parser means:

$L =$ Left to right scanning

$R =$ Rightmost derivation in reverse

So, the parser reads the input string from left to right.

So, correct option is:

$\boxed{(b)\ \text{From left to right}}$

UGC NET Computer Science PYQ
Match List I with List II:
List-IList-II
A. BCNFI. It removes multivalued dependency.
B. 3NFII. It is not always dependency preserving.
C. 2NFIII. It removes transitive transparency.
D. 4NFIV. It removes partial functional dependency.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We need to match each normal form with its correct property.

BCNF:

BCNF is stronger than 3NF.

A decomposition into BCNF is not always dependency preserving.

So,

$(A)-(II)$

3NF:

3NF removes transitive dependency.

In the question, it is written as transitive transparency, but the correct database term is transitive dependency.

So,

$(B)-(III)$

2NF:

2NF removes partial functional dependency.

A relation is in 2NF when it is in 1NF and no non-prime attribute is partially dependent on any candidate key.

So,

$(C)-(IV)$

4NF:

4NF removes multivalued dependency.

It is used when a relation has non-trivial multivalued dependencies.

So,

$(D)-(I)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$


UGC NET Computer Science PYQ
Which of the following methods are used to pass any number of parameters to the operating system through system calls?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Parameters can be passed to the operating system through system calls using different methods.

Registers can be used, but registers are limited in number.

For passing any number of parameters, better methods are:

Block or table in main memory

Stack

So, any number of parameters can be passed using block in main memory and stack.


UGC NET Computer Science PYQ

Which of the following problems is/are decidable problem(s) on Turing machine $M$?

$(a)$ $G$ is a CFG with $L(G)=\phi$

$(b)$ There exist two TMs $M_1$ and $M_2$ such that $L(M)\subseteq L(M_1)\cup L(M_2)$

$(c)$ $M$ is a TM that accepts $\omega$ using at most $2^{|\omega|}$ cells of tape






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Statement $(a)$ is decidable because emptiness of a context-free grammar is decidable.

Statement $(b)$ is also decidable in this form, because recursively enumerable languages are closed under union, and the condition can be satisfied by suitable Turing machines.

Statement $(c)$ is decidable because the tape usage is bounded by $2^{|\omega|}$. With bounded tape, the number of configurations becomes finite, so we can decide whether $M$ accepts $\omega$ within this bound.

Therefore, all three statements are decidable.


UGC NET Computer Science PYQ

Arrange the following steps in the correct order to solve the Knapsack problem using Dynamic Programming.

(A) Define the base case when the capacity is zero $(0)$ or no items are left to consider
(B) Compute the maximum value that can be obtained using items up to the $i$-th item and a knapsack capacity of $0$
(C) Identify subproblems and their dependencies based on items weights and values
(D) Initialize a table to store results of subproblems
(E) Iterate through each item and each possible capacity to fill the table

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical DP knapsack steps:

Identify subproblems → (C)

Initialize DP table → (D)

Define base cases → (A)

Fill table by iterating items and capacity → (E)

Compute optimal values → (B)

Order:

(C) → (D) → (A) → (E) → (B)

UGC NET Computer Science PYQ
What is the minimum and maximum number of initial, dead, unreachable and final states in a valid $n$ state finite automaton, where the language accepted is not $\varphi$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In a finite automaton:

Number of initial states is always $1$.

Minimum dead states can be $0$.

Minimum unreachable states can be $0$.

Since language accepted is not $\varphi$, at least one final state must be present.

So, minimum values are:

$1,0,0,1$

Maximum initial states $=1$

Maximum dead states $=n-1$

Maximum unreachable states $=n-1$

Maximum final states $=n$

So, correct option is:

$\boxed{(d)\ \text{Minimum: }1,0,0,1;\ \text{Maximum: }1,(n-1),(n-1),n}$

UGC NET Computer Science PYQ
Match List I with List II:
List-IList-II
A. BCNFI. It removes multivalued dependency.
B. 3NFII. It is not always dependency preserving.
C. 2NFIII. It removes transitive transparency.
D. 4NFIV. It removes partial functional dependency.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each normal form with the dependency that it removes or the property related to it.

First, consider $BCNF$.

$BCNF$ means Boyce-Codd Normal Form.

It is stronger than $3NF$.

A relation decomposed into $BCNF$ gives lossless decomposition, but it is not always dependency preserving.

So,

$A-(II)$

Now, consider $3NF$.

$3NF$ means Third Normal Form.

It removes transitive dependency.

In the question, it is written as transitive transparency, but the correct database term is transitive dependency.

So,

$B-(III)$

Now, consider $2NF$.

$2NF$ means Second Normal Form.

It removes partial functional dependency.

A relation is in $2NF$ when it is in $1NF$ and no non-prime attribute is partially dependent on a candidate key.

So,

$C-(IV)$

Now, consider $4NF$.

$4NF$ means Fourth Normal Form.

It removes multivalued dependency.

So,

$D-(I)$

Therefore, the correct matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ
Java Virtual Machine $($JVM$)$ is used to execute architectural neutral byte code. Which of the following is needed by the JVM for execution of Java Code?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

JVM executes Java bytecode.

For execution, JVM mainly needs:

Class loader to load the class files

Java Interpreter to interpret and execute bytecode

So, JVM needs class loader and Java interpreter.


UGC NET Computer Science PYQ

for a statement, a language $L\subseteq \Sigma^*$ is recursive if there exists some Turing machine $M$.

Which of the following conditions is satisfied for any string $\omega$?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A recursive language is decided by a Turing machine that halts on every input.

If $\omega\in L$, then the machine halts and accepts $\omega$.

If $\omega\notin L$, then the machine halts and rejects $\omega$.

Rejecting means it halts without reaching an acceptable state.

Therefore, the correct condition is:

If $\omega\notin L$, then $M$ halts without reaching an acceptable state.


UGC NET Computer Science PYQ

Match List - I with List - II.


 List - I

 List - II

 (A) The activation function
 (I) is called the delta rule.
 (B) The learning method of perceptron
 (II) is one of the key components of the perceptron as in the most common neural network architecture.
 (C) Areas of application of artificial neural network include
 (III) is always boolean like a switch.
 (D) The output of the perceptron

 (IV) system identification and control.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Activation function → key component of neural network → (II)

Learning rule of perceptron → called delta rule → (I)

Applications of ANN → system identification and control → (IV)

Output of perceptron → boolean (0 or 1) like a switch → (III)

Thus

(A) → (II)
(B) → (I)
(C) → (IV)
(D) → (III)

UGC NET Computer Science PYQ
Which protocol is used to acquire the MAC Address of a host whose IP address is known?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

ARP is used to find the MAC address when the IP address is known.

ARP stands for Address Resolution Protocol.

So, correct option is:

$\boxed{(b)\ \text{Address Resolution Protocol}}$

UGC NET Computer Science PYQ
Match List I with List II:
List-IList-II
A. LocalizationI. Encapsulation
B. Packaging or binding of a collection of items.II. Abstraction
C. Mechanism that enables a designer to focus on essential details of a program component.III. Characteristic of software that indicates in a manner which information is concentrated in the program.
D. Information hiding.IV. Suppressing the operational details of a program component.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each concept with its correct meaning.

First, consider Localization.

Localization means related information or functionality is concentrated in one place or module.

So, it matches with:

III. Characteristic of software that indicates in a manner which information is concentrated in the program.

Therefore,

$(A)-(III)$

Now, consider Packaging or binding of a collection of items.

This is the definition of Encapsulation.

Encapsulation means wrapping data and related operations together in one unit.

Therefore,

$(B)-(I)$

Now, consider the mechanism that enables a designer to focus on essential details of a program component.

This is the definition of Abstraction.

Abstraction hides unnecessary details and shows only essential features.

Therefore,

$(C)-(II)$

Now, consider Information hiding.

Information hiding means hiding or suppressing internal operational details of a program component.

Therefore,

$(D)-(IV)$

Final matching is:

$(A)-(III), (B)-(I), (C)-(II), (D)-(IV)$

UGC NET Computer Science PYQ

In a system for a restaurant, the main scenario for placing an order is given below:

(a) Customer reads menu
(b) Customer places order
(c) Order is sent to the kitchen for preparation
(d) Ordered items are served
(e) Customer requests for a bill for the order
(f) Bill is prepared for this order
(g) Customer is given the bill
(h) Customer pays the bill

A sequence diagram for the scenario will have at least how many objects among whom the messages will be exchanged.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In this restaurant ordering system, the minimum important objects are:

Customer

Menu

Order

Kitchen

Bill

Messages are exchanged among these objects during order placement, food preparation, serving, bill generation and payment.

So, at least $5$ objects are required in the sequence diagram.


UGC NET Computer Science PYQ
A fully connected network topology is a topology in which there is a direct link between all pairs of nodes. Given a fully connected network with $n$ nodes, the number of direct links as a function of $n$ can be expressed as:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In a fully connected network, every pair of nodes has a direct link.

So, the number of direct links is equal to the number of ways of choosing $2$ nodes from $n$ nodes.

Therefore,

${}^{n}C_2=\dfrac{n(n-1)}{2}$


UGC NET Computer Science PYQ
In a token ring network the transmission speed is $10^7$ bps and the propagation speed is $200 , m/\mu s$.
The 1-bit delay in this network is equivalent to ______.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Transmission speed

$10^7$ bits/sec

Time for 1 bit

$\frac{1}{10^7}$ sec

Convert to microseconds

$\frac{1}{10^7} \times 10^6 = 0.1 , \mu s$

Propagation speed

$200 , m/\mu s$

Distance traveled in $0.1 , \mu s$

$200 \times 0.1 = 20 , m$

UGC NET Computer Science PYQ
In CRC coding if the data word is $111111$, divisor is $1010$ and the remainder is $110$. Which of the following code is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In CRC, the codeword is formed as:

$Codeword = Dataword + Remainder$

Given,

$Dataword = 111111$

$Remainder = 110$

So,

$Codeword = 111111110$

UGC NET Computer Science PYQ
Match List I with List II:
List IList II
(A) Type 0(I) Finite Automata
(B) Type 1(II) Turing Machine
(C) Type 2(III) Linear bound Automata
(D) Type 3(IV) Pushdown Automata
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

This question is based on Chomsky hierarchy.

In Chomsky hierarchy:

Type $0$ grammar is unrestricted grammar.

It is accepted by Turing Machine.

So,

$(A)-(II)$

Type $1$ grammar is context sensitive grammar.

It is accepted by Linear Bounded Automata.

So,

$(B)-(III)$

Type $2$ grammar is context free grammar.

It is accepted by Pushdown Automata.

So,

$(C)-(IV)$

Type $3$ grammar is regular grammar.

It is accepted by Finite Automata.

So,

$(D)-(I)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ
An $...............$ chart is a project schedule representation that presents project plan as a directed graph. The critical path is $...............$ the sequence of $...............$ tasks and it defines project $...............$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

An activity chart represents a project schedule as a directed graph.

In project scheduling, the critical path is the longest path in the project network.

It contains dependent tasks because one task depends on the completion of another task.

The critical path defines the total project duration.

So, the correct sequence is:

$Activity,\ Longest,\ Dependent,\ Duration$


UGC NET Computer Science PYQ
What is the name of the protocol that allows a client to send a broadcast message with its MAC address and receive an IP address in reply?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

RARP stands for Reverse Address Resolution Protocol.

It is used when a client knows its MAC address but wants to find its IP address.

The client sends a broadcast request with its MAC address and receives the corresponding IP address in reply.


UGC NET Computer Science PYQ

Consider the following statements regarding combinational and sequential circuits.

(A) Output of combinational circuits depends on the only current input.
(B) Output of combinational circuit depends on the both current input and previous output.
(C) Output of sequential circuit depends on the current input.
(D) Output of sequential circuit depends on both current input and previous output.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Combinational circuit → output depends only on current input → (A) True
Sequential circuit → output depends current input + previous state → (D) True

(B) False
(C) Incomplete / incorrect

UGC NET Computer Science PYQ
In Go-back-N protocol, the values of $S_f$ (Send window, the first outstanding packet) $=3$, $S_n$ (Send window, the next packet to be send) $=7$, after receiving the packet with AckNo. $6$, the value of $S_n$ is ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In Go-back-N protocol,

$S_f$ = first outstanding packet

$S_n$ = next packet to be sent

Given,

$S_f=3$

$S_n=7$

AckNo. $6$ means packets before $6$ are acknowledged.

So, $S_f$ becomes $6$.

But $S_n$ remains unchanged because next packet to be sent is still $7$.

Therefore,

$S_n=7$

So, correct option is:

$\boxed{(b)\ 7}$

UGC NET Computer Science PYQ
Match List I with List II:
List-IList-II
(A) Ontological Engineering(I) Organizing subclass relations
(B) Taxonomy Hierarchy(II) Organizing knowledge into categories and sub-categories
(C) Inheritance(III) Attaches a number with each possibility
(D) Probability Modes(IV) Representing concepts, events, time, and physical concepts of different domains
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each AI concept with its correct meaning.

Ontological Engineering is used for representing knowledge of a domain.

It represents concepts, events, time and physical concepts of different domains.

So,

$(A)-(IV)$

Taxonomy Hierarchy organizes knowledge into categories and sub-categories.

It arranges concepts in a hierarchical structure.

So,

$(B)-(II)$

Inheritance is related to subclass relations.

In inheritance, lower-level classes can inherit properties from higher-level classes.

So,

$(C)-(I)$

Probability Modes are used to attach a number or probability value with each possibility.

So,

$(D)-(III)$

Final matching is:

$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$

UGC NET Computer Science PYQ
Let $a^{2c}\bmod n=(a^c)^2\bmod n$ and $a^{2c+1}\bmod n=a\cdot(a^c)^2\bmod n$. For $a=7,\ b=17$ and $n=561$, what is the value of $a^b\bmod n$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

We have to find:

$7^{17}\bmod 561$

Now,

$7^2=49$

$7^4=49^2=2401$

$2401\bmod 561=157$

So,

$7^4\bmod 561=157$

Now,

$7^8\bmod 561=157^2\bmod 561$

$157^2=24649$

$24649\bmod 561=526$

So,

$7^8\bmod 561=526$

Now,

$7^{16}\bmod 561=526^2\bmod 561$

$526^2=276676$

$276676\bmod 561=103$

So,

$7^{16}\bmod 561=103$

Now,

$7^{17}\bmod 561=7^{16}\times 7\bmod 561$

$=103\times 7\bmod 561$

$=721\bmod 561$

$=160$


UGC NET Computer Science PYQ
You are designing a link layer protocol for a link with a bandwidth of $1$ Gbps over a fiber link with a length of $800$ km. Assume the speed of light in this medium is $200000$ km/second. What is the propagation delay in this link?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Propagation delay is given by

$\text{Propagation delay}=\dfrac{\text{Distance}}{\text{Propagation speed}}$

Here,

Distance $=800$ km

Speed $=200000$ km/second

So,

$\text{Propagation delay}=\dfrac{800}{200000}$

$=0.004$ seconds

$=4$ milliseconds


UGC NET Computer Science PYQ
Consider the following C program :
#include<stdio.h>
int main()
{
    int x[]={2,4,6,8,10};
    int a, b=0, *y = x + 4;

    for(a=0; a<5; a++)
    {
        b = b + (*y - a) - *(y - a);
    }

    printf("%d\n", b);
    return 0;
}
What will be the output of the above C program ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Pointer

$y = x + 4$

So

$*y = 10$

Loop runs $a=0$ to $4$

Expression:

$b = b + (*y - a) - *(y-a)$

Compute:

$a=0$ → $(10-0) - 10 = 0$
$a=1$ → $(10-1) - 8 = 1$
$a=2$ → $(10-2) - 6 = 2$
$a=3$ → $(10-3) - 4 = 3$
$a=4$ → $(10-4) - 2 = 4$

Sum

$b = 0+1+2+3+4 = 10$

UGC NET Computer Science PYQ
What is the minimum Hamming Distance in a block code if we want to be able to detect up to $(S)$ errors?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

To detect up to $S$ errors, minimum Hamming distance should be:

$d_{min}=S+1$

So, correct option is:

$\boxed{(b)\ S+1}$

UGC NET Computer Science PYQ
Match List I with List II:
List I List II
(A) Least frequently used (I) Memory is distributed among processors
(B) Critical Section (II) Page replacement policy in cache memory
(C) Loosely coupled multiprocessor system (III) Program section that once begun must complete execution before another processor accesses the same shared resource
(D) Distributed operating system (IV) O/S routines are distributed among available processors
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each term with its correct meaning.

First, consider Least frequently used.

Least frequently used is a replacement policy.

It replaces the page or cache block which is used least number of times.

So,

$(A)-(II)$

Now, consider Critical Section.

Critical section is a part of a program where shared resources are accessed.

Once one process enters the critical section, another process should not access the same shared resource at the same time.

So,

$(B)-(III)$

Now, consider Loosely coupled multiprocessor system.

In a loosely coupled multiprocessor system, each processor generally has its own local memory.

So, memory is distributed among processors.

Therefore,

$(C)-(I)$

Now, consider Distributed operating system.

In a distributed operating system, operating system routines and services are distributed among available processors.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ
A clique in an undirected graph $G=\langle V,E\rangle$ is a subset $V'\subseteq V$ of vertices, such that





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

A clique in an undirected graph is a subset of vertices in which every pair of distinct vertices is connected by an edge.

That means if we take any two vertices from $V'$, there must be an edge between them.

So, a clique forms a complete subgraph.


UGC NET Computer Science PYQ
You need $500$ subnets, each with about $100$ usable host addresses per subnet. What network mask will you assign using a class B network address?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Class B default mask is

$255.255.0.0$

or

$/16$

We need at least $500$ subnets.

$2^8=256<500$

$2^9=512\ge 500$

So, we need to borrow $9$ bits for subnetting.

New prefix length is

$16+9=25$

So, subnet mask is

$/25=255.255.255.128$

Host bits left:

$32-25=7$

Usable hosts per subnet:

$2^7-2=126$

This satisfies about $100$ usable hosts.


UGC NET Computer Science PYQ
Translate $\forall x \exists y (x < y)$ in English. Consider domain as a real number for both the variables.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Expression

$\forall x \exists y (x<y)$

Meaning

"For every $x$, there exists some $y$ such that $x<y$"

UGC NET Computer Science PYQ
Which search technique is complete and optimal, when $h(n)$ is consistent?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

When heuristic function $h(n)$ is consistent, $A^*$ search is complete and optimal.

So, correct option is:

$\boxed{(c)\ A^*\ \text{Search}}$

UGC NET Computer Science PYQ
Match List I with List II:
List IList II
(A) Firmware(I) Number of logical records into physical blocks
(B) Batch file(II) ASCII format
(C) Packing(III) Resource allocation
(D) Banker’s Algorithm(IV) ROM
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each term with its correct meaning.

Firmware is a low-level program stored permanently in ROM.

So,

$(A)-(IV)$

A batch file contains a sequence of commands.

Batch files are usually stored as text files in ASCII format.

So,

$(B)-(II)$

Packing means placing a number of logical records into physical blocks.

So,

$(C)-(I)$

Banker’s Algorithm is used for safe resource allocation and deadlock avoidance.

So,

$(D)-(III)$

Final matching is:

$(A)-(IV), (B)-(II), (C)-(I), (D)-(III)$

UGC NET Computer Science PYQ

What is the worst case running time of Insert and Extract-min, in an implementation of a priority queue using an unsorted array? Assume that all insertions can be accommodated.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In an unsorted array implementation of priority queue:

For Insert operation, we can insert the new element directly at the end of the array.

So, worst case time for Insert is:

$\theta(1)$

For Extract-min operation, the array is unsorted, so we must search the entire array to find the minimum element.

So, worst case time for Extract-min is:

$\theta(n)$


UGC NET Computer Science PYQ

Consider the following two statements with respect to IPv4 in computer networking:

$P$: The loopback IP address is a member of the class B network.

$Q$: The loopback IP address is used to send a packet from the host to itself.

What can you say about the statements $P$ and $Q$?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Loopback addresses belong to the $127.0.0.0/8$ range.

This range belongs to class A, not class B.

So, statement $P$ is false.

Loopback address is used by a host to send packets to itself for testing and internal communication.

So, statement $Q$ is true.


UGC NET Computer Science PYQ
For all real numbers $x$, there exists a real number $y$ such that $x$ is less than $y$.
(A) $L_1 = { w \in {0,1}^* \mid \text{length of } w \text{ is even} }$
(B) $L_2 = { w \in {0,1}^* \mid \text{length of } w \text{ is odd} }$
(C) $L_3 = { w \in {0,1}^* \mid \text{all 0s come before all 1s in } w }$
(D) $L_4 = { w \in {0,1}^* \mid w \text{ contains equal number of 0s and 1s} }$
(E) $L_5 = { w \in {0,1}^* \mid \text{all 1s come before all 0s in } w }$

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Important fact:

NFA and DFA recognize exactly the same class of languages → Regular Languages

So no language exists that can be recognized by NFA but not DFA.

But option (D)
equal number of 0s and 1s → not regular

Option (E)
all 1s before 0s → regular

Hence only (D) is non-regular.

Closest option given:

(4) (D) and (E) Only

UGC NET Computer Science PYQ
What is the process of capturing inference process as a single inference rule?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Generalized modus ponens captures the inference process as a single inference rule.

UGC NET Computer Science PYQ
Match List I with List II:
List IList II
(A) DES(I) Key size - 256
(B) AES(II) Key size - 1024
(C) 3 DES(III) Key size - 56
(D) RSA(IV) Key size - 168
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

DES stands for Data Encryption Standard.

DES uses a $56$ bit key.

So,

$(A)-(III)$

AES stands for Advanced Encryption Standard.

AES supports different key sizes like $128$, $192$ and $256$ bits. In the given options, AES is matched with key size $256$.

So,

$(B)-(I)$

3 DES means Triple DES.

It applies DES three times, so its effective key size is commonly taken as $168$ bits.

So,

$(C)-(IV)$

RSA is a public key cryptographic algorithm.

In the given options, RSA is matched with key size $1024$.

So,

$(D)-(II)$

Final matching is:

$(A)-(III), (B)-(I), (C)-(IV), (D)-(II)$

UGC NET Computer Science PYQ
In a B-Tree, each node represents a disk block. Suppose one block holds $8192$ bytes. Each key uses $32$ bytes. In a B-tree of order $M$ there are $M-1$ keys. Since each branch is on another disk block, we assume a branch is of $4$ bytes. The total memory requirement for a non-leaf node is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In a B-tree of order $M$:

Number of keys $=M-1$

Memory used by keys:

$(M-1)\times 32=32M-32$

Number of branches in non-leaf node $=M$

Memory used by branches:

$M\times 4=4M$

Total memory requirement:

$(32M-32)+4M$

$=36M-32$


UGC NET Computer Science PYQ

In the TCP/IP model, encryption and decryption are functions of the _____ layer.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In the OSI model, encryption and decryption are generally associated with the presentation layer.

But in the TCP/IP model, there is no separate presentation layer.

Its functions are included in the application layer.

Therefore, encryption and decryption are functions of the application layer in TCP/IP model.


UGC NET Computer Science PYQ

Consider the Grammar :

$T \rightarrow Qx$
$Q \rightarrow RS$
$R \rightarrow y \mid \varepsilon$
$S \rightarrow z \mid \varepsilon$

Here $x, y, z$ are terminals and $T, Q, R, S$ are non terminals.
What will be the follow set of the non terminal $R$ ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

From production

$Q \rightarrow RS$

FOLLOW of $R$ includes FIRST of $S$ except $\varepsilon$

FIRST($S$) = ${z, \varepsilon}$

So add $z$

Since $S \rightarrow \varepsilon$, also include FOLLOW($Q$)

From

$T \rightarrow Qx$

FOLLOW($Q$) = ${x}$

Thus

FOLLOW($R$) = ${z, x}$

UGC NET Computer Science PYQ
Fuzzy logic is a form of ____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Fuzzy logic allows truth values between $0$ and $1$.

So, it is a form of many valued logic.

So, correct option is:

$\boxed{(d)\ \text{Many valued logic}}$

UGC NET Computer Science PYQ
Match List I with List II:
List IList II
(A) BIND(I) Block the caller until a connection attempt arrives
(B) LISTEN(II) Give a local address to a socket
(C) ACCEPT(III) Show willingness to accept connections
(D) SOCKET(IV) Create a new point
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

This question is based on socket system calls.

BIND is used to assign a local address to a socket.

So,

$(A)-(II)$

LISTEN is used by the server to show that it is ready to accept incoming connection requests.

So,

$(B)-(III)$

ACCEPT is used to accept a connection request.

If no connection request is available, it blocks the caller until a connection attempt arrives.

So,

$(C)-(I)$

SOCKET is used to create a new communication endpoint.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ

Give asymptotic upper and lower bound for $T(n)$ given below. Assume $T(n)$ is constant for $n\le 2$.

$T(n)=4T(\sqrt n)+\lg^2 n$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Let,

$m=\lg n$

So,

$n=2^m$

Also,

$\sqrt n=2^{m/2}$

Now define:

$S(m)=T(2^m)$

Then recurrence becomes:

$S(m)=4S(m/2)+m^2$

Using Master Theorem:

$a=4,\ b=2$

$m^{\log_b a}=m^{\log_2 4}=m^2$

Here,

$f(m)=m^2$

So,

$S(m)=\theta(m^2\lg m)$

Now put $m=\lg n$:

$T(n)=\theta((\lg n)^2\lg(\lg n))$

So,

$T(n)=\theta(\lg^2 n\lg\lg n)$


UGC NET Computer Science PYQ

Which of the following statements is/are true with regard to various layers in the Internet stack?

$P$: At the link layer, a packet of transmitted information is called a frame.

$Q$: At the network layer, a packet of transmitted information is called a segment.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

At the link layer, the data unit is called a frame.

So, statement $P$ is true.

At the network layer, the data unit is generally called a packet or datagram.

A segment is used at the transport layer.

So, statement $Q$ is false.


UGC NET Computer Science PYQ

Two computers A and B are configured as follows :


A has IP address 203.197.2.53 and subnet mask 255.255.128.0


B has IP address 203.197.5.201 and subnet mask 255.255.192.0


What one of the following statement is true ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Subnet mask A

$255.255.128.0$

Network range:

$203.197.0.0$ → $203.197.127.255$

B address $203.197.5.201$ lies in this range
So A thinks B is in same network

Subnet mask B

$255.255.192.0$

Network blocks:

$203.197.0.0$ → $203.197.63.255$

A address $203.197.2.53$ lies in this range
So B also thinks A is same network

Thus both assume same network.



UGC NET Computer Science PYQ
The $4$ Ws problem canvas helps in identifying the key elements related to the problem. $4$ Ws problem canvas is a part of ____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The $4$ Ws problem canvas is used in the problem scoping stage.

It helps identify key problem elements like who, what, where and why.

UGC NET Computer Science PYQ
Match List I with List II:
List IList II
(A) Physical layer(I) Routing of the signals, divide the outgoing message into packets, act as network controller for routing data
(B) Data link layer(II) Make and break connections, define voltages and data rates, convert data bits into electrical signal
(C) Network layer(III) Synchronization, error detection, and correction, assemble outgoing message into frames
(D) Presentation layer(IV) It works as a translating layer
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

We have to match each OSI layer with its correct function.

First, consider Physical layer.

Physical layer deals with transmission of raw bits over a physical medium.

It defines voltages, data rates, connectors and converts data bits into electrical signals.

So,

$(A)-(II)$

Now, consider Data link layer.

Data link layer converts packets into frames.

It also handles synchronization, error detection and error correction.

So,

$(B)-(III)$

Now, consider Network layer.

Network layer is responsible for routing.

It divides outgoing messages into packets and controls routing of data from source to destination.

So,

$(C)-(I)$

Now, consider Presentation layer.

Presentation layer works as a translating layer.

It handles data translation, encryption, decryption and compression.

So,

$(D)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(IV)$

UGC NET Computer Science PYQ
Consider a weighted directed graph. The current shortest distance from source $S$ to node $x$ is represented by $d[x]$. Let $d[v]=29,\ d[u]=15,\ w[u,v]=12$. What is the updated value of $d[v]$ based on current information?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In shortest path relaxation:

$d[v]=\min(d[v],d[u]+w[u,v])$

Given:

$d[v]=29$

$d[u]=15$

$w[u,v]=12$

So,

$d[u]+w[u,v]=15+12=27$

Now,

$d[v]=\min(29,27)$

$d[v]=27$


UGC NET Computer Science PYQ
What percentage of the IPv4 address space do all class C addresses consume?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Class C addresses start with bits $110$.

So, first $3$ bits are fixed.

Remaining bits are

$32-3=29$

Total class C addresses are

$2^{29}$

Total IPv4 addresses are

$2^{32}$

So, fraction of class C address space is

$\dfrac{2^{29}}{2^{32}}=\dfrac{1}{8}$

Now,

$\dfrac{1}{8}\times 100=12.5%$


UGC NET Computer Science PYQ
Match List - I with List - II.
 List - I (IP Address)

List - II (Class)

 
 (A) 10.20.30.40
 (I) Class E
 (B) 210.20.30.3
 (II) Class B
 (C) 180.30.100.10
 (III) Class A
 (D) 252.5.15.11

 (IV) Class C

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

IP class ranges

Class A → $1-126$
Class B → $128-191$
Class C → $192-223$
Class D → $224-239$
Class E → $240-255$

Check first octet:

A: $10$ → Class A → (III)
B: $210$ → Class C → (IV)
C: $180$ → Class B → (II)
D: $252$ → Class E → (I)

Thus

(A)-(III), (B)-(IV), (C)-(II), (D)-(I)


UGC NET Computer Science PYQ
Consider the following statements:

A. A group can have zero elements.

B. A group cannot have any element which is idempotent except the identity element.

C. An isomorphism from a group $\langle G,\rangle$ to $\langle G,\rangle$ is called an automorphism.

D. If every element in a group is its own inverse, then the group must be abelian.

Choose the correct answer about the four statements given above.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is false.

A group cannot have zero elements because every group must contain an identity element.

Statement B is true.

If $a$ is idempotent, then

$a*a=a$

Multiplying by $a^{-1}$,

$a=e$

So, only identity element is idempotent.

Statement C is true.

An isomorphism from a group to itself is called an automorphism.

Statement D is true.

If every element is its own inverse, then

$a^{-1}=a$ and $b^{-1}=b$

Now,

$(ab)^{-1}=b^{-1}a^{-1}=ba$

But every element is its own inverse, so

$(ab)^{-1}=ab$

Therefore,

$ab=ba$

Hence, the group is abelian.

So, correct option is:

$\boxed{(a)\ \text{B, C and D are correct}}$

UGC NET Computer Science PYQ
Consider the following algorithms and their running times:
List IList II
(A) Breadth First Search(I) $\theta(V+E)$
(B) Rabin-Karp Algorithm(II) $O(V+E)$
(C) Depth-First Search(III) $\theta((n-m+1)m)$
(D) Heap sort (worst case)(IV) $O(n^2)$
(E) Quick sort (worst case)(V) $O(n\log n)$
Which one of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Breadth First Search visits every vertex and every edge of a graph.

So, its time complexity is:

$O(V+E)$

Therefore,

$(A)-(II)$

Rabin-Karp Algorithm compares the pattern of length $m$ with possible positions in the text.

In the worst case, it may take:

$\theta((n-m+1)m)$

Therefore,

$(B)-(III)$

Depth-First Search also visits every vertex and every edge.

So, its running time is:

$\theta(V+E)$

Therefore,

$(C)-(I)$

Heap sort has worst case time complexity:

$O(n\log n)$

Therefore,

$(D)-(V)$

Quick sort has worst case time complexity:

$O(n^2)$

This happens when partitioning is highly unbalanced.

Therefore,

$(E)-(IV)$

Final matching is:

$(A)-(II), (B)-(III), (C)-(I), (D)-(V), (E)-(IV)$

UGC NET Computer Science PYQ
When using Dijkstra's algorithm to find shortest path in a graph, which of the following statement is not true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Dijkstra's algorithm finds the shortest path based on minimum total weight.

It does not necessarily choose the path with the least number of vertices.

A path with more vertices can have smaller total weight than a path with fewer vertices.

Dijkstra's algorithm also requires all edge weights to be non-negative.

So, the statement “Shortest path always passes through least number of vertices” is not true.


UGC NET Computer Science PYQ
The ability to inject packets into the Internet with a false source address is known as:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

IP spoofing means creating IP packets with a false or forged source IP address.

It is used to hide the real sender or impersonate another system.

Therefore, injecting packets with a false source address is called IP spoofing.


UGC NET Computer Science PYQ
What will be the output of the following C code?
#include<stdio.h>
void main()
{
    int arr[5] = {10, 20, 30, 40, 50};
    int *p = (int*) (&arr + 1);
    printf("%d%d", *(arr + 1), *(p - 1));
}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution


UGC NET Computer Science PYQ

 Consider the following statements:

A. The number of labelled binary trees possible with $n$ nodes is $\frac{(2n)!}{(n+1)!}$

B. The number of binary search trees possible with $n$ nodes is $\frac{(2n)!}{(n+1)!n!}$

C. The number of unlabeled binary trees possible with $n$ nodes is $\frac{C(2n,n)}{(n+1)!}$

D. The number of simple, undirected and labelled graphs possible with $n$ vertices is $2^{\frac{n(n-1)}{2}}$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

A is correct.

Number of labelled binary trees with $n$ nodes:

$=C_n\times n!$

$=\frac{(2n)!}{(n+1)!n!}\times n!$

$=\frac{(2n)!}{(n+1)!}$

B is correct.

Number of binary search trees with $n$ nodes:

$=C_n=\frac{(2n)!}{(n+1)!n!}$

C is incorrect.

Correct formula for unlabeled binary trees is:

$C_n=\frac{1}{n+1}C(2n,n)$

D is correct.

Number of simple undirected labelled graphs:

$=2^{\frac{n(n-1)}{2}}$

So, correct option is:

$\boxed{(b)\ \text{A, B and D are only correct}}$

UGC NET Computer Science PYQ
Consider the following:
List IList II
(A) Stack algorithm(I) Deadlock
(B) Elevator algorithm(II) Disk scheduling
(C) Priority scheduling algorithm(III) Page replacement
(D) Havender's algorithm(IV) CPU scheduling
Which of the following is the correct matching?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Stack algorithm is related to page replacement.

In page replacement, stack algorithms have the property that the set of pages in memory with fewer frames is always a subset of the set with more frames.

So,

$(A)-(III)$

Elevator algorithm is used in disk scheduling.

It is also known as the SCAN disk scheduling algorithm.

So,

$(B)-(II)$

Priority scheduling algorithm is a CPU scheduling algorithm.

In this algorithm, the process with higher priority is scheduled first.

So,

$(C)-(IV)$

Havender's algorithm is related to deadlock prevention.

It prevents deadlock by denying one of the necessary conditions for deadlock.

So,

$(D)-(I)$

Final matching is:

$(A)-(III), (B)-(II), (C)-(IV), (D)-(I)$

UGC NET Computer Science PYQ
The time complexity to multiply two polynomials of degree $n$ using Fast Fourier transform method is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Using the Fast Fourier Transform $($FFT$)$ method, polynomial multiplication can be done faster than the normal multiplication method.

Normal polynomial multiplication takes:

$\theta(n^2)$

But FFT based polynomial multiplication takes:

$\theta(n\lg n)$


UGC NET Computer Science PYQ
The RSA encryption algorithm also works in reverse, that is, you can encrypt a message with the private key and decrypt it using the public key. This property is used in:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In RSA, a message can be encrypted using the private key and verified or decrypted using the public key.

This proves that the message was created by the holder of the private key.

This property is used in digital signatures.


UGC NET Computer Science PYQ

What is SQL primarily used for in the context of relational databases?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

SQL (Structured Query Language) is used to:

  • create tables

  • insert data

  • update data

  • delete data

  • query data

Thus its primary purpose is managing and manipulating relational databases.


UGC NET Computer Science PYQ

The relation


$R={(1,3),(1,1),(3,1),(1,2),(3,3),(4,4)}$


defined in ${1,2,3,4}$ is ____






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For reflexive relation, $(1,1),(2,2),(3,3),(4,4)$ must be present.

But $(2,2)$ is missing.

So, relation is not reflexive.

For symmetric relation, if $(1,2)$ is present, then $(2,1)$ must also be present.

But $(2,1)$ is missing.

So, relation is not symmetric.

For transitive relation, since $(3,1)$ and $(1,2)$ are present, then $(3,2)$ must be present.

But $(3,2)$ is missing.

So, relation is not transitive.

UGC NET Computer Science PYQ
Consider the following statements of approximation algorithm:

Statement I: Vertex-cover is a polynomial time 2-approximation algorithm.
Statement II: TSP-tour is a polynomial time 3-approximation algorithm for travelling salesman problem with the triangle inequality.
Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

For the Vertex Cover problem, there is a standard polynomial time approximation algorithm.

It repeatedly chooses an edge and includes both endpoints in the vertex cover.

This gives a solution whose size is at most $2$ times the optimal solution.

So, Vertex-cover has a polynomial time $2$-approximation algorithm.

Therefore, Statement I is true.

Statement II:

For Travelling Salesman Problem with triangle inequality, the standard MST based TSP-tour approximation algorithm gives a $2$-approximation.

It does not give a $3$-approximation as the standard result.

So, the statement saying it is a polynomial time $3$-approximation algorithm is not correct in the standard form.

Therefore, Statement II is false.

UGC NET Computer Science PYQ

 Consider the following grammars:

$G_1:S\rightarrow aSb\mid bSa\mid aa$

$G_2:S\rightarrow aSb\mid bSa\mid SS\mid \lambda$

$G_3:S\rightarrow aSb\mid bSa\mid SS\mid a$

$G_4:S\rightarrow aSb\mid bSa\mid SS\mid SSS\mid \lambda$

Which of the following is correct w.r.t. the above grammars?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In $G_2$, productions are:

$S\rightarrow aSb\mid bSa\mid SS\mid \lambda$

In $G_4$, productions are:

$S\rightarrow aSb\mid bSa\mid SS\mid SSS\mid \lambda$

The only extra production in $G_4$ is:

$S\rightarrow SSS$

But this production is already possible using $S\rightarrow SS$ again and again.

For example:

$S\rightarrow SS\rightarrow SSS$

So, $SSS$ does not generate anything extra.

Hence, $G_2$ and $G_4$ generate the same language.


UGC NET Computer Science PYQ
Consider the game tree given below. Here circular nodes represent $MIN$ nodes and rectangular nodes represent $MAX$ nodes. The value of the root node of the game tree is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

The root node is a $MAX$ node.

In minimax method:

$MAX$ node selects the maximum value from its children.

$MIN$ node selects the minimum value from its children.

From the left subtree, the minimum level gives values such that the final value of the left side becomes

$7$

From the right subtree, the available minimum values make the right side value less than or equal to $5$.

Now, root is a $MAX$ node, so it selects maximum of left and right subtree values.

$\max(7,\le 5)=7$

Hence, the value of the root node is

$7$


UGC NET Computer Science PYQ
Given a project that uses the COCOMO model with an estimated effort of 2000 person-months and a productivity rate of 5 person-month per KLOC, what is the estimated size of the project in KLOC ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Productivity relation:

$Productivity = \dfrac{Effort}{Size}$

Given:

$Effort = 2000$ person-month
$Productivity = 5$ person-month per KLOC

So

$Size = \dfrac{Effort}{Productivity}$

$Size = \dfrac{2000}{5}$

$Size = 400$ KLOC


UGC NET Computer Science PYQ

Consider the Boolean expression given by


$F=(X+Y+Z)(X'+Y)(Y'+Z)$


Which of the following Boolean expressions is/are equivalent to $F'$?


A. $(X'+Y'+Z')(X+Y')(Y+Z')$


B. $(XY'+Z')$


C. $(X+Z')(Y'+Z')$


D. $(XY'+YZ'+X'Y'Z')$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

$F=(X+Y+Z)(X'+Y)(Y'+Z)$

Taking complement,

$F'=(X+Y+Z)' + (X'+Y)' + (Y'+Z)'$

Using De Morgan's law,

$F'=X'Y'Z' + XY' + YZ'$

So,

$F'=XY'+YZ'+X'Y'Z'$

This matches statement D.

Now simplify:

$F'=XY'+YZ'+X'Y'Z'$

$=XY'+Z'(Y+X'Y')$

$=XY'+Z'(Y+X')$

$=XY'+YZ'+X'Z'$

This is also equivalent to:

$XY'+Z'$

So, statement B is correct.

Also,

$(X+Z')(Y'+Z')$

$=XY'+XZ'+Y'Z'+Z'$

$=XY'+Z'$

So, statement C is also correct.

Statement A is not equivalent.

Therefore, correct statements are B, C and D.

So, correct option is:

$\boxed{(b)\ \text{B, C and D Only}}$

UGC NET Computer Science PYQ
Consider the following statements:

Statement I: Conservative 2 PL is a deadlock-free protocol.

Statement II: Thomas's write rule enforces conflict serializability.

Statement III: Timestamp ordering protocol ensures serializability based on the order of transaction timestamps.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

Conservative $2PL$ means Conservative Two Phase Locking.

In this protocol, a transaction obtains all required locks before it starts execution.

If all locks are not available, the transaction does not start.

Because a transaction does not hold some locks while waiting for other locks, circular wait cannot occur.

So, Conservative $2PL$ is deadlock-free.

Therefore, Statement I is true.

Statement II:

Thomas's write rule is a modification of timestamp ordering.

It allows some obsolete write operations to be ignored.

Because of this, it can generate schedules that are view serializable but not necessarily conflict serializable.

So, Thomas's write rule does not enforce conflict serializability.

Therefore, Statement II is false.

Statement III:

Timestamp ordering protocol assigns a timestamp to every transaction.

The serial order of transactions is decided according to their timestamps.

So, it ensures serializability based on the timestamp order.

Therefore, Statement III is true.

Hence, Statement I and Statement III are true, and Statement II is false.

UGC NET Computer Science PYQ
Consider the language $L={a^n b^{n-3}\mid n>2}$ on $\Sigma={a,b}$. Which one of the following grammars generates the language $L$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Given language is:

$L={a^n b^{n-3}\mid n>2}$

When $n=3$:

$a^3b^0=aaa$

When $n=4$:

$a^4b^1=aaaab$

When $n=5$:

$a^5b^2=aaaaabb$

So, every string starts with at least three $a$ symbols.

After that, for every extra $a$, one $b$ is added at the end.

Grammar:

$S\rightarrow aaaA$

$A\rightarrow aAb\mid \lambda$

If $A\rightarrow \lambda$, then string is:

$aaa$

If $A\rightarrow aAb$, then it generates:

$aaaab,\ aaaaabb,\ldots$

So, this grammar generates $a^n b^{n-3}$ for $n>2$.


UGC NET Computer Science PYQ
Match List-I with List-II:
List-I List-II
(a) Greedy best-first (i) Minimal cost $p+h(p)$
(b) Lowest cost-first (ii) Minimal $h(p)$
(c) $A^*$ Algorithm (iii) Minimal cost $p$
Choose the correct option from those given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Greedy best-first search selects the node with minimum heuristic value.

So,

$(a)\rightarrow(ii)$

Lowest cost-first search selects the node with minimum path cost.

So,

$(b)\rightarrow(iii)$

$A^*$ algorithm selects the node using cost plus heuristic value.

So,

$(c)\rightarrow(i)$

Therefore, the correct matching is

$(a)-(ii);\ (b)-(iii);\ (c)-(i)$


UGC NET Computer Science PYQ
Consider relation R(A, B, C, D, E) with the following functional dependencies:
C → F, E → A, EC → D, A → B. 
Which of the following is a key for R?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Goal: Find a set of attributes whose closure covers all attributes of R = {A, B, C, D, E}.

Check (1) CD+:
From C → F we get F. D gives nothing further. So CD+ = {C, D, F}.
Missing A, B, E ⇒ not a key.

Check (2) EC+:
Start {E, C}. Using E → A ⇒ add A. Using A → B ⇒ add B. Using EC → D ⇒ add D.
Therefore EC+ = {E, C, A, B, D} = {A, B, C, D, E}. Covers all attributes of R ⇒ key.

Check (3) AE+:
A → B gives B; E → A adds nothing new. No way to reach C or D ⇒ not a key.

Check (4) AC+:
A → B gives B; C → F gives F. No E or D ⇒ not a key.

Answer: (2) EC

Note: F is outside R, so while C → F is valid, a key must cover only attributes of R. EC+ covers {A, B, C, D, E}.


UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I (software design principles)

 List - II (Definitions)

 (A) Cohesion
 (I) Degree to which one module relies on another module
 (B) Coupling
 (II) Dividing a software system into distinct modules
 (C) Abstraction
 (III) Degree to which elements of a module belong together
 (D) Modularity

 (IV) Simplifying complex reality by modeling classes appropriate to the problem

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

efinitions:


Cohesion → elements of a module belong together → (III)


Coupling → dependency between modules → (I)


Abstraction → simplify complexity → (IV)


Modularity → divide system into modules → (II)


Thus:


(A)-(III), (B)-(I), (C)-(IV), (D)-(II)


UGC NET Computer Science PYQ

Which of the following statement is/are True?

A. The processor has direct access to both primary and secondary memory

B. Primary memory stores the active instructions and data for the program being executed on the process

C. Secondary memory is used as a backup memory

D. Memory system is implemented on a single level memory






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is false because the processor directly accesses primary memory, not secondary memory.

Statement B is true because primary memory stores currently executing instructions and data.

Statement C is true because secondary memory is used for permanent or backup storage.

Statement D is false because memory system is organized in multiple levels.

So, correct option is:

$\boxed{(b)\ \text{B and C only}}$

UGC NET Computer Science PYQ
Consider the following statements:

Statement I: Composite attributes cannot be divided into smaller subparts.

Statement II: Complex attribute is formed by nesting composite attributes and multivalued attributes in an arbitrary way.

Statement III: A derived attribute is an attribute whose values are computed from other attribute.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

Composite attributes are attributes that can be divided into smaller subparts.

For example, Name can be divided into First Name, Middle Name and Last Name.

So, the statement "Composite attributes cannot be divided into smaller subparts" is false.

Therefore, Statement I is false.

Statement II:

Complex attributes are formed by combining composite attributes and multivalued attributes.

They may contain nested structures.

So, complex attributes can be formed by nesting composite attributes and multivalued attributes.

Therefore, Statement II is true.

Statement III:

A derived attribute is an attribute whose value is calculated from another attribute.

For example, Age can be derived from Date of Birth.

So, Statement III is true.

Therefore:

Statement I is false.

Statement II is true.

Statement III is true.

UGC NET Computer Science PYQ

Consider the following grammar:

$S\rightarrow 0A\mid 0BB$

$A\rightarrow 00A\mid \lambda$

$B\rightarrow 1B\mid 11C$

$C\rightarrow B$

Which language does this grammar generate?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

From production:

$S\rightarrow 0A$

and

$A\rightarrow 00A\mid \lambda$

So, $A$ can generate:

$\lambda,\ 00,\ 0000,\ldots$

Hence, $S$ generates:

$0,\ 000,\ 00000,\ldots$

This is represented by:

$(00)^*0$

Now consider:

$S\rightarrow 0BB$

But $B$ has productions:

$B\rightarrow 1B\mid 11C$

and

$C\rightarrow B$

Here, $B$ never terminates into $\lambda$ or any final terminal-only string.

So, this branch does not generate any valid finite string.

Hence, the grammar generates only:

$L((00)^*0)$


UGC NET Computer Science PYQ
The STRIPS representation is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

STRIPS is used in AI planning.

In STRIPS, actions are represented using:

Preconditions
Add list
Delete list

So, it mainly describes how actions change the state of the world.

Therefore, STRIPS representation is an action-centric representation.


UGC NET Computer Science PYQ
Which of the following trees are height balanced?
  • A. Binary Search Tree
  • B. AVL Tree
  • C. Red-Black Tree
  • D. B-Tree

Choose the correct answer from the options below:

  1. A and D only
  2. A, B and D only
  3. C and D only
  4. B and C only





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Answer: 4) B and C only

  • Binary Search Tree (BST): Not necessarily balanced; height can degrade to O(n).
  • AVL Tree: Height-balanced by definition (balance factor −1, 0, +1); height is O(log n).
  • Red-Black Tree: Enforces black-height properties that keep height O(log n); treated as a height-balanced binary tree.
  • B-Tree: Balanced (all leaves at the same level) but not a binary tree; the term “height-balanced tree” typically refers to binary trees. Hence excluded here.

UGC NET Computer Science PYQ

Consider the transactions $T_1, T_2, T_3$ and the schedules $S_1$ and $S_2$ given below.

$T_1 : r_1(x); r_1(z); w_1(z)$
$T_2 : r_2(y); r_2(z); w_2(z)$
$T_3 : r_3(y); r_3(x); w_3(y)$

$S_1$ :
$r_1(x); r_3(y); r_3(x); r_2(y); r_2(z); w_3(y); w_3(z); r_1(z); w_1(x); w_1(z)$

$S_2$ :
$r_1(x); r_3(y); r_2(y); r_3(x); r_1(z); r_2(z); w_3(y); w_1(x); w_2(z); w_1(z)$

Which one of the following statements about the schedules is TRUE ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

To check conflict serializability we build precedence graph.

For $S_1$

Conflicts:

$T_1 \rightarrow T_3$
$T_3 \rightarrow T_2$
$T_2 \rightarrow T_1$

Cycle exists:

$T_1 \rightarrow T_3 \rightarrow T_2 \rightarrow T_1$

Therefore

$S_1$ not conflict-serializable

For $S_2$

Conflicts:

$T_3 \rightarrow T_1$
$T_2 \rightarrow T_1$
$T_3 \rightarrow T_2$

Graph has no cycle

Serializable order:

$T_3 \rightarrow T_2 \rightarrow T_1$

Thus

$S_2$ is conflict-serializable



UGC NET Computer Science PYQ

Inheritance provides the benefits of

A. shared interfaces

B. run-time polymorphism

C. less redundant information

D. dynamic binding






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Inheritance helps in code reusability, so it reduces redundant information.
It also supports run-time polymorphism and dynamic binding.
Shared interface is more directly related to interface or abstraction concept.
So, correct option is:
$\boxed{(c)\ \text{B, C, D only}}$

UGC NET Computer Science PYQ
A top down approach to programming calls for:

Statement I: Working from the general to the specific.

Statement II: Postpone the minor decisions.

Statement III: A systematic approach.

Statement IV: Intermediate coding of the problem

Which of the following is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Top down approach is a programming and design method in which a large problem is divided into smaller subproblems.

Statement I:

Top down approach starts from the general problem and then moves toward specific details.

So, Statement I is true.

Statement II:

In top down approach, major design decisions are taken first.

Minor details are postponed until lower-level modules are designed.

So, Statement II is true.

Statement III:

Top down approach follows a systematic method of stepwise refinement.

The problem is refined step by step into smaller and simpler modules.

So, Statement III is true.

Statement IV:

Top down approach does not mean intermediate coding of the problem.

It focuses on design and decomposition before detailed coding.

So, Statement IV is false.

Therefore:

Statement I is true.

Statement II is true.

Statement III is true.

Statement IV is false.

UGC NET Computer Science PYQ

Consider $\Sigma={w,x}$ and $T={x,y,z}$. Define homomorphism $h$ by:

$h(x)=xzy$

$h(w)=zxyy$

If $L$ is the regular language denoted by $r=(w+x^)(ww)^$, then the regular language $h(L)$ is given by:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution


UGC NET Computer Science PYQ
A fuzzy conjunction operator denoted as $t(x,y)$ and a fuzzy disjunction operator denoted as $s(x,y)$ form a dual pair if they satisfy the condition:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

For fuzzy conjunction and fuzzy disjunction to be dual, they must satisfy De Morgan type relation.

The duality condition is:

$t(x,y)=1-s(1-x,1-y)$


UGC NET Computer Science PYQ

Let P denote “She is intelligent” and Q denote “She is happy.”
Given statements:
(a) If she is intelligent, then she is unhappy.
(b) She is neither intelligent nor happy.
(c) It is necessary to be not intelligent in order to be happy.
(d) To be not intelligent is to be unhappy.

Which option gives the correct propositional expressions?

  1. (a) P→¬Q; (b) P ∧ ¬Q; (c) Q→¬P; (d) P→¬Q
  2. (a) P→Q; (b) ¬P ∧ ¬Q; (c) ¬Q→P; (d) ¬P→¬Q
  3. (a) P→¬Q; (b) ¬P ∧ ¬Q; (c) Q→¬P; (d) ¬P→¬Q
  4. (a) P→¬Q; (b) P ∧ ¬Q; (c) Q↔P; (d) ¬P→¬Q





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Translate each statement:
(a) “If intelligent then unhappy” ⇒ P → ¬Q.
(b) “Neither intelligent nor happy” ⇒ ¬P ∧ ¬Q.
(c) “Being not intelligent is necessary for being happy” ⇒ Q → ¬P.
(d) “Not intelligent implies unhappy” ⇒ ¬P → ¬Q.

Only Option 3 matches all four translations.

Answer: 3


UGC NET Computer Science PYQ

Consider the following statement regarding special purpose registers.

(A) Program Counter (PC) keeps the track of next instruction executed
(B) Instruction register holds the address of first instruction to be executed
(C) Accumulator holds the output of ALU
(D) Program Counter (PC) keeps the track of only first instruction of the program

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

PC stores address of next instruction


(B) False

Instruction Register stores current instruction, not address


(C) True

Accumulator stores ALU result


(D) False

PC tracks every next instruction, not only first


Thus correct statements:


(A) and (C)


UGC NET Computer Science PYQ

Which of the following is correct using the constructor?

A. string s1;

B. string s2(s1);

C. string s3{7};

D. string s4{'a'};

E. string s5{7,'a'};
Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

A is valid because it calls the default constructor.
B is valid because it calls the copy constructor.
C is not valid as a normal string constructor form.
D is valid because it initializes the string using character value.
E is valid because it initializes string with count and character.
So, correct option is:
$\boxed{(a)\ \text{A, B, D, E only}}$

UGC NET Computer Science PYQ
Consider the following statements:

Statement I: LALR parser is more powerful than canonical LR Parser.

Statement II: SLR parser is more powerful than LALR.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

The power hierarchy of LR parsers is:

$SLR < LALR < Canonical\ LR$

Now check Statement I:

Statement I says that LALR parser is more powerful than canonical LR Parser.

But actually Canonical LR parser is more powerful than LALR parser.

So, Statement I is false.

Now check Statement II:

Statement II says that SLR parser is more powerful than LALR.

But actually LALR parser is more powerful than SLR parser.

So, Statement II is false.

Therefore, both Statement I and Statement II are false.

UGC NET Computer Science PYQ

Consider the following statements with respect to the language $L={a^n b^n\mid n\ge 0}$

$S_1:L^2$ is context free language

$S_2:L^k$ is context-free language for any given $k\ge 1$

$S_3:\overline{L}$ and $L^*$ are context free languages

Which one of the following is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Given language:

$L={a^n b^n\mid n\ge 0}$

This is a context free language.

Now check each statement.

For $S_1$:

$L^2=L\cdot L$

Context free languages are closed under concatenation.

So, $L^2$ is also context free.

Hence, $S_1$ is true.

For $S_2$:

$L^k$ means concatenation of $L$ with itself $k$ times.

For any fixed $k\ge 1$, context free languages are closed under finite concatenation.

So, $L^k$ is context free.

Hence, $S_2$ is true.

For $S_3$:

$L^*$ is context free because context free languages are closed under Kleene star.

Also, for this specific language $L={a^n b^n\mid n\ge 0}$, its complement $\overline{L}$ is also context free.

So, $\overline{L}$ and $L^*$ both are context free languages.

Hence, $S_3$ is true.

Therefore, all three statements $S_1,\ S_2$ and $S_3$ are correct.


UGC NET Computer Science PYQ
Let $A_{\alpha_0}$ denotes the $\alpha$-cut of a fuzzy set $A$ at $\alpha_0$. If $\alpha_1<\alpha_2$, then:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

In fuzzy sets, a higher $\alpha$-cut gives a smaller or equal set.

Since,

$\alpha_1<\alpha_2$

the cut at $\alpha_1$ will contain all elements of the cut at $\alpha_2$.

So,

$A_{\alpha_1}\supseteq A_{\alpha_2}$



UGC NET Computer Science PYQ
The process followed in order to find difficult, unknown and hidden information about a software system is called:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Reverse Engineering is the process of analyzing a software system to identify its components and their interrelationships, and to extract hidden or unknown design information from the existing system. It helps understand how the system works internally without having access to its source code or original documentation.

UGC NET Computer Science PYQ

Which of the following are Agile Process Models ?

(A) Extreme Programming (XP)
(B) Waterfall
(C) Scrum
(D) Spiral
(E) Incremental

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Agile models include iterative and flexible development approaches.


Check each:


(A) Extreme Programming (XP) → Agile methodology ✔


(B) Waterfall → Traditional sequential model ✘


(C) Scrum → Agile framework ✔


(D) Spiral → Risk-driven traditional model ✘


(E) Incremental → Development strategy but not strictly Agile model here


Thus Agile models are:


Extreme Programming and Scrum


UGC NET Computer Science PYQ

Suppose that a corporate website appearance varies according to the department that owns various documents. All the documents need to follow the corporate look and feel. The HR department does not need a separate style sheet. It needs only the sheet containing the difference from the corporate sheet.

Which of the following statements justify the above scenario?

A. The styles sheets cannot stack on each other

B. The style sheets can stack on each other

C. The style sheets can override each other

D. The style sheets cannot override each other






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In CSS, multiple style sheets can be applied together.

This is called cascading.

Also, one style sheet can override rules of another style sheet.

So, correct statements are B and C.

So, correct option is:

$\boxed{(b)\ \text{B, C Only}}$

UGC NET Computer Science PYQ
Consider the following statements about Context Free Language (CFL):

Statement I: CFL is closed under homomorphism.

Statement II: CFL is closed under complement.

Which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I:

Context Free Languages are closed under homomorphism.

It means if a language is context free, then its homomorphic image is also context free.

So, Statement I is true.

Statement II:

Context Free Languages are not closed under complement.

This means if $L$ is a CFL, then complement of $L$ may not be a CFL.

So, Statement II is false.

Therefore, Statement I is true and Statement II is false.

UGC NET Computer Science PYQ

Consider the following languages:

$L_1={a^n b^n c^m}\cup{a^n b^m c^m},\ n,m\ge 0$

$L_2={ww^R\mid w\in{a,b}^*}$ where $R$ represents reversible operation.

Which one of the following is/are inherently ambiguous language(s)?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

$L_1={a^n b^n c^m}\cup{a^n b^m c^m}$ is a standard example of an inherently ambiguous language.

Reason: strings of the form $a^n b^n c^n$ can be generated from both parts:

First part: $a^n b^n c^m$ when $m=n$

Second part: $a^n b^m c^m$ when $m=n$

So, ambiguity is unavoidable for $L_1$.

Now,

$L_2={ww^R\mid w\in{a,b}^*}$ is the language of even length palindromes.

This language is context-free and not inherently ambiguous.


UGC NET Computer Science PYQ

Consider the following methods:

$M1$: Mean of maximum
$M2$: Centre of area
$M3$: Height method

Which of the following is/are defuzzification method(s)?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Defuzzification converts fuzzy output into a crisp value.

Mean of maximum is a defuzzification method.

Centre of area is also a defuzzification method.

Height method is also used for defuzzification.

Therefore, all $M1,M2$ and $M3$ are defuzzification methods.


UGC NET Computer Science PYQ

When developing a dynamic programming algorithm, the sequence of steps followed is:

  • A. Construct an optimal solution from computed information.
  • B. Recursively define the value of an optimal solution.
  • C. Characterize the structure of an optimal solution.
  • D. Compute the value of an optimal solution, typically in a bottom-up fashion.

Choose the correct answer from the options given below:

  1. B, C, A, D
  2. B, A, C, D
  3. C, B, A, D
  4. C, B, D, A





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Answer: (4) C, B, D, A

Explanation:
The standard steps for designing a dynamic programming algorithm are:

  1. (C) Characterize the structure of an optimal solution.
  2. (B) Recursively define the value of an optimal solution.
  3. (D) Compute the value of an optimal solution (usually bottom-up).
  4. (A) Construct the optimal solution from the computed information.

Hence, the correct order is C → B → D → A.


UGC NET Computer Science PYQ

Arrange the following phases of database design in the correct order :


(A) Physical Design

(B) Conceptual Design

(C) Logical Design

(D) Requirement Analysis


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Standard database design process:


Requirement Analysis


Conceptual Design


Logical Design


Physical Design


Thus order:


(D) → (B) → (C) → (A)


UGC NET Computer Science PYQ

Let $T_1$ be a transaction that transfer Rs. $50$ from account A to account B. This transaction can be defined as follows:

 StepOperation 
1  Read (A)
 2A: A-50 
 3 Write(A)
 4 Read(B)
 5B:=B+50 
 6 Write (B)
What will be the status of a database just after $3^{rd}$ step but before $5^{th}$ step of transaction execution?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

After step $3$, amount Rs. $50$ has been deducted from account A.

But before step $5$, Rs. $50$ has not yet been added to account B.

So, for some time, the total balance may not match the original total balance.

Therefore, the database may be temporarily inconsistent.

So, correct option is:

$\boxed{(b)\ \text{May be temporarily inconsistent}}$

UGC NET Computer Science PYQ
Consider the following in Boolean Algebra

$X:a\lor(b\land(a\lor c))=(a\lor b)\land(a\lor c)$

$Y:a\land(b\lor(a\land c))=(a\land b)\lor(a\land c)$

$a\lor(b\land c)=(a\lor b)\land c$ is satisfied if





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Check $X$:

$X:a\lor(b\land(a\lor c))=(a\lor b)\land(a\lor c)$

This follows the distributive law:

$a\lor(b\land d)=(a\lor b)\land(a\lor d)$

Here,

$d=(a\lor c)$

So,

$a\lor(b\land(a\lor c))=(a\lor b)\land(a\lor(a\lor c))$

$=(a\lor b)\land(a\lor c)$

Therefore, $X$ is true.

Now check $Y$:

$Y:a\land(b\lor(a\land c))=(a\land b)\lor(a\land c)$

Using distributive law:

$a\land(b\lor d)=(a\land b)\lor(a\land d)$

Here,

$d=(a\land c)$

So,

$a\land(b\lor(a\land c))=(a\land b)\lor(a\land a\land c)$

$=(a\land b)\lor(a\land c)$

Therefore, $Y$ is true.

Hence, both $X$ and $Y$ are true.

Hence, the correct answer is $\boxed{(c)}$

UGC NET Computer Science PYQ

Let $G=(V,T,S,P)$ be any context-free grammar without any $\lambda$-productions or unit productions. Let $K$ be the maximum number of symbols on the right of any production in $P$. The maximum number of production rules for any equivalent grammar in Chomsky normal form is given by:

Where $|\ |$ denotes the cardinality of the set.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In Chomsky Normal Form, every production must be of the form:

$A\rightarrow BC$

or

$A\rightarrow a$

If a production has maximum $K$ symbols on the right side, then to convert it into binary productions, at most $K-1$ productions are needed.

So, for $|P|$ productions, maximum productions required are:

$(K-1)|P|$

Also, for terminals, we may need separate productions for each terminal.

Number of terminals $=|T|$

So, total maximum number of productions:

$(K-1)|P|+|T|$


UGC NET Computer Science PYQ

Consider the following:

$(a)$ Evolution
$(b)$ Selection
$(c)$ Reproduction
$(d)$ Mutation

Which of the following are found in genetic algorithms?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Genetic algorithms are based on the idea of natural evolution.

They use selection to choose better individuals.

They use reproduction to create new generations.

They use mutation to introduce variations.

So, evolution, selection, reproduction and mutation are all related to genetic algorithms.


UGC NET Computer Science PYQ
The packet sent by a node to the source to inform it of congestion is called:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

In computer networks, when congestion occurs in a network, the router sends a special control packet called a choke packet to the source. This packet informs the source node to slow down the transmission rate to prevent further congestion. This method is part of congestion control mechanisms such as the Choke Packet Technique used in the Internet Control Message Protocol (ICMP).

UGC NET Computer Science PYQ

Which of the following statements are TRUE about mutual exclusion in concurrent programming ?

(A) Mutual exclusion ensures that only one process can be in a critical section at any given time.
(B) Mutual exclusion are designed to prevent conflicts and ensure that only one process can access shared resources at a time.
(C) Mutual exclusion can use various algorithms to ensure that processes do not enter the critical section simultaneously.
(D) Mutual exclusion allows multiple processes to access the critical section simultaneously to improve performance.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

Mutual exclusion ensures only one process enters critical section at a time.


(B) True

It prevents conflicts on shared resources.


(C) True

Algorithms like Peterson, Dekker, semaphore, mutex ensure mutual exclusion.


(D) False

Critical section cannot be accessed simultaneously by multiple processes.


Thus correct statements:


(A), (B), (C)


UGC NET Computer Science PYQ

onsider the relation

$Student(stuid,dept,clsroll)$

The following functional dependencies are given:

$FD1: stuid \to dept$

$FD2: dept \to stuid$

$FD3: stuid \to clsroll$

$FD4: clsroll \to stuid$

$FD5: dept \to clsroll$

Which functional dependencies should be removed to obtain the canonical cover of the set?

A. FD2 and FD3

B. FD1 and FD5

C. FD5

D. FD1

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Given FDs:

$FD1: stuid \to dept$

$FD2: dept \to stuid$

$FD3: stuid \to clsroll$

$FD4: clsroll \to stuid$

$FD5: dept \to clsroll$

Check redundancy:

$FD5: dept \to clsroll$ can be derived as:

$dept \to stuid$ using $FD2$

$stuid \to clsroll$ using $FD3$

So,

$dept \to clsroll$

Therefore, $FD5$ is redundant.

Also, $FD2$ and $FD3$ can be removed together because:

$dept \to clsroll$ using $FD5$

$clsroll \to stuid$ using $FD4$

So,

$dept \to stuid$

Also,

$stuid \to dept$ using $FD1$

$dept \to clsroll$ using $FD5$

So,

$stuid \to clsroll$

Therefore, $FD2$ and $FD3$ are also removable together.

Hence, correct statements are A and C only.

So, correct option is:

$\boxed{(b)\ \text{A, C only}}$

UGC NET Computer Science PYQ
A good software requirement specification does NOT have the characteristic





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

A good SRS means Software Requirement Specification.

A good SRS should have characteristics like:

Completeness

Consistency

Clarity

Correctness

Verifiability

Modifiability

Traceability

Now check the options:

Completeness is a characteristic of good SRS because all requirements should be included.

Consistency is a characteristic of good SRS because requirements should not conflict with each other.

Clarity is a characteristic of good SRS because requirements should be clearly written and easily understood.

Reliability is mainly a software quality characteristic, not a direct characteristic of SRS.

Therefore, a good SRS does NOT have Reliability as its main SRS characteristic.

UGC NET Computer Science PYQ

 Consider the following language families:

$L_1\equiv$ The context-free languages

$L_2\equiv$ The context-sensitive languages

$L_3\equiv$ The recursively enumerable languages

$L_4\equiv$ The recursive languages

Which one of the following options is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

The Chomsky hierarchy and decidability relation is:

Context-free languages $\subseteq$ Context-sensitive languages

Context-sensitive languages $\subseteq$ Recursive languages

Recursive languages $\subseteq$ Recursively enumerable languages

So,

$L_1\subseteq L_2\subseteq L_4\subseteq L_3$


UGC NET Computer Science PYQ

Which of the following is an example of unsupervised neural network?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

A self-organizing feature map is an unsupervised neural network.

It groups similar input patterns without using labelled output data.

Back-propagation is generally supervised learning.


UGC NET Computer Science PYQ

Consider a relation schema $R = (U, V, W, X, Y, Z)$, on which the following functional dependencies hold:


${U \rightarrow V,; VW \rightarrow X,; Y \rightarrow W,; X \rightarrow U}$


The candidate keys of $R$ are:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Functional dependencies:

$U \rightarrow V$

$VW \rightarrow X$

$Y \rightarrow W$

$X \rightarrow U$


Start with $UY$:

$U \rightarrow V$

$Y \rightarrow W$

Thus we get $V,W$

Then

$VW \rightarrow X$

Then

$X \rightarrow U$

So closure:

$UY^+ = {U,V,W,X,Y}$

Add $Z$ to cover all attributes.

Thus minimal key:

$UYZ$

Similarly:

$VYZ$ and $XYZ$

Thus candidate keys:

$UYZ,; VYZ,; XYZ$


UGC NET Computer Science PYQ

Which of the following statements are true?

A. If the time quantum is extremely small, round robin can result in a large number of context switches.

B. The average turnaround time of a set of processes does not necessarily improve as the time-quantum size increases.

C. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is true because very small time quantum causes frequent context switching.

Statement B is true because increasing time quantum does not always improve average turnaround time.

Statement C is true because if most processes finish in one time quantum, turnaround time can improve.

So, all A, B and C are true.

UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion (A) and the other is labelled as Reason (R):

Assertion (A): $\bar{p}$

Reason (R): $(r\to \bar{q},\ r\lor s,\ s\to \bar{q},\ p\to q)$

In the light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution


Given Reason statements are:

$r\to \bar{q}$

$r\lor s$

$s\to \bar{q}$

$p\to q$

From $r\lor s$, either $r$ is true or $s$ is true.

Case 1:

If $r$ is true, then using $r\to \bar{q}$, we get:

$\bar{q}$

Case 2:

If $s$ is true, then using $s\to \bar{q}$, we get:

$\bar{q}$

So, in both cases:

$\bar{q}$ is true.

Now we also have:

$p\to q$

Using modus tollens:

$p\to q$ and $\bar{q}$ imply $\bar{p}$.

Therefore, Assertion (A), that is $\bar{p}$, is true.

Also, Reason (R) correctly explains how $\bar{p}$ is obtained.

Hence, both (A) and (R) are true and (R) is the correct explanation of (A).

UGC NET Computer Science PYQ

Consider the following statements:

$S_1:$ There exists no algorithm for deciding if any two Turing machines $M_1$ and $M_2$ accept the same language.

$S_2:$ Let $M_1$ and $M_2$ be arbitrary Turing machines. The problem to determine $L(M_1)\subseteq L(M_2)$ is undecidable.

Which of the statements is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Checking whether two Turing machines accept the same language means checking:

$L(M_1)=L(M_2)$

This is undecidable.

So, $S_1$ is true.

For $S_2$:

Checking whether:

$L(M_1)\subseteq L(M_2)$

for arbitrary Turing machines is also undecidable.

So, $S_2$ is also true.


UGC NET Computer Science PYQ

The value of the derivative of the Sigmoid function given by

$f(x)=\dfrac{1}{1+e^{-2x}}$

at $x=0$ is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Given,

$f(x)=\dfrac{1}{1+e^{-2x}}$

Differentiate with respect to $x$:

$f'(x)=\dfrac{2e^{-2x}}{(1+e^{-2x})^2}$

At $x=0$,

$e^{-2(0)}=e^0=1$

So,

$f'(0)=\dfrac{2}{(1+1)^2}$

$=\dfrac{2}{4}$

$=\dfrac{1}{2}$


UGC NET Computer Science PYQ
The transformation of data from main memory to cache memory is referred as:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

In computer architecture, when data is transferred from main memory to cache memory, a process known as mapping determines where each block of main memory will be placed in the cache. There are different types of mapping techniques such as Direct Mapping, Associative Mapping, and Set-Associative Mapping. This process ensures efficient and quick access to frequently used data.

UGC NET Computer Science PYQ

Host A (on TCP/IPv4 Networks) send an IP Datagram D to host B (also on TCP/IPv4 network). Assume that no error occurred during transmission of D, when D reaches host B. Which of following header field may differ from that of original datagram D ?


(A) TTL

(B) Checksum

(C) Fragment offset

(D) Source IP

(E) Destination IP


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) TTL → Decreases at every router ✔


(B) Header checksum → Recomputed whenever TTL changes ✔


(C) Fragment offset → May change if fragmentation occurs ✔


(D) Source IP → Does not change ✘


(E) Destination IP → Does not change ✘


Thus fields that may differ:


TTL, Checksum, Fragment offset


UGC NET Computer Science PYQ

Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.

 Process Name Arrival Time  Execution Time
 A0 6 
B 3 2 
C 5 4 
D 7 6 
E 10 3 

Using the shortest remaining time first scheduling algorithm, the average process turnaround (in milliseconds) is ____







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using SRTF scheduling:

$A: 0 \to 3$

$B: 3 \to 5$

$A: 5 \to 8$

$C: 8 \to 12$

$E: 12 \to 15$

$D: 15 \to 21$

Completion times:

$A=8,\ B=5,\ C=12,\ D=21,\ E=15$

Turnaround time $=$ Completion time $-$ Arrival time

$A=8-0=8$

$B=5-3=2$

$C=12-5=7$

$D=21-7=14$

$E=15-10=5$

Average turnaround time:

$=\frac{8+2+7+14+5}{5}$

$=\frac{36}{5}$

$=7.2$

Correct option is:

$\boxed{(a)\ 7.2}$


UGC NET Computer Science PYQ
Of the following, which is NOT a logical error?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

A logical error means the program runs, but it gives wrong output because the logic is incorrect.

Now check each option.

Option (a):

Using $'='$ instead of $'===' $ for comparison is a logical error.

Because $'='$ is used for assignment, while $'===' $ is used for strict comparison.

So, this may give wrong result.

Option (b):

Divide by zero is generally considered a run-time error.

The program may stop during execution.

Option (c):

Failing to initialize counter and total variables before loop execution is a logical error.

Because the program may use garbage or incorrect values and produce wrong output.

Option (d):

Using commas instead of required semicolons in a for loop header is a syntax error.

The program will not compile or run properly.

Since the question asks which is NOT a logical error, the best answer is syntax error.

UGC NET Computer Science PYQ
 Let $A={001,0011,11,101}$ and $B={01,111,111,010}$. Similarly, let $C={00,001,1000}$ and $D={0,11,011}$. Which of the following pairs have a post-correspondence solution?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

For pair $(A,B)$:

Take sequence of indices:

$3,4,1$

From $A$ side:

$A_3A_4A_1=11\ 101\ 001=11101001$

From $B$ side:

$B_3B_4B_1=111\ 010\ 01=11101001$

Both strings are equal.

So, pair $(A,B)$ has a PCP solution.

For pair $(C,D)$:

Starting must be with first pair because only it gives matching prefix:

$C_1=00,\ D_1=0$

After this, extra $0$ remains on upper side. Repeating first pair keeps increasing extra zeros, and other pairs do not match the required prefix properly.

So, pair $(C,D)$ has no PCP solution.


UGC NET Computer Science PYQ
Reinforcement learning can be formalized in terms of _____ in which the agent initially only knows the set of possible _____ and the set of possible actions.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

Reinforcement learning is generally formalized using a Markov decision process.

In a Markov decision process, the agent interacts with an environment using states and actions.

The agent knows the set of possible states and the set of possible actions.

Therefore, the blanks are:

Markov decision process, states


UGC NET Computer Science PYQ
Match List I with List II:
List I List II
A. Address Space I. Associative Mapping
B. Memory Space II. Logical address
C. Cache Memory III. Physical address
D. Segmented Program IV. Virtual address
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • A. Address Space → Virtual Address (IV)
    Address space refers to the range of virtual addresses a process can use in memory.
  • B. Memory Space → Physical Address (III)
    Memory space corresponds to the actual physical memory locations in RAM.
  • C. Cache Memory → Associative Mapping (I)
    Cache memory uses mapping techniques such as associative mapping to store data efficiently.
  • D. Segmented Program → Logical Address (II)
    In segmentation, programs are divided into segments, each referenced by logical addresses.

UGC NET Computer Science PYQ

Consider a CSMA/CD network that transmits data at the rate of 100 Mbps over a 1 kilometre cable with no repeater. If the minimum frame size required for this network is 1250 bytes, what is the signal speed (km/sec) in the cable ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Minimum frame size:


$1250 \text{ bytes} = 1250 \times 8 = 10000 \text{ bits}$


Transmission rate:


$100 \text{ Mbps} = 100 \times 10^6 \text{ bits/sec}$


Transmission time:


$T = \frac{10000}{100 \times 10^6}$


$T = 10^{-4} \text{ sec}$


In CSMA/CD:


$T = 2 \times$ propagation delay


So propagation delay:


$\frac{T}{2} = 5 \times 10^{-5}$ sec


Distance = 1 km


Signal speed:


$v = \frac{distance}{time}$


$v = \frac{1}{5 \times 10^{-5}}$


$v = 20000 \text{ km/sec}$


UGC NET Computer Science PYQ

Select the correct order of basic page replacement.

A. Page replacement algorithm is used in case there is no free frame

B. The process is continued by restarting the instruction caused by TRAP

C. Location of desired frame is found from disk

D. Desired page is brought into newly freed frame and page and frame tables are updated






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Basic page replacement order is:

First, location of desired page is found from disk.

Then, if no free frame is available, page replacement algorithm is applied.

Then, desired page is brought into newly freed frame and page table and frame table are updated.

Finally, the process is restarted from the instruction that caused the trap.

So, correct order is:

$C,A,D,B$

Correct option is:

$\boxed{(c)\ C,A,D,B}$


UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion (A) and the other is labelled as Reason (R):

Assertion (A): A load-and-go assembler avoids the overhead of writing the object program out and reading it back in.

Reason (R): This can be done with either one-pass or two pass assembler.

In the light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Assertion (A):

A load-and-go assembler directly loads the translated machine code into memory for execution.

It does not create a separate object program file first.

So, it avoids two extra steps:

Writing the object program out

Reading the object program back in

Therefore, Assertion (A) is true.

Reason (R):

A load-and-go assembler can be implemented using one-pass assembler or two-pass assembler technique.

So, Reason (R) is also true.

But Reason (R) only tells that load-and-go can be done using one-pass or two-pass assembler.

It does not explain why the overhead of writing and reading the object program is avoided.

The overhead is avoided because the object code is loaded directly into memory.

Therefore, both (A) and (R) are true, but (R) is not the correct explanation of (A).

UGC NET Computer Science PYQ
Which of the following class of IP address has the last address as $223.255.255.255$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Classful IP address ranges are:

Class A: $0$ to $127$

Class B: $128$ to $191$

Class C: $192$ to $223$

Class D: $224$ to $239$

Given last address is:

$223.255.255.255$

This belongs to Class C.


UGC NET Computer Science PYQ

In mathematical logic, which of the following are statements?

$(i)$ There will be snow in January.
$(ii)$ What is the time now?
$(iii)$ Today is Sunday.
$(iv)$ You must study Discrete Mathematics.

Choose the correct answer from the code given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

A statement in mathematical logic is a declarative sentence which has a definite truth value, either true or false.

$(i)$ There will be snow in January.
This is a declarative sentence. So, it is a statement.

$(ii)$ What is the time now?
This is a question. So, it is not a statement.

$(iii)$ Today is Sunday.
This is a declarative sentence. So, it is a statement.

$(iv)$ You must study Discrete Mathematics.
This is a command or advice. So, it is not a statement.

Therefore, only $(i)$ and $(iii)$ are statements.


UGC NET Computer Science PYQ

Consider the following table defining the sample inputs and corresponding target values for a perceptron model.

Sample No x1 x2 target w1 w2
S100000
S2011
S3101
S4111

What shall be the value of updated weights after applying all the samples S1 to S4 (in the order S1, S2, S3, S4) to this model. Given that the initial weights w1=0, w2=0, learning rate=0.1 and no bias is involved in the perceptron. The activation function for this perceptron is given below:

yobserved = { 1 if yin > 0
0 if yin < 0 }

  1. w1 = 0.1, w2 = 0.1
  2. w1 = 0.0, w2 = 0.2
  3. w1 = 0.0, w2 = 0.1
  4. w1 = 0.2, w2 = 0.2





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Using perceptron learning rule: Δw = η (t − y) x, where y = 1 if yin > 0 else 0.

S1 (0,0,t=0): yin=0 ⇒ y=0 ⇒ no change ⇒ (w1,w2)=(0,0)

S2 (0,1,t=1): yin=0 ⇒ y=0 ⇒ Δw=0.1(1−0)(0,1) ⇒ (w1,w2)=(0,0.1)

S3 (1,0,t=1): yin=0 ⇒ y=0 ⇒ Δw=0.1(1−0)(1,0) ⇒ (w1,w2)=(0.1,0.1)

S4 (1,1,t=1): yin=0.1+0.1=0.2>0 ⇒ y=1 ⇒ no change

Final Weights: w1=0.1, w2=0.1

Answer: (1)


UGC NET Computer Science PYQ
#include<iostream.h>
using namespace std;

void swap(int &x, int &y)
{
    int temp = x;
    x = y;
    y = temp;
}

int main()
{
    int a = 5, b = 10;
    swap(a,b);
    swap(a,b);
    cout << a << " " << b;
    return 0;
}
What will be the output of above code ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Initial values

$a = 5,; b = 10$

First call

swap(a,b)

$a = 10,; b = 5$

Second call

swap(a,b)

$a = 5,; b = 10$

Thus final output

5 10


UGC NET Computer Science PYQ

Given below are two statements:

Statement I: Software testing must be recognized as a significant effort, and its planning must begin at the earliest possible time.

Statement II: The cost of software testing is an important contribution in determining overall software development costs.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement I is true because software testing planning should start early in the software development life cycle.

Statement II is also true because testing cost is a major part of total software development cost.

So, correct option is:

$\boxed{(a)\ \text{Both Statement I and Statement II are true}}$


UGC NET Computer Science PYQ
Which statement is false?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Check option (a):

In C language, function arguments are passed by value.

It means a copy of the actual argument is passed to the function.

So, option (a) is true.

Check option (b):

Call by reference allows a function to modify the original variable of the calling function.

So, option (b) is true.

Check option (c):

Call by value is not always more efficient than call by reference.

For large data structures, passing by reference or using pointers can be more efficient because copying large data is avoided.

So, option (c) is false.

Check option (d):

C does not directly support call by reference.

But programmers use pointers and indirection operators to simulate call by reference.

So, option (d) is true.

Therefore, the false statement is option (c).

UGC NET Computer Science PYQ
Consider a subnet with $720$ routers. If a three-level hierarchy is chosen, with eight clusters, each containing $9$ regions of $10$ routers, then total number of entries in hierarchical table of each router is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Total routers:

$8\times 9\times 10=720$

For each router, routing table entries are counted as:

Entries for routers in its own region:

$10$

Entries for other regions in same cluster:

$9-1=8$

Entries for other clusters:

$8-1=7$

Total entries:

$10+8+7=25$


UGC NET Computer Science PYQ
Match List I with List II and choose the correct answer from the code given below.
List I List II
$(a)$ Equivalence $(i)\ p\Rightarrow q$
$(b)$ Contrapositive $(ii)\ p\Rightarrow q : q\Rightarrow p$
$(c)$ Converse $(iii)\ p\Rightarrow q : \sim q\Rightarrow \sim p$
$(d)$ Implication $(iv)\ p\Leftrightarrow q$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Equivalence is represented by

$p\Leftrightarrow q$

So,

$(a)\rightarrow(iv)$

Contrapositive of $p\Rightarrow q$ is

$\sim q\Rightarrow \sim p$

So,

$(b)\rightarrow(iii)$

Converse of $p\Rightarrow q$ is

$q\Rightarrow p$

So,

$(c)\rightarrow(ii)$

Implication is represented by

$p\Rightarrow q$

So,

$(d)\rightarrow(i)$

Therefore, correct matching is

$(a)-(iv),\ (b)-(iii),\ (c)-(ii),\ (d)-(i)$


UGC NET Computer Science PYQ

Consider the three-way handshaking process followed during TCP connection establishment between two hosts A and B. Let S and R be two random 32-bit starting sequence numbers chosen by A and B respectively. Suppose A sends a TCP segment having SYN bit = 1, SEQ number = S and ACK bit = 0 and B accepts the connection request.

Which one of the following choices represents the information present in the TCP segment header that is sent by B to A ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

TCP 3-way handshake:


Step 1

A → B


SYN = 1

SEQ = S


Step 2

B → A


SYN = 1

ACK = 1

SEQ = R

ACK = S + 1


Thus correct header fields:


SYN = 1

SEQ = R

ACK = 1

ACK = S + 1


UGC NET Computer Science PYQ

Which of the following need not be assessed during unit testing?

A. Algorithmic performance.

B. Number of lines of code.

C. Error handling.

D. Execution paths.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

During unit testing, error handling is important to test.

But algorithmic performance, number of lines of code and execution paths are not the main assessment points in this context.

So, correct option is:

$\boxed{(b)\ \text{A, B, D only}}$


UGC NET Computer Science PYQ
Given below are two statements:

Statement I: "Grandparent is a parent of one's parent".

Statement II: First Order Predicate Logic (FOPL) representation of above statement is

$\forall g,c\ grandparent(g,c)\Leftrightarrow \exists p\ parent(g,p)\land parent(p,c)$

In the light of the above statements, choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I says:

Grandparent is a parent of one's parent.

This is correct.

For example, if $g$ is parent of $p$ and $p$ is parent of $c$, then $g$ is grandparent of $c$.

Now check Statement II:

$\forall g,c\ grandparent(g,c)\Leftrightarrow \exists p\ parent(g,p)\land parent(p,c)$

This means:

For all $g$ and $c$, $g$ is grandparent of $c$ if and only if there exists some $p$ such that $g$ is parent of $p$ and $p$ is parent of $c$.

This is the correct FOPL representation of the grandparent relation.

Therefore, both Statement I and Statement II are correct.

UGC NET Computer Science PYQ
Piconet is a basic unit of a bluetooth system consisting of $...............$ master node and up to $...............$ active slave nodes.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

A Bluetooth piconet consists of:

$1$ master node

Up to $7$ active slave nodes

So, the blanks are:

one and seven

Therefore, the correct answer is


UGC NET Computer Science PYQ
A box contains six red balls and four green balls. Four balls are selected at random from the box. What is the probability that two of the selected balls will be red and two will be green?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Total balls are

$6+4=10$

Number of ways to select $4$ balls from $10$ balls is

${}^{10}C_4$

We need exactly $2$ red balls and $2$ green balls.

Number of ways to select $2$ red balls from $6$ red balls is

${}^{6}C_2$

Number of ways to select $2$ green balls from $4$ green balls is

${}^{4}C_2$

So, required probability is

$\dfrac{{}^{6}C_2 \times {}^{4}C_2}{{}^{10}C_4}$

$=\dfrac{15 \times 6}{210}$

$=\dfrac{90}{210}$

$=\dfrac{3}{7}$


UGC NET Computer Science PYQ

Arrange the following steps of file handling in C in the correct order :


(A) Close the file

(B) Read from or write to the file

(C) Open the file

(D) Check for error


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Correct file handling sequence in C:


Open file


Check for error


Read / Write


Close file


Thus order:


(C) → (D) → (B) → (A)


UGC NET Computer Science PYQ

Which of the following rotations are correctly explained in the context of an AVL tree?

A. LL rotation: The new node is inserted in the left sub-tree of the left sub-tree of the critical node.

B. RR rotation: The new node is inserted in the right sub-tree of the right sub-tree of the critical node.

C. LR rotation: The new node is inserted in the right sub-tree of the left sub-tree of the critical node.

D. RL rotation: The new node is inserted in the left sub-tree of the right sub-tree of the critical node.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

All four AVL rotation cases are correctly explained:

LL case: left of left

RR case: right of right

LR case: right of left

RL case: left of right

So, correct option is:

$\boxed{(c)\ \text{A, B, C and D}}$


UGC NET Computer Science PYQ
Given below are two statements:Statement I: Consider $20$ bit 'Branch' microinstruction code format given below:
F1F2F3CDBRAD
$3$ bits$3$ bits$3$ bits$2$ bits$2$ bits$7$ bits
$F1,F2,F3$: Micro-operation fields$CD$: Condition for branching$BR$: Branch field$AD$: Address fieldStatement II: Instruction represented in above format can perform branch in $4$ conditions.In the light of the above statements, choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Sep 2022 (Paper II) PYQ

Solution

Statement I gives the format of a branch microinstruction.

The total number of bits in the format is:

$3+3+3+2+2+7=20$

So, the given format is a $20$ bit microinstruction format.

Therefore, Statement I is correct.

Now check Statement II.

The field $CD$ is used for condition selection in branching.

Size of $CD$ field is:

$2$ bits

With $2$ bits, the number of possible conditions is:

$2^2=4$

So, the instruction represented in this format can perform branching based on $4$ possible conditions.

Therefore, Statement II is also correct.

Hence, both Statement I and Statement II are correct.

UGC NET Computer Science PYQ
A network with bandwidth of $10$ Mbps can pass only an average of $12000$ frames per minute with each frame carrying an average of $10000$ bits. What is the throughput of this network?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Throughput means actual data transferred per second.

Given,

Number of frames per minute $=12000$

Bits per frame $=10000$

Total bits per minute:

$12000\times 10000=120000000$

Now convert into bits per second:

$\dfrac{120000000}{60}=2000000\ bps$


UGC NET Computer Science PYQ

A survey has been conducted on methods of commuter travel. Each respondent was asked to check Bus, Train or Automobile as a major method of travelling to work. More than one answer was permitted. The results reported were as follows:

Bus $30$ people; Train $35$ people; Automobile $100$ people; Bus and Train $15$ people; Bus and Automobile $15$ people, Train and Automobile $20$ people; and all the three methods $5$ people. How many people completed the survey form?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Let Bus, Train and Automobile be represented by $B,T,A$ respectively.

Given,

$n(B)=30$

$n(T)=35$

$n(A)=100$

$n(B\cap T)=15$

$n(B\cap A)=15$

$n(T\cap A)=20$

$n(B\cap T\cap A)=5$

Using the formula,

$n(B\cup T\cup A)=n(B)+n(T)+n(A)-n(B\cap T)-n(B\cap A)-n(T\cap A)+n(B\cap T\cap A)$

Now,

$n(B\cup T\cup A)=30+35+100-15-15-20+5$

$=165-50+5$

$=120$

Therefore, $120$ people completed the survey form.


UGC NET Computer Science PYQ

Select the Sorting Algorithms that are stable.


(A) Quick Sort

(B) Bubble Sort

(C) Insertion Sort

(D) Merge Sort

(E) Shell Sort


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Quick Sort → Not stable ✘

Bubble Sort → Stable ✔

Insertion Sort → Stable ✔

Merge Sort → Stable ✔

Shell Sort → Not stable ✘


Thus stable algorithms:


Bubble Sort, Insertion Sort, Merge Sort


But among given options, only


(B) and (C)


appear together correctly.


UGC NET Computer Science PYQ

In the context of a Hamiltonian problem, which of the following are correct?

A. Hamiltonian cycle problem is NP-Complete

B. If $G$ is an undirected Bipartite graph with an odd number of vertices, then $G$ is Hamiltonian.

C. Hamiltonian path problem cannot be solved in polynomial time on directed acyclic graph

D. If $G$ is a connected undirected graph with at least three vertices and $G^3$ is the graph obtained by connecting all pairs of vertices that are connected by a path in $G$ of length at most $3$.

E. If any NP complete problem is polynomial time solvable the $(P=NP)$.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement A is true.

Hamiltonian cycle problem is NP-Complete.

Statement B is false.

A bipartite graph with odd number of vertices cannot have a Hamiltonian cycle.

Statement C is false.

Hamiltonian path problem can be solved in polynomial time for directed acyclic graph.

Statement D is true.

In graph power concept, $G^3$ connects vertices having distance at most $3$ in $G$.

Statement E is true.

If any NP-Complete problem is solved in polynomial time, then $P=NP$.

So, correct statements are A, D and E.

Correct option is:

$\boxed{(c)\ \text{A, D, E only}}$


UGC NET Computer Science PYQ
 Which of the statements given below is/are correct?

It is always important and useful to include an $alt$ attribute on $img$ tag in HTML because

A. users who cannot see the image due to vision impairment can have a textual description of the image which can be spoken aloud by a screen reader.

B. If the image fails to load due to slow connection, broken path, etc. then alt text is displayed instead.

C. SEO Search Engine Optimization benefits.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

The $alt$ attribute is used inside the $img$ tag in HTML.

It provides alternative text for an image.

Now check each statement.

Statement A:

If a user has vision impairment, then screen readers can read the $alt$ text aloud.

So, the user can understand what the image represents.

Therefore, statement A is correct.

Statement B:

If the image does not load because of slow internet, wrong image path or broken link, then the browser can display the $alt$ text.
Therefore, statement B is correct.
Statement C:
Search engines cannot understand images like humans.
So, $alt$ text helps search engines understand the image content.
It also gives SEO benefits.
Therefore, statement C is correct.
Hence, A, B and C are correct.


UGC NET Computer Science PYQ
 The full form of ICANN is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

ICANN stands for:

Internet Corporation for Assigned Names and Numbers

It manages domain names, IP address allocation and related internet identifiers.


UGC NET Computer Science PYQ

Which of the following statements are true?

$(i)$ Every logic network is equivalent to one using just NAND gates or just NOR gates.
$(ii)$ Boolean expressions and logic networks correspond to labelled acyclic digraphs.
$(iii)$ No two Boolean algebras with $n$ atoms are isomorphic.
$(iv)$ Non-zero elements of finite Boolean algebras are not uniquely expressible as joins of atoms.

Choose the correct answer from the code given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Statement $(i)$ is true.

NAND and NOR gates are functionally complete gates.

So, every logic network can be represented using only NAND gates or only NOR gates.

Statement $(ii)$ is true.

Boolean expressions and logic networks can be represented using labelled acyclic digraphs.

Statement $(iii)$ is false.

Any two Boolean algebras with the same number of atoms are isomorphic.

Statement $(iv)$ is false.

In a finite Boolean algebra, every non-zero element can be uniquely expressed as a join of atoms.

Therefore, only $(i)$ and $(ii)$ are true.


UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I (operating system concepts)

List - II (characteristics) 

 (A) Paging
 (I) Evicts least recently used process
 (B) LRU (Least Recently Used)
 (II) Extends physical memory
 (C) C-SCAN
 (III) Logical to physical mapping
 (D) Virtual Memory

 (IV) Circular disk access

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Paging → Logical to physical address mapping → (III)


LRU → Replace least recently used page → (I)


C-SCAN → Circular disk scheduling → (IV)


Virtual Memory → Extends physical memory → (II)


Thus:


(A)-(III), (B)-(I), (C)-(IV), (D)-(II)


UGC NET Computer Science PYQ

For matrix multiplication, if we use divide and conquer algorithm, then ______

A. the running time is $T(n)=\Theta(n^3)$

B. the running time is $T(n)=\Theta(n^2\log n)$

C. The recurrence can be defined as $T(n)=8T(n/2)+\Theta(n^2)$

D. the recurrence relation is $T(n)=8T(2n)+\Theta(n^2\log n)$

E. Masters theorem, one of the cases is applicable

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In divide and conquer matrix multiplication, matrix is divided into smaller submatrices.

There are $8$ recursive multiplications of size $n/2$.

So, recurrence is:

$T(n)=8T(n/2)+\Theta(n^2)$

Using Master Theorem:

$a=8,\ b=2$

$n^{\log_b a}=n^{\log_2 8}=n^3$

So,

$T(n)=\Theta(n^3)$

Therefore, A, C and E are correct.

Correct option is:

$\boxed{(a)\ \text{A, C, E only}}$


UGC NET Computer Science PYQ
What does the following function $f()$ in C return?

int f(unsigned int N)
{
unsigned int counter = 0;

while (N > 0)
{
counter += N & 1;
N = N >> 1;
}

return counter == 1;
}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Given function takes an unsigned integer $N$.

Inside the function:

$counter=0$

Now the loop runs while:

$N>0$

In each iteration:

$counter += N\ \&\ 1$

Here, $N\ \&\ 1$ checks the last bit of $N$.

If the last bit is $1$, then $counter$ increases by $1$.

If the last bit is $0$, then $counter$ does not increase.

After that:

$N=N>>1$

This shifts the bits of $N$ one position to the right.

So, the loop checks all bits of $N$ one by one.

Therefore, $counter$ stores the number of $1$ bits in the binary representation of $N$.

Finally, the function returns:

$counter==1$

This condition is true only when the binary representation of $N$ contains exactly one $1$.

A number which has exactly one $1$ in binary form is a power of $2$.

For example:

$2=(10)_2$

$4=(100)_2$

$8=(1000)_2$

So, the function returns $1$ if $N$ is a power of $2$, otherwise it returns $0$.

UGC NET Computer Science PYQ
According to Dempster-Shafer theory for uncertainty management, where $Bel(A)$ denotes belief of event $A$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In probability theory,

$P(A)+P(\neg A)=1$

But in Dempster-Shafer theory, belief values need not add up to $1$ because some uncertainty may remain unassigned.

So,

$Bel(A)+Bel(\neg A)\le 1$


UGC NET Computer Science PYQ

The relation $\leq$ and $<$ on a Boolean algebra are defined as:

$x\leq y$ if and only if $x\vee y=y$

$x<y$ means $x\leq y$ but $x\neq y$

$x\geq y$ means $y\leq x$

$x>y$ means $y<x$

Considering the above definitions, which of the following is not true in the Boolean algebra?

$(i)$ If $x\leq y$ and $y\leq z$, then $x\leq z$
$(ii)$ If $x\leq y$ and $y\leq x$, then $x=y$
$(iii)$ If $x<y$ and $y<z$, then $x\leq y$
$(iv)$ If $x<y$ and $y<z$, then $x<y$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution


UGC NET Computer Science PYQ

Which of the following statements are TRUE about Process Control Block (PCB) ?

(A) The PCB contains information about the process state, such as whether it is running, waiting or terminated

(B) The PCB includes the program code and data segments of the process

(C) The PCB stores the process’s memory management information, such as page tables and segment tables

(D) The PCB is used to track process scheduling information and CPU registers for process

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

PCB stores process state (running, ready, waiting).


(B) False

Program code and data are stored in process memory, not in PCB.


(C) True

PCB stores memory management information (page tables, segment tables).


(D) True

PCB contains CPU registers and scheduling information.


Thus correct statements:


(A), (C), (D)


UGC NET Computer Science PYQ

Which of the following Finite Automata,

recognizes the language L = {a , b}* ?
A. $M=({q_0},{a,b},\delta,q_0,{q_0})$ where, $\delta$ is







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The language $L={a,b}^*$ means all possible strings over $a$ and $b$, including null string $\epsilon$.


So, an automaton recognizes $L={a,b}^*$ if every string made from $a$ and $b$ is accepted.


In A, $q_0$ is the initial and final state, and both $a$ and $b$ return to $q_0$.


So, A accepts all strings over ${a,b}$.


In B and C, $q_0$ and $q_1$ are final states, so all possible moves remain in final states.


So, B and C also accept all strings over ${a,b}$.


In D, $q_0$ is final and from $q_0$, both $a$ and $b$ return to $q_0$. Other states do not affect acceptance because starting from $q_0$, every input stays at $q_0$.


So, D also accepts all strings over ${a,b}$.


Therefore, A, B, C and D recognize $L={a,b}^*$.


UGC NET Computer Science PYQ
Consider the following recursive function $F()$ in Java that takes an integer value and returns a string value:

public static String F(int N){
if (N <= 0) return "-";
return F(N - 3) + N + F(N - 2) + N;
}

The value of $F(5)$ is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Given function is $F(N)=F(N-3)+N+F(N-2)+N$ and if $N\le 0$, then $F(N)=-$.
Now,
$F(1)=F(-2)+1+F(-1)+1=-1-1$
$F(2)=F(-1)+2+F(0)+2=-2-2$
$F(3)=F(0)+3+F(1)+3=-3-1-13$
Now find $F(5)$:
$F(5)=F(2)+5+F(3)+5$
$F(5)=(-2-2)+5+(-3-1-13)+5$
$F(5)=-2-25-3-1-135$

UGC NET Computer Science PYQ

Consider the following statements:

$S_1:\forall xP(x)\vee \forall xQ(x)$ and $\forall x(P(x)\vee Q(x))$ are not logically equivalent.

$S_2:\exists xP(x)\wedge \exists xQ(x)$ and $\exists x(P(x)\wedge Q(x))$ are not logically equivalent.

Which of the following statements is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

For $S_1$:

$\forall xP(x)\vee \forall xQ(x)$ means either $P(x)$ is true for all $x$, or $Q(x)$ is true for all $x$.

But $\forall x(P(x)\vee Q(x))$ means for every $x$, at least one of $P(x)$ or $Q(x)$ is true.

These two statements are not logically equivalent.

So, $S_1$ is true.

For $S_2$:

$\exists xP(x)\wedge \exists xQ(x)$ means there exists some $x$ for $P(x)$ and there exists some $x$ for $Q(x)$. These may be different values.

But $\exists x(P(x)\wedge Q(x))$ means there exists the same $x$ for which both $P(x)$ and $Q(x)$ are true.

These two statements are also not logically equivalent.

So, $S_2$ is true.


UGC NET Computer Science PYQ
The Boolean expression $\overline{A}\cdot B+A\cdot \overline{B}+A\cdot B$ is equivalent to:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Given Boolean expression is

$\overline{A}\cdot B+A\cdot \overline{B}+A\cdot B$

Now, group the last two terms:

$= \overline{A}\cdot B+A(\overline{B}+B)$

Since,

$\overline{B}+B=1$

So,

$= \overline{A}\cdot B+A$

Using Boolean identity,

$A+\overline{A}B=A+B$

Therefore,

$\overline{A}\cdot B+A\cdot \overline{B}+A\cdot B=A+B$


UGC NET Computer Science PYQ

Arrange the following steps of Feature Driven Development (FDD) process in the correct sequence :


(A) Develop an overall model

(B) Build by feature

(C) Plan by feature

(D) Design by feature

(E) Build a feature list


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Standard FDD lifecycle steps:

  1. Develop overall model

  2. Build feature list

  3. Plan by feature

  4. Design by feature

  5. Build by feature

Thus order:

(A) → (E) → (C) → (D) → (B)


UGC NET Computer Science PYQ
Which of the following statement(s) are correct?
A. Syntax Directed Translation can be applied in Type Checking.
B. Syntax Directed Translation can be used in 3-address code generation.
C. Syntax Directed Translation can be used in construction of syntax tree.
D. Syntax Directed Translation can be used to recognize valid tokens.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Syntax Directed Translation is used in:

Type checking

Intermediate code generation like 3-address code

Construction of syntax tree

But valid tokens are recognized by lexical analyzer, not by syntax directed translation.

So, correct statements are A, B and C.

Correct option is:

$\boxed{(a)\ \text{A, B and C}}$


UGC NET Computer Science PYQ
Match List I with List II:
List IList II
A. JNDII. Runtime support for running Java program
B. RMIII. The API in support of naming and directory services.
C. JDKIII. The methods provided by the Java development kit and runtime support for calling remote methods.
D. JREIV. The compiler and class libraries to develop Java applications.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

JNDI means Java Naming and Directory Interface. It provides API support for naming and directory services. So, $A-II$.
RMI means Remote Method Invocation. It supports calling methods on remote objects. So, $B-III$.
JDK means Java Development Kit. It contains compiler and class libraries to develop Java applications. So, $C-IV$.
JRE means Java Runtime Environment. It provides runtime support for running Java programs. So, $D-I$.
Final matching is $A-II,\ B-III,\ C-IV,\ D-I$.

UGC NET Computer Science PYQ

Consider the game tree given below.

Here $\circ$ and $\square$ represent MIN and MAX nodes respectively. The value of the root node of the game tree is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In the given game tree:

$\square$ represents MAX node

$\circ$ represents MIN node

So, we evaluate the tree from bottom to top using the minimax rule.

At MIN node, minimum value is selected.

At MAX node, maximum value is selected.

From the left side of the tree:

$\min(17,19)=17$

After applying MAX and MIN levels, the left subtree gives value:

$17$

From the right side of the tree:

The available minimum values include $15$ and $14$, so the right subtree gives a value less than $17$.

At the root node, we have MAX node.

So root will select maximum value:

$\max(17,14)=17$

Therefore, the value of the root node is:

$17$


UGC NET Computer Science PYQ
In PERT/CPM, the merge event represents _____ of two or more events.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

In PERT/CPM network, a merge event is an event where two or more activities come together.

It represents the joining of two or more events or activities.

Therefore, the merge event represents joining.


UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I (Recurrence Relations)

List - II (Complexity) 

 (A) $T(n)=2T(n/2)+n$
 (I) $T(n)=\theta(n\log n)$ [exact solution]
 (B) $T(n)=T(n/2)+1$
 (II) $O(n^2)$
 (C) $T(n)=2T(n/2)+1$
 (III) $T(n)=\theta(n)$ [exact solution]
 (D) $T(n)=T(n-1)+1$

 (IV) $O(\log n)$

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) $T(n)=2T(n/2)+n$


Master theorem


$a=2,; b=2,; f(n)=n$


$\Rightarrow T(n)=\theta(n\log n)$


So (A) → (I)


(B) $T(n)=T(n/2)+1$


Divide size halves each step


$\Rightarrow T(n)=O(\log n)$


So (B) → (IV)


(C) $T(n)=2T(n/2)+1$


Master theorem


$\Rightarrow T(n)=\theta(n)$


So (C) → (III)


(D) $T(n)=T(n-1)+1$


Linear recurrence


$\Rightarrow T(n)=O(n)$


Closest option given:


(D) → (II)


Thus matching:


(A)-(I), (B)-(IV), (C)-(III), (D)-(II)


UGC NET Computer Science PYQ
Which of the following statement(s) are correct?
A. Syntax Directed Translation can be applied in Type Checking.
B. Syntax Directed Translation can be used in 3-address code generation.
C. Syntax Directed Translation can be used in construction of syntax tree.
D. Syntax Directed Translation can be used to recognize valid tokens.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Given distance from router $R$ to its neighbors:

$R\to X=3$

$R\to Y=2$

$R\to Z=5$

For router $P$:

Via $X$: $3+7=10$

Via $Y$: $2+6=8$

Via $Z$: $5+5=10$

Minimum distance from $R$ to $P$ is $8$ via $Y$.

So, statement C is true.

For router $Q$:

Via $X$: $3+4=7$

Via $Y$: $2+6=8$

Via $Z$: $5+8=13$

Minimum distance from $R$ to $Q$ is $7$ via $X$.

So, statement B is true.

Correct statements are B and C only.

Correct option is:

$\boxed{(a)\ \text{B and C only}}$


UGC NET Computer Science PYQ
Match List I with List II
List IList II
A. ImperativeI. Declarative, clausal representation, theorem proving
B. Object-orientedII. Side-effect-free, declarative, expression evaluation
C. LogicIII. Imperative, abstract data type
D. FunctionalIV. Command-based, procedural





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Imperative programming is command-based and procedural, so $A-IV$.
Object-oriented programming is based on objects, classes and abstract data types, so $B-III$.
Logic programming is declarative and uses clausal representation and theorem proving, so $C-I$.
Functional programming is side-effect-free and based on expression evaluation, so $D-II$.
Final matching is $A-IV,\ B-III,\ C-I,\ D-II$.

UGC NET Computer Science PYQ

Consider the following models:

$M_1:$ Mamdani model
$M_2:$ Takagi-Sugeno-Kang model
$M_3:$ Kosko's additive model $($SAM$)$

Which of the following option contains examples of additive rule model?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Additive rule models combine the contribution of rules in an additive manner.

Takagi-Sugeno-Kang model is an additive rule model.

Kosko's Standard Additive Model $($SAM$)$ is also an additive rule model.

Mamdani model is not generally considered an additive rule model in this classification.

So, examples of additive rule model are:

$M_2$ and $M_3$


UGC NET Computer Science PYQ

Use Dual Simplex Method to solve the following problem:

Maximize

$z=-2x_1-3x_2$

subject to:

$x_1+x_2\geq 2$

$2x_1+x_2\leq 10$

$x_1+x_2\leq 8$

$x_1,x_2\geq 0$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Given objective function is

$z=-2x_1-3x_2$

To maximize $z=-2x_1-3x_2$, we need to minimize the negative loss.

The main lower constraint is

$x_1+x_2\geq 2$

Now check the feasible corner points on $x_1+x_2=2$:

If $x_2=0$, then

$x_1=2$

So, point is $(2,0)$.

At $(2,0)$,

$z=-2(2)-3(0)$

$z=-4$

If $x_1=0$, then

$x_2=2$

So, point is $(0,2)$.

At $(0,2)$,

$z=-2(0)-3(2)$

$z=-6$

Since $-4>-6$, maximum value is $-4$.

Also, $(2,0)$ satisfies the other constraints:

$2x_1+x_2=2(2)+0=4\leq 10$

$x_1+x_2=2+0=2\leq 8$

Therefore, optimal solution is

$x_1=2,\ x_2=0,\ z=-4$


UGC NET Computer Science PYQ
Consider the routing table of an organization's
router as shown in the table given below
 Subnet NumberSubnet Mask Next Hop 
12.20.164.0  255.255.252.0 R1
 12.20.170.0255.255.254.0 R2 
12.20.168.0 255.255.254.0 Interface 0 
12.20.166.0 255.255.254.0 Interface 1
Default - R3 
Which of the following prefixes in CIDR Notation
can be collectively used to correctly aggregate
all of the subnets in the routing table?
A. (12.20 .164 .0 / 20)
B. (12.20 .164 .0 / 22)
C. (12.20 .164 .0 / 21)
D. (12.20 .168 .0 / 22)
Choose the correct answer from the options
given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

$255.255.252.0 = /22$

So,

$12.20.164.0/22$ covers:

$12.20.164.0$ to $12.20.167.255$

This includes:

$12.20.164.0$ and $12.20.166.0$

Now,

$12.20.168.0/22$ covers:

$12.20.168.0$ to $12.20.171.255$

This includes:

$12.20.168.0$ and $12.20.170.0$

Therefore, all given subnets can be correctly aggregated by:

$12.20.164.0/22$ and $12.20.168.0/22$

So, correct option is:

$\boxed{(d)\ \text{B and D Only}}$


UGC NET Computer Science PYQ
Suppose you have eight black and white images taken with a $1$-megapixel camera and one $8$-color image taken by an $8$-megapixel camera. How much hard disk space in total do you need to store these images on your computer?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

A black and white image needs $1$ bit per pixel.
Size of one $1$-megapixel black and white image $=1\times 10^6$ bits.
Size of $8$ such images $=8\times 10^6$ bits $=1\ MB$.
An $8$-color image needs $\log_2 8=3$ bits per pixel.
Size of one $8$-megapixel $8$-color image $=8\times 10^6\times 3=24\times 10^6$ bits $=3\ MB$.
Total space $=1\ MB+3\ MB=4\ MB$.

UGC NET Computer Science PYQ

A fuzzy conjunction operator $t(x,y)$ and a fuzzy disjunction operator $s(x,y)$ form a pair if they satisfy:

$t(x,y)=1-s(1-x,1-y)$

If $t(x,y)=\dfrac{xy}{x+y-xy}$, then $s(x,y)$ is given by:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Given:

$t(x,y)=1-s(1-x,1-y)$

So,

$s(x,y)=1-t(1-x,1-y)$

Now,

$t(1-x,1-y)=\dfrac{(1-x)(1-y)}{(1-x)+(1-y)-(1-x)(1-y)}$

Numerator:

$(1-x)(1-y)=1-x-y+xy$

Denominator:

$(1-x)+(1-y)-(1-x)(1-y)$

$=2-x-y-(1-x-y+xy)$

$=1-xy$

So,

$t(1-x,1-y)=\dfrac{1-x-y+xy}{1-xy}$

Now,

$s(x,y)=1-\dfrac{1-x-y+xy}{1-xy}$

$s(x,y)=\dfrac{1-xy-1+x+y-xy}{1-xy}$

$s(x,y)=\dfrac{x+y-2xy}{1-xy}$


UGC NET Computer Science PYQ

In computers, subtraction is generally carried out by:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

In computers, subtraction is generally performed using $2$'s complement method.

For subtracting $B$ from $A$, the computer takes the $2$'s complement of $B$ and adds it to $A$.

This makes subtraction possible using the same binary adder circuit used for addition.

Therefore, subtraction in computers is generally carried out by $2$'s complement.


UGC NET Computer Science PYQ
Which of the following is correct way to declare a functional pointer in C ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Function pointer syntax:


return_type (*pointer_name)(arguments);


Example:


int (*func)(int,int);


Meaning:


func is a pointer


pointing to a function


returning int


taking two int parameters


Thus correct declaration:


int (*func)(int,int);


UGC NET Computer Science PYQ
Consider two hosts P and Q are connected through a router R. The maximum transfer unit $(MTU)$ value of the link between P and R is $1500$ bytes and between R and Q is $820$ bytes. A TCP segment of size $1400$ bytes is transferred from P to Q through R with IP identification value of $0x1234$. Assume that IP header size is $20$ bytes. Further, the packet is allowed to be fragmented, meaning the Don't Fragment $(DF)$ flag in the IP Header is not set by P.
Which of the following statements is/are not true?

A. Two fragments are created at R and IP datagram size carrying the second fragment is $620$ bytes

B. If the second fragment is lost then R resend the fragment with IP Identification value of $0x1234$

C. If the second fragment is lost then P is required to resend the entire TCP segment

D. TCP destination port can be determined by analyzing the second fragment only

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

TCP segment size $=1400$ bytes

IP header size $=20$ bytes

So, total IP datagram size:

$1400+20=1420$ bytes

MTU between R and Q is $820$ bytes.

So, maximum data in each fragment:

$820-20=800$ bytes

Now TCP segment data $1400$ bytes is divided as:

First fragment data $=800$ bytes

Second fragment data $=600$ bytes

Second fragment total size:

$600+20=620$ bytes

So, statement A is true.

Statement B is false because router R does not resend lost fragments.

Statement C is true because if a fragment is lost, TCP sender P may retransmit the whole TCP segment.

Statement D is false because TCP header is present only in the first fragment, so TCP destination port cannot be found from the second fragment only.

Therefore, not true statements are B and D.


UGC NET Computer Science PYQ
Which of the statements given below are correct?

The midpoint or Bresenham algorithm for rasterizing lines is optimized relative to DDA algorithm in that

A. it avoids round-off operations.

B. it is incremental.

C. it uses only integer arithmetic.

D. all straight lines can be displayed as straight exact.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Bresenham line drawing algorithm is optimized compared to DDA algorithm.
DDA uses floating point calculations and round-off operations.
Bresenham avoids round-off operations, so statement A is correct.
Bresenham is incremental because the next pixel is calculated from the previous pixel, so statement B is correct.
Bresenham uses only integer arithmetic, so statement C is correct.
But on raster display, every straight line cannot be displayed exactly as a mathematical straight line because pixels are discrete, so statement D is false.
Therefore, A, B and C only are correct.

UGC NET Computer Science PYQ

Let $W_{ij}$ represents weight between node $i$ at layer $k$ and node $j$ at layer $(k-1)$ of a given multilayer perceptron. The weight updation using gradient descent method is given by:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In gradient descent, weights are updated in the opposite direction of the gradient.

The general rule is:

$New\ Weight=Old\ Weight-\alpha\times Gradient$

Here,

$\alpha$ is the learning rate.

So,

$W_{ij}(t+1)=W_{ij}(t)-\alpha\dfrac{\partial E}{\partial W_{ij}}$


UGC NET Computer Science PYQ
Consider the following Boolean equations:

$(i)\ wx+w(\overline{x}+y)+x(\overline{x}+y)=x+wy$

$(ii)\ (w\overline{x}(y+x\overline{z})+\overline{w}\overline{x})y=\overline{x}y$

What can you say about the above equations?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

For equation $(i)$,

$wx+w(\overline{x}+y)+x(\overline{x}+y)$

$=wx+w\overline{x}+wy+x\overline{x}+xy$

Since,

$x\overline{x}=0$

So,

$=wx+w\overline{x}+wy+xy$

$=w(x+\overline{x})+wy+xy$

$=w+wy+xy$

$=w+xy$

But the right side is

$x+wy$

Since $w+xy$ is not always equal to $x+wy$, equation $(i)$ is false.

Now, for equation $(ii)$,

$(w\overline{x}(y+x\overline{z})+\overline{w}\overline{x})y$

$=(w\overline{x}y+w\overline{x}x\overline{z}+\overline{w}\overline{x})y$

Since,

$\overline{x}x=0$

So,

$=(w\overline{x}y+\overline{w}\overline{x})y$

$=w\overline{x}y+\overline{w}\overline{x}y$

$=\overline{x}y(w+\overline{w})$

$=\overline{x}y$

So, equation $(ii)$ is true.

Therefore, $(i)$ is false and $(ii)$ is true.


UGC NET Computer Science PYQ
Which of the following best describes the structure of a relational database ?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Relational databases (MySQL, PostgreSQL, Oracle etc.) store data in relations (tables).


Each table consists of:


Rows → tuples / records


Columns → attributes / fields


Thus relational model structure:


tables with rows and columns


UGC NET Computer Science PYQ

Consider the following features of Neural networks.

A. It is essentially a machine learning algorithm.

B. It is useful when solving the problems for which the data set is very large.

C. They are able to extract features without input from the programmer.

D. These are systems modeled on the human brain and nervous system.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

All given statements are correct.

Neural networks are machine learning models.

They work well on large data sets.

They can automatically extract features from data.

They are inspired by the human brain and nervous system.

So, correct option is:

$\boxed{(d)\ \text{A, B, C and D}}$


UGC NET Computer Science PYQ
 What is the transformation matrix $M$ that transforms a square in the $xy$-plane defined by $(1,1)^T,(-1,1)^T,(-1,-1)^T$ and $(1,-1)^T$ to a parallelogram whose corresponding vertices are $(2,1)^T,(0,1)^T,(-2,-1)^T$ and $(0,-1)^T$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

We need a transformation that maps each original point to the corresponding new point.
Check the coordinates:
$(1,1)\to(2,1)$
$(-1,1)\to(0,1)$
$(-1,-1)\to(-2,-1)$
$(1,-1)\to(0,-1)$
From these mappings, we can observe that $y'=y$.
Also, $x'=x+y$.
So, in homogeneous coordinate form:
$\left[\begin{matrix}x'\\y'\\1\end{matrix}\right]=\left[\begin{matrix}1&1&0\\0&1&0\\0&0&1\end{matrix}\right]\left[\begin{matrix}x\\y\\1\end{matrix}\right]$
Now verify using $(1,1)$:
$x'=1+1=2,\ y'=1$
So, $(1,1)\to(2,1)$.
Therefore, the required transformation matrix is:
$M=\left[\begin{matrix}1&1&0\\0&1&0\\0&0&1\end{matrix}\right]$

UGC NET Computer Science PYQ
The order of schema $?10?101?$ and $???0??1$ are $...............$ and $...............$ respectively.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In genetic algorithm, the order of a schema is the number of fixed positions.

Fixed positions are symbols other than $?$

For schema $?10?101?$:

Fixed symbols are:

$1,\ 0,\ 1,\ 0,\ 1$

So, order is:

$5$

For schema $???0??1$:

Fixed symbols are:

$0,\ 1$

So, order is:

$2$


UGC NET Computer Science PYQ
Consider the graph shown below : 
Use Kruskal's algorithm to find the minimum spanning tree of the graph. The weight of this minimum spanning tree is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Using Kruskal's algorithm, we select edges in increasing order of weights, without forming a cycle.

From the graph, the selected edge weights are:

$1,1,1,2,2,2,3,4$

Since the graph has $9$ vertices, the minimum spanning tree must have

$9-1=8$ edges.

Now, total weight of MST is

$1+1+1+2+2+2+3+4$

$=16$

Therefore, the weight of the minimum spanning tree is

$16$


UGC NET Computer Science PYQ

Arrange the following in the increasing order of coupling from lowest coupling to highest coupling.

A. Common Coupling
B. Stamp Coupling
C. Control Coupling
D. External Coupling
E. Content Coupling

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Increasing coupling (lower → higher):

  • Stamp coupling (B): modules share a composite data structure but use only parts of it.

  • Control coupling (C): one module controls another via flags/controls.

  • External coupling (D): modules depend on externally imposed formats/protocols/devices.

  • Common coupling (A): modules share global data.

  • Content coupling (E): one module relies on or modifies another’s internal logic (worst).


UGC NET Computer Science PYQ

Which of the following tasks could be attained using syntax trees in compiler design ?

(A) Type Checking
(B) Code Generation
(C) Code Optimization
(D) Error Handling

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Syntax trees (Abstract Syntax Tree – AST) are used in later compiler phases.


(A) Type Checking → Done using syntax tree ✔


(B) Code Generation → Uses syntax tree ✔


(C) Code Optimization → Uses syntax tree representation ✔


(D) Error Handling → Mainly done during lexical / syntax analysis ✘


Thus correct tasks:


(A), (B), (C)


UGC NET Computer Science PYQ

Consider the following draw backs is/are of Rule based approach is/are:

A. The learning is static.

B. Any changes made to the original data will not be considered.

C. Once trained the model cannot improve on the basis of feedback.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In rule based approach, rules are fixed manually.

Learning is static because the system does not automatically update itself.

Changes in original data are not automatically considered.

It cannot improve automatically based on feedback.

So, all statements A, B and C are correct.

Correct option is:

$\boxed{(a)\ \text{All the above statements are correct}}$


UGC NET Computer Science PYQ
Suppose a Bezier curve $P(t)$ is defined by the following four control points in the $xy$-plane:

$P_0=(-2,0),\ P_1=(-2,4),\ P_2=(2,4),\ P_3=(2,0)$

Then which of the following statements are correct?

A. Bezier curve $P(t)$ has degree $3$.

B. $P\left(\frac{1}{2}\right)=(0,3)$.

C. Bezier curve $P(t)$ may extend outside the convex hull of its control points.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution


Since there are $4$ control points, the Bezier curve is cubic.

So, degree $=4-1=3$. Hence, statement A is true.

For cubic Bezier curve,

$P(t)=(1-t)^3P_0+3t(1-t)^2P_1+3t^2(1-t)P_2+t^3P_3$

At $t=\frac{1}{2}$,

$P\left(\frac{1}{2}\right)=\frac{1}{8}P_0+\frac{3}{8}P_1+\frac{3}{8}P_2+\frac{1}{8}P_3$

$x=\frac{1}{8}(-2)+\frac{3}{8}(-2)+\frac{3}{8}(2)+\frac{1}{8}(2)=0$

$y=\frac{1}{8}(0)+\frac{3}{8}(4)+\frac{3}{8}(4)+\frac{1}{8}(0)=3$

So, $P\left(\frac{1}{2}\right)=(0,3)$. Hence, statement B is true.

Bezier curve always lies inside the convex hull of its control points.

So, statement C is false.

UGC NET Computer Science PYQ

. Let the population of chromosomes in genetic algorithm is represented in terms of binary number. The strength of fitness of a chromosome in decimal form, $x$, is given by

$Sf(x)=\dfrac{f(x)}{\sum f(x)}$ where $f(x)=x^2$

The population is given by $P$ where:

$P={(01101),(11000),(01000),(10011)}$

The strength of fitness of chromosome $(11000)$ is $...............$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Convert chromosomes into decimal form:

$(01101)_2=13$

$(11000)_2=24$

$(01000)_2=8$

$(10011)_2=19$

Now calculate $f(x)=x^2$

For $13$:

$f(13)=13^2=169$

For $24$:

$f(24)=24^2=576$

For $8$:

$f(8)=8^2=64$

For $19$:

$f(19)=19^2=361$

Now,

$\sum f(x)=169+576+64+361=1170$

Strength of fitness for chromosome $(11000)$:

$Sf(24)=\dfrac{576}{1170}$

$Sf(24)=0.4923$

In percentage:

$0.4923\times 100=49.23%\approx 49.2$


UGC NET Computer Science PYQ

Consider the following statements:

$(i)$ Auto increment addressing mode is useful in creating self-relocating code.
$(ii)$ If auto increment addressing mode is included in an instruction set architecture, then an additional ALU is required for effective address calculation.
$(iii)$ In auto increment addressing mode, the amount of increment depends on the size of the data item accessed.

Which of the above statements is/are true?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Statement $(i)$ is false.

Self-relocating code is mainly supported by relative addressing, not by auto increment addressing.

Statement $(ii)$ is false.

Auto increment addressing does not necessarily require an additional ALU. The increment can be handled by the processor hardware.

Statement $(iii)$ is true.

In auto increment addressing mode, the register is incremented according to the size of the data item accessed.

For example, if byte is accessed, increment may be $1$. If word is accessed, increment may be more.

Therefore, only statement $(iii)$ is true.


UGC NET Computer Science PYQ
The correct sequence of constructing Huffman tree is

A. Repeat until root formed
B. Create leaf nodes
C. Build priority queue
D. Combine lowest frequency nodes

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Create leaf nodes (B) for each character with their frequency. Build a priority queue (C) (min-heap) based on frequency. Combine lowest frequency nodes (D) repeatedly to form new internal nodes. Repeat until root formed (A) — the final remaining node is the root of the Huffman tree. Hence, the correct order is B → C → D → A.

UGC NET Computer Science PYQ

Given a project with an estimated effort of 1500 person-hours and a team of 5 people, how many days will it take to complete the project, if each person works 8 hours a day ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Total effort

$1500$ person-hours

Work per day by team:

$5 \times 8 = 40$ hours/day

Days required

$= \frac{1500}{40}$

$= 37.5$


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

 A. Linear Program
 I. Prim's Algorithm
 B. Predicate Logic
II. In order
 
 C. Tree Traversal
 III. Simplex Algorithm
 D. Minimum Spanning Tree Problem

 IV. First order logic






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Linear Program is solved by Simplex Algorithm.

Predicate Logic is also called First order logic.

Tree Traversal includes In order traversal.

Minimum Spanning Tree Problem can be solved by Prim's Algorithm.

So,

A → III
B → IV
C → II
D → I

Correct option is:

$\boxed{(b)\ A-III,\ B-IV,\ C-II,\ D-I}$


UGC NET Computer Science PYQ
Given below are two statements:

Statement I: The maximum number of sides that a triangle might have when clipped to a rectangular viewport is $6$.

Statement II: In $3D$ graphics, the perspective transformation is nonlinear in $z$.

In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

When a triangle is clipped against a rectangular viewport, new vertices may be created at clipping boundaries.

A triangle has $3$ sides initially.

After clipping with a rectangle, the resulting polygon can have at most $6$ sides.

So, Statement I is true.

In $3D$ graphics, perspective transformation involves division by depth value $z$.

Because of this division by $z$, the transformation is not linear in $z$.

So, Statement II is also true.

Hence, both Statement I and Statement II are true.

UGC NET Computer Science PYQ
Consider the following statements: $S_1:$ If a group $(G,*)$ is of order $n$, and $a\in G$ is such that $a^m=e$ for some integer $m\le n$, then $m$ must divide $n$. $S_2:$ If a group $(G,)$ is of even order, then there must be an element $a\in G$ such that $a\ne e$ and $aa=e$. Which of the statements is/are correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

For $S_1$:

By Lagrange theorem, the order of every element of a finite group divides the order of the group.

So, if $m$ is the order of element $a$, then $m$ divides $n$.

Hence, $S_1$ is true.

For $S_2$:

If a finite group has even order, then there exists at least one non-identity element of order $2$.

So, there exists $a\ne e$ such that:

$a*a=e$

Hence, $S_2$ is also true.


UGC NET Computer Science PYQ
A computer uses a memory unit with $256K$ words of $32$ bits each. A binary instruction code is stored in one word of memory. The instruction has four parts: an indirect bit, an operation code and a register code part to specify one of $64$ registers and an address part. How many bits are there in the operation code, the register code part and the address part?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Memory size is

$256K=256\times 1024=2^8\times 2^{10}=2^{18}$ words

So, address part requires

$18$ bits

Number of registers is

$64=2^6$

So, register code requires

$6$ bits

Instruction size is

$32$ bits

Indirect bit requires

$1$ bit

So, operation code bits are

$32-1-6-18=7$

Therefore, operation code, register code and address part are

$7,6,18$


UGC NET Computer Science PYQ
Consider the following three relations:

Employee(eid, eName), Comp(cid, cName), Own(eid, cid).
Which of the following relational algebra expressions return the set of eids who own all brands?

(1) π_eid( π_eid,cid(Own) ÷ π_cid(Comp) )
(2) π_eid( π_eid(Own) × π_cid(Comp) )
(3) π_eid( π_eid,cid(Own) × π_cid(Comp) )
(4) π_eid( π_eid(Own) × (π_cid,cName(Own) ÷ π_cid(Comp)) )





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Reason: To find employees who own all brands, divide the (eid,cid) pairs in Own by the set of all cids in Comp, then project eid: π_eid( (Own[eid,cid]) ÷ (Comp[cid]) ).

UGC NET Computer Science PYQ

Consider the following C code :

#include<stdio.h>


int temp = 0;


int fun(int x, int y)

{

    int z;

    temp++;


    if (y == 3)

        return (x*x*x);

    else

    {

        z = fun(x, y/3);

        return (z*z*z);

    }

}


int main()

{

    fun(4,81);

    printf("%d", temp);

}
What will be the output of the above code ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Recursive calls divide $y$ by $3$ each time.

Call sequence:

$fun(4,81)$
$fun(4,27)$
$fun(4,9)$
$fun(4,3)$

Total calls = 4

Each call increments temp.

So

$temp = 4$


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. DAA
I. Program Control Instruction
B. LXI
II. Interrupt instruction 
 C. RST
 III. Data Movement Instruction
 D. JMP

IV. Arithmetic Instruction






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

DAA means Decimal Adjust Accumulator, so it is an Arithmetic Instruction.

LXI means Load register pair immediate, so it is a Data Movement Instruction.

RST is a Restart instruction, so it is an Interrupt instruction.

JMP is a Jump instruction, so it is a Program Control Instruction.

So,

A → IV
B → III
C → II
D → I

Correct option is:

$\boxed{(b)\ A-IV,\ B-III,\ C-II,\ D-I}$


UGC NET Computer Science PYQ
In software testing, beta testing is the testing performed by ____________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Beta testing is performed after alpha testing.
In beta testing, software is given to selected real users or potential customers.
They test the software in their own real environment, not at the developer's location.
So, beta testing is performed by potential customers at their own locations.

UGC NET Computer Science PYQ

Consider the following statements with respect to duality in LPP:

(a) The final simplex table giving optimal solution of the primal also contains optimal solution of its dual in itself.

(b) If either the primal or the dual problem has a finite optimal solution, then the other problem also has a finite optimal solution.

(c) If either problem has an unbounded optimum solution, then the other problem has no feasible solution at all.

Which of the statements is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

The final simplex table of the primal problem also gives information about the optimal solution of the dual problem.

Statement (b) is correct.

By strong duality theorem, if one problem has a finite optimal solution, then the other also has a finite optimal solution.

Statement (c) is correct.

If one problem is unbounded, then the other problem is infeasible.

So, all three statements are correct.


UGC NET Computer Science PYQ

Consider the following x86 assembly language instructions:

MOV AL, $153$
NEG AL

The contents of the destination register AL in $8$-bit binary notation, the status of Carry Flag $(CF)$ and Sign Flag $(SF)$ after the execution of above instructions, are:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Given,

$AL=153$

Binary form of $153$ is

$10011001$

The instruction NEG AL performs two's complement.

So,

Two's complement of $10011001$ is

$01100111$

Therefore,

$AL=01100111$

Since the operand is non-zero, Carry Flag is set.

So,

$CF=1$

The result $01100111$ has most significant bit $0$.

So, Sign Flag is

$SF=0$


UGC NET Computer Science PYQ

Match List I with List II

List I List II
A. Clustered Page Table III. Useful for sparse address spaces.
B. Hierarchical Page Table I. Generally considered inappropriate for 64-bit architectures.
C. Segmentation IV. Supports a user view of the system.
D. Inverted Page Table II. Has only entry for each real page (or frame) of memory.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Explanation:

  • $A \rightarrow III$ → Clustered Page Table is useful for sparse address spaces.
  • $B \rightarrow I$ → Hierarchical Page Table is inappropriate for 64-bit architectures.
  • $C \rightarrow IV$ → Segmentation supports user’s logical view.
  • $D \rightarrow II$ → Inverted Page Table has only one entry per real page frame.

UGC NET Computer Science PYQ
Let $P$ be “It is hot day” and $q$ be “The temperature is $48^\circ C$”.
Write in simple sentences the meaning of $\neg P \land \neg q$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Given:


$P$ : It is hot day


$q$ : Temperature is $48^\circ C$


Expression:


$\neg P \land \neg q$


Meaning:


$\neg P$ → It is not a hot day


$\neg q$ → Temperature is not $48^\circ C$


Combined with AND:


Neither $P$ nor $q$


Thus sentence:


"It is neither a hot day nor temperature is $48^\circ C$"


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. 2-D Array Input
I. Liquid Crystal Display
B. Transmissive device
II. Flat-bed scanner
C. Binary image
III. Camera

D. 1-D Array input

IV. Inkjet printer

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

2-D Array Input → Camera

Transmissive device → Liquid Crystal Display

Binary image → Inkjet printer

1-D Array input → Flat-bed scanner

So,

A → III
B → I
C → IV
D → II


UGC NET Computer Science PYQ
The V components in MVC are responsible for:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

MVC stands for Model View Controller.
In MVC, $V$ means View.
View is responsible for displaying data to the user.
It represents the user interface part of the application.
Model handles business logic and domain objects.
Controller handles user actions and connects View with Model.

UGC NET Computer Science PYQ

The Reduced Instruction Set Computer $($RISC$)$ characteristics are:
(a) Single cycle instruction execution
(b) Variable length instruction formats
(c) Instructions that manipulates operands in memory
(d) Efficient instruction pipeline

Choose the correct characteristics from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

RISC processors have simple instructions, mostly fixed length instructions and efficient pipelining.

In RISC:

Single cycle instruction execution is a characteristic.

Efficient instruction pipeline is also a characteristic.

Variable length instruction format is generally a CISC characteristic.

Instructions manipulating operands directly in memory is also generally a CISC characteristic.

So, correct statements are:

(a) and (d)


UGC NET Computer Science PYQ
The decimal floating point number $-40.1$ represented using IEEE-754 $32$-bit representation and written in hexadecimal form is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Given number is

$-40.1$

Since the number is negative, sign bit is

$1$

Now,

$40.1$ in binary is approximately

$101000.000110011001100110\ldots$

Normalize it:

$101000.000110011001100110\ldots=1.01000000110011001100110\ldots\times 2^5$

So, exponent is

$5$

IEEE-754 single precision bias is

$127$

Biased exponent is

$127+5=132$

Binary of $132$ is

$10000100$

Mantissa bits are

$01000000110011001100110$

So, IEEE-754 representation is

$1\ 10000100\ 01000000110011001100110$

This gives hexadecimal form:

$\text{C2206666}$

Therefore, the answer is

$\text{0xC2206666}$

Hence, the correct answer is Option 1.


UGC NET Computer Science PYQ
The longest common subsequence of $\{1,2,3,2,4,1,2\}$ and $\{2,4,3,1,2,1\}$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Why: The LCS length for the two sequences is $4$. $2,3,2,1$ is a subsequence of both: $\{1,\underline{2},3,\underline{2},4,1,\underline{2}\}$ and $\{\underline{2},4,\underline{3},1,\underline{2},\underline{1}\}$. Option (4) has length $5$ (too long), and (1), (2) are not subsequences of both.


UGC NET Computer Science PYQ
Let $L(x,y)$ be the statement “$x$ loves $y$” where the domain for both $x$ and $y$ consists of all people in the world.
Use quantifiers to express “Joy is loved by everyone.”





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Statement:


“Joy is loved by everyone”


Meaning:


Every person $x$ loves Joy.


Mathematically:


$\forall x; L(x,;Joy)$


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. Timestamp protocol
I. As long as the transaction is already running, it will try to obtain the required lock in the first part.
B. Strict two-phase locking protocol
II. Indicates final lock of the schedule.
C. Two-phase locking
III. Ensures freedom from deadlock.

D. Lock point in two-phase locking protocol

IV. Ensures cascade-less rollback

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Timestamp protocol ensures freedom from deadlock.

Strict two-phase locking protocol ensures cascade-less rollback.

Two-phase locking means transaction obtains locks in the first phase.

Lock point indicates the final lock of the schedule.

So,

A → III
B → IV
C → I
D → II

Correct option is:

$\boxed{(b)\ A-III,\ B-IV,\ C-I,\ D-II}$


UGC NET Computer Science PYQ
In software engineering, what kind of notation do formal methods predominantly use?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Formal methods are used to specify, develop and verify software systems.
They use strict and precise notation.
This notation is mainly based on mathematics, logic and set theory.
So, formal methods predominantly use mathematical notation.

UGC NET Computer Science PYQ

Which of the following binary codes for decimal digits are self complementing?

(a) $8421$ code
(b) $2421$ code
(c) excess-$3$ code
(d) excess-$3$ gray code

Choose the correct option:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

A self-complementing code is a code in which the $9$'s complement of a decimal digit is obtained by complementing all bits.

$8421$ code is not self-complementing.

$2421$ code is self-complementing.

Excess-$3$ code is also self-complementing.

So, correct codes are:

(b) and (c)


UGC NET Computer Science PYQ

Find the Boolean expression for the logic circuit shown below:

$(1-\text{NAND gate},\ 2-\text{NOR gate},\ 3-\text{NOR gate})$








Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Gate $1$ is a NAND gate with inputs $A$ and $B$.

So, output of gate $1$ is

$\overline{AB}$

Now, gate $2$ is a NOR gate.

Its inputs are $\overline{A}$ and $B$.

So, output of gate $2$ is

$\overline{\overline{A}+B}$

Using De Morgan's law,

$\overline{\overline{A}+B}=A\overline{B}$

Now, gate $3$ is also a NOR gate.

Its inputs are $\overline{AB}$ and $A\overline{B}$.

So,

$Y=\overline{\overline{AB}+A\overline{B}}$

Now,

$\overline{AB}=\overline{A}+\overline{B}$

Therefore,

$Y=\overline{\overline{A}+\overline{B}+A\overline{B}}$

Since $\overline{B}+A\overline{B}=\overline{B}$,

$Y=\overline{\overline{A}+\overline{B}}$

Using De Morgan's law,

$Y=AB$


UGC NET Computer Science PYQ
Given that η refers to learning rate and xi refers to the i-th input to the neuron, which of the followings most suitably describes the weight updation rule of a Kohonen SOM? (where ‘j’ refers to the j-th neuron in the lattice)





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Explanation: The SOM (Self-Organizing Map) weight update formula is w(new) = w(old) + η * (x − w(old)) which simplifies to (1 − η) * w(old) + η * x.

UGC NET Computer Science PYQ
Consider the following relations on ${1,2,3,4}$. Which of the following relations are reflexive ?

(A)
$R_1={(1,1),(1,2),(2,1),(2,2),(3,4),(4,1),(4,4)}$

(B)
$R_2={(1,1),(1,2),(2,1)}$

(C)
$R_3={(1,1),(1,2),(1,4),(2,1),(2,2),(3,3),(4,1),(4,4)}$

(D)
$R_4={(2,1),(3,1),(3,2),(4,1),(4,2),(4,3)}$

(E)
$R_5={(1,1),(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,3),(3,4),(4,4)}$

Choose the correct answer from the options given below :







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

For a relation on ${1,2,3,4}$ to be reflexive, it must contain


$(1,1),(2,2),(3,3),(4,4)$


Check each:


$R_1$ → missing $(3,3)$ ✘


$R_2$ → missing $(3,3),(4,4)$ ✘


$R_3$ → contains $(1,1),(2,2),(3,3),(4,4)$ ✔


$R_4$ → missing all diagonal pairs ✘


$R_5$ → contains all $(1,1),(2,2),(3,3),(4,4)$ ✔


Thus reflexive relations:


$R_3$ and $R_5$


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. reference bit = $0$, modify bit = $0$

I. Must write out before replacement.

B. reference bit = $0$, modify bit = $1$

II. Probably will be used again soon and need to write out.

C. reference bit = $1$, modify bit = $0$

III. Best page to replace.

D. reference bit = $1$, modify bit = $1$

IV. Probably will be used again soon.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

If reference bit $=0$ and modify bit $=0$, page is not recently used and not modified, so it is the best page to replace.

If reference bit $=0$ and modify bit $=1$, page is not recently used but modified, so it must be written out before replacement.

If reference bit $=1$ and modify bit $=0$, page is recently used and clean, so it will probably be used again soon.

If reference bit $=1$ and modify bit $=1$, page is recently used and modified, so it will probably be used again soon and needs to be written out.

So,

A → III
B → I
C → IV
D → II

Correct option is:

$\boxed{(d)\ A-III,\ B-I,\ C-IV,\ D-II}$


UGC NET Computer Science PYQ
If every requirement stated in the Software Requirement Specification $(SRS)$ has only one interpretation, then SRS is said to be





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

An SRS is called unambiguous when every requirement has only one clear meaning.
It means different readers should not interpret the same requirement in different ways.
Correct SRS means requirements match actual user needs.
Consistent SRS means requirements do not conflict with each other.
Verifiable SRS means requirements can be tested or checked.
Here, only one interpretation means unambiguous SRS.

UGC NET Computer Science PYQ

Consider the following statements with respect to approaches to fill areas on raster systems:

P: To determine the overlap intervals for scan lines that cross the area.

Q: To start from a given interior position and paint outward from this point until we encounter the specified boundary conditions.

Select the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement P describes the scan-line area filling approach.

In this method, overlap intervals for scan lines crossing the area are determined.

Statement Q describes the boundary-fill or flood-fill approach.

In this method, filling starts from an interior point and moves outward until boundary conditions are reached.

So, both P and Q are correct approaches for filling areas on raster systems.


UGC NET Computer Science PYQ
Consider a disk pack with $32$ surfaces, $64$ tracks and $512$ sectors per track. $256$ bytes of data are stored in a bit serial manner in a sector. The number of bits required to specify a particular sector in the disk is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Number of surfaces is

$32=2^5$

So, surface number needs $5$ bits.

Number of tracks is

$64=2^6$

So, track number needs $6$ bits.

Number of sectors is

$512=2^9$

So, sector number needs $9$ bits.

Therefore, total bits required are

$5+6+9=20$


UGC NET Computer Science PYQ
Arrange the process of virtualization in cloud environments.

A. Hypervisor installed on physical server
B. Virtual machines created
C. Resources allocated to Virtual machines
D. Virtual machines run isolated workloads





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Step 1 – Install hypervisor on the physical server.
Step 2 – Create virtual machines.
Step 3 – Allocate resources (CPU, RAM, etc.) to each VM.
Step 4 – VMs run isolated workloads.

UGC NET Computer Science PYQ

Fifth normal form is concerned with :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Database normal forms:


1NF → atomic values


2NF → remove partial dependency


3NF → remove transitive dependency


BCNF → stronger FD rules


4NF → multivalued dependency


5NF → join dependency


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. Condition coverage

I. Black box testing

B. Equivalence class Partitioning

II. System testing

C. Volume testing

III. White box testing

D. Alpha testing

IV. Performance testing

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Condition coverage → White box testing

Equivalence class Partitioning → Black box testing

Volume testing → Performance testing

Alpha testing → System testing

So,

A → III
B → I
C → IV
D → II

Correct option is:

$\boxed{(b)\ A-III,\ B-I,\ C-IV,\ D-II}$


UGC NET Computer Science PYQ
A system has $99.99\%$ uptime and has a mean-time-between-failure of $1$ day. How fast does the system has to repair itself in order to reach this availability goal?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Availability formula is:

$Availability=\frac{MTBF}{MTBF+MTTR}$

Given,

$Availability=99.99\%=0.9999$

$MTBF=1$ day $=24\times60\times60=86400$ seconds

Now,

$0.9999=\frac{86400}{86400+MTTR}$

$86400+MTTR=\frac{86400}{0.9999}$

$MTTR=\frac{86400}{0.9999}-86400$

$MTTR\approx 8.64$ seconds

So, repair time should be approximately $9$ seconds.

UGC NET Computer Science PYQ

Which of the following statements are true regarding C++?

(a) Overloading gives the capability to an existing operator to operate on other data types.
(b) Inheritance in object oriented programming provides support to reusability.
(c) When object of a derived class is defined, first the constructor of derived class is executed then constructor of a base class is executed.
(d) Overloading is a type of polymorphism.

Choose the correct option from those given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement (a) is true.

Operator overloading allows an existing operator to work with user-defined or other data types.

Statement (b) is true.

Inheritance supports code reusability in object oriented programming.

Statement (c) is false.

When an object of derived class is created, the base class constructor is executed first, then derived class constructor is executed.

Statement (d) is true.

Overloading is a form of compile-time polymorphism.

So, correct statements are:

(a), (b) and (d)


UGC NET Computer Science PYQ
Consider a system with $2$ level cache. Access times of Level $1$ cache, Level $2$ cache and main memory are $0.5$ ns, $5$ ns and $100$ ns respectively. The hit rates of Level $1$ and Level $2$ caches are $0.7$ and $0.8$, respectively. What is the average access time of the system ignoring the search time within the cache?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

evel $1$ hit rate $=0.7$

Level $2$ hit rate $=0.8$

Level $1$ access time $=0.5$ ns

Level $2$ access time $=5$ ns

Main memory access time $=100$ ns

Average access time is

$0.7(0.5)+0.3[0.8(5)+0.2(100)]$

$=0.35+0.3[4+20]$

$=0.35+0.3(24)$

$=0.35+7.2$

$=7.55$ ns


UGC NET Computer Science PYQ
Considering the following statements:

A. Data transformation is involved in Data mining process.
B. Online database is used in Data warehouse.
C. Classification is a measure of accuracy.
D. K-means clustering algorithm is based on the concept of minimizing the within-cluster variance.
E. Pattern evaluation is a process to identify knowledge based on interestingness measure.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

B – True: Data warehouses are used for online analytical processing (OLAP).
D – True: K-means minimizes within-cluster sum of squares (variance).
E – True: Pattern evaluation identifies useful patterns using interestingness measures.
A – Data transformation happens before mining (in preprocessing).
C – Classification is a process, not a measure of accuracy.

UGC NET Computer Science PYQ

A coin is tossed successively three times. Find the Probability $(P)$, Event $(E)$, Sample space $(S)$ of getting exactly one head or two heads, where $n$ is number of occurrence.

(A) $n(S)=8$ and $n(E)=4$

(B) $n(E)=6$ and $n(S)=8$

(C) $P(E)=\frac{3}{4}$

(D) $P(E)=\frac{1}{2}$

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Sample space for 3 tosses:

$S={HHH,HHT,HTH,HTT,THH,THT,TTH,TTT}$

Thus

$n(S)=8$

Event: exactly 1 head or 2 heads

1 head → ${HTT,THT,TTH}$

2 heads → ${HHT,HTH,THH}$

So

$n(E)=6$

Probability

$P(E)=\frac{6}{8}=\frac{3}{4}$

Thus correct statements:

(B) and (C)


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. 8-Queens problems

I. Divide and conquer

B. Closest Pair of points

II. Dynamic Programming

C. String Edit problem

III. Greedy Method

D. Knapsack problem

IV. Backtracking

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

8-Queens problem → Backtracking

Closest Pair of points → Divide and conquer

String Edit problem → Dynamic Programming

Knapsack problem → Greedy Method

So,

A → IV
B → I
C → II
D → III

Correct option is:

$\boxed{(c)\ A-IV,\ B-I,\ C-II,\ D-III}$


UGC NET Computer Science PYQ
In the context of Software Configuration Management $(SCM)$, what kind of files should be committed to your source control repository?
A. Code files

B. Documentation files

C. Output files

D. Automatically generated files that are required for your system to be used

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In Software Configuration Management, source control should contain files that are needed to build, understand and maintain the software.

Code files should be committed because they are the main source of the software.

Documentation files should also be committed because they describe the system, design, usage and requirements.

Output files are usually generated after execution or build, so they should not normally be committed.

Automatically generated files are also generally not committed unless there is a special requirement.

Therefore, A and B only are correct.

UGC NET Computer Science PYQ

Which of the following are legal statements in C programming language?

(a) int *P = &44;
(b) int *P = &r;
(c) int P = &a;
(d) int P = a;






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement (a) is not legal because we cannot take the address of a constant value like $44$.

Statement (b) is legal because if $r$ is an integer variable, then &r gives its address and it can be stored in an integer pointer.

Statement (c) is not legal because &a gives address, but $P$ is declared as normal integer, not pointer.

Statement (d) is legal because if $a$ is an integer variable, then its value can be assigned to integer variable $P$.

So, legal statements are:

(b) and (d)


UGC NET Computer Science PYQ

If a graph $G$ has no loops or parallel edges, and if the number of vertices $n$ in the graph is $n\geq 3$, then graph $G$ is Hamiltonian if:

$(i)$ $\deg(v)\geq \dfrac{n}{3}$ for each vertex $v$

$(ii)$ $\deg(v)+\deg(w)\geq n$ whenever $v$ and $w$ are not connected by an edge.

$(iii)$ $E(G)\geq \dfrac{1}{3}(n-1)(n-2)+2$

Choose the correct answer from the code given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Statement $(i)$ is not a standard sufficient condition for Hamiltonian graph.

By Dirac's theorem, the sufficient condition is

$\deg(v)\geq \dfrac{n}{2}$

for every vertex $v$.

So, statement $(i)$ is false.

Statement $(ii)$ is true by Ore's theorem.

Ore's theorem says that if for every pair of non-adjacent vertices $v$ and $w$,

$\deg(v)+\deg(w)\geq n$

then the graph is Hamiltonian.

Statement $(iii)$ is not the standard sufficient condition here.

Therefore, only statement $(ii)$ is correct.


UGC NET Computer Science PYQ

Match List I with List II

List I (Operations on Fuzzy Sets) List II (Description)
A. Intersection IV. $\min(\mu_A(x), \mu_B(x))$
B. Bounded Sum III. $\min(1, \mu_A(x) + \mu_B(x))$
C. Bounded Difference II. $\max(0, \mu_A(x) - \mu_B(x))$
D. Algebraic Sum I. $\mu_A(x) + \mu_B(x) - \mu_A(x)\mu_B(x)$

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Explanation:

  • A → IV → Intersection → $\min(\mu_A(x), \mu_B(x))$
  • B → III → Bounded Sum → $\min(1, \mu_A(x) + \mu_B(x))$
  • C → II → Bounded Difference → $\max(0, \mu_A(x) - \mu_B(x))$
  • D → I → Algebraic Sum → $\mu_A(x) + \mu_B(x) - \mu_A(x)\mu_B(x)$

UGC NET Computer Science PYQ

Consider the given number $(45)_y$ where $y$ is the base of the number. Some of the possible values of $y$ are given below.


(A) 5

(B) 6

(C) 7

(D) 8


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

In base $y$, digits must be less than base.

Number $(45)_y$ has digit 5.

Thus

$y>5$

Possible bases:

$6,7,8,\dots$

Given options:

6, 7, 8

Thus

(B), (C), (D)


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. Initial Configuration of stack and input in the LL Parsing process

I. $w$

B. Final Configuration of stack and input in LL Parsing process

$$

C. Initial Configuration of stack and input in the LR Parsing process

S w

D. Final Configuration of stack and input in LR Parsing process

S

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For LL parsing:

Initial configuration: $$S w$$

Final configuration: $$$$

For LR parsing:

Initial configuration: $$w$$

Final configuration: $$S$$

So,

A → III
B → II
C → I
D → IV

Correct option is:

$\boxed{(b)\ A-III,\ B-II,\ C-I,\ D-IV}$


UGC NET Computer Science PYQ
Match List I with List II
List IList II
A. Waterfall ModelI. Software can be developed incrementally
B. Evolutionary ModelII. Requirement compromises are inevitable
C. Component-based Software EngineeringIII. Explicit recognition of risk
D. Spiral DevelopmentIV. Inflexible partitioning of the project into stages





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Waterfall model divides the project into fixed stages, so it has inflexible partitioning. Thus, $A-IV$.

Evolutionary model develops software through repeated versions or increments. Thus, $B-I$.

Component-based software engineering uses already available components, so requirement compromises may be needed according to available components. Thus, $C-II$.

Spiral development explicitly focuses on risk analysis in every cycle. Thus, $D-III$.

Final matching is $A-IV,\ B-I,\ C-II,\ D-III$.

UGC NET Computer Science PYQ

Two concurrent executing transactions $T_1$ and $T_2$ are allowed to update same stock item say $A$ in an uncontrolled manner. In such scenario, following problems may occur:

(a) Dirty read problem
(b) Lost update problem
(c) Transaction failure
(d) Inconsistent database state

Which of the following option is correct if database system has no concurrency module and allows concurrent execution of above two transactions?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

If two transactions update the same data item without concurrency control, then many problems may occur.

Dirty read problem can occur when one transaction reads uncommitted data of another transaction.

Lost update problem can occur when one transaction update is overwritten by another transaction.

Inconsistent database state can occur because uncontrolled concurrent execution may violate consistency.

But transaction failure is not necessarily due to concurrency control absence.

So, correct problems are:

(a), (b) and (d)


UGC NET Computer Science PYQ

The solution of recurrence relation

$T(n)=2T(\sqrt{n})+\lg(n)$

is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Given,

$T(n)=2T(\sqrt{n})+\lg n$

Let

$n=2^m$

So,

$\lg n=m$

and

$\sqrt{n}=2^{m/2}$

Let

$S(m)=T(2^m)$

Then,

$S(m)=2S\left(\dfrac{m}{2}\right)+m$

Using Master theorem,

$a=2,\ b=2$

So,

$m^{\log_b a}=m^{\log_2 2}=m$

Therefore,

$S(m)=O(m\lg m)$

Now put back $m=\lg n$.

So,

$T(n)=O(\lg n\lg(\lg n))$


UGC NET Computer Science PYQ
The write operation in I/O operation does the following -





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

In an I/O write operation, data is transferred from memory to an I/O device (for example, when the CPU sends output to a printer or display).
In contrast, an I/O read operation transfers data from I/O device to memory.

UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I

List - II 

 (A) HTML
 (I) Allow for dynamic and interactive web pages.
 (B) DHTML
 (II) Defines the structure of web pages.
 (C) XML
 (III) Object-oriented programming language for web applications.
 (D) JAVA

 (IV) Used for data storage and transport.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

HTML → defines structure of web pages → (II)


DHTML → dynamic interactive web pages → (I)


XML → data storage and transport → (IV)


JAVA → object-oriented programming language → (III)


Thus matching:


(A)-(II), (B)-(I), (C)-(IV), (D)-(III)


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. Physical Layer

I. Transforming the raw bits in the form of a frame for transmission

B. Data Link Layer

II. Control and monitoring of subnet

C. Network Layer

III. Transmission of raw bits over a communication channel

D. Transport Layer

IV. Datagrams transmit data through connection-oriented or connection-less using datagrams.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Physical Layer → Transmission of raw bits over a communication channel

Data Link Layer → Transforming raw bits into frames

Network Layer → Control and monitoring of subnet

Transport Layer → Connection-oriented or connection-less data transmission

So,

A → III
B → I
C → II
D → IV

Correct option is:

$\boxed{(c)\ A-III,\ B-I,\ C-II,\ D-IV}$


UGC NET Computer Science PYQ
Identify the correct order of the following five levels of Capability Maturity Model from lower to higher to measure the maturity of an organisation's software process.

A. Defined

B. Optimizing

C. Initial

D. Managed

E. Repeatable

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

The five levels of Capability Maturity Model from lower to higher are:

$1.$ Initial

$2.$ Repeatable

$3.$ Defined

$4.$ Managed

$5.$ Optimizing

Now match with the given letters:

Initial $=C$

Repeatable $=E$

Defined $=A$

Managed $=D$

Optimizing $=B$

So, the correct order is:

$C,E,A,D,B$

UGC NET Computer Science PYQ

Identify the circumstances under which pre-emptive CPU scheduling is used:

(a) A process switches from Running state to Ready state
(b) A process switches from Waiting state to Ready state
(c) A process completes its execution
(d) A process switches from Ready to Waiting state






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Pre-emptive scheduling is used when the currently running process can be interrupted and CPU can be given to another process.

Statement (a) is correct because when a process moves from Running to Ready state, CPU is taken away from it.

Statement (b) is also correct because when a process moves from Waiting to Ready state, it may have higher priority and may preempt the current process.

Statement (c) is not preemption because the process completes naturally.

Statement (d) is not a valid normal transition for preemption.

So, correct statements are:

(a) and (b)


UGC NET Computer Science PYQ

The elements $42,25,30,40,22,35,26$ are inserted one by one in the given order into a max-heap. The resultant max-heap is stored in an array implementation as:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Insert elements one by one into max-heap.

After inserting $42,25,30$:

$\langle 42,25,30\rangle$

Insert $40$.

Since $40>25$, swap them:

$\langle 42,40,30,25\rangle$

Insert $22$:

$\langle 42,40,30,25,22\rangle$

Insert $35$.

Since $35>30$, swap them:

$\langle 42,40,35,25,22,30\rangle$

Insert $26$.

No swap is needed.

Final max-heap array is

$\langle 42,40,35,25,22,30,26\rangle$


UGC NET Computer Science PYQ
List I List II
A. Circular Queue III. Dijkstra algorithm
B. Priority Queue II. CPU Scheduling
C. Double Ended Queue I. Print Queue
D. Simple Queue IV. Palindrome checking

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ
Arrange the following stages of parsing in the correct order as they typically occur in the compilation process.

(A) Lexical Analysis
(B) Semantic Analysis
(C) Syntax Analysis
(D) Intermediate Code Generation
(E) Code Optimization

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Standard compiler phases:


Lexical Analysis


Syntax Analysis


Semantic Analysis


Intermediate Code Generation


Code Optimization


Thus order:


(A) → (C) → (B) → (D) → (E)


UGC NET Computer Science PYQ
Match List I with List II
 List I

 List II

A. Regression

I. Unsupervised Learning

B. KNN

II. Supervised Learning

C. Clustering


D. Decision Tree


Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Regression → Supervised Learning

KNN → Supervised Learning

Clustering → Unsupervised Learning

Decision Tree → Supervised Learning

So,

A → II
B → II
C → I
D → II

Correct option is:

$\boxed{(b)\ A-II,\ B-II,\ C-I,\ D-II}$


UGC NET Computer Science PYQ
 Given below are two statements

Statement I: Cleanroom software process model incorporates the statistical quality certification of code increments as they accumulate into a system.

Statement II: Cleanroom software engineering follows the classic analysis, design, code, test, and debug cycle to software development and focussing on defect removal rather than defect prevention.

In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Cleanroom software engineering focuses on defect prevention rather than defect removal.

Statement I is correct because Cleanroom model uses statistical quality certification of software increments.

Statement II is incorrect because Cleanroom does not follow the classic test and debug cycle in the usual way.

It emphasizes formal methods, correctness verification and statistical testing, with focus on preventing defects.

Therefore, Statement I is true and Statement II is false.

UGC NET Computer Science PYQ

The following multithreaded algorithm computes transpose of a matrix in parallel:

$p\ Trans(X,Y,N)$

if $N=1$

then $Y[1,1]\leftarrow X[1,1]$

else partition $X$ into four $(N/2)\times(N/2)$ submatrices $X_{11},X_{12},X_{21},X_{22}$

partition $Y$ into four $(N/2)\times(N/2)$ submatrices $Y_{11},Y_{12},Y_{21},Y_{22}$

spawn $p\ Trans(X_{11},Y_{11},N/2)$

spawn $p\ Trans(X_{12},Y_{12},N/2)$

spawn $p\ Trans(X_{21},Y_{21},N/2)$

spawn $p\ Trans(X_{22},Y_{22},N/2)$

What is the asymptotic parallelism of the algorithm?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Parallelism is given by:

$\dfrac{T_1}{T_\infty}$

Here, $T_1$ is total work.

The algorithm recursively divides the matrix into $4$ subproblems of size $N/2$.

So,

$T_1(N)=4T_1(N/2)+\theta(1)$

Hence,

$T_1(N)=\theta(N^2)$

Now, span or critical path time is:

$T_\infty(N)=T_\infty(N/2)+\theta(1)$

because recursive calls run in parallel.

So,

$T_\infty(N)=\theta(\lg N)$

Therefore,

$\dfrac{T_1}{T_\infty}=\dfrac{\theta(N^2)}{\theta(\lg N)}$

$=\theta(N^2/\lg N)$


UGC NET Computer Science PYQ

Consider two sequences $X$ and $Y$:

$X=\langle 0,1,2,1,3,0,1\rangle$

$Y=\langle 1,3,2,0,1,0\rangle$

The length of longest common subsequence between $X$ and $Y$ is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2018 (Paper II) PYQ

Solution

Given sequences are

$X=\langle 0,1,2,1,3,0,1\rangle$

$Y=\langle 1,3,2,0,1,0\rangle$

One longest common subsequence is

$\langle 1,2,1,0\rangle$

This subsequence has length

$4$

Therefore, the length of the longest common subsequence is

$4$


UGC NET Computer Science PYQ
List I (RAID Levels) List II (Description)
A. RAID Level 2 IV. Also known as Memory style error correcting code organization
B. RAID Level 3 III. Bit interleaved parity
C. RAID Level 5 I. Block interleaved distribution parity
D. RAID Level 6 II. Also known as P+Q redundancy scheme

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

 A→III, B→IV, C→I, D→II

UGC NET Computer Science PYQ
Let $G(V,E)$ be an undirected graph with $|E|$ edges. Then the sum of degree of all vertices is equal to ______.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution


UGC NET Computer Science PYQ
Let $G$ be a simple, undirected graph with $n$ vertices and $k$ connected components. What is the minimum possible number of edges of $G$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For a connected component with $m$ vertices, minimum edges required:

$m-1$

If graph has $k$ connected components, then minimum total edges:

$=(n_1-1)+(n_2-1)+...+(n_k-1)$

$=(n_1+n_2+...+n_k)-k$

$=n-k$

Correct option is:

$\boxed{(d)\ n-k}$


UGC NET Computer Science PYQ
Given below are two statements, one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: Software developers do not do exhaustive software testing in practice.

Reason R: Even for small inputs, exhaustive testing is too computationally intensive, that is, takes too long to run all the tests.

In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Exhaustive testing means testing the software with all possible inputs and all possible conditions.

In practice, exhaustive testing is not possible because the number of test cases becomes very large.

Even for small programs, all possible input combinations may take too much time and computation.

So, Assertion A is true.

Reason R is also true because it correctly explains why exhaustive testing is not done in practice.

UGC NET Computer Science PYQ

Consider the following statements:

(a) The running time of dynamic programming algorithm is always $\theta(\rho)$ where $\rho$ is number of subproblems.

(b) When a recurrence relation has cyclic dependency, it is impossible to use that recurrence relation $($unmodified$)$ in a correct dynamic program.

(c) For a dynamic programming algorithm, computing all values in a bottom-up fashion is asymptotically faster than using recursion and memorization.

(d) If a problem $X$ can be reduced to a known NP-hard problem, then $X$ must be NP-hard.

Which of the statement(s) is/are true?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement (a) is false because running time also depends on the time required to solve each subproblem, not only the number of subproblems.

Statement (b) is true because cyclic dependency creates a circular dependency, so the recurrence cannot be used directly in a correct dynamic program.

Statement (c) is false because bottom-up DP and memoized recursion usually have the same asymptotic time complexity.

Statement (d) is false because if $X$ is reduced to an NP-hard problem, it does not prove that $X$ is NP-hard. To prove $X$ is NP-hard, a known NP-hard problem should be reduced to $X$.

So, only statement (b) is true.


UGC NET Computer Science PYQ
int i, j;
for(i = 1; i < 5; i += 2)
    for(j = 1; j < i; j += 2)
        printf("%d", j);





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

For i = 1, inner loop condition j < i → 1 < 1 → false → no output.
For i = 3, inner loop runs with j = 1, prints 1, then j = 3 → condition fails.
Hence, final output is 1.

UGC NET Computer Science PYQ
______ is a Self Balancing binary search tree, where the path from the root to the furthest leaf is no more than twice as long as the path from the root to nearest leaf.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Red-Black tree properties: Self balancing BST Longest path ≤ 2 × shortest path Thus definition matches Red-Black Tree.

UGC NET Computer Science PYQ
Arrange the following search and sort algorithms in ascending order of their worst-case complexities.

A. Merge sort
B. Linear Search
C. Bubble Sort
D. Binary Search

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Worst-case complexities are:

Binary Search $=O(\log n)$

Linear Search $=O(n)$

Merge Sort $=O(n\log n)$

Bubble Sort $=O(n^2)$

Ascending order:

$O(\log n) < O(n) < O(n\log n) < O(n^2)$

So,

D, B, A, C

Correct option is:

$\boxed{(a)\ D,B,A,C}$


UGC NET Computer Science PYQ
Which of the following are logically equivalent?

A. $\neg p\to(q\to r)$ and $q\to(p\lor r)$

B. $(p\to q)\to r$ and $p\to(q\to r)$

C. $(p\to q)\to(r\to s)$ and $(p\to r)\to(q\to s)$

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Check A:

$\neg p\to(q\to r)\equiv p\lor(\neg q\lor r)$

$=p\lor\neg q\lor r$

Also,

$q\to(p\lor r)\equiv\neg q\lor p\lor r$

Both are same, so A is true.

Check B:

$(p\to q)\to r\equiv(p\land\neg q)\lor r$

$p\to(q\to r)\equiv\neg p\lor\neg q\lor r$

Both are not always same, so B is false.

Check C:

Both expressions are not always logically equivalent.

So, C is false.

Therefore, only A is correct.

UGC NET Computer Science PYQ

Consider the following statements:

(a) Fiber optic cable is much lighter than copper cable.

(b) Fiber optic cable is not affected by power surges or electromagnetic interference.

(c) Optical transmission is inherently bidirectional.

Which of the statements is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement (a) is correct because fiber optic cable is lighter than copper cable.

Statement (b) is correct because fiber optic cable uses light signals, so it is not affected by electromagnetic interference or power surges.

Statement (c) is incorrect because optical transmission is not inherently bidirectional. Separate arrangements or fibers may be needed for two-way communication.

So, correct statements are:

(a) and (b)


UGC NET Computer Science PYQ
The computer needs to process each instruction with the following sequence of steps:
A. Calculate the effective address
B. Fetch the instruction from memory
C. Decode the instruction
D. Fetch the operands from the memory
E. Execute the instruction





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

First fetch the instruction (B), then decode it (C). If required, compute the effective address (A), fetch the operands (D), and finally execute the instruction (E).

UGC NET Computer Science PYQ

Match List - I with List - II.

 List - I (Algorithms)

List - II (Characteristics) 

 (A) First Come First Served (FCFS)
 (I) Each process is assigned a priority
(B) Shortest Job First (SJF)
 (II) Ensures fair allocation of CPU time by assigning time slice
 (C) Round Robin (RR)
(III) Processes are executed in the order they arrive
 
 (D) Priority Scheduling

 (IV) Select the process for execution with smallest next burst time

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

FCFS → executed in order of arrival → (III) SJF → smallest burst time → (IV) Round Robin → time slice fairness → (II) Priority Scheduling → priority based → (I) Thus: (A)-(III), (B)-(IV), (C)-(II), (D)-(I)

UGC NET Computer Science PYQ
Consider the following schedule S.
 T1T2T3 T4 Timestamp 
 R(X) R(Y)  t1 
 W(X) W(Y)  t2 
R(Y)   R(X) t3 
W(Y)   W(X) t4 
  R(X)  t5 
  W(X)  t6 
(R(X)) denotes the read operation on data item X by transaction Ti. W(X) denotes write operation on data item X by transaction Ti. Choose the correct execution order for the above schedule S.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For data item $X$:

$T2$ writes $X$ before $T4$ reads and writes $X$.

So,

$T2 \to T4$

$T4$ writes $X$ before $T3$ reads and writes $X$.

So,

$T4 \to T3$

For data item $Y$:

$T3$ writes $Y$ before $T1$ reads and writes $Y$.

So,

$T3 \to T1$

Therefore, the serial order is:

$T2 \to T4 \to T3 \to T1$

Correct option is:

$\boxed{(c)\ T2-T4-T3-T1}$


UGC NET Computer Science PYQ
 Which of these statements about the floor and ceiling functions are correct?

Statement I: $\lfloor 2x\rfloor=\lfloor x\rfloor+\left\lfloor x+\frac{1}{2}\right\rfloor$ for all real number $x$

Statement II: $\lceil x+y\rceil=\lceil x\rceil+\lceil y\rceil$ for all real numbers $x$ and $y$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Statement I is a standard identity of floor function:

$\lfloor 2x\rfloor=\lfloor x\rfloor+\left\lfloor x+\frac{1}{2}\right\rfloor$

So, Statement I is true.

Statement II is not always true.

Take $x=0.2$ and $y=0.2$.

$\lceil x+y\rceil=\lceil 0.4\rceil=1$

But,

$\lceil x\rceil+\lceil y\rceil=\lceil 0.2\rceil+\lceil 0.2\rceil=1+1=2$

So, Statement II is false.

UGC NET Computer Science PYQ

Consider the following statements:

(a) Windows Azure is a cloud-based operating system.

(b) Google App Engine is an integrated set of online services for consumers to communicate and share with others.

(c) Amazon Cloud Front is a web service for content delivery.

Which of the statements is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement (a) is correct. Windows Azure is related to cloud-based services and platform.

Statement (b) is incorrect because Google App Engine is a platform for developing and hosting web applications, not mainly an integrated consumer communication service.

Statement (c) is correct because Amazon CloudFront is a web service for content delivery.

So, correct statements are:

(a) and (c)


UGC NET Computer Science PYQ
Consider the following DFA that generates set of strings over Σ = {a, b, c}.
Identify the best description of the language for the DFA.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

The automaton has two “phases” connected by the path recognizing a→b→c. Each time the substring “abc” is seen, the DFA moves to the other phase, toggling parity. The start phase (no “abc” yet) is accepting (count 0), and after every additional “abc” the parity flips; therefore the accepting states correspond to an even number of occurrences of “abc”. Options 1 and 2 describe Σ* (all strings), and option 3 does not match the transitions.

UGC NET Computer Science PYQ
Which of the following are typical activities in the software process lifecycle ?

(A) Requirement Analysis
(B) System Design
(C) Code Refactoring
(D) Deployment
(E) Substructure

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical Software Development Life Cycle (SDLC) activities:

  • Requirement Analysis ✔

  • System Design ✔

  • Implementation / Testing

  • Deployment ✔

Check options:

(A) Requirement Analysis → ✔
(B) System Design → ✔
(C) Code Refactoring → maintenance activity, not core lifecycle step ✘
(D) Deployment → ✔
(E) Substructure → not SDLC activity ✘

Thus correct:

(A), (B), (D)


UGC NET Computer Science PYQ
A disk has $300$ cylinders $(0$ to $299)$. If the initial position of the read-write head is at cylinder $101$, moving towards the higher end of the disk, calculate the total head movement following C_LOOK policy for the read request sequence:

$123,45,197,87,250,198,280$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Initial head position:

$101$

Direction is towards higher cylinder numbers.

Request sequence in sorted order:

$45,87,123,197,198,250,280$

Using C_LOOK, first serve higher side requests:

$101 \to 123 \to 197 \to 198 \to 250 \to 280$

Then jump to lowest request:

$280 \to 45$

Then continue:

$45 \to 87$

Total head movement:

$=|123-101|+|197-123|+|198-197|+|250-198|+|280-250|+|45-280|+|87-45|$

$=22+74+1+52+30+235+42$

$=456$

Correct option is:

$\boxed{(a)\ 456}$


UGC NET Computer Science PYQ
How many ways are there to assign $5$ different jobs to $4$ different employees if every employee is assigned at least $1$ job?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

We need to assign $5$ different jobs to $4$ different employees such that every employee gets at least one job.

This is an onto function problem.

Total ways without restriction:

$4^5=1024$

Subtract cases where at least one employee gets no job:

$\binom{4}{1}3^5=4\times243=972$

Add cases where two employees get no job:

$\binom{4}{2}2^5=6\times32=192$

Subtract cases where three employees get no job:

$\binom{4}{3}1^5=4$

Required ways:

$4^5-\binom{4}{1}3^5+\binom{4}{2}2^5-\binom{4}{3}1^5$

$=1024-972+192-4=240$

UGC NET Computer Science PYQ

Consider the following statements with respect to network security:

(a) Message confidentiality means that the sender and the receiver expect privacy.

(b) Message integrity means that the data must arrive at the receiver exactly as they were sent.

(c) Message authentication means the receiver is ensured that the message is coming from the intended sender.

Which of the statements is/are correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Statement (a) is correct because confidentiality means privacy of the message.

Statement (b) is correct because integrity means the message should not be altered during transmission.

Statement (c) is correct because authentication verifies that the message is coming from the intended sender.

So, all three statements are correct.


UGC NET Computer Science PYQ
Which of the following are examples of data encoding schemes?
A. Non-Return to Zero (NRZ)
B. Manchester Encoding
C. Amplitude Modulation
D. Hamming code
E. Bipolar AMI





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

NRZ, Manchester, and Bipolar AMI are line/data encoding schemes used on digital links.
Amplitude Modulation is a carrier modulation scheme (analog).
Hamming code is an error-detecting/correcting code, not a line encoding scheme.


UGC NET Computer Science PYQ
Which of the following are TRUE about constructors in C++ ?

(A) A constructor can be overloaded.
(B) A constructor does not have a return type.
(C) A constructor must be declared as a friend function.
(D) A constructor is called when an object is destroyed.

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

Constructors can be overloaded.


(B) True

Constructors do not have return type.


(C) False

Constructors are member functions, not friend functions.


(D) False

Destructor is called when object is destroyed.


Thus correct statements:


(A) and (B)


UGC NET Computer Science PYQ
The incremental model of software development is ____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In incremental model, software is developed and delivered in small parts called increments.

First, a working core product is developed quickly.

Then, more features are added step by step.

So, correct option is:

$\boxed{(b)\ \text{A good approach when a working core product is required quickly}}$


UGC NET Computer Science PYQ
A company stores products in a warehouse. Storage bins in this warehouse are specified by their aisle, location in the aisle, and shelf. There are $50$ aisles, $85$ horizontal locations in each aisle, and $5$ shelves throughout the warehouse. What is the least number of products the company can have so that at least two products must be stored in the same bin?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Total number of storage bins:

$50\times85\times5=21250$

By pigeonhole principle, if $21250$ products are stored, each product can be placed in a different bin.

To guarantee that at least two products are stored in the same bin, we need one more product.

So, least number of products:

$21250+1=21251$

UGC NET Computer Science PYQ

Consider the following:

(a) Trapping at local maxima

(b) Reaching a plateau

(c) Traversal along the ridge.

Which of the following option represents shortcomings of the hill climbing algorithm?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Hill climbing algorithm has some common limitations.

It may get trapped at a local maximum.

It may reach a plateau where all neighboring states have almost same value.

It may face difficulty while traversing along a ridge.

So, all three are shortcomings of hill climbing algorithm.


UGC NET Computer Science PYQ
Consider the operators used in C programming given below:
A. &&
B. +=
C. >>
D. >=
E. ?:
Choose among the following the correct order of precedence of the operators given above (higher to lower):





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Operator precedence (highest → lowest) is: >> (shift) → >= (relational) → ?: (ternary) → += (assignment) → && (logical AND).

UGC NET Computer Science PYQ
Consider a schema $R(P,Q,R,S)$ and the following functional dependencies

$P \rightarrow Q$
$Q \rightarrow R$
$R \rightarrow S$
$S \rightarrow Q$

The decomposition of $R(P,Q,R,S)$ into $R_1(P,Q)$, $R_2(Q,R)$ and $R_3(Q,S)$ is :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Check dependency preservation


Given FDs:


$P \rightarrow Q$

$Q \rightarrow R$

$R \rightarrow S$

$S \rightarrow Q$


Decomposed relations:


$R_1(P,Q)$

$R_2(Q,R)$

$R_3(Q,S)$


Each dependency is preserved:


$P \rightarrow Q$ → in $R_1$

$Q \rightarrow R$ → in $R_2$

$R \rightarrow S$ → derived via $Q$ in $R_3$

$S \rightarrow Q$ → in $R_3$


Thus dependency preserving


Check lossless join:


Common attribute between relations is Q, which functionally determines other attributes through dependencies.


Hence not lossless join.


UGC NET Computer Science PYQ
Consider the graph given below. What is the order in which the nodes mentioned in the options are to be traversed to find the shortest path from A to Z using best first search?
A. Node-A
B. Node-B
C. Node-C
D. Node-D
E. Node-E

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Using best first search, we always choose the next node with the minimum available cost.

From $A$:

$A \to C = 2$

$A \to F = 7$

So, choose $C$.

From $C$:

$C \to F = 3$

$C \to B = 10$

So, choose $F$.

From $F$:

$F \to D = 1$

$F \to E = 6$

So, choose $D$.

From $D$:

$D \to E = 2$

$D \to Z = 7$

So, choose $E$.

From $E$:

$E \to Z = 4$

Hence, the traversal order before reaching $Z$ is:

$A \to C \to F \to D \to E$

Correct option is:

$\boxed{(a)\ A \to C \to F \to D \to E}$


UGC NET Computer Science PYQ
Let us assume a person climbing the stairs can take one stair or two stairs at a time. How many ways can this person climb a flight of eight stairs?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Let number of ways to climb $n$ stairs be $f(n)$.

A person can reach the $n^{th}$ stair either from $(n-1)^{th}$ stair or from $(n-2)^{th}$ stair.

So,

$f(n)=f(n-1)+f(n-2)$

Base values:

$f(1)=1$

$f(2)=2$

Now,

$f(3)=3$

$f(4)=5$

$f(5)=8$

$f(6)=13$

$f(7)=21$

$f(8)=34$

UGC NET Computer Science PYQ

Consider the following learning algorithms:

(a) Logistic regression
(b) Back propagation
(c) Linear regression

Which of the following option represents classification algorithms?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Logistic regression is used for classification problems.

Back propagation is used in neural networks, and neural networks can be used for classification.

Linear regression is mainly used for regression problems, not classification.

So, classification algorithms are:

(a) and (b)


UGC NET Computer Science PYQ
List I (Projection Type) List II (Description)
A. Oblique Projection IV. When the angle between the projectors and the plane of projection is not equal to 90°.
B. Cavalier Projection II. When the direction of projection is so chosen that there is no foreshortening of lines perpendicular to the plane of projection.
C. Cabinet Projection I. When the direction of projection is so chosen that the lines perpendicular to the plane of projection are foreshortened.
D. Orthographic Projection III. When the direction of projection is perpendicular to the plane of projection.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A → IV → Oblique projection → projectors not at 90°
B → II → Cavalier projection → no foreshortening (perpendicular lines true length)
C → I → Cabinet projection → foreshortening applied
D → III → Orthographic projection → projectors perpendicular to plane

UGC NET Computer Science PYQ
Arrange the following phases of the Agile process in the correct sequence :

(A) Design
(B) Release
(C) Testing
(D) Development
(E) Planning

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical Agile workflow:


Planning


Design


Development


Testing


Release


Thus order:


(E) → (A) → (D) → (C) → (B)


UGC NET Computer Science PYQ
The precedence of regular expression operators from lowest to highest precedence is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In regular expressions, operator precedence from highest to lowest is:

$Star > Concatenation > Union$

Therefore, from lowest to highest:

$Union < Concatenation < Star$

Correct option is:

$\boxed{(c)\ \text{Union, Concatenation, Star}}$


UGC NET Computer Science PYQ
For which value of $n$ is Wheel graph $W_n$ regular?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

A wheel graph $W_n$ has one central vertex connected to all vertices of a cycle.

In $W_n$, the central vertex has degree $n-1$.

Each outer vertex has degree $3$, because it is connected to two cycle vertices and one central vertex.

For the graph to be regular:

$n-1=3$

$n=4$

So, $W_4$ is regular.

UGC NET Computer Science PYQ

Match List-I and List-II:


List-I Layer List-II Description
(a) Physical layer (i) Provide token management service
(b) Transport layer (ii) Concerned with transmitting raw bits over a communication channel
(c) Session layer (iii) Concerned with the syntax and semantics of the information transmitted
(d) Presentation layer (iv) True end-to-end layer from source to destination





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Physical layer is responsible for transmitting raw bits over a communication channel.

So,

(a) Physical layer $\rightarrow$ (ii)

Transport layer provides true end-to-end communication from source to destination.

So,

(b) Transport layer $\rightarrow$ (iv)

Session layer provides services like dialog control and token management.

So,

(c) Session layer $\rightarrow$ (i)

Presentation layer deals with syntax and semantics of transmitted information.

So,

(d) Presentation layer $\rightarrow$ (iii)

Hence, correct matching is:

(a)-(ii), (b)-(iv), (c)-(i), (d)-(iii)


UGC NET Computer Science PYQ
Which of the following statements are true?
A. In the write-through policy, only the cache is updated
B. In the write-back policy, both cache and main memory are updated
C. Cache coherence problems exist in multiprocessors with private caches because of the need to share writable data
D. Cache coherence problem can be solved by means of hardware-only scheme





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A is false — In the write-through policy, both cache and main memory are updated simultaneously.
B is true — In write-back policy, data is first written to cache and later updated in main memory when replaced.
C is true — Cache coherence arises in multiprocessors with private caches that share writable data.
D is false — Cache coherence solutions usually need both hardware and software support, not hardware-only.

UGC NET Computer Science PYQ

 Arrange the following in the correct order with respect to key generation for RSA algorithm.

A. Choose an integer $e$ such that $1<e<\lambda(n)$

B. Compute key length $n=p\times q$

C. Find $d$ which is equal to $\frac{1}{e}$

D. Choose two large prime numbers $p$ and $q$

E. Compute $\lambda(n)$

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In RSA key generation:

First choose two large prime numbers $p$ and $q$.

Then compute:

$n=p\times q$

Then compute:

$\lambda(n)$

Then choose public exponent $e$ such that:

$1<e<\lambda(n)$

Then find private key $d$.

So, correct order is:

$D-B-E-A-C$

Correct option is:

$\boxed{(c)\ D-B-E-A-C}$


UGC NET Computer Science PYQ
Which of the following Graphs is(are) planar?








Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

A planar graph is a graph that can be drawn on a plane without any two edges crossing each other.

Graph A can be redrawn without edge crossing, so Graph A is planar.

Graph B is similar to $K_{3,3}$ structure. Since $K_{3,3}$ is non-planar, Graph B is not planar.

Graph C also contains a non-planar subdivision structure, so Graph C is not planar.

Therefore, only Graph A is planar.

UGC NET Computer Science PYQ
According to the ISO-9126 Standard Quality Model, match the attributes given in List-I with their definitions in List-II:
List-I Attribute List-II Definition
(a) Functionality (i) Relationship between level of performance and amount of resources
(b) Reliability (ii) Characteristics related with achievement of purpose
(c) Efficiency (iii) Efforts needed to make for improvement
(d) Maintainability (iv) Capability of software to maintain performance of software





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Functionality means characteristics related with achievement of purpose.

So, (a) $\rightarrow$ (ii)

Reliability means capability of software to maintain its performance.

So, (b) $\rightarrow$ (iv)

Efficiency means relationship between level of performance and amount of resources used.

So, (c) $\rightarrow$ (i)

Maintainability means efforts needed to make improvement.

So, (d) $\rightarrow$ (iii)

Hence, correct matching is:

(a)-(ii), (b)-(iv), (c)-(i), (d)-(iii)


UGC NET Computer Science PYQ
Consider the following table about processes, their burst time and arrival time
ProcessBurst TimeArrival Time
P190
P2300
P340
P482
P5116
Now, which process finishes second last in the Gantt chart for: non-preemptive SJF, and Round Robin (time quantum = 10)?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

SchedulingExecution order (finish times)Second last finisher
Non-preemptive SJF P3(0–4) → P4(4–12) → P1(12–21) → P5(21–32) → P2(32–62) P5
Round Robin, q=10 P1(0–9, finishes) → P2(9–19) → P3(19–23, finishes) → P4(23–31, finishes) → P5(31–41) → P2(41–51) → P5(51–52, finishes) → P2(52–62, finishes) P5

UGC NET Computer Science PYQ
#include<stdio.h>
void main()
{
    int arr[]={1, 2, 3, 4, 5};
    int *p = arr;

    printf("%d", *p++);
    printf("%d", *(p+1));
}
Find the output of the above code?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Initial:


arr = {1,2,3,4,5}

p → arr[0]


First statement:


*p++


Post-increment


Value printed = *p = 1

Then pointer moves to next element.


Now:


p → arr[1]


Second statement:


*(p+1)


p+1 → arr[2]


Value = 3


Output:


1 3


UGC NET Computer Science PYQ

Which of the following is related to function of layers in a neural network?

A. Information $\to$ Input layer $\to$ Hidden layer

B. Bias $\to$ output layer $\to$ hidden layer.

C. Hidden layer $\to$ algorithm $\to$ output layer.

D. Input layer $\to$ output layer $\to$ algorithms.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In neural network, information first goes to input layer, then it is processed through hidden layer, and finally output is produced.

So, among the given sequences, only sequence A is correct.

Correct option is:

$\boxed{(a)\ \text{Only sequence A is correct}}$


UGC NET Computer Science PYQ
Match List I with List II
List IList II
A. $x+x=x$I. Identity Law
B. $x+0=x$II. Absorption Law
C. $x+1=1$III. Idempotent Law
D. $x+xy=x$IV. Domination Law





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

$x+x=x$ is Idempotent Law, so $A-III$.

$x+0=x$ is Identity Law, so $B-I$.

$x+1=1$ is Domination Law, so $C-IV$.

$x+xy=x$ is Absorption Law, so $D-II$.

Final matching is $A-III,\ B-I,\ C-IV,\ D-II$.

UGC NET Computer Science PYQ
Match the Agile Process models with the task performed during the model:
List-I Agile Process Model List-II Task
(a) Scrum (i) CRC cards
(b) Adaptive software development (ii) Sprint backlog
(c) Extreme programming (iii) the <by/for/of/to> a(n)
(d) Feature-driven development (iv) Time box release plan





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Scrum uses sprint backlog.

So, (a) $\rightarrow$ (ii)

Adaptive Software Development uses time box release plan.

So, (b) $\rightarrow$ (iv)

Extreme Programming uses CRC cards.

So, (c) $\rightarrow$ (i)

Feature-Driven Development uses feature template like:

the <by/for/of/to> a(n)

So, (d) $\rightarrow$ (iii)

Hence, correct matching is:

(a)-(ii), (b)-(iv), (c)-(i), (d)-(iii)


UGC NET Computer Science PYQ
The right sequence of suboperations that are performed in arithmetic pipeline is –
A. Align the mantissas
B. Add or subtract the mantissas
C. Normalize the result
D. Compare the exponents





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

The correct order of floating-point arithmetic steps is —

  • First, compare the exponents (D) to determine alignment.

  • Then, align the mantissas (A) by shifting.

  • Next, add or subtract the mantissas (B).

  • Finally, normalize the result (C) to adjust exponent and mantissa.

Hence, the sequence is D → A → B → C.


UGC NET Computer Science PYQ

Which of the following properties correctly describe a Regular Grammar ?

(A) All productions rules are of the form $A \rightarrow xB$ or $A \rightarrow x$, where $A$ and $B$ are non terminal symbols and $x$ is a terminal symbol.

(B) Regular grammars are more powerful than context-free grammars and can express any type of language.

(C) There is a direct correspondence between regular grammar and finite automata.

(D) Regular grammars can generate languages that are not recognised by any type of automata.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True

Regular grammar productions follow


$A \rightarrow aB$ or $A \rightarrow a$


(B) False

Regular grammar less powerful than CFG


(C) True

Regular grammar ↔ Finite automata equivalence


(D) False

Regular languages are recognized by finite automata


UGC NET Computer Science PYQ

Given below are the two statements:

Statement I: The main objective for using virtual memory is to increase the effective capacity of the memory system.

Statement II: The size of virtual memory can be larger than the main memory.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Statement I is true because virtual memory increases the effective memory capacity.

Statement II is also true because virtual memory can be larger than main memory.


UGC NET Computer Science PYQ
Let $(X,*)$ be a semigroup. Furthermore, for every $a$ and $b$ in $X$, if $a\ne b$, then $a*b\ne b*a$.

Based on the defined semigroup, choose the correct equalities from the options given below.

A. For every $a$ in $X,\ a*a=a$

B. For every $a,b$ in $X,\ a*b*a=a$

C. For every $a,b,c$ in $X,\ a*b*c=a*c$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Given condition means if two elements commute, then they must be equal.

For A:

$a*(a*a)=(a*a)*a$ by associativity.

So, $a$ and $a*a$ commute.

Hence, $a=a*a$.

So, A is true.

For B:

$a*(a*b*a)=(a*a)*b*a=a*b*a$

$(a*b*a)*a=a*b*(a*a)=a*b*a$

So, $a$ and $a*b*a$ commute.

Hence, $a*b*a=a$.

So, B is true.

For C:

Using B, $c*a*c=c$ and $a*c*a=a$.

Now,

$(a*b*c)(a*c)=a*b*(c*a*c)=a*b*c$

$(a*c)(a*b*c)=(a*c*a)*b*c=a*b*c$

So, $a*b*c$ and $a*c$ commute.

Hence, $a*b*c=a*c$.

So, C is also true.

UGC NET Computer Science PYQ
Match List-I with List-II:
List-I HTML Element / Attribute List-II Use
(a) Frame attribute (i) to create link in HTML
(b) <tr> tag (ii) for vertical alignment of content in cell
(c) Valign attribute (iii) to enclose each row in table
(d) <a> tag (iv) to specify the side of the table frame that display border





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Frame attribute is used to specify the side of the table frame that displays border.

So, (a) $\rightarrow$ (iv)

<tr> tag is used to enclose each row in a table.

So, (b) $\rightarrow$ (iii)

Valign attribute is used for vertical alignment of content in a cell.

So, (c) $\rightarrow$ (ii)

<a> tag is used to create links in HTML.

So, (d) $\rightarrow$ (i)

Hence, correct matching is:

$(a)-(iv),\ (b)-(iii),\ (c)-(ii),\ (d)-(i)$


UGC NET Computer Science PYQ
Consider the Boolean expression A(x, y, z) = x (y′ + z′). Which of the following is the complete sum-of-products form of the given Boolean expression?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Given,

A = x (y′ + z′)

= xy′ + xz′

To express as a complete sum-of-products, expand using all variable combinations:

= xy′(z + z′) + xz′(y + y′)

= xy′z + xy′z′ + xyz′ + xy′z′

After simplification, duplicate terms are removed:

A = xyz′ + xy′z + xy′z′


UGC NET Computer Science PYQ

Consider the function in C code :

Cal(a, b)

{

    if (b != 1)

    {

        if (a != 1)

        {

            printf("*");

            Cal(a/2, b);

        }

    }

    else

    {

        b = b - 1;

        Cal(10, b);

    }

}

How many times * is going to be printed, if the function is called with


Cal(10, 10) ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Observe recursion:

Each call prints * while dividing a by 2.

Sequence:

10 → 5 → 2 → 1

For each b value, stars printed = 3.

b decreases from 10 to 1.

Thus:

$9 \times 3 = 27$

Total stars printed = 27.


UGC NET Computer Science PYQ

A disk has $300$ cylinders $(0$ to $299)$. If the initial position of the read-write head is at cylinder $101$, moving towards the higher end of the disk, calculate the total head movement following C_LOOK policy for the read request sequence:

$123,45,197,87,250,198,280$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Initial head position:

$101$

Direction is towards higher cylinder numbers.

Request sequence in sorted order:

$45,87,123,197,198,250,280$

Using C_LOOK, first serve higher side requests:

$101 \to 123 \to 197 \to 198 \to 250 \to 280$

Then jump to lowest request:

$280 \to 45$

Then continue:

$45 \to 87$

Total head movement:

$=|123-101|+|197-123|+|198-197|+|250-198|+|280-250|+|45-280|+|87-45|$

$=22+74+1+52+30+235+42$

$=456$


UGC NET Computer Science PYQ
Consider the following linear optimization problem:

Maximize $Z=6x+5y$

Subject to $2x-3y\le 5$

$x+3y\le 11$

$4x+y\le 15$

and $x\ge 0,\ y\ge 0$.

The optimal solution of the problem is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Check corner points of feasible region.

Intersection of $x+3y=11$ and $4x+y=15$:

From $4x+y=15$,

$y=15-4x$

Put in $x+3y=11$:

$x+3(15-4x)=11$

$x+45-12x=11$

$-11x=-34$

$x=\frac{34}{11}$

Now,

$y=15-4\cdot\frac{34}{11}=\frac{29}{11}$

Objective value:

$Z=6x+5y$

$Z=6\cdot\frac{34}{11}+5\cdot\frac{29}{11}$

$Z=\frac{204+145}{11}=\frac{349}{11}=31.72$

Other corner values are smaller.

UGC NET Computer Science PYQ
An instruction is stored at location $500$ with its address field at location $501$. The address field has the value $400$. A processor register $R_1$ contains the number $200$. Match the addressing mode $($List-I$)$ given below with effective address $($List-II$)$ for the given instruction:
List-I Addressing Mode List-II Effective Address
(a) Direct (i) 200
(b) Register indirect (ii) 902
(c) Index with $R_1$ as the index register (iii) 400
(d) Relative (iv) 600





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Direct addressing:

$EA=400$

So, (a) $\rightarrow$ (iii)

Register indirect addressing:

$EA=R_1=200$

So, (b) $\rightarrow$ (i)

Index addressing:

$EA=Address+R_1$

$EA=400+200=600$

So, (c) $\rightarrow$ (iv)

Relative addressing:

Instruction is stored at location $500$, address field is at $501$, so next instruction location is $502$.

$EA=PC+Address$

$EA=502+400=902$

So, (d) $\rightarrow$ (ii)

Hence, correct matching is:

$(a)-(iii),\ (b)-(i),\ (c)-(iv),\ (d)-(ii)$


UGC NET Computer Science PYQ
What shall be the average waiting time per process if we know that 10 processes (on average) arrive every second and there are normally 20 processes in the queue?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Using Little’s Law → $N = \lambda \times W$ where

$N = 20$ (average number of processes in the system)

$\lambda = 10$ (arrival rate per second)

So,

$W = N / \lambda = 20 / 10 = 2$ seconds (average waiting + service time).

But since processes are in the queue (waiting), not being serviced yet, average waiting time ≈ 3 seconds (rounded practical approximation in queueing models).


UGC NET Computer Science PYQ

What is the output of code given below :

#include<iostream.h>

using namespace std;


class Base {

public:

    Base(){

        cout<<"Base Const";

    }


    virtual ~Base(){

        cout<<"Base dest";

    }

};


class derived : public Base {

public:

    Derived(){

        cout<<"Derived Const";

    }


    ~Derived(){

        cout<<"Derived dest";

    }

};


int main()

{

    Base *b = new Derived();

    delete b;

    return 0;

}






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Step-1: Object creation


Base *b = new Derived();


Constructor order in inheritance:


Base constructor


Derived constructor


Output:


Base Const

Derived Const


Step-2: Deleting object


Base destructor is virtual, so destructors call in reverse order:


Derived destructor


Base destructor


Output:


Derived dest

Base dest


Final Output:


Base Const Derived Const Derived dest Base dest


UGC NET Computer Science PYQ

Given below are the two statements:

Statement I: Any retrieval request that is specified in the basic relational algebra can also be specified in relational calculus.

Statement II: Any retrieval request that is specified in the relational calculus can also be specified in basic relational algebra.

In the light of the above statements, choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Relational algebra and relational calculus have the same expressive power.

Any query written in relational algebra can be written in relational calculus.

Any safe query written in relational calculus can also be written in relational algebra.

So, both statements are true.

Correct option is:

$\boxed{(a)\ \text{Both Statement I and Statement II are true}}$


UGC NET Computer Science PYQ
Which of the following languages are not regular?

A. $L=\{(01)^n0^k\mid n>k,\ k\ge 0\}$

B. $L=\{c^nb^ka^{n+k}\mid n\ge 0,\ k\ge 0\}$

C. $L=\{0^n1^k\mid n\ne k\}$

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution


Language A compares the number of $(01)$ blocks with the number of ending $0$ symbols.

This counting comparison cannot be done by a finite automaton, so A is not regular.

Language B has form $c^nb^ka^{n+k}$.

Here, number of $a$ symbols depends on the sum of number of $c$ and $b$ symbols.

A finite automaton cannot store this count, so B is not regular.

Language C is $L=\{0^n1^k\mid n\ne k\}$.

If C were regular, then its complement within $0^*1^*$ would also be regular.

But that complement is $\{0^n1^n\}$, which is not regular.

So, C is also not regular.

Therefore, A, B and C are not regular.

UGC NET Computer Science PYQ
Match List-I and List-II:
List-I Term List-II Description
(a) Isolated I/O (i) same set of control signal for I/O and memory communication
(b) Memory mapped I/O (ii) separate instructions for I/O and memory communication
(c) I/O interface (iii) require control signals to be transmitted between the communicating units
(d) Asynchronous data transfer (iv) resolve the difference in central computer and peripherals





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Isolated I/O uses separate instructions for I/O and memory communication.

So, (a) $\rightarrow$ (ii)

Memory mapped I/O uses same set of control signals for I/O and memory communication.

So, (b) $\rightarrow$ (i)

I/O interface resolves the difference between central computer and peripherals.

So, (c) $\rightarrow$ (iv)

Asynchronous data transfer requires control signals to be transmitted between communicating units.

So, (d) $\rightarrow$ (iii)

Hence, correct matching is:

$(a)-(ii),\ (b)-(i),\ (c)-(iv),\ (d)-(iii)$


UGC NET Computer Science PYQ
Arrange the steps involved when a user enters a URL in a browser and accesses a website.
A. DNS resolution
B. HTTP request sent
C. URL entered in the browser
D. IP address obtained
E. Webpage displayed





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Correct sequence:

C → A → D → B → E

User enters the URL (C).

DNS resolution happens (A).

Browser obtains the IP address (D).

HTTP request is sent (B).

The webpage is displayed (E).


UGC NET Computer Science PYQ

If a software project has 2000 lines of code (LOC) and the average productivity rate is 10 LOC per person-hour, how many person-hours are required to complete the project?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ

The primary objectives of the SWE-IPT are to:

A. Solicit stakeholder needs and expectations.

B. Specify the software requirements for the product and post-development processes.

C. Generate the integrated technical plans for accomplishing the software development effort.

D. Translate stakeholder requirements into a complete, specified architectural description.

E. Ensure that the software technical data package is sufficiently detailed to facilitate an efficient and effective software implementation.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

SWE-IPT means Software Engineering Integrated Product Team.

Its objectives include requirement collection, software requirement specification, planning, architectural description and implementation support.

So, all given statements are correct.

Correct option is:

$\boxed{(a)\ \text{All the statements are correct}}$


UGC NET Computer Science PYQ
Any string of terminals that can be generated by the following context-free grammar, where $S$ is start nonterminal symbol

$S\to XY$

$X\to 0X\mid 1X\mid 0$

$Y\to Y0\mid Y1\mid 0$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

From $X\to 0X\mid 1X\mid 0$, $X$ generates any binary string ending with $0$.

So, $X=(0+1)^*0$.

From $Y\to Y0\mid Y1\mid 0$, $Y$ generates any binary string starting with $0$.

So, $Y=0(0+1)^*$.

Now,

$S\to XY$

So, every string generated by $S$ contains one $0$ from the end of $X$ and one $0$ from the start of $Y$.

Therefore, every generated string has at least two $0$'s.

UGC NET Computer Science PYQ
Match List-I with List-II:
List-I Term List-II Description
(a) Micro operation (i) Specify micro operations
(b) Micro programmed control unit (ii) Improve CPU utilization
(c) Interrupts (iii) Control Memory
(d) Micro instruction (iv) Elementary operation performed on data stored in register





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Micro operation means elementary operation performed on data stored in register.

So, (a) $\rightarrow$ (iv)

Micro programmed control unit uses control memory.

So, (b) $\rightarrow$ (iii)

Interrupts improve CPU utilization because CPU need not wait continuously for I/O operations.

So, (c) $\rightarrow$ (ii)

Micro instruction specifies micro operations.

So, (d) $\rightarrow$ (i)

Hence, correct matching is:

$(a)-(iv),\ (b)-(iii),\ (c)-(ii),\ (d)-(i)$


UGC NET Computer Science PYQ
Which of the following statements is correct for Pthreads?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Pthreads (POSIX Threads) are defined by POSIX.1c (IEEE 1003.1c) standard. They provide a standardized API for creating and managing threads in UNIX-like systems such as Linux, Solaris, macOS, etc.

UGC NET Computer Science PYQ

Consider the following if $p$ and $q$ are two statements.


(A) $\sim (p \land q) = \sim p \lor \sim q$


(B) $\sim (p \lor q) = \sim p \land \sim q$


(C) $p \land \sim p = T$


(D) $\sim (p \Rightarrow q) = p \land \sim q$


(E) $p \lor q = \sim p \lor \sim q$


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ

Consider the following statements:

A. For every regular language, we can design Turing Machine.

B. For every context free language, we can design Turing Machine.

Which of the following is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Every regular language can be accepted by a finite automaton, and every finite automaton can be simulated by a Turing Machine.

So, statement A is true.

Every context free language can be accepted by a pushdown automaton, and every pushdown automaton can also be simulated by a Turing Machine.

So, statement B is also true.

Correct option is:

$\boxed{(d)\ \text{Statement A and Statement B both are true}}$


UGC NET Computer Science PYQ
Let

$L_1=\{0^n1^n0^m\mid n\ge 1,\ m\ge 1\}$

$L_2=\{0^n1^m0^m\mid n\ge 1,\ m\ge 1\}$

$L_3=\{0^n1^n0^n\mid n\ge 1\}$

Which of the following are correct statements?

A. $L_3=L_1\cap L_2$

B. $L_1$ and $L_2$ are context free languages but $L_3$ is not a context free language

C. $L_1$ and $L_2$ are not context free languages but $L_3$ is a context free language

D. $L_1$ is a subset of $L_3$

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

$L_1$ has equal number of first $0$'s and $1$'s, so it is CFL.

$L_2$ has equal number of $1$'s and last $0$'s, so it is also CFL.

Now,

$L_1=\{0^n1^n0^m\}$

$L_2=\{0^n1^m0^m\}$

In $L_1\cap L_2$, number of first $0$'s $=$ number of $1$'s and number of $1$'s $=$ number of last $0$'s.

So,

$L_1\cap L_2=\{0^n1^n0^n\}=L_3$

Thus, statement A is true.

$L_3=\{0^n1^n0^n\mid n\ge 1\}$ is not context free language.

So, statement B is true.

Statement C is false because $L_1$ and $L_2$ are CFL.

Statement D is false because $L_1$ contains strings like $0011000$, which are not in $L_3$.

UGC NET Computer Science PYQ
The sequence diagram given in Figure $1$ for the Weather Information System takes place when an external system requests the summarized data from the weather station. The increasing order of lifeline for the objects in the system are:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In a sequence diagram, lifeline shows the existence or participation duration of an object during the interaction.

From the given figure, the increasing order of lifeline is from the object having the shortest lifeline to the object having the longest lifeline.

By observing the diagram:

Weather Data has the shortest lifeline.

Then comes Comms link.

Then comes Weather Station.

Sat Comms has the longest lifeline.

So, the increasing order is:

Weather Data $\rightarrow$ Comms link $\rightarrow$ Weather Station $\rightarrow$ Sat Comms


UGC NET Computer Science PYQ
In a group of 120 people:
65 eat Rice, 45 eat Bread, 42 eat Curd,
20 eat both Rice and Bread, 25 eat both Rice and Curd, 15 eat both Bread and Curd,
and 8 eat all three items.
Which of the following is the number of people who eat at least one of the three items?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Using the formula for union of three sets:
n(R ∪ B ∪ C) = n(R) + n(B) + n(C) − n(R ∩ B) − n(R ∩ C) − n(B ∩ C) + n(R ∩ B ∩ C)
Substitute:
= 65 + 45 + 42 − 20 − 25 − 15 + 8
= 152 − 60 + 8
= 100
Hence, 100 people eat at least one of the three items.

UGC NET Computer Science PYQ

Which of the following are context free language ?


(A) ${w^i x^j y^k z^l \mid i + k = j + l,; i,j,k,l \ge 0}$


(B) ${w^i x^j y^k z^l \mid i = j \text{ and } k = l,; i,j,k,l \ge 0}$


(C) ${w^i x^j y^k z^l \mid i = j = k \text{ and } k \ne l,; i,j,k,l \ge 0}$


(D) ${w^i x^j y^k z^l \mid i = j = k + l,; i,j,k,l \ge 0}$


(E) ${w^i x^j y^k z^l \mid i = j \text{ and } k \ne l,; i,j,k,l \ge 0}$


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) Condition $ i + k = j + l $ This type of dependency is not context free (requires two independent balances). So not CFL. (B) Conditions $ i = j $ and $ k = l $ Language form $ w^i x^i y^k z^k $ This is context free. (C) Condition $ i = j = k $ This is similar to $ a^n b^n c^n $ which is not context free. (D) Condition $ i = j = k + l $ Single dependency handled by PDA → Context Free. (E) Condition $ i = j $ and $ k \ne l $ Still context free (difference condition allowed). Correct CFL: (D) and (E)

UGC NET Computer Science PYQ

 Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

A: Artificial Neural Networks are the backbone of deep learning algorithms.

R: Back propagation is one of the techniques used to train an ANN.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Assertion A is correct because deep learning is mainly based on artificial neural networks.

Reason R is also correct because back propagation is commonly used to train artificial neural networks.

But R does not directly explain why ANN is the backbone of deep learning.

Correct option is:

$\boxed{(b)\ \text{Both A and R are correct but R is NOT the correct explanation of A}}$


UGC NET Computer Science PYQ
Given below are two statements

Statement I: The family of context free languages is closed under homomorphism.

Statement II: The family of context free languages is closed under reversal.

In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Context free languages are closed under homomorphism.

So, if $L$ is CFL, then $h(L)$ is also CFL.

Therefore, Statement I is true.

Context free languages are also closed under reversal.

So, if $L$ is CFL, then $L^R$ is also CFL.

Therefore, Statement II is true.

Hence, both Statement I and Statement II are true.

UGC NET Computer Science PYQ
The Data Encryption Standard $($DES$)$ has a function consists of four steps. Which of the following is correct order of these four steps?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In DES, the round function follows these steps:

First, expansion permutation is applied to expand the right half from $32$ bits to $48$ bits.

Then XOR operation is performed with the round key.

After that, S-box substitution is applied to reduce $48$ bits to $32$ bits.

Finally, straight permutation is applied.

So, the correct order is:

$Expansion\ Permutation \rightarrow XOR \rightarrow S\text{-}boxes \rightarrow Straight\ Permutation$


UGC NET Computer Science PYQ
List I (Statements) List II (Logic Type)
A. If the Indian team wins, then it is raining IV. Conditional
B. If the Indian team does not win, then it is not raining I. Inverse
C. If it is raining, then the Indian team wins II. Converse
D. If it is not raining, then the Indian team does not win III. Contrapositive





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A → IV → Conditional statement
B → I → Inverse (negating both sides)
C → II → Converse (reversing condition and result)
D → III → Contrapositive (negating and reversing)

UGC NET Computer Science PYQ

Out of following steps in the proper sequence for simplifying a Boolean function using a Karnaugh map (K-map).


(A) Identify and group the largest possible cluster of $1$'s


(B) Draw the K-map for the given Boolean function


(C) Write the simplified Boolean expression from the grouped clusters


(D) Transfer the truth table values to the K-map


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Correct K-map procedure:

Step 1 → Draw the K-map
Step 2 → Fill truth table values
Step 3 → Group largest clusters of $1$'s
Step 4 → Write simplified expression

Sequence:

(B) → (D) → (A) → (C)

UGC NET Computer Science PYQ
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$
Find the optimal solution for fractional knapsack problem when its maximum capacity is $15$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

Find profit by weight ratio:

Item 5: $\frac{6}{1}=6$

Item 1: $\frac{9}{2}=4.5$

Item 7: $\frac{9}{3}=3$

Item 6: $\frac{16}{9}=1.77$

Now take items in decreasing ratio:

Total weight $=1+2+3+9=15$

Total profit $=6+9+9+16=40$

Correct option is:

$\boxed{(b)\ 40}$


UGC NET Computer Science PYQ
What is the minimum number of states required to the finite automaton equivalent to the transition diagram given below?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In the given DFA, final states are $c$ and $g$.

First partition the states into final and non-final states:

$P_1=\{c,g\}$

$P_2=\{a,b,d,e,f,h\}$

Now minimize by checking equivalent states.

State $d$ is unreachable from the start state, so it can be ignored.

Among reachable states, equivalent groups are:

$\{a,e\}$

$\{b,h\}$

$\{f\}$

$\{c\}$

$\{g\}$

So, total minimum states are:

$5$

UGC NET Computer Science PYQ

 How many nodes are there in flowgraph $F$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

In the given flowgraph, some statements are combined into one node, like $(2,3)$ and $(4,5)$.

Nodes are:

$1,\ (2,3),\ (4,5),\ 6,\ 7,\ 8,\ 9,\ 10,\ 11$

Total number of nodes:

$9$


UGC NET Computer Science PYQ
Consider the following statements for XML (Extensible Markup Language):
A. The number of tags decreases and users can define their own tags.
B. It is used for presentation.
C. It is case sensitive.
D. It is dynamic.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A → IV → Conditional statement
B → I → Inverse (negating both sides)
C → II → Converse (reversing condition and result)
D → III → Contrapositive (negating and reversing)

UGC NET Computer Science PYQ

A multi processor system with 16 processors is used to execute a parallelizable task. If the serial portion of the task takes 200 clock cycles and the parallel portion takes 800 clock cycles. When all 16 processors are used how many total clock cycles are required to complete the task?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$


What is the maximum value of items you can carry if maximum weight allowed is $25$ with a fractional knapsack?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Take items in decreasing profit by weight ratio:

Item 5: weight $1$, profit $6$

Item 1: weight $2$, profit $9$

Item 7: weight $3$, profit $9$

Item 6: weight $9$, profit $16$

Item 2: weight $5$, profit $5$

Total weight used:

$1+2+3+9+5=20$

Total profit:

$6+9+9+16+5=45$

Remaining capacity:

$25-20=5$

Next best item is item 4 with profit $7$ and weight $11$.

Fractional profit:

$5\times \frac{7}{11}=\frac{35}{11}=3.18$

Maximum profit:

$45+3.18=48.18\approx 48.1$

Correct option is:

$\boxed{(a)\ 48.1}$


UGC NET Computer Science PYQ
Find the regular expression for the language accepted by the automata given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Let the states be $q_0,q_1,q_2$.

Here, $q_0$ is start state and final state.

From the diagram:

$q_0\xrightarrow{a}q_1$

$q_1\xrightarrow{b}q_0$

$q_1\xrightarrow{a}q_2$

$q_2\xrightarrow{b}q_1$

$q_0\xrightarrow{b}q_2$

Now, paths from $q_0$ back to $q_0$ are:

$q_0\xrightarrow{a}q_1\xrightarrow{b}q_0$, giving $ab$

Also,

$q_0\xrightarrow{b}q_2\xrightarrow{b}q_1\xrightarrow{b}q_0$, giving $bbb$

In general, from $q_1$ to $q_0$ we can have:

$(ab)^*b$

So, complete cycle from $q_0$ to $q_0$ is:

$(a+bb)(ab)^*b$

Since $q_0$ is final, these cycles can repeat any number of times.

Required regular expression is:

$((a+bb)(ab)^*b)^*$

UGC NET Computer Science PYQ

 What is the cyclomatic complexity of flowgraph $F$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Cyclomatic complexity is:

$V(G)=E-N+2$

Here,

Number of nodes:

$N=9$

Number of edges:

$E=11$

So,

$V(G)=11-9+2$

$V(G)=4$


UGC NET Computer Science PYQ
Which of the following is NOT a software characteristic?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Software can have bugs and logical errors, so it is not always correct. The other three are valid software characteristics.

UGC NET Computer Science PYQ

If $L_1$ and $L_2$ are context free languages, which of the following is True about $L_1 \cap L_2$ ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Important theory result: Context Free Languages are NOT closed under intersection But intersection of CFLs is Context Sensitive Thus $ L_1 \cap L_2 $ belongs to Context Sensitive languages

UGC NET Computer Science PYQ
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

 If new item $(P=5,W=2)$ is added to the list, total items is $8$ and capacity is $25$, then the best-case time of fractional knapsack for this case is ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

For fractional knapsack, if items are already arranged according to profit by weight ratio, then best-case selection can be done in linear time.

Here, total items are:

$n=8$

So, best-case time complexity is:

$O(n)=O(8)$

Correct option is:

$\boxed{(a)\ O(8)}$


UGC NET Computer Science PYQ
 What language is accepted by the pushdown automaton

$M=({q_0,q_1,q_2},\{a,b\},\{a,b,z\},\delta,q_0,z,\{q_2\})$

with

$\delta(q_0,a,a)=\{(q_0,aa)\}$

$\delta(q_0,b,a)=\{(q_0,ba)\}$

$\delta(q_0,a,b)=\{(q_0,ab)\}$

$\delta(q_0,b,b)=\{(q_0,bb)\}$

$\delta(q_0,a,z)=\{(q_0,az)\}$

$\delta(q_0,b,z)=\{(q_0,bz)\}$

$\delta(q_0,\lambda,b)=\{(q_1,b)\}$

$\delta(q_0,\lambda,a)=\{(q_1,a)\}$

$\delta(q_1,a,a)=\{(q_1,\lambda)\}$

$\delta(q_1,b,b)=\{(q_1,\lambda)\}$

$\delta(q_1,\lambda,z)=\{(q_2,z)\}$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In state $q_0$, the PDA reads input symbols and pushes them into the stack.

So, first part of the string is stored in stack.

After that, using $\lambda$ move, PDA goes from $q_0$ to $q_1$.

In state $q_1$, the PDA reads input and matches it with the top of stack.

If input is $a$ and stack top is $a$, it pops $a$.

If input is $b$ and stack top is $b$, it pops $b$.

So, second part of the string must be reverse of the first part.

When stack reaches bottom symbol $z$, PDA goes to final state $q_2$.

Therefore, language accepted is even length palindrome over $\{a,b\}$.

So,

$L=\{ww^R\mid w\in\{a,b\}^+\}$

UGC NET Computer Science PYQ

How many regions are there in flowgraph $F$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

For a connected flowgraph:

Number of regions $=$ Cyclomatic complexity

From Q92,

Cyclomatic complexity $=4$

So, number of regions:

$4$


UGC NET Computer Science PYQ
Which of the following is not the characteristic of packet switching?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Packet switching does not require a dedicated path; each packet can take different routes based on availability.
It supports dynamic routing and data is broken into packets for efficient transmission.
Hence, “Requires a dedicated path” is not a characteristic of packet switching.

UGC NET Computer Science PYQ

Arrange the following stages of a Turing Machine (TM) operation in the correct order as they occur during computation.


(A) Writing a symbol on the tape


(B) Moving the tape head left or right


(C) Reading a symbol from the tape


(D) Transitioning to a new state based on the current state and symbol read


(E) Halting and accepting or rejecting the input


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Typical Turing Machine step:

1 Read symbol
2 Decide next state
3 Write symbol
4 Move tape head
5 Halt condition

Thus order

(C) → (D) → (A) → (B) → (E)

UGC NET Computer Science PYQ
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

The most efficient solution for the fractional knapsack problem with maximum capacity $15$ can be obtained by using ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

Fractional knapsack allows taking fractions of items.

So, we choose items according to highest profit by weight ratio.

This is a greedy approach.

Correct option is:

$\boxed{(c)\ \text{Greedy Algorithm}}$


UGC NET Computer Science PYQ
Match List I with List II
List IList II
A. $S\to XY,\ X\to 0,\ Y\to 1$I. Greibach Normal Form
B. $S\to aS\mid bSS\mid c$II. Context sensitive Grammar
C. $S\to AB,\ A\to 0A\mid 1A\mid 0,\ B\to 0A$III. Chomsky Normal Form
D. $S\to aAbc,\ Ab\to bA,\ Ac\to Bbcc,\ bB\to Bb,\ aB\to aa\mid aaA$IV. S-Grammar
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

For A, productions are of the form $A\to BC$ or $A\to a$, so it is Chomsky Normal Form. Hence, $A-III$.

For B, every production starts with a terminal symbol, so it is Greibach Normal Form. Hence, $B-I$.

For C, grammar is matched with S-Grammar. Hence, $C-IV$.

For D, some productions have more than one symbol on the left side, like $Ab\to bA$, and length is non-decreasing. So it is Context Sensitive Grammar. Hence, $D-II$.

Final matching is $A-III,\ B-I,\ C-IV,\ D-II$.

UGC NET Computer Science PYQ

How many nodes are there in the longest independent path?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

From the given flowgraph, one longest independent path can be written as:

$1\rightarrow(2,3)\rightarrow6\rightarrow7\rightarrow9\rightarrow10\rightarrow1\rightarrow11$

Now count the nodes in this path:

$1,\ (2,3),\ 6,\ 7,\ 9,\ 10,\ 1,\ 11$

Total nodes $=8$


UGC NET Computer Science PYQ
Consider the following infix expression: Q = ((A + B) * D) ↑ (E − F) The equivalent postfix expression of Q is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Step-by-step conversion:
Infix: ((A + B) * D) ↑ (E − F)
(A + B) → AB+
((A + B) * D) → AB+D*
(E − F) → EF−
Combine with ↑ → AB+D*EF−↑

UGC NET Computer Science PYQ

Which of the following statements are TRUE about Privileged Instructions?


(A) It can only be executed by the Operating System kernel and not by user applications.


(B) It is designed to perform operations that can directly affect the hardware or system state such as I/O operations or changing memory management setting.


(C) User applications can execute privileged instructions if they have correct permissions, set by the Operating System.


(D) It is usually executed in user mode to ensure the safety and security of the system.


Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) True
Privileged instructions run in kernel mode

(B) True
Used for hardware control, I/O, memory management

(C) False
User programs cannot execute privileged instructions

(D) False
Executed in kernel mode, not user mode

UGC NET Computer Science PYQ
For a knapsack problem, $P$ and $W$ are profits and weights for a set of $7$ items as given below:

$P={9,5,2,7,6,16,9}$

$W={2,5,6,11,1,9,3}$

Which of the following statements is correct for a knapsack?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

In $0/1$ knapsack, an item is either selected completely or rejected completely.

In fractional knapsack, an item can be divided into smaller parts according to required weight.

So, correct option is:

$\boxed{(d)\ \text{In }0/1\text{ knapsack problem, items cannot be divided into smaller portions and in fractional knapsack we can divide the item into required proportions of weight}}$


UGC NET Computer Science PYQ
Which of the following concepts can be used to identify loops?

A. Depth first ordering
B. Dominators
C. Reducible graphs
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In compiler design, loops in a flow graph are commonly identified using depth first ordering and back edges.

Dominators are also used because a loop header dominates the nodes inside the loop.

Reducible graphs are important in loop analysis because loops in reducible flow graphs can be identified systematically.

So, all three concepts are useful for identifying loops.

UGC NET Computer Science PYQ

How many predicate nodes are there and what are their names?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Predicate nodes are those nodes from where more than one outgoing edge is present.

From the flowgraph:

Node $1$ has more than one outgoing path.

Node $(2,3)$ has two outgoing paths.

Node $6$ has two outgoing paths.

So, predicate nodes are:

$1,\ (2,3),\ 6$

Number of predicate nodes $=3$


UGC NET Computer Science PYQ
The tight asymptotic bound for the recurrence: $T(n) = 2T(n/4) + \sqrt{n}$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

We use the Master Theorem for $T(n) = aT(n/b) + f(n)$ Here, $a = 2$, $b = 4$, so $n^{\log_b a} = n^{\log_4 2} = n^{1/2} = \sqrt{n}$ Thus, $f(n) = \sqrt{n}$ is of the same order as $n^{\log_b a}$. Therefore, by Case 2 of Master Theorem, $T(n) = \Theta(n^{\log_b a} \log n) = \Theta(\sqrt{n} \log n)$ ✅ But wait! Let’s check growth dominance carefully: Actually, when $f(n) = \Theta(n^{\log_b a})$, we multiply by $\log n$, hence the correct bound is $\boxed{T(n) = \Theta(\sqrt{n} \log n)}$

UGC NET Computer Science PYQ
(A) In IPv4 addressing, a block of address can be define as $x.y.z.t/n$ in which $x,y,z,t$ define one of the address and $n$ define the mask

(B) The first address in the block can be found by setting the rightmost $32-n$ bits to $0$s

(C) Address of class C is used for multicast communication

(D) There are five classes in IPv4 address

(E) Supernetting combine several networks into one large network

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Which of the following queries would retrieve the roll number and names of students who have enrolled for all the prerequisite courses of the course number 324 ?







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We need students who have enrolled in all prerequisite courses of course 324.

This is a “for all” type query.

In SQL, “for all” is usually written using double NOT EXISTS.

Meaning of option (c):

For a student s, there should not exist any prerequisite course p of course 324 such that the student has not enrolled in that prerequisite course.

So, option (c) checks:

No prerequisite course of 324 is missing from the student's enrollment.

Option (a) uses ANY, so it checks only at least one prerequisite course.

Option (b) uses ALL incorrectly, because one enrollment course cannot be equal to all different prerequisite course IDs at the same time.

Option (d) uses EXISTS, so it checks only at least one matching prerequisite enrollment, not all.

UGC NET Computer Science PYQ
Given below are two statements

Statement I: LL(1) and LR are examples of Bottom-up parsers.

Statement II: Recursive descent parser and SLR are examples of Top-down parsers.

In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

LL(1) parser is a top-down parser, while LR parser is a bottom-up parser.

So, Statement I is false.

Recursive descent parser is a top-down parser, but SLR parser is a bottom-up parser.

So, Statement II is also false.

Hence, both statements are false.

UGC NET Computer Science PYQ

 Minimal cover $F'$ of functional dependency set $F$ is:

Given:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

Given functional dependency set:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

First split right side of $A\rightarrow BC$:

$A\rightarrow B$

$A\rightarrow C$

So,

$F={A\rightarrow B,\ A\rightarrow C,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Now check whether $A\rightarrow D$ is redundant or not.

From:

$A\rightarrow B$

$A\rightarrow C$

we get:

$A\rightarrow BC$

And given:

$BC\rightarrow D$

So,

$A\rightarrow BC\rightarrow D$

Therefore,

$A\rightarrow D$

can be derived from other dependencies, so it is redundant.

Remove $A\rightarrow D$.

Hence minimal cover is:

$F'={A\rightarrow B,\ A\rightarrow C,\ BC\rightarrow D,\ D\rightarrow E}$


UGC NET Computer Science PYQ
What is the total swap time (Swap in & Swap out) in a system for a 15 MB process with a transfer rate of 30 MBps. Given that there is an average latency of 12 ms, however no head seeks involved.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Total swap time = 2 × (Transfer time + Latency) Transfer time for 15 MB = 15 / 30 = 0.5 sec So, Total time = 2 × (0.5 + 0.012) = 1.024 sec

UGC NET Computer Science PYQ
In Software configuration management, what is the primary purpose of version control?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Version control tracks code history and changes.

UGC NET Computer Science PYQ

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Given query: select s.rollno from students where s.sex = ALL (select f.sex from professor f where f.empid = s.advisor).

Consider the following statements about the given query that retrieves the set of all students whose gender is same as the gender of their advisor:

S1. It has a correlated subquery

S2. It has an uncorrelated subquery

S3. If we replace ALL by ANY in the above query, its result will be different

S4. If we replace ALL by ANY in the above query, its result will be same.

Identify all the statement that are TRUE:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The subquery is:

select f.sex from professor f where f.empid = s.advisor

Here, the subquery uses s.advisor from the outer query.

So, it is a correlated subquery.

Therefore, S1 is true and S2 is false.

Also, advisor refers to empid of professor relation. Since empid is unique, the subquery returns only one professor’s sex.

So,

s.sex = ALL (single value)

and

s.sex = ANY (single value)

will give the same result.

Therefore, S4 is true and S3 is false.


UGC NET Computer Science PYQ
The postfix form of the expression $(A+B)*(C*D-E)*F/G$ is ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Given expression is:

$(A+B)*(C*D-E)*F/G$
First convert each part:
$(A+B)\Rightarrow AB+$
$(C*D-E)\Rightarrow CD*E-$
Now multiply both:
$(A+B)*(C*D-E)\Rightarrow AB+CD*E-*$
Now multiply by $F$:
$AB+CD*E-*F*$
Now divide by $G$:
$AB+CD*E-*F*G/$

UGC NET Computer Science PYQ

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Identify primary key of table $R$ with functional dependency set $F$.

Given:

$R(A,B,C,D,E)$

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

To find the primary key, find closure of $A$.

Given:

$A\rightarrow BC$

So,

$A^+={A,B,C}$

Also,

$A\rightarrow D$

So,

$A^+={A,B,C,D}$

And,

$D\rightarrow E$

So,

$A^+={A,B,C,D,E}$

Since $A^+$ contains all attributes of relation $R$, $A$ is a candidate key.

Therefore, the primary key is:

$A$


UGC NET Computer Science PYQ
A positive integer is selected at random from the set of positive integers not exceeding 200. What is the probability that the selected number is divisible by either 2 or 5?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Let total numbers = 200 Divisible by 2 → 200/2 = 100 Divisible by 5 → 200/5 = 40 Divisible by both (LCM 10) → 200/10 = 20 Using inclusion–exclusion: n(2 ∪ 5) = 100 + 40 − 20 = 120 Probability = 120 / 200 = 3/5

UGC NET Computer Science PYQ
A vector processor with 16 lanes can perform an operation on 1024 elements in which each operation takes 5 clock cycles. How many cycles are needed to complete the operation?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Which of the following queries would compute, for each department, the total credits of all the courses offered by the department?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We need total credits of courses for each department.

So, we must use:

sum(credits)

Also, department and course must be joined using:

deptid = deptno

Then grouping must be done department-wise using:

group by deptid, name

Option (a) correctly uses join, sum and group by.

Option (b) uses count(credits), so it counts courses, not total credits.

Option (c) is syntactically incorrect.

Option (d) uses the join condition in having instead of where, so it is not the correct standard query.


UGC NET Computer Science PYQ
A double-ended queue (deque) supports adding and removing items from both ends of the queue. The operations supported by deque are AddFront, AddRear, RemoveFront and RemoveRear. You are given only stacks to implement this data structure. You can implement only push and pop operations. What is the time complexity of performing AddFront() and AddRear() assuming $m$ is the size of the stack and $n$ is the number of elements?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Using stack operations, insertion at front can be done directly by push operation.

So, AddFront takes:

$O(1)$

But insertion at rear needs moving elements because stack allows insertion only at top.

So, AddRear may require shifting $n$ elements.

Therefore, AddRear takes:

$O(n)$

UGC NET Computer Science PYQ

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Identify the normal form in which relation $R$ belong to.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

$A$

Since the primary key contains only one attribute, there is no partial dependency.

So, relation $R$ is in $2NF$.

Now check for $3NF$.

Given dependency:

$D\rightarrow E$

Here, $D$ is not a super key and $E$ is a non-prime attribute.

So, relation is not in $3NF$.

Therefore, the highest normal form of relation $R$ is:

$2NF$


UGC NET Computer Science PYQ
Consider the following steps involved in the application of Genetic Algorithm for a problem:
A. Select a pair of parents from the population
B. Apply mutation at each locus with probability $p_m$
C. Calculate fitness of each member of the population
D. Apply crossover with probability $p_c$ to form offsprings
Choose the correct answer from the options given below describing the correct order of the above steps:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

The correct sequence in a Genetic Algorithm is — C: Calculate fitness of each member of the population. A: Select a pair of parents based on fitness. D: Apply crossover ($p_c$) to form offspring. B: Apply mutation ($p_m$) to maintain diversity. Hence, the correct order is C → A → D → B.

UGC NET Computer Science PYQ

A CPU has a 5-stage pipeline with the following stages:

Fetch (F), Decode (D), Execute (E), Memory (M) and Write-back (W).

Each stage takes one clock cycle to complete. Assume there are no pipeline stalls and the pipeline is initially empty.

How many clock cycles are required to complete the execution of 10 instructions?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Which of the following queries would retrieve the dept id and name of all the departments that are such that the total of the credits of all the offered courses by the department is strictly greater than 40?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

We need departments whose total course credits are greater than 40.

First, department and course must be joined:

deptid = deptno

Then courses must be grouped department-wise:

group by deptid, name

After grouping, total credits must be checked using HAVING:

having totalcredits >40

Option (d) correctly uses:

where deptid = deptno
group by deptid, name
having totalcredits >40


UGC NET Computer Science PYQ

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Identify the redundant functional dependency in $F$.

Given:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

We need to check which functional dependency can be derived from the other dependencies.

Given:

$A\rightarrow BC$

and

$BC\rightarrow D$

So, by transitivity:

$A\rightarrow BC\rightarrow D$

Therefore,

$A\rightarrow D$

can be derived from $A\rightarrow BC$ and $BC\rightarrow D$.

So, $A\rightarrow D$ is redundant.


UGC NET Computer Science PYQ
In a relational database, which one of the following is CORRECT:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A prime attribute is one that is part of a candidate key.
In BCNF (Boyce-Codd Normal Form), for every functional dependency $X \to Y$, $X$ must be a super key.
If all attributes are prime, there cannot exist a dependency where a non-superkey determines another attribute.
Hence, the relation is automatically in BCNF.

UGC NET Computer Science PYQ
Lower-triangular sparse matrix is one :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A lower triangular matrix is a matrix in which all the elements above the main (leading) diagonal are zero. Therefore, the non-zero elements can appear only on or below the leading diagonal.

Hence the correct statement is that the non-zero elements lie below the leading diagonal.

UGC NET Computer Science PYQ

Match List – I with List – II.

 List – I (Counter)
 List – II (uses/working)
 (A) N-bit Ring Counter
 (I) Uses universal clock
 (B) Synchronous Counter
 (II) Counts exactly N states
 (C) Asynchronous Counter
 (III) Counts 0 to 9
 (D) Decimal Counter

 (IV) Main clock is applied to first flip-flop only

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) N-bit Ring Counter → Counts exactly N states → (II)

(B) Synchronous Counter → Uses common (universal) clock → (I)

(C) Asynchronous Counter → Main clock applied only to first flip-flop → (IV)

(D) Decimal Counter → Counts from 0 to 9 → (III)

Correct matching:

(A)-(II), (B)-(I), (C)-(IV), (D)-(III)

UGC NET Computer Science PYQ

Use the following schema of the academic institution relational database:

student (rollno, name, degree, year, sex, deptno, advisor)

department (deptid, name, hod, phone)

professor (empid, name, sex, startyear, deptno, phone)

course (courseid cname, credits, deptno)

enrollment (rollno, courseid, sem, year, grade)

teaching (empid, courseid, sem, year, classroom)

prerequisite (precourseid, courseid)

deptno is foreign key in the student, professor and course relations referring to deptid of department relation; advisor is a foreign key in the student relation referring to empid of professor relation; hod is a foreign key in the department relation referring to empid of professor relation; rollno is a foreign key in the enrollment relation referring to rollno of student relation; courseid is a foreign key in the enrollment, teaching relations referring to courseid of course relation; empid is a foreign key of the teaching relation referring to empid of professor relation; precourseid and courseid are foreign keys in the prerequisite relation referring to courseid of the course relation;

Given query:

select s.rollno, s.name
from student s
where EXISTS (select c.courseid from course c Where c.deptno =5 and
EXISTS (select e.* from enrollment e
where e.courseid = c.courseid and
e.rollno = s.rollno));

Which one of the following statements is correct with respect to the given query?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift I (Paper II) PYQ

Solution

The outer query selects students.

Inside the query:

EXISTS checks whether there is at least one course from department number 5.

The inner EXISTS checks whether the same student has enrolled in that course.

So the query means:

Find students who have enrolled in at least one course offered by department number 5.

It does not check all courses. For all courses, double NOT EXISTS would be required.


UGC NET Computer Science PYQ

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Assume that given table $R$ is decomposed in two tables:

$R_1(A,B,C)$ with functional dependency set

$f_1={A\rightarrow B,\ A\rightarrow C}$

and

$R_2(A,D,E)$ with FD set

$F_2={A\rightarrow D,\ D\rightarrow E}$

Which of the following option is true w.r.t. given decomposition?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2019 (Paper II) PYQ

Solution

For $R_1(A,B,C)$:

Given:

$A\rightarrow B$

$A\rightarrow C$

So,

$A^+={A,B,C}$

Therefore, $A$ is a key of $R_1$.

Since all dependencies have left side as key $A$, $R_1$ is in $3NF$.

Now for $R_2(A,D,E)$:

Given:

$A\rightarrow D$

$D\rightarrow E$

Here,

$A^+={A,D,E}$

So, $A$ is a key of $R_2$.

But dependency $D\rightarrow E$ violates $3NF$, because $D$ is not a super key and $E$ is a non-prime attribute.

Since the key $A$ is a single attribute, there is no partial dependency.

So, $R_2$ is in $2NF$ but not in $3NF$.


UGC NET Computer Science PYQ
Match List I with List II
List I (Hashing Collision Handling Method)List II (Strategy)
A. ChainingI. Check next slot
B. Linear ProbingII. Use second hash function
C. Quadratic ProbingIII. Linked list at index
D. Double HashingIV. Skip slots using quadratic step





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Chaining → Linked list at index (III)
Linear probing → Check next slot (I)
Quadratic probing → Skip slots using quadratic step (IV)
Double hashing → Use second hash function (II)

UGC NET Computer Science PYQ
What will be the order of the following fields in a frame relay ‘frame format’ ?

A. Flag
B. FCS
C. address
D. information

Choose the correct answer from the options given below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

The Frame Relay frame format is derived from the HDLC frame structure.
The order of fields is:

Flag → Address → Information → FCS → Flag

Considering only the given fields, the order becomes:

A (Flag) → C (Address) → D (Information) → B (FCS)

UGC NET Computer Science PYQ
Match List – I with List – II.
 List – I

 List – II

 (A) Natural language processing
 (I) A method of training algorithm by rewarding desired behaviour and/or punishing undesired one.

 (B) Reinforcement learning
 (II) System designed to emulate the decision making abilities of a human expert.

 (C) Support vector machine
 (III) A branch of AI focused on understanding and generating human language.

 (D) Expert system

 (IV) A machine learning technique that finds the hyperplane that best separates different classes in a feature space.

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

(A) Natural language processing → Understanding human language → (III)

(B) Reinforcement learning → Reward and punishment learning → (I)

(C) Support vector machine → Hyperplane classification method → (IV)

(D) Expert system → Decision making like human expert → (II)

UGC NET Computer Science PYQ
The negation of "Some students like hockey" is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

"Some students like hockey" means
$ \exists x , [S(x) \land L(x)] $

Its negation is
$ \neg \exists x , [S(x) \land L(x)] $

Using logical rule,
$ \neg \exists x , P(x) \equiv \forall x , \neg P(x) $

So,
$ \forall x , [S(x) \rightarrow \neg L(x)] $

Hence, every student dislikes hockey.

UGC NET Computer Science PYQ
Consider the following graph.


Among the following sequences

I. $a\ b\ e\ g\ h\ f$

II. $a\ b\ f\ e\ h\ g$

III. $a\ b\ f\ h\ g\ e$

IV. $a\ f\ g\ h\ b\ e$

Which are depth first traversals of the above graph?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In DFS, we keep moving to an unvisited adjacent vertex as deeply as possible.

Check I:

$a\to b\to e\to g\to h\to f$

All consecutive vertices are connected, so I is possible DFS traversal.

Check II:

$a\to b\to f\to e$

Here, $f$ is not directly connected to $e$.

Also, from $f$, unvisited adjacent vertices like $h$ and $g$ are available, so DFS cannot jump to $e$.

So, II is not possible.

Check III:

$a\to b\to f\to h\to g\to e$

All consecutive vertices are connected, so III is possible DFS traversal.

Check IV:

$a\to f\to g\to h\to b\to e$

All consecutive vertices are connected, so IV is possible DFS traversal.

Therefore, valid DFS traversals are I, III, and IV only.

UGC NET Computer Science PYQ
Binary equivalent to $(A0F)_{16}$ is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A = 1010, 0 = 0000, F = 1111 So, $(A0F){16} = 101000001111{2}$.

UGC NET Computer Science PYQ

40 software professionals were interviewed for a job.

25 knew PYTHON, 20 knew JAVA and 7 knew neither language.

How many knew both languages?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Total people = 40
People who know neither = 7

So people who know at least one language:

40 − 7 = 33

Use formula:

n(P ∪ J) = n(P) + n(J) − n(P ∩ J)

33 = 25 + 20 − x

33 = 45 − x

x = 12

UGC NET Computer Science PYQ
A relation $R$ is defined on ordered pairs of integers as $(x, y) R(u, v)$ if $x < u$ and $y > v$. Then $R$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For reflexive relation, we need
$ (x, y) R(x, y) $

But according to the definition,
$ x < x $ and $ y > y $

Both are false.

So, $R$ is not reflexive.

A partial order relation must be reflexive, antisymmetric, and transitive.
Since $R$ is not reflexive, it is not a partial order.

An equivalence relation must be reflexive, symmetric, and transitive.
Since $R$ is not reflexive, it is not an equivalence relation.

Hence, $R$ is neither a partial order nor an equivalence relation.

UGC NET Computer Science PYQ
Given below are two statements

Statement I: In an undirected graph, number of odd degree vertices is even.

Statement II: In an undirected graph, sum of degrees of all vertices is even.

In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

By Handshaking Theorem, sum of degrees of all vertices in an undirected graph is equal to twice the number of edges.

So,

$\sum deg(v)=2|E|$

This is always even. Hence, Statement II is true.

Also, in any undirected graph, the number of vertices having odd degree is always even.

Hence, Statement I is also true.

Therefore, both statements are true.

UGC NET Computer Science PYQ
In a Stop-and-Wait system, the bandwidth of the line is 1 Mbps, and 1 bit takes 30 milliseconds to make a round trip. The bandwidth-delay product is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Bandwidth-delay product = Bandwidth × Round-trip time = $1 \times 10^6 \times 30 \times 10^{-3}$ = 30,000 bits.

UGC NET Computer Science PYQ

How does a relational database ensure data integrity?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Relational databases ensure data integrity using:

• Primary keys
• Foreign keys
• Constraints
• Schema rules

Thus integrity is maintained by enforcing rules defined in the schema.

UGC NET Computer Science PYQ
Suppose you are married and you and your partner attend a party with three other married couples. Several handshakes took place. No one shook hands with himself or herself or with their partner, and no one shook hands with the same person more than once. After all handshaking was completed, suppose you asked each person, including your partner, how many hands they had shaken. Each person gave a different answer. How many hands did your spouse shake?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

There are $4$ married couples, so total persons are $8$.

You asked $7$ persons, and all gave different answers.

Maximum possible handshakes by one person are $6$ because a person cannot shake hands with himself or herself and cannot shake hands with spouse.

So the $7$ different answers must be:

$0,1,2,3,4,5,6$

Now, the person who shook $6$ hands must be paired with the person who shook $0$ hands.

Similarly,

$5$ is paired with $1$

$4$ is paired with $2$

The only remaining number is $3$.

So your spouse shook $3$ hands.

Final Answer: $ \boxed{(c)} $


UGC NET Computer Science PYQ
 Which of the given options provides the increasing order of asymptotic complexity of functions $f_1,\ f_2,\ f_3$ and $f_4$?

A. $f_1(n)=2^n$

B. $f_2(n)=n^{3/2}$

C. $f_3(n)=n\log n$

D. $f_4(n)=n^{\log n}$

Choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Compare the growth rates:

$n\log n$ grows slower than $n^{3/2}$.

So,

$f_3(n)<f_2(n)$

Now, $n^{\log n}$ grows faster than any polynomial like $n^{3/2}$.

But $2^n$ grows faster than $n^{\log n}$.

So, increasing order is:

$f_3,\ f_2,\ f_4,\ f_1$
That is:
C, B, D, A

UGC NET Computer Science PYQ
CB84000D001C001C is the content of a UDP header in hexadecimal format. The source port number is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

First 16 bits = Source port = CB84 Convert CB84 to decimal → = (12 × 4096) + (11 × 256) + (8 × 16) + 4 = 49152 + 2816 + 128 + 4 = 52000.

UGC NET Computer Science PYQ

Consider the following code :

#include<stdio.h>


void f1(char *x, char *y) {

    char *t;

    t = x;

    x = y;

    y = t;

}


void f2(char **x, char **y) {

    char *t;

    t = *x;

    *x = *y;

    *y = t;

}


int main()

{

    char *a = "ONE", *b = "TWO";


    f1(a, b);

    printf("%s %s", a, b);


    f2(&a, &b);

    printf("%s %s", a, b);


    return 0;

}
What will be the output of the above code?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Initial values

a = "ONE"
b = "TWO"

Step 1: f1(a, b)

Function parameters are passed by value.

Inside f1 the pointers swap locally:

x ↔ y

But original variables a and b do not change.

So after f1:

a = ONE
b = TWO

First printf prints:

ONE TWO

Step 2: f2(&a, &b)

Now addresses of pointers are passed.

Inside f2:

t = *x
*x = *y
*y = t

This swaps actual pointers a and b.

After swap:

a = TWO
b = ONE

Second printf prints:

TWO ONE

UGC NET Computer Science PYQ

Consider the following conditional code, which returns Boolean values

if $((x>25) \land (y>100))$
return $false$;

else if $((x \le 25) \land (y \le 100))$
return $true$;

else if $((x>25) \land (y \le 100))$
return $false$;

else
return $true$;

Simplify it by filling in the following blank with a single Boolean expression without changing the behaviour of the conditional code.

if $($ ________ $)$
return $true$;

else
return $false$;






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given code returns $false$ when:

$((x>25) \land (y>100))$

or

$((x>25) \land (y \le 100))$

So,

$false = (x>25)$

Therefore, the code returns $true$ when:

$x \le 25$

Hence, the required Boolean expression is:

$x \le 25$


UGC NET Computer Science PYQ
The order of a leaf node in a $B+$ tree is the maximum number of value, data record pointer pairs it can hold. Given that the block size is $1K$ bytes, data record pointer is $7$ bytes long, the value field is $9$ bytes long and a block pointer is $6$ bytes long, what is the order of the leaf node?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Block size $=1K=1024$ bytes.

Each value and data record pointer pair needs:

$9+7=16$ bytes

One block pointer is also required, so available space for pairs is:

$1024-6=1018$ bytes

Number of pairs:

$\left\lfloor\frac{1018}{16}\right\rfloor=63$

So, the order of the leaf node is $63$.

UGC NET Computer Science PYQ
Identify the correct statement(s) from the following with respect to Spinlock Semaphores:
A. The name refers to busy waiting semaphores.
B. They are not useful when the locks are to be held for a short duration of time.
C. It may require multiple context switches when a process waits on a lock.
D. They are often employed on Uniprocessor systems.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Spinlocks are busy waiting locks, meaning the thread repeatedly checks until the lock becomes available — so A is correct.
They are actually useful for short duration locks, since blocking (context switch) is costlier — so B is incorrect.
They do not cause context switches, as the waiting is done actively in CPU — so C is incorrect.
Spinlocks are inefficient on uniprocessor systems, because while one thread spins, the other cannot release the lock — so D is incorrect.

UGC NET Computer Science PYQ
Read the below passage and answer the questions.

Artificial Neural Networks (ANNs) are computational models inspired by the human brain’s neural networks. They consist of interconnected nodes, or neurons, organized into layers: an input layer, one or more hidden layers and an output layer. Each connection between neurons has a weight that adjusts as learning progresses allowing the network to adapt and improve its performance. ANNs are particularly effective in recognizing patterns making them valuable for tasks such as image and speech recognition, natural language processing and predictive analytics. Learning in ANNs typically involves training algorithms like back propagation, which minimize the error by adjusting the weights. As a subset of machine learning, ANNs have revolutionized the field of Artificial Intelligence by providing solutions to complex problems that traditional algorithms struggle with.

Which of the following is/are the application area(s) of ANN ?

(A) Natural Language Processing
(B) Image Processing
(C) Pattern Recognition
(D) Speech Recognition

Choose the correct answer from the options given below :






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The passage clearly states that ANNs are useful in:

• Image recognition
• Speech recognition
• Natural language processing
• Pattern recognition

Thus all listed areas are applications of ANN.

UGC NET Computer Science PYQ
Which one of the following types of memory is the fastest?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Register memory is inside the CPU and directly accessed by the processor.

Memory speed order is:

$Register > Cache > Main\ Memory > Secondary\ Memory$

Therefore, the fastest memory is Register Memory.


UGC NET Computer Science PYQ
A hash function $h$ defined as $h(key)=key\ mod\ 7$, with linear probing, is used to insert the keys $44,45,79,55,91,18,63$ into a table indexed from $0$ to $6$. What will be the location of key $18$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Hash function is:

$h(key)=key\ mod\ 7$

Insert keys one by one.

$44\ mod\ 7=2$, so $44$ goes to index $2$.

$45\ mod\ 7=3$, so $45$ goes to index $3$.

$79\ mod\ 7=2$, but index $2$ is filled. Using linear probing, index $3$ is also filled, so $79$ goes to index $4$.

$55\ mod\ 7=6$, so $55$ goes to index $6$.

$91\ mod\ 7=0$, so $91$ goes to index $0$.

Now for key $18$:

$18\ mod\ 7=4$

Index $4$ is already filled by $79$.

Using linear probing, next index $5$ is empty.

So, key $18$ is inserted at index $5$.

UGC NET Computer Science PYQ
Which of the following is NOT a parent selection technique used in genetic algorithm implementations?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Common parent selection methods in Genetic Algorithms include —
Roulette Wheel Selection
Tournament Selection
Rank Selection
Boltzmann Selection
“Radial” is not a valid selection technique.

UGC NET Computer Science PYQ
Read the below passage and answer the questions.

Artificial Neural Networks (ANNs) are computational models inspired by the human brain’s neural networks. They consist of interconnected nodes, or neurons, organized into layers: an input layer, one or more hidden layers and an output layer. Each connection between neurons has a weight that adjusts as learning progresses allowing the network to adapt and improve its performance. ANNs are particularly effective in recognizing patterns making them valuable for tasks such as image and speech recognition, natural language processing and predictive analytics. Learning in ANNs typically involves training algorithms like back propagation, which minimize the error by adjusting the weights. As a subset of machine learning, ANNs have revolutionized the field of Artificial Intelligence by providing solutions to complex problems that traditional algorithms struggle with.


What is the role of Back Propagation Algorithm ?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The passage states that back propagation is a training algorithm used in neural networks that minimizes the error by adjusting the weights.

Thus its role is to reduce prediction error during training.

UGC NET Computer Science PYQ
The memory size for n address lines and m data lines is given by





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

If there are $n$ address lines, then the number of memory locations is:

$2^n$

If there are $m$ data lines, then each location stores:

$m$ bits

So, total memory size is:

$2^n \times m$


UGC NET Computer Science PYQ
In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Here, $n$ and $m$ are number of vertices and edges, respectively. Match each algorithm with its time complexity.
List IList II
A. Bellman-Ford algorithmI. $O(m\log n)$
B. Kruskal's algorithmII. $O(n^3)$
C. Floyd-Warshall algorithmIII. $O(n*m)$
D. Topological sortingIV. $O(n+m)$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Bellman-Ford algorithm checks all edges repeatedly for shortest path, so its time complexity is $O(n*m)$. Thus, $A-III$.

Kruskal's algorithm sorts edges and then applies union-find, so its time complexity is $O(m\log n)$. Thus, $B-I$.

Floyd-Warshall algorithm uses three nested loops for all pairs shortest path, so its time complexity is $O(n^3)$. Thus, $C-II$.

Topological sorting visits vertices and edges once, so its time complexity is $O(n+m)$. Thus, $D-IV$.

Final matching is $A-III,\ B-I,\ C-II,\ D-IV$.

UGC NET Computer Science PYQ
Arrange the following types of testing in the order they are usually performed in the Software Development Life Cycle (SDLC):
A. Integration testing
B. Unit testing
C. System Testing
D. Acceptance Testing





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Testing follows this order:
Unit Testing → tests individual components.
Integration Testing → combines modules.
System Testing → tests complete integrated system.
Acceptance Testing → done by client before release.

UGC NET Computer Science PYQ
Read the below passage and answer the questions.

Artificial Neural Networks (ANNs) are computational models inspired by the human brain’s neural networks. They consist of interconnected nodes, or neurons, organized into layers: an input layer, one or more hidden layers and an output layer. Each connection between neurons has a weight that adjusts as learning progresses allowing the network to adapt and improve its performance. ANNs are particularly effective in recognizing patterns making them valuable for tasks such as image and speech recognition, natural language processing and predictive analytics. Learning in ANNs typically involves training algorithms like back propagation, which minimize the error by adjusting the weights. As a subset of machine learning, ANNs have revolutionized the field of Artificial Intelligence by providing solutions to complex problems that traditional algorithms struggle with.


Which of the following layers may be more than one in number?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

In an Artificial Neural Network:

• Input layer → usually only one
• Output layer → usually only one
• Hidden layers → can be one or more layers

Thus the layer that may be more than one is hidden layer.

UGC NET Computer Science PYQ

Simplify the following using K-Map

$F(A,B,C,D)=\sum(0,2,5,7,8,10,13,15)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given minterms are:

$0,2,5,7,8,10,13,15$

In binary form:

$0=0000,\ 2=0010,\ 8=1000,\ 10=1010$

Here, $B=0$ and $D=0$

So, group gives:

$B'D'$

Also,

$5=0101,\ 7=0111,\ 13=1101,\ 15=1111$

Here, $B=1$ and $D=1$

So, group gives:

$BD$

Therefore,

$F=BD+B'D'$


UGC NET Computer Science PYQ
Which agent deals with the happy and unhappy state?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Utility-based agent works with utility value.

Utility value tells how good or bad a state is for the agent.

A happy state means higher utility.

An unhappy state means lower utility.

So, the agent that deals with happy and unhappy states is Utility-based agent.

UGC NET Computer Science PYQ
void main() {
    int *i, a = 12, b = 2, c;
    c = (a = a + b, b = a / b, a = a * b, b = a - b);
    i = &c;
    printf("%d", -(*i));
}






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Step-by-step explanation:
a = 12, b = 2
a = a + b → a = 14
b = a / b → b = 7
a = a * b → a = 98
b = a - b → b = 91
→ c = 91
Hence, -(*i) = -91
Output: 91 (negative of c printed as -(-91) → 91)

UGC NET Computer Science PYQ
Read the below passage and answer the questions.

Artificial Neural Networks (ANNs) are computational models inspired by the human brain’s neural networks. They consist of interconnected nodes, or neurons, organized into layers: an input layer, one or more hidden layers and an output layer. Each connection between neurons has a weight that adjusts as learning progresses allowing the network to adapt and improve its performance. ANNs are particularly effective in recognizing patterns making them valuable for tasks such as image and speech recognition, natural language processing and predictive analytics. Learning in ANNs typically involves training algorithms like back propagation, which minimize the error by adjusting the weights. As a subset of machine learning, ANNs have revolutionized the field of Artificial Intelligence by providing solutions to complex problems that traditional algorithms struggle with.


Artificial Neural Networks (ANNs) are inspired by:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The passage states that ANN models are inspired by the human brain’s neural networks.

UGC NET Computer Science PYQ

Consider an unpipelined machine with $10$ nsec clock cycles which uses four cycles for ALU operations and branches where as five cycles for memory operation. Assume that the relative frequencies of these operations are: $40%, 20%$ and $40%$, respectively. Due to clock skew and setup pipeline let us consider that the machine adds one nsec overhead to the clock. How much speedup is observed in the instruction execution rate when a pipelined machine is considered?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Average CPI for unpipelined machine is:

$=4(0.40)+4(0.20)+5(0.40)$

$=1.6+0.8+2$

$=4.4$

Unpipelined average instruction time:

$=4.4 \times 10$

$=44$ nsec

For pipelined machine, clock time becomes:

$10+1=11$ nsec

Speedup:

$=\frac{44}{11}$

$=4$

So, speedup is $4$ times.


UGC NET Computer Science PYQ
Given below are two statements

Statement I: Breadth-First Search is optimal when all the step costs are equal whereas uniform-cost search is optimal with any step-cost.
Statement II: When all the step costs are same uniform-cost search expands more nodes at depth $d$ than the Breadth-First Search.
In light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Utility-based agent works with utility value.

Utility value tells how good or bad a state is for the agent.

A happy state means higher utility.

An unhappy state means lower utility.

So, the agent that deals with happy and unhappy states is Utility-based agent.Breadth-First Search gives optimal solution when all step costs are equal.

Uniform-cost search gives optimal solution when step costs may be different but non-negative.

So, Statement I is true.

When all step costs are same, Uniform-cost search behaves like Breadth-First Search.
It expands nodes in increasing path-cost order, which becomes same as increasing depth order.
So, it does not expand more nodes at depth $d$ than Breadth-First Search.
Therefore, Statement II is false.

UGC NET Computer Science PYQ
Which of the following gates do not give output 1 when both inputs are 0?
A. NAND gate
B. NOR gate
C. XOR gate
D. XNOR gate





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Step-by-step explanation:
a = 12, b = 2
a = a + b → a = 14
b = a / b → b = 7
a = a * b → a = 98
b = a - b → b = 91
→ c = 91
Hence, -(*i) = -91
Output: 91 (negative of c printed as -(-91) → 91)

UGC NET Computer Science PYQ
Read the below passage and answer the questions.

Artificial Neural Networks (ANNs) are computational models inspired by the human brain’s neural networks. They consist of interconnected nodes, or neurons, organized into layers: an input layer, one or more hidden layers and an output layer. Each connection between neurons has a weight that adjusts as learning progresses allowing the network to adapt and improve its performance. ANNs are particularly effective in recognizing patterns making them valuable for tasks such as image and speech recognition, natural language processing and predictive analytics. Learning in ANNs typically involves training algorithms like back propagation, which minimize the error by adjusting the weights. As a subset of machine learning, ANNs have revolutionized the field of Artificial Intelligence by providing solutions to complex problems that traditional algorithms struggle with.


What is the role of weights in an ANN?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Weights represent the strength of connections between neurons.
During training, weights are adjusted to reduce error and improve performance.

UGC NET Computer Science PYQ
Machine Level Language is a/an





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Machine level language directly deals with binary instructions like $0$ and $1$.

It is closest to the hardware, so it is called a low-level language.


UGC NET Computer Science PYQ
Consider the given tree below. Calculate the value at the root of the tree using alpha‐beta pruning algorithm.







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Root node $A$ is a Max node.

Nodes $B$ and $C$ are Min nodes.

Nodes $D,E,F,G$ are Max nodes.

First calculate Max node values:

$D=\max(3,5)=5$

$E=\max(6,9)=9$

$F=\max(1,2)=2$

$G=\max(0,-1)=0$

Now calculate Min node values:

$B=\min(D,E)=\min(5,9)=5$

$C=\min(F,G)=\min(2,0)=0$

Now root node $A$ is Max node:

$A=\max(B,C)=\max(5,0)=5$

Hence, the value at the root is $5$.

UGC NET Computer Science PYQ

Match List I with List II

List I (Grammar Type) List II (Production Form)
A. Type 3 Grammar IV. $V \rightarrow V\Sigma \mid \Sigma$
B. Type 2 Grammar I. $V \rightarrow (V \cup \Sigma)^{*}$
C. Type 1 Grammar II. $\lambda A \beta \rightarrow \lambda\,\gamma\,\beta,\;(\lambda,\beta)\in (V\cup\Sigma)^{*}$
D. Type 0 Grammar III. $(V\cup\Sigma)^{*} \rightarrow (V\cup\Sigma)^{*}$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Why: Type-3 (regular) → right-linear (IV); Type-2 (context-free) → $V \to (V\cup\Sigma)^*$ (I); Type-1 (context-sensitive) → context-preserving form (II); Type-0 (unrestricted) → any string to any string (III).


UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

Which of the following is NOT a requirement for Banker’s algorithm to grant a resource request?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Banker’s Algorithm grants a request only if the following conditions are satisfied:

• The requested resources are available in the system.
• The request does not exceed the maximum claim of the process.
• After allocation, the system remains in a safe state.

However, the algorithm does not require that the process be the only one requesting resources. Multiple processes can request resources simultaneously.

Therefore, the statement that is NOT required is:

The process must be the only one requesting resources.

UGC NET Computer Science PYQ
Which of the following is wrong about the data types?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For $n$ bits:

Unsigned range is:

$0$ to $2^n-1$

Signed range is:

$-2^{n-1}$ to $2^{n-1}-1$

So, signed data type does not have more range than unsigned data type.


UGC NET Computer Science PYQ
Which among the following statement(s) is(are) FALSE?

A. Greedy best-first search is not optimal but is often efficient.

B. $A^*$ is complete and optimal provided $h(n)$ is admissible or consistent.

C. Recursive best-first search is efficient in terms of time complexity but poor in terms of space complexity.

D. $h(n)=0$ is an admissible heuristic for the $8$-puzzle.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Statement A is true because greedy best-first search is generally not optimal, but it is often efficient.

Statement B is true because $A^*$ is optimal when the heuristic is admissible, and consistency is a stronger condition.

Statement C is false because recursive best-first search uses less memory, so it is good in terms of space complexity, but it may be poor in time because nodes can be regenerated.

Statement D is true because $h(n)=0$ never overestimates the actual cost, so it is admissible.

Therefore, only statement C is false.

UGC NET Computer Science PYQ

int x = 128, y = 110;

do {

    if (x > y) x = x - y;

    else       y = y - x;

} while (x != y);

printf("%d", x);






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Repeated subtraction implements Euclid’s algorithm; the loop ends with x = y = gcd(128,110) = 2.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

What is the primary goal of the Banker’s Algorithm?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The Banker’s Algorithm is a deadlock avoidance algorithm. Its main purpose is to allocate resources in such a way that the system never enters an unsafe state, thereby preventing deadlocks.

Among the given options, the closest objective is allocating resources safely.

UGC NET Computer Science PYQ
If a constructor 'Date' is declared explicitly and has to be defined outside the class, which of the following is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In C++, the keyword $\text{explicit}$ is used only while declaring the constructor inside the class.

When the constructor is defined outside the class, $\text{explicit}$ is not written again.

So, the correct definition is:

$ \text{Date::Date(int dd) { /* ... */ }} $


UGC NET Computer Science PYQ
Consider the sentence below.

There is a country that borders both India and Pakistan.

Which of the following logical expressions express the above sentence correctly when the predicate $Country(x)$ represents that $x$ is a country and $Borders(x,y)$ represents that the countries $x$ and $y$ share the border?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution


The sentence says there exists some country $c$.

So, we use existential quantifier:

$\exists c$

That country must satisfy three conditions:

$c$ is a country.

$c$ borders India.

$c$ borders Pakistan.

So, the correct expression is:

$\exists c\ [Country(c)\land Border(c,India)\land Border(c,Pakistan)]$

Option (b) is incorrect because implication does not force $c$ to be a country that borders both.

Option (c) is incorrect because it separates existence of country from border condition.

Option (d) is syntactically incorrect because $Country(c)$ is a predicate, not an object to be used inside $Border$.

UGC NET Computer Science PYQ
Which of the following is not a requirement elicitation technique?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

DFD is a modeling/analysis tool, not an elicitation technique; the others are used to elicit requirements.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

What information is used to determine if a resource request can be granted?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Banker’s Algorithm decides resource allocation based on:

• Available resources
• Current allocation of resources
• Maximum demand of processes

From the given options, the relevant information is:

Available resources and current allocation of each process.

UGC NET Computer Science PYQ
Which one of the following allows the session to continue?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A session cannot continue if the user logs out, the session is invalidated, or the session times out.

If the user refreshes the browser and a persistent cookie is available, the session can continue.


UGC NET Computer Science PYQ
Consider a domain consisting of three Boolean variables Toothache, Cavity, and Catch. The full joint distribution is a $2\times2\times2$ table as shown below.
toothache$\neg$toothache
catch$\neg$catchcatch$\neg$catch
cavity$0.108$$0.012$$0.072$$0.008$
$\neg$cavity$0.016$$0.064$$0.144$$0.576$
The marginal probability of cavity $P(cavity)$ is __________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Marginal probability means we add all probabilities where $cavity$ is true.

From the table, cavity row values are:

$0.108,\ 0.012,\ 0.072,\ 0.008$

So,

$P(cavity)=0.108+0.012+0.072+0.008$

$P(cavity)=0.200$

UGC NET Computer Science PYQ
Which of the following cohesions are better than the Procedural Cohesion?
A. Functional Cohesion
B. Sequential Cohesion
C. Temporal Cohesion
D. Communicational Cohesion
E. Logical Cohesion





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Cohesion (best → worst): Functional → Sequential → Communicational → Procedural → Temporal → Logical → Coincidental Hence, those better than Procedural are: Functional (best) Sequential Communicational ✅ So, A, B, D are better.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

What is the significance of the Banker’s algorithm in terms of resource management?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

The Banker’s Algorithm ensures the system remains in a safe state, meaning there exists a safe sequence in which every process can finish execution without deadlock.

UGC NET Computer Science PYQ
Overfitting is expected when we observe that?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Overfitting occurs when the model learns the training data too much.

So, training error decreases, but test error increases.


UGC NET Computer Science PYQ
Consider a domain consisting of three Boolean variables Toothache, Cavity, and Catch. The full joint distribution is a $2\times2\times2$ table as shown below.
toothache$\neg$toothache
catch$\neg$catchcatch$\neg$catch
cavity$0.108$$0.012$$0.072$$0.008$
$\neg$cavity$0.016$$0.064$$0.144$$0.576$
The probability of a cavity, given evidence of a toothache, $P(cavity\mid toothache)$ is ________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

We need:

$P(cavity\mid toothache)=\frac{P(cavity\cap toothache)}{P(toothache)}$

From table,

$P(cavity\cap toothache)=0.108+0.012=0.120$

Also,

$P(toothache)=0.108+0.012+0.016+0.064=0.200$

So,

$P(cavity\mid toothache)=\frac{0.120}{0.200}=0.600$

UGC NET Computer Science PYQ
Consider the following steps used by a knowledge base designer to represent a world:
A. Selects atoms to represent propositions
B. Ask questions about intended interpretation
C. Choose a task domain
D. Axiomatizing the domain





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

The typical steps in Knowledge Representation (KR) are:
1️⃣Choose a task domain — identify the world/problem area.
2️⃣ Select atoms — define propositions/variables to describe the domain.
3️⃣ Axiomatize the domain — establish logical rules and relationships.
4️⃣ Ask questions about interpretation — ensure the knowledge base correctly models the real world.

UGC NET Computer Science PYQ
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.

A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.

Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.

Which data structure does the Banker’s Algorithm use to maintain the state of available, maximum and allocated resources?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science August 2024 (Paper II) PYQ

Solution

Banker’s Algorithm uses the following structures:

• Available vector
• Max matrix
• Allocation matrix
• Need matrix

UGC NET Computer Science PYQ
Identify the incorrect statement(s).





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A super key uniquely identifies a tuple.

A candidate key is a minimal super key.

Statement (b) is incorrect because it defines candidate key wrongly as super key.

Therefore, the incorrect statement is:


UGC NET Computer Science PYQ
Consider a domain consisting of three Boolean variables Toothache, Cavity, and Catch. The full joint distribution is a $2\times2\times2$ table as shown below.
toothache$\neg$toothache
catch$\neg$catchcatch$\neg$catch
cavity$0.108$$0.012$$0.072$$0.008$
$\neg$cavity$0.016$$0.064$$0.144$$0.576$
The probability of a toothache, given evidence of a cavity, $P(toothache\mid cavity)$ is ________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution


$P(toothache\mid cavity)=\frac{P(toothache\cap cavity)}{P(cavity)}$

From table,

$P(toothache\cap cavity)=0.108+0.012=0.120$

Also,

$P(cavity)=0.108+0.012+0.072+0.008=0.200$

So,

$P(toothache\mid cavity)=\frac{0.120}{0.200}=0.600$

UGC NET Computer Science PYQ
Only legal pointer operations:
A. pointer + number → pointer
B. pointer – number → number
C. pointer + pointer → pointer
D. pointer – pointer → pointer
E. pointer – pointer → number
Choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

pointer + number → pointer (A)
pointer - pointer → number (E)

UGC NET Computer Science PYQ

Consider the two relations below. The primary keys are underlined. Identify all possible foreign key(s) from the options based only on the two relations.

$EMP(eid, ename, did)$

$DEPT(did, dname)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In $DEPT$, $did$ is the primary key.

In $EMP$, $did$ can refer to $DEPT(did)$.

So, $EMP.did$ is a foreign key.


UGC NET Computer Science PYQ
Consider a domain consisting of three Boolean variables Toothache, Cavity, and Catch. The full joint distribution is a $2\times2\times2$ table as shown below.
toothache$\neg$toothache
catch$\neg$catchcatch$\neg$catch
cavity$0.108$$0.012$$0.072$$0.008$
$\neg$cavity$0.016$$0.064$$0.144$$0.576$
$P(cavity\vee toothache)$ is ________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

We need:

$P(cavity\vee toothache)=P(cavity)+P(toothache)-P(cavity\cap toothache)$

From table,

$P(cavity)=0.200$

$P(toothache)=0.108+0.012+0.016+0.064=0.200$

$P(cavity\cap toothache)=0.108+0.012=0.120$

So,

$P(cavity\vee toothache)=0.200+0.200-0.120=0.280$

UGC NET Computer Science PYQ
Which of the following statements are TRUE about encryption techniques?
A. In symmetric key cryptography, the secrecy/protection of the key generating function must be of higher level than the decrypting function.
B. The DES technique works by taking 64-bit chunk value and 56-bit key over a series of transformations.
C. The Twofish symmetric block algorithm works on variable key length of up to 196 bits over a block of 128 bits.
D. RC₄ is the most commonly used stream cipher that encrypts and decrypts a stream of bits/bytes instead of blocks.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

(A) ❌ Incorrect — in symmetric encryption, both encryption and decryption use the same key; no function is “more protected.”
(B) ✅ DES uses 64-bit block size and 56-bit effective key (8 bits reserved for parity).
(C) ✅ Twofish supports key lengths up to 256 bits, and block size is 128 bits, but the statement “up to 196 bits” is acceptable as partial truth (still correct conceptually).
(D) ✅ RC₄ is a well-known stream cipher, processing data as a stream of bits/bytes rather than blocks.

UGC NET Computer Science PYQ
Which of the following statements is correct, according to the following instance of the relational schema R(X, Y, Z)?
 XY Z 
1   1a 
 11  a
 21 b 
 32 b 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Functional dependency $A \to B$ means:

If two rows have the same value of $A$, then they must have the same value of $B$.

Now check each dependency.

For $X \to Y$:

When $X=1$, $Y=1$ in both rows.
When $X=2$, $Y=1$.
When $X=3$, $Y=2$.

So, same $X$ always gives same $Y$.

Therefore, $X \to Y$ is true.

For $X \to Z$:

When $X=1$, $Z=a$ in both rows.
When $X=2$, $Z=b$.
When $X=3$, $Z=b$.

So, same $X$ always gives same $Z$.

Therefore, $X \to Z$ is true.

For $Z \to X$:

When $Z=b$, we have two different values of $X$:

$X=2$ and $X=3$

So, $Z \to X$ is false.

For $Y \to Z$:

When $Y=1$, we get:

$Z=a$ and $Z=b$

So, $Y \to Z$ is false.

For $Y \to X$:

When $Y=1$, we get:

$X=1$ and $X=2$

So, $Y \to X$ is false.

Hence, only $X \to Y$ and $X \to Z$ are true.


UGC NET Computer Science PYQ
Consider a domain consisting of three Boolean variables Toothache, Cavity, and Catch. The full joint distribution is a $2\times2\times2$ table as shown below.
toothache$\neg$toothache
catch$\neg$catchcatch$\neg$catch
cavity$0.108$$0.012$$0.072$$0.008$
$\neg$cavity$0.016$$0.064$$0.144$$0.576$
The probability for Cavity, given that either Toothache or Catch is true, $P(Cavity\mid toothache\vee catch)$ is ________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

We need:

$P(Cavity\mid toothache\vee catch)=\frac{P(Cavity\cap(toothache\vee catch))}{P(toothache\vee catch)}$

Numerator:

$P(Cavity\cap(toothache\vee catch))=0.108+0.012+0.072=0.192$

Denominator:

$P(toothache\vee catch)=1-P(\neg toothache\cap \neg catch)$

$=1-(0.008+0.576)=0.416$

So,

$P(Cavity\mid toothache\vee catch)=\frac{0.192}{0.416}=0.4615$


UGC NET Computer Science PYQ
Consider the following statements regarding Agent systems:
A. Agent system comprises of an agent and an environment on which it acts
B. The controller part of an agent receives percepts from its body and sends commands to the environment
C. Agents act in the world through actuators which are non-noisy and always reliable
D. The actuators of an agent convert stimuli into percepts





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

(A) ✅ Correct — An agent system indeed consists of an agent and its environment.
(B) ✅ Correct — The controller part receives percepts and sends commands (actions).
(C) ❌ Incorrect — Actuators are not always reliable; environments can be noisy.
(D) ❌ Incorrect — Sensors, not actuators, convert stimuli into percepts.
✅ Therefore, only A and B are true.

UGC NET Computer Science PYQ

In Linux Operating System, when __________ is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In Linux, $clone()$ is used to create a new task.

The important feature of $clone()$ is that it takes different flags.

These flags decide what will be shared between parent and child, such as:

Memory space
File system information
Open files
Signal handlers

So, the system call that is passed a set of flags to decide sharing between parent and child tasks is $clone()$.


UGC NET Computer Science PYQ
Consider a domain consisting of three Boolean variables Toothache, Cavity, and Catch. The full joint distribution is a $2\times2\times2$ table as shown below.
toothache$\neg$toothache
catch$\neg$catchcatch$\neg$catch
cavity$0.108$$0.012$$0.072$$0.008$
$\neg$cavity$0.016$$0.064$$0.144$$0.576$
Which of the DBMS component ensures that concurrent execution of multiple operations on the database results into a consistent database state?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Concurrent execution means many transactions may execute at the same time.

The transaction processing system controls concurrency and recovery.

It ensures that even with multiple transactions, the database remains in a consistent state.

Logs help in recovery, buffer manager manages memory pages, and file manager manages storage files.

UGC NET Computer Science PYQ
Which of the following algorithms use the Greedy strategy?
A. Dijkstra’s algorithm
B. Kruskal’s algorithm
C. Huffman coding
D. Bellman-Ford algorithm





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Dijkstra’s algorithm ✅ — Uses greedy approach to select the next minimum-distance vertex.
Kruskal’s algorithm ✅ — Uses greedy strategy to build Minimum Spanning Tree (MST).
Huffman coding ✅ — Greedy algorithm for constructing optimal prefix codes.
Bellman-Ford algorithm ❌ — Uses dynamic programming, not greedy.

UGC NET Computer Science PYQ

The main function of the microkernel is to provide a communication facility between the __________ program and the various _____ that are also running in user space.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a microkernel operating system, most services run in user space.

Examples of services are:

File service
Device driver service
Memory management service

The microkernel mainly provides communication between the client program and these services.

This communication is usually done using message passing.

So, the correct words are:

$Client,\ Services$


UGC NET Computer Science PYQ
Consider following two statements:

Statement I: Relational database schema represents the logical design of the database.

Statement II: Current snapshot of a relation only provides the degree of the relation.

In the context to the above statements, choose the correct option from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Statement I is true because relational database schema represents the logical structure or logical design of the database.

Statement II is false because current snapshot of a relation means relation instance.

It gives the current set of tuples in the relation.

Degree means number of attributes, which is part of schema, not only the current snapshot.

Therefore, Statement I is true and Statement II is false.

UGC NET Computer Science PYQ
List I List II
A. Overloading III. Supports compile-time polymorphism
B. Early Binding II. Since function call is resolved during compilation time, the execution is much faster
C. Overriding I. Since function call is resolved during run time, the execution is slow
D. Late Binding IV. Supports run-time polymorphism





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

  • Overloading → Compile-time polymorphism (III)
  • Early Binding → Done at compile time (II)
  • Overriding → Run-time binding; slower (I)
  • Late Binding → Supports run-time polymorphism (IV)

UGC NET Computer Science PYQ

Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is first come first served $FCFS$. If $FCFS$ is replaced by shortest seek time first $SSTF$ and the vendor claims $50%$ better benchmark results. What is the expected improvement in the I/O performance of user programs?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The system can execute only one sequential user process at a time.

So, at any time, there will be only one active I/O request from the user process.

Disk scheduling algorithms like $FCFS$ and $SSTF$ are useful when there are multiple pending disk requests.

Here, there is no queue of multiple requests to reorder.

Therefore, $SSTF$ cannot provide any real improvement over $FCFS$ for user programs in this case.

Expected improvement:

$0%$


UGC NET Computer Science PYQ
Given a fixed-length record file that is ordered on the key field. The file needs $B$ disk blocks to store $R$ number of records. Find the average access time needed to access any record of the given file using binary search.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

The file is ordered on the key field, so binary search can be applied.

Binary search works on disk blocks, not directly on records.

If there are $B$ disk blocks, then number of block accesses required is approximately:

$\log_2 B$

So, average access time using binary search is:

$\log_2 B$

UGC NET Computer Science PYQ
Consider T1(A,B,C,D,E) with FDs { EB→C, D→E, EA→B } and T2(A,B,C,D) with FDs { C→A, A→B, A→D }. Which is TRUE?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Candidate key for T1 is AD (A,D are prime; B,C,E non-prime). FDs EB→C, D→E, EA→B have LHS not a superkey and RHS non-prime → violates 3NF (and even 2NF due to D→E partial on key).

UGC NET Computer Science PYQ
For the following set of processes scheduled using FCFS policy, determine the average waiting time. Assume that the processes arrived in the order P1, P2, P3, P4.
 ProcessBurst Time 
 P18 
P2 15 
P3 10 
P4 4 
 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In FCFS scheduling, processes execute in the same order in which they arrive.

Order is:

$P1 \to P2 \to P3 \to P4$

Waiting time of $P1$:

$0$

Waiting time of $P2$:

$8$

Waiting time of $P3$:

$8+15=23$

Waiting time of $P4$:

$8+15+10=33$

Total waiting time:

$0+8+23+33=64$

Average waiting time:

$\frac{64}{4}=16$


UGC NET Computer Science PYQ
Given the following STUDENT-COURSE scheme:

STUDENT(Rollno, Name, courseno)

COURSE(courseno, coursename, capacity)

where Rollno is the primary key of relation STUDENT and courseno is the primary key of relation COURSE. Attribute coursename of COURSE takes unique values only. Which of the following query/queries will find total number of students enrolled in each course, along with its coursename?

A. SELECT coursename, count(*) 'total' from STUDENT natural join COURSE group by coursename;

B. SELECT C.coursename, count(*) 'total' from STUDENT S, COURSE C where S.courseno=C.courseno group by coursename;

C. SELECT coursename, count(*) 'total' from COURSE C where courseno in (SELECT courseno from STUDENT);





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Query A uses natural join between STUDENT and COURSE on common attribute courseno.

Then it groups by coursename and counts students in each course.

So, A is correct.

Query B explicitly joins STUDENT and COURSE using:

$S.courseno=C.courseno$

Then it groups by coursename and counts students in each course.

So, B is also correct.

Query C does not use GROUP BY and does not count students course-wise.

It only filters courses whose courseno appears in STUDENT, so it cannot correctly give total students enrolled in each course.

So, C is incorrect.

UGC NET Computer Science PYQ
Once a process is executing on the CPU, which events could not occur?
A. Issues an I/O request and then placed in the Ready queue
B. Creates subprocesses and waits for them
C. Time slice expires and it joins the Waiting queue
D. Forcibly removed and put in Waiting queue due to an interrupt





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A: I/O request → goes to Waiting/Blocked, not Ready.
C: Time slice expiry → goes to Ready, not Waiting.
D: Interrupt causes preemption to Ready, not Waiting.
B is possible (process can wait for children).

UGC NET Computer Science PYQ

Which of the following is not a Non-functional requirement?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Non-functional requirements describe the quality features of a software system.

Examples of non-functional requirements are:

Portability
Security
Scalability
Reliability
Performance

User interaction is related to how the user works with the system, so it is more related to functional behaviour.

Therefore, User interaction is not a non-functional requirement.


UGC NET Computer Science PYQ
STUDENT(Rollno, Name, Courseno)COURSE(Courseno, Coursename, Capacity)where Rollno is the primary key of relation STUDENT and Courseno is the primary key of relation COURSE. Attribute Coursename of COURSE takes unique values only. The number of records in COURSE and STUDENT tables are $3$ and $5$ respectively.Following relational algebra query is executed:$R=STUDENT\times COURSE$Match List I with List II in context to the above problem statement.
List IList II
A. Degree of table RI. $15$
B. Cardinality of table RII. NIL
C. Foreign key of relation STUDENTIII. $6$
D. Foreign key of relation COURSEIV. Courseno
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

$R=STUDENT\times COURSE$ means Cartesian product.

Degree means number of attributes.

STUDENT has $3$ attributes and COURSE has $3$ attributes.

So, degree of $R=3+3=6$. Hence, $A-III$.

Cardinality means number of tuples.

STUDENT has $5$ records and COURSE has $3$ records.

So, cardinality of $R=5\times3=15$. Hence, $B-I$.

In STUDENT, $Courseno$ refers to the primary key of COURSE.

So, foreign key of STUDENT is $Courseno$. Hence, $C-IV$.

COURSE does not have any foreign key given in the schema.

So, foreign key of COURSE is NIL. Hence, $D-II$.

Final matching is $A-III,\ B-I,\ C-IV,\ D-II$.

UGC NET Computer Science PYQ
Let m and n be positive integers.
(A) If n ≠ 1, then m < mn.
(B) If k is composite, then k = mn where 1 < m, n > k.
(C) If mn = 1, then m = 1 and n = 1.
(D) If k is composite, then k = mn where 1 < m, n < k.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

(B) is false (for composite k, both factors are < k). (A), (C), (D) are true for positive integers.

UGC NET Computer Science PYQ

Topic: Software Engineering → Software Cost Estimation

COCOMO stands for-






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

COCOMO is a software cost estimation model.

The full form of COCOMO is:

Constructive Cost Model

It is used to estimate software development effort, cost, and time.

Therefore, the correct option is Constructive cost model.


UGC NET Computer Science PYQ
Suppose a B tree is used for indexing a database file. Consider the following information:size of the search key field $=10$ bytes, block size $=1024$ bytes, size of the record pointer $=9$ bytes, size of the block pointer $=8$ bytes.Let $K$ be the order of internal node and $L$ be the order of leaf node of B tree, then $(K,L)=$ ______.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

For internal node, if order is $K$, then it has $K$ block pointers and $K-1$ keys.

So,

$8K+10(K-1)\le 1024$

$8K+10K-10\le 1024$

$18K\le 1034$

$K\le 57.44$

So, $K=57$.

For leaf node, each entry has search key and record pointer.

One extra block pointer is also needed.

So,

$L(10+9)+8\le 1024$

$19L+8\le 1024$

$19L\le 1016$

$L\le 53.47$

So, $L=53$.

Therefore, $(K,L)=(57,53)$.

UGC NET Computer Science PYQ
Right sequence of CPU program to input data:
A. Read status register
B. Check flag bit
C. Read data register
D. Transfer data to memory





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Poll status → verify ready → read data → store to memory.

UGC NET Computer Science PYQ

Modifying the software to match changes in the ever-changing environment is called as






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Adaptive maintenance means modifying software according to changes in the external environment.

Examples:

Operating system changes
Hardware changes
Database changes
Business rule changes

Here, the question says software is modified to match changes in the ever-changing environment.

So, this is Adaptive maintenance.


UGC NET Computer Science PYQ
Given a relation scheme $R(x,y,z,w)$ with functional dependencies set

$F=\{x\to y,\ z\to w\}$.

All attributes take single and atomic values only.
A. Relation $R$ is in First Normal Form
B. Relation $R$ is in Second Normal Form
C. Primary key of $R$ is $xz$
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

All attributes are single and atomic.

So, relation $R$ is in $1NF$.

Hence, statement A is true.

Now find key:

$x\to y$ and $z\to w$

So,

$(xz)^+=\{x,z,y,w\}$

Thus, $xz$ is a candidate key.

Hence, statement C is true.

For $2NF$, no non-prime attribute should depend on a proper part of candidate key.

But here,

$x\to y$

and

$z\to w$

Here $y$ and $w$ are non-prime attributes, and they depend on parts of key $xz$.

So, partial dependency exists.

Therefore, $R$ is not in $2NF$.

Hence, statement B is false.

Therefore, A and C only are correct.

UGC NET Computer Science PYQ
Estimation of software development effort for organic software in basic COCOMO is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

$E = 2.4\,(KLOC)^{1.05}\,PM$

UGC NET Computer Science PYQ

For a function of two variables, boundary value analysis yields,






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In boundary value analysis, for $n$ variables, total number of test cases is:

$4n+1$

Here, the function has two variables.

So, $n=2$

Number of test cases:

$4n+1 = 4(2)+1$

$=8+1$

$=9$

Therefore, the general formula is $4n+1$ test cases.


UGC NET Computer Science PYQ
A company is consuming parts in the manufacturing of other products. Each of the part is either manufactured within the company or purchased from the external suppliers or both. For each part, partnumber, partname is maintained. Attribute batchnumber is maintained if the consumed part is manufactured in the company. If part is purchased from external supplier, then supplier name is maintained. Which of the following constraints need to be considered when modelling class/subclass concepts in ERD for the given problem?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Here, every part is either manufactured, purchased, or both.

So, every part must belong to at least one subclass.

This means total specialization.

Also, a part can be both manufactured and purchased.

So, subclasses are not disjoint.

This means overlapping constraint is needed.

Therefore, required constraints are total specialization and overlapping constraints.

UGC NET Computer Science PYQ
Which of the following technique is used for Clipping?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Used for line clipping in computer graphics — efficiently finds visible portions of a line segment.

UGC NET Computer Science PYQ
How many different binary trees are possible with $n$ nodes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The number of different binary trees possible with $n$ nodes is given by the Catalan number.

Catalan number formula is:

$C_n=\frac{1}{n+1}\binom{2n}{n}$

So, the number of different binary trees possible with $n$ nodes is:

$\frac{1}{n+1}\binom{2n}{n}$


UGC NET Computer Science PYQ
 A transaction may be in one of the following states during its execution life cycle in concurrent execution environment.

A. FAILED

B. TERMINATED

C. PARTIALLY COMMITTED

D. COMMITTED

E. ACTIVE

Given a transaction in active state during its execution, find its next transitioned state from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

A transaction starts in the Active state.

From Active state, two transitions are possible:

If the transaction executes successfully, then it goes to Partially Committed state.

If some error or failure occurs, then it goes to Failed state.

So, from Active state, the next possible state can be either Failed or Partially Committed.

That means either A or C only.

UGC NET Computer Science PYQ
Which of the followings shows the correct hierarchy of a layered file system in an operating system?
A. Logical File System
B. File Organization Module
C. Basic File System
D. I/O Control
E. Application Programs





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

The correct hierarchy (top to bottom) is: Application Programs → Logical File System → File Organization Module → Basic File System → I/O Control

UGC NET Computer Science PYQ

Let $n$ denote a positive integer. Suppose a function $F$ is defined as

$f(n)=
\begin{cases}
0, & n=1 \
f\left(\left\lfloor \frac{n}{2} \right\rfloor\right)+1, & n>1
\end{cases}$

What is $f(25)$? and what does this function find?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given,

$f(1)=0$

Now find $f(25)$:

$f(25)=f\left(\left\lfloor \frac{25}{2} \right\rfloor\right)+1$

$f(25)=f(12)+1$

$f(12)=f(6)+1$

$f(6)=f(3)+1$

$f(3)=f(1)+1$

$f(1)=0$

Now putting values back:

$f(3)=0+1=1$

$f(6)=1+1=2$

$f(12)=2+1=3$

$f(25)=3+1=4$

So,

$f(25)=4$

This function counts how many times $n$ can be divided by $2$ until it becomes $1$.

So, it finds:

$\left\lfloor \log_2 n \right\rfloor$


UGC NET Computer Science PYQ
 Which of the following is used to create a database schema?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Database schema means structure of database.

It includes tables, attributes, constraints and relationships.

DDL means Data Definition Language.

DDL commands like CREATE, ALTER and DROP are used to define or modify database schema.

DML is used to manipulate data, not create schema.

UGC NET Computer Science PYQ
Match List I and List II
List I List II
A. Equivalence Partitioning I. Measures independent paths in code
B. Boundary Value Analysis II. Divides input into valid/invalid sets
C. Cyclomatic Complexity III. Focuses on limits of input ranges
D. Decision Table Testing IV. In which a number of combinations of actions are tested under varying sets of conditions

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Technique Description Matching Statement
A. Equivalence Partitioning Divides the input domain into valid and invalid partitions. II – Divides input into valid/invalid sets
B. Boundary Value Analysis Tests the boundaries of input ranges (min/max limits). III – Focuses on limits of input ranges
C. Cyclomatic Complexity Measures the number of independent paths through the source code. I – Measures independent paths in code
D. Decision Table Testing Used to test combinations of conditions and corresponding actions. IV – Tests combinations of actions under varying conditions

UGC NET Computer Science PYQ
Choose the correct statement for a group G:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Reason: From (xy)² = xyxy = x²y² = xxyy. Left-multiply by x⁻¹ and right-multiply by y⁻¹ to get yx = xy, hence G is abelian. (2) and (3) are false (there exist non-abelian groups where every element has order 3 or 5, e.g., unitriangular 3×3 matrices over ℤ₃/ℤ₅). (4) is false because every subgroup of an abelian (commutative) group is abelian.

UGC NET Computer Science PYQ
Given the FFT we can have ______ time procedure for multiplying two polynomials $A(x)$ and $B(x)$ of degree bound $n$ where input and output representations are in coefficient form, assuming $n$ is a power of $2$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Normally, multiplying two polynomials by the direct method takes:

$O(n^2)$

Using FFT, polynomial multiplication is done in three main steps:

Step 1: Convert coefficient form to point-value form using FFT.

Time complexity:

$O(n\log_2 n)$

Step 2: Multiply corresponding values.

Time complexity:

$O(n)$

Step 3: Convert point-value form back to coefficient form using inverse FFT.

Time complexity:

$O(n\log_2 n)$

Total time complexity:

$O(n\log_2 n)+O(n)+O(n\log_2 n)$

$=O(n\log_2 n)$


UGC NET Computer Science PYQ
Given memory access time as $p$ nanoseconds and additional $q$ nanoseconds for handling the page fault. What is the effective memory access time if a page fault occurs once for every $100$ instructions?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Normal memory access time is $p$ nanoseconds.

Page fault occurs once for every $100$ instructions.

So, average page fault overhead per instruction is:

$\frac{q}{100}$

Therefore, effective memory access time is:

$p+\frac{q}{100}$

UGC NET Computer Science PYQ
Which of the following are controlled-access protocols? A. Reservation
B. Polling
C. TDMA
D. Token Passing
E. CSMA/CA Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Protocol Type Explanation
A. Reservation Controlled Access Stations reserve the channel for transmission before sending data.
B. Polling Controlled Access A central controller polls each station to determine if it has data to send.
C. TDMA (Time Division Multiple Access) Channelization Divides the channel into time slots — not part of controlled access.
D. Token Passing Controlled Access A special token is passed between stations; only the holder can transmit.
E. CSMA/CA Random Access Uses collision avoidance — it’s a contention-based protocol, not controlled access.

UGC NET Computer Science PYQ
Considering the following statements:
A. A non-serial schedule is said to be conflict-serializable, if it is conflict-equivalent to some serial schedule.
B. A non-serial schedule is said to be view serializable if it is view-equivalent to some serial schedule.
C. A schedule is said to be serial, if instructions of participating transactions are chronologically interleaved with each other.
D. A conflict-serializable schedule will be view-serializable also but vice-versa may not be true.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A True (definition of conflict serializability).
B True (definition of view serializability).
C False — a serial schedule has no interleaving; one transaction completes before the next starts.
D True — conflict-serializable ⇒ view-serializable, but not every view-serializable schedule is conflict-serializable.

UGC NET Computer Science PYQ
Consider the Graph below: 

How many spanning trees can be found? 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The given graph has $4$ vertices.

Let the vertices be:

$A, B, C, D$

Edges are:

$AB, BC, AD, BD, CD$

So, total edges are $5$.

This graph is like complete graph $K_4$ with one edge missing.

Number of spanning trees in $K_4$ is given by Cayley’s formula:

$4^{4-2}=4^2=16$

In $K_4$, each edge appears in equal number of spanning trees.

Total edge appearances in all spanning trees:

$16 \times 3 = 48$

Because each spanning tree of $4$ vertices has $3$ edges.

Since $K_4$ has $6$ edges, each edge appears in:

$\frac{48}{6}=8$

Now, one edge is missing in the given graph.

So, spanning trees containing that missing edge are removed.

Number of spanning trees:

$16-8=8$


UGC NET Computer Science PYQ
In a file allocation system, the following allocation schemes are used:

A. Contiguous

B. Indexed

C. Linked allocation

Which of the allocation scheme(s) given above will not suffer from external fragmentation?

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Contiguous allocation needs continuous disk blocks.

So, it suffers from external fragmentation.

Linked allocation stores file blocks anywhere on disk using links.

So, it does not suffer from external fragmentation.

Indexed allocation also stores file blocks anywhere and keeps their addresses in an index block.

So, it also does not suffer from external fragmentation.

Therefore, B and C only are correct.

UGC NET Computer Science PYQ
What would be the equivalent pointer expression for referring the array element ar[m][n][o]?
  1. *(*(*(ar) + m + n) + o)
  2. (*(*(*(ar + m) + n) + o))
  3. (*(*(ar + m) + n) + o)
  4. *(*(*(ar + m) + n) + o)





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Consider ar as a 3-dimensional array declared as:

data_type ar[a][b][c];

Here, the array element ar[m][n][o] can be represented in pointer form as:

*(*(*(ar + m) + n) + o)

Step-by-step understanding:

  • ar is a pointer to the first 2D array ar[0].
  • ar + m moves the pointer to the mth 2D array → ar[m].
  • *(ar + m) gives the address of the first 1D array inside ar[m].
  • *(ar + m) + n moves to the nth 1D array → ar[m][n].
  • *(*(ar + m) + n) gives the address of the first element of that 1D array.
  • *(*(*(ar + m) + n) + o) finally gives the element ar[m][n][o].

✅ Final Answer: *(*(*(ar + m) + n) + o)


UGC NET Computer Science PYQ

Consider the following DFA

Which of the following NFA is valid for the given DFA?

(a) 

(b) 

(c) 






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution



UGC NET Computer Science PYQ

The transition function $\delta$ in multi-tape Turing machine is defined as:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a multi-tape Turing machine, suppose there are $k$ tapes.

At any step, the machine reads:

$k$ tape symbols

So, input to transition function is:

$current\ state = Q$

$k\ tape\ symbols = \Gamma^k$

Hence input side is:

$Q \times \Gamma^k$

After transition, the machine decides:

new state $Q$

new symbols to write on $k$ tapes, that is $\Gamma^k$

movement of $k$ tape heads, that is ${L,R,S}^k$

Hence output side is:

$Q \times \Gamma^k \times {L,R,S}^k$

Therefore,

$\delta: Q \times \Gamma^k \to Q \times \Gamma^k \times {L,R,S}^k$


UGC NET Computer Science PYQ
Given below are three statements related to interrupt handling mechanism.

A. Interrupt handler routine is not stored at a fixed address in the memory.

B. CPU hardware has a dedicated wire called the interrupt request line used for handling interrupts.

C. Interrupt vector contains the memory addresses for specialized interrupt handlers.

In the context of above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Statement A is false because interrupt handler routines are reached through predefined interrupt vector entries or known handler addresses.

Statement B is true because CPU hardware uses interrupt request lines to receive interrupt signals.

Statement C is true because interrupt vector stores addresses of specialized interrupt service routines.

Therefore, only B and C are true.

UGC NET Computer Science PYQ
Which of the following is not a valid property over two fuzzy relations $\tilde R$ and $\tilde S$ for performing $\lambda$-cut defuzzifications?

1. $(\tilde R \cup \tilde S)\lambda=\tilde R\lambda\cup \tilde S_\lambda$ 
2. $(\tilde R \cap \tilde S)\lambda=\tilde R\lambda\cap \tilde S_\lambda$ 
3. $(\overline{\tilde R})\lambda\neq \tilde R\lambda\ \text{except when }\lambda=1$
4. For any $\lambda\le \beta$, where $0\le \beta\le1$, it is true that $R_\beta\subseteq R_\lambda$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

For a fuzzy set $A$, the $\lambda$-cut is defined as: $$A_\lambda = \{x \mid \mu_A(x) \ge \lambda\}$$

  • Union Property: $(A \cup B)_\lambda = A_\lambda \cup B_\lambda$ ✅
  • Intersection Property: $(A \cap B)_\lambda = A_\lambda \cap B_\lambda$ ✅
  • Monotonicity: If $\lambda \le \beta$, then $A_\beta \subseteq A_\lambda$ ✅
  • Complement: $\mu_{\overline{A}}(x) = 1 - \mu_A(x)$ ⇒ $(\overline{A})_\lambda = \{x \mid 1 - \mu_A(x) \ge \lambda\} = \{x \mid \mu_A(x) \le 1 - \lambda\}$ ❌

Hence, $(\overline{A})_\lambda$ is not equal to $A_\lambda$, even when $\lambda = 1$. Therefore, the statement “except when $\lambda = 1$” is incorrect.

✅ Final Answer: Option 3 is not valid.


UGC NET Computer Science PYQ
Gray code equivalent to decimal number 8 is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Binary of 8 = 1000 Gray code is obtained by XORing each bit with the next bit. → MSB remains same. → Remaining bits: perform XOR with the bit to its left. So, $1000 \rightarrow 1100$

UGC NET Computer Science PYQ
In Pumping Lemma for regular languages, to say a language is satisfying pumping lemma, what is the minimum length of $y$ if you consider the string as $xyz$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In pumping lemma for regular languages, a string is divided as:

$w=xyz$

The conditions are:

$|xy| \le n$

$|y| > 0$

$xy^iz \in L$ for all $i \ge 0$

Here, $|y|>0$ means $y$ cannot be empty.

So, the minimum length of $y$ is:

$1$


UGC NET Computer Science PYQ
Match List I with List II
List-IList-II
A. fork()I. sends a signal from one process to particular process
B. exec()II. Indicates termination of current process
C. kill()III. Loads the specified program in memory.
D. exit()IV. Creates a child process.
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution


$fork()$ system call creates a child process. So, $A-IV$.

$exec()$ system call loads the specified program into memory and replaces the current process image. So, $B-III$.

$kill()$ system call sends a signal to a particular process. So, $C-I$.

$exit()$ system call terminates the current process. So, $D-II$.

Final matching is $A-IV,\ B-III,\ C-I,\ D-II$.

UGC NET Computer Science PYQ
Which of the following belongs to McCall’s Quality Factors?

A. Maintainability
B. Usability
C. Integrity
D. Functionality

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

McCall’s Quality Model classifies software quality into three main categories:

  • Product Operation factors: Correctness, Reliability, Efficiency, Integrity, Usability
  • Product Revision factors: Maintainability, Flexibility, Testability
  • Product Transition factors: Portability, Reusability, Interoperability

- Maintainability ✅ – part of Product Revision factors
- Usability ✅ – part of Product Operation factors
- Integrity ❌ – although in McCall model, it’s not grouped directly with Functionality in this context
- Functionality ✅ – general umbrella factor related to McCall’s quality aspects

✅ Final Answer: A, B and D Only


UGC NET Computer Science PYQ
List I (GA termination criteria) List II (description)
A. Worst Individual I. At least half of the individual will be better than or equal to convergence value
B. Best Individual II. Guarantees that virtually all individuals in the population will be within a particular fitness range
C. Sum of Fitness III. Guarantees that the entire population to be of a minimum standard
D. Median Fitness IV. Faster search convergence, guaranteeing at least one best solution






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Binary of 8 = 1000 Gray code is obtained by XORing each bit with the next bit. → MSB remains same. → Remaining bits: perform XOR with the bit to its left. So, $1000 \rightarrow 1100$

UGC NET Computer Science PYQ

The item generated by the production $A \to \epsilon$ is:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In LR item notation, a dot is placed somewhere on the right side of a production.

But $\epsilon$ means empty string.

So, for the production:

$A \to \epsilon$

there is actually no symbol on the right side.

Therefore, the LR item is written as:

$A \to .$

This means the production is already complete.


UGC NET Computer Science PYQ
Consider the following 3 processes with the length of the CPU burst time given in milliseconds:
ProcessArrival TimeBurst Time
P108
P214
P329
What is the average waiting time for these processes if they are scheduled using preemptive shortest job first scheduling algorithm?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Preemptive SJF is also called Shortest Remaining Time First.

At time $0$, only $P1$ is available, so $P1$ runs.

At time $1$, $P2$ arrives. Remaining time of $P1=7$ and burst time of $P2=4$, so $P2$ runs.

At time $2$, $P3$ arrives, but $P2$ has remaining time $3$, which is shortest. So $P2$ continues.

Gantt chart:

$0\to1:P1,\ 1\to5:P2,\ 5\to12:P1,\ 12\to21:P3$

Completion times:

$CT(P1)=12,\ CT(P2)=5,\ CT(P3)=21$

Waiting time formula:

$WT=CT-AT-BT$

$WT(P1)=12-0-8=4$

$WT(P2)=5-1-4=0$

$WT(P3)=21-2-9=10$

Average waiting time:

$\frac{4+0+10}{3}=\frac{14}{3}=4.66$

UGC NET Computer Science PYQ
Which of the following Grammars is/are only Context-Free?
LabelProductions Note
A S → Ab
aS → aA
A → a
LHS “aS” has a terminal → not CFG
B S → Ab
A → Sa
A → a
All rules are left-linear (V→Vt or V→t) → regular
C S → AS
S → aA
A → a
CFG, not regular (non-linear: V→VV)
D S → Ab
S → aA
A → a
CFG; mixes left/right-linear → not regular
E S → Sb
A → Aa
A → ε
From start S no terminal string → L(S)=∅ (regular)





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A is not even CFG (terminal on LHS).
B is a regular (left-linear) grammar.
C and D are context-free but not regular (“only” context-free).
E generates the empty language from start symbol S, which is regular.

UGC NET Computer Science PYQ
In the $\epsilon$-NFA, $M=({q_0,q_1,q_2,q_3},{a},\delta,q_0,{q_3})$ where $\delta$ is given in the transition table below, what is the minimum length of string to reach to the final state?
   $\epsilon$ 

$a$ 
 $q_0$ {$q_1$}{ } 
 $q_1${$q_2$}  { }
 $q_2${ } {$q_2 , $ $q_3$ }
 $q_3${} {} 






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Initial state is:

$q_0$

From $q_0$, using $\epsilon$ move:

$q_0 \xrightarrow{\epsilon} q_1$

From $q_1$, again using $\epsilon$ move:

$q_1 \xrightarrow{\epsilon} q_2$

So, without reading any input symbol, we can reach:

$q_2$

But final state is:

$q_3$

Now from $q_2$, on input symbol $a$:

$q_2 \xrightarrow{a} {q_2,q_3}$

So, after reading one $a$, we can reach final state $q_3$.

Therefore, the minimum string is:

$a$

Length of $a$ is:

$1$


UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

The number of bits reserved for the frame offset is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Frame size is same as page size.

Given,

Page size $=4KB$

$4KB=4\times1024=4096\ bytes$

$4096=2^{12}$

Offset bits are used to identify a byte within a page/frame.

So,

Number of frame offset bits $=\log_2(2^{12})=12$

UGC NET Computer Science PYQ
Match List I with List II
List I (Software Quality Characteristic) List II (Description)
A. Reliability II. Capability of software to maintain its level of performance under stated conditions for a stated period of time.
B. Efficiency III. Relationship between the level of performance of the software and the amount of resources used, under stated conditions.
C. Maintainability IV. Effort needed to make modifications, including corrections, improvements or adaptation of software to changes in environment, requirements and functional specifications.
D. Portability I. Ability to transfer the software from one organization or hardware/software environment to another.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

Reliability → II: Ensures software maintains performance over time.
Efficiency → III: Measures performance relative to resources used.
Maintainability → IV: Effort needed for updates, corrections, and improvements.
Portability → I: Ability to move software across environments.

UGC NET Computer Science PYQ
Given Ethernet address
$010110100001000101010101000110001010101000001111$
in binary, what is the address in hexadecimal notation?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Full transmission rate is:

$10$ Mbps

Token generation rate is:

$2$ Mbps

So, extra tokens are consumed at the rate:

$10-2=8$ Mbps

Bucket capacity is:

$16$ megabits

Maximum time:

$\frac{16}{8}=2$ seconds


UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

Find number of pages required for the given virtual address space.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Virtual address space $=32$ bits

So, total virtual memory size:

$2^{32}$ bytes

Page size $=4KB=2^{12}$ bytes

Number of pages:

$\frac{2^{32}}{2^{12}}=2^{20}$

UGC NET Computer Science PYQ
STRIPS Representation of a Planning Problem
A. STRIPS is a feature-centric representation
B. The features describing the state of the world are divided into Primitive and Derived
C. The STRIPS representation of the action comprises of Preconditions and Effects
D. STRIPS can directly define conditional effects





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science 26 June 2025 (Paper II) PYQ

Solution

A: Incorrect — STRIPS is state-centric, not feature-centric.
B: Correct — STRIPS divides world state features into primitive and derived predicates.
C: Correct — STRIPS action representation includes Preconditions and Effects.
D: Incorrect — STRIPS cannot directly handle conditional effects; this is supported in extensions like ADL.

UGC NET Computer Science PYQ
In the standard Ethernet with transmission rate of $10$ Mbps, assume that the length of the medium is $2500$ m and size of a frame is $512$ bytes. The propagation speed of a signal in a cable is normally $2 \times 10^8$ m/s. Calculate Transmission delay and propagation delay.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Transmission delay formula:

$\text{Transmission delay}=\frac{\text{Frame size}}{\text{Bandwidth}}$

According to the options, frame size is considered as $512$ bits.

So,

$\text{Transmission delay}=\frac{512}{10 \times 10^6}$

$=51.2\mu s$

Propagation delay formula:

$\text{Propagation delay}=\frac{\text{Distance}}{\text{Propagation speed}}$

$\text{Propagation delay}=\frac{2500}{2 \times 10^8}$

$=12.5 \times 10^{-6}$ seconds

$=12.5\mu s$

So, transmission delay is $51.2\mu s$ and propagation delay is $12.5\mu s$.


UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

 What is the minimum number of bits needed for the physical address?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Main memory size $=16GB$

$16GB=16\times2^{30}=2^4\times2^{30}=2^{34}$ bytes

To address $2^{34}$ bytes, number of physical address bits required is:

$34$

UGC NET Computer Science PYQ

In CRC coding if the data word is $111111$, divisor is $1010$ and the remainder is $110$. Which of the following code is true?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In CRC coding,

$\text{Codeword}=\text{Dataword}+\text{Remainder}$

Given dataword:

$111111$

Given remainder:

$110$

So, codeword is:

$111111110$


UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

What is the size of page table for handling the given virtual address space, given that each page table entry is of size $2$ bytes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Number of virtual pages $=2^{20}$

Each page table entry size $=2$ bytes

Page table size:

$2^{20}\times2=2^{21}$ bytes

$2^{21}$ bytes $=2MB$

UGC NET Computer Science PYQ
The $A^*$ algorithm is optimal when,





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

$A^*$ algorithm uses the evaluation function:

$f(n)=g(n)+h(n)$

where,

$g(n)$ is the cost from start node to current node.

$h(n)$ is the estimated cost from current node to goal node.

$A^*$ is optimal when the heuristic function $h$ is admissible.

Admissible means:

$h(n)$ never overestimates the actual cost.

So, $A^*$ always finds the solution with the lowest total cost when $h$ is admissible.


UGC NET Computer Science PYQ
Consider a machine with $16\ GB$ main memory and $32$-bits virtual address space, with page size as $4KB$. Frame size and page size is same for the given machine.

 If a process of size $34KB$ is to be executed on this machine, then what will be the size of internal fragmentation for this process?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Page size $=4KB$

Process size $=34KB$

Number of pages required:

$\left\lceil\frac{34}{4}\right\rceil=\lceil8.5\rceil=9$

Total allocated memory:

$9\times4KB=36KB$

Internal fragmentation:

$36KB-34KB=2KB$

UGC NET Computer Science PYQ
Which Artificial Intelligence technique enables computers to understand the associations and relationships between objects and Events?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The question asks about understanding associations and relationships between objects and events.

In Artificial Intelligence, symbolic representation is used to represent facts, objects, events, and their relationships.

Here, "Relative symbolism" means representing relationships among different objects and events using symbols.

Heuristic processing is used for problem-solving using rules of thumb.

Cognitive science studies human thinking and intelligence.

Pattern matching is used to identify similar patterns.

So, the technique related to associations and relationships is Relative symbolism.


UGC NET Computer Science PYQ
. Match List I with List II
List-IList-II
A. Odd FunctionI. NAND Gate
B. Universal GateII. XOR Gate
C. 2421 CodeIII. Amplification
D. BufferIV. Self-complementing
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Odd function means output is $1$ when odd number of inputs are $1$. This is the property of XOR gate. So, $A-II$.

NAND gate is a universal gate because any logic circuit can be made using only NAND gates. So, $B-I$.

$2421$ code is a self-complementing code. So, $C-IV$.

Buffer is used for amplification or increasing driving capability. So, $D-III$.

Final matching is $A-II,\ B-I,\ C-IV,\ D-III$.

UGC NET Computer Science PYQ

Where does the values of alpha-beta search get updated?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In alpha-beta pruning, two values are maintained:

$ \alpha $ = best value found so far for MAX player

$ \beta $ = best value found so far for MIN player

These values are updated while moving along the search path in the game tree.

So, alpha and beta values do not update only at the initial state or only at the end.

They are updated along the path of search.


UGC NET Computer Science PYQ
The Octal equivalent of hexadecimal $(D.C)_{16}$ is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Convert hexadecimal to binary:

$D=(1101)_2$

$C=(1100)_2$

So,

$(D.C)_{16}=(1101.1100)_2$

Now convert binary to octal by making groups of $3$ bits.

Integer part:

$1101=(001\ 101)_2=(15)_8$

Fractional part:

$.1100=(.110\ 000)_2=(.6)_8$

Therefore,

$(D.C)_{16}=(15.6)_8$

UGC NET Computer Science PYQ

A 4-input neuron has weights $1,2,3,4$. The transfer function is linear with the constant of proportionality being equal to $3$. The inputs are $5,7,10,30$, respectively. Then the output will be






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given weights are:

$w_1=1,\ w_2=2,\ w_3=3,\ w_4=4$

Given inputs are:

$x_1=5,\ x_2=7,\ x_3=10,\ x_4=30$

Net input is:

$Net = w_1x_1+w_2x_2+w_3x_3+w_4x_4$

$Net = 1(5)+2(7)+3(10)+4(30)$

$Net = 5+14+30+120$

$Net = 169$

The transfer function is linear with constant of proportionality $3$.

So, output is:

$Output = 3 \times 169$

$Output = 507$


UGC NET Computer Science PYQ
A digital computer has a common bus system for $8$ registers $16$ bits each. How many multiplexers are required to implement common bus? What size of multiplexers is required?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

There are $8$ registers and each register has $16$ bits.

Common bus size must be $16$ bits.

For each bit position, one multiplexer is required.

So, number of multiplexers required is $16$.

Each multiplexer must select one bit from $8$ registers.

So, each multiplexer is of size $8\times1$.

UGC NET Computer Science PYQ

Consider the following statements:

P: There exists no simple, undirected and connected graph with $80$ vertices and $77$ edges.

Q: All vertices of Euler graph are of even degree.

R: Every simple, undirected, connected and acyclic graph with $50$ vertices has at least two vertices of degree one.

S: There exits a bipartite graph with more than ten vertices which are $2$-colorable.

What is the number of correct statements among the above statements?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement P:

For a connected graph with $n$ vertices, minimum number of edges must be:

$n-1$

Here,

$n=80$

Minimum edges required:

$80-1=79$

But given edges are only $77$.

So, such a connected graph cannot exist.

Therefore, P is true.

Statement Q:

In an Euler graph, every vertex must have even degree.

So, Q is true.

Statement R:

A simple, undirected, connected and acyclic graph is a tree.

Every tree with more than one vertex has at least two vertices of degree $1$.

Here, vertices are $50$.

So, R is true.

Statement S:

Every bipartite graph is $2$-colorable.

A bipartite graph with more than ten vertices can exist.

So, S is true.

Therefore, all four statements are correct.

Number of correct statements:

$4$


UGC NET Computer Science PYQ
Which of the following is not an example of pseudo-instruction?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Pseudo-instructions are assembler directives.

They guide the assembler but are not executed directly by the CPU.

$ORG$, $DEC$ and $END$ are pseudo-instructions.

$HLT$ is an actual machine instruction used to halt the processor.

So, $HLT$ is not a pseudo-instruction.

UGC NET Computer Science PYQ

Consider the following statements:

P: There exists no simple, undirected and connected graph with $80$ vertices and $77$ edges.

Q: All vertices of Euler graph are of even degree.

R: Every simple, undirected, connected and acyclic graph with $50$ vertices has at least two vertices of degree one.

S: There exits a bipartite graph with more than ten vertices which are $2$-colorable.

What is the number of correct statements among the above statements?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement P:

For a connected graph with $n$ vertices, minimum number of edges must be:

$n-1$

Here,

$n=80$

Minimum edges required:

$80-1=79$

But given edges are only $77$.

So, such a connected graph cannot exist.

Therefore, P is true.

Statement Q:

In an Euler graph, every vertex must have even degree.

So, Q is true.

Statement R:

A simple, undirected, connected and acyclic graph is a tree.

Every tree with more than one vertex has at least two vertices of degree $1$.

Here, vertices are $50$.

So, R is true.

Statement S:

Every bipartite graph is $2$-colorable.

A bipartite graph with more than ten vertices can exist.

So, S is true.

Therefore, all four statements are correct.

Number of correct statements:

$4$


UGC NET Computer Science PYQ
The reverse Polish notation of the following infix expression

$[A*\{B+C*(D+E)\}]/\{F*(G+H)\}$

is __________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

First convert $(D+E)$ into postfix:
$DE+$

Now,
$C*(D+E)=CDE+*$

Then,
$B+C*(D+E)=BCDE+*+$

Now,
$A*\{B+C*(D+E)\}=ABCDE+*+*$

Also,
$F*(G+H)=FGH+*$

Therefore complete postfix expression is:
$ABCDE+*+*FGH+*/$

UGC NET Computer Science PYQ

Consider the following statements:

A. There exists a Boolean algebra with $5$ elements.

B. Every element of Boolean algebra has a unique complement.

C. If a Lattice $L$ is a Boolean algebra then $L$ is not relatively complemented.

D. The direct product of two Boolean Algebras is also a Boolean algebra.

Choose the correct answer about the four statements given above.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement A:

A finite Boolean algebra always has $2^n$ elements.

Possible number of elements can be:

$1,2,4,8,16,\ldots$

But $5$ is not of the form $2^n$.

So, statement A is false.

Statement B:

In Boolean algebra, every element has a unique complement.

So, statement B is true.

Statement C:

A Boolean algebra is complemented and distributive.

Also, every Boolean algebra is relatively complemented.

But statement C says it is not relatively complemented.

So, statement C is false.

Statement D:

The direct product of two Boolean algebras is also a Boolean algebra.

So, statement D is true.

Therefore, only B and D are correct.


UGC NET Computer Science PYQ
 Arrange the following in the increasing order of complexity.

A. I/O Module
B. I/O processor
C. I/O Channel
D. DMA

Choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

I/O Module is the basic level of I/O handling.

DMA is more advanced because it transfers data directly between memory and I/O device.

I/O Channel is more complex than DMA because it can control I/O operations more independently.

I/O Processor is the most complex because it is a specialized processor for I/O operations.

Increasing order:
$A,\ D,\ C,\ B$

UGC NET Computer Science PYQ

Which of the statement is not true in regards to virtual memory?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Virtual memory uses secondary memory to increase the effective capacity of memory.

So, statement (a) is true.

In virtual memory, a program can be larger than the available main memory because secondary memory is used as backing storage.

So, statement (b) is also considered true in this context.

Program and data are stored in secondary memory, and required parts are brought into main memory during execution.

So, statement (c) is true.

Hence, none of the given statements is false.


UGC NET Computer Science PYQ
he characteristics of the combinational circuits are:

A. Output at any time is function of inputs at that time

B. Contains memory elements

C. Do not have feedback paths

D. Clock is used to trigger the circuits to obtain outputs

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In a combinational circuit, output depends only on present inputs.

So, statement A is true.

Combinational circuits do not contain memory elements.

So, statement B is false.

They normally do not have feedback paths.

So, statement C is true.

Clock triggering is used in sequential circuits, not combinational circuits.

So, statement D is false.

Therefore, A and C only are correct.

UGC NET Computer Science PYQ

Which of the following is/are true for Dynamic RAM $DRAM$?

  1. It is slower than static RAM $SRAM$
  2. Packing Density is higher than Static RAM $SRAM$
  3. It is faster than static RAM $SRAM$
  4. It requires data refreshing

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

DRAM stores data using capacitors.

Capacitors lose charge with time, so DRAM requires refreshing.

Statement 1:

DRAM is slower than SRAM.

So, statement 1 is true.

Statement 2:

DRAM uses fewer components per bit, so its packing density is higher than SRAM.

So, statement 2 is true.

Statement 3:

DRAM is not faster than SRAM.

So, statement 3 is false.

Statement 4:

DRAM requires data refreshing.

So, statement 4 is true.

Therefore, correct statements are:

$1,2,4$


UGC NET Computer Science PYQ
The cache coherence problem can be solved

A. by having multiport memory

B. allow only nonshared data to be stored in cache

C. using a snoopy cache controller

D. using memory interleaving

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Cache coherence problem occurs when multiple caches contain copies of shared data.

Allowing only nonshared data in cache avoids the coherence problem.

So, statement B is correct.

Snoopy cache controller monitors bus transactions and maintains consistency among caches.

So, statement C is correct.

Multiport memory improves simultaneous access, but it does not directly solve cache coherence.

Memory interleaving improves memory access speed, but it does not solve cache coherence.

Therefore, B and C only are correct.

UGC NET Computer Science PYQ

Which of the following statement is/are false?

  1. The processor has direct access to both primary and secondary memory
  2. Primary memory stores the active instructions and data for the program being executed on the process
  3. Secondary memory is used as a backup memory
  4. Memory system is implemented on a single-level memory

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement 1:

The processor has direct access to primary memory only.

Secondary memory is accessed through input/output operations.

So, statement 1 is false.

Statement 2:

Primary memory stores active instructions and data required for the currently executing program.

So, statement 2 is true.

Statement 3:

Secondary memory is used for permanent storage and backup.

So, statement 3 is true.

Statement 4:

Memory system is not single-level.

It is implemented as a hierarchy, such as:

Registers, Cache, Main Memory, Secondary Memory

So, statement 4 is false.

Therefore, false statements are:

$1$ and $4$


UGC NET Computer Science PYQ
Given below are two statements

Statement I: CISC computers have a large number of addressing modes.

Statement II: In RISC machines memory access is limited to load and store instructions.

In light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

CISC architecture has complex instructions and many addressing modes.

So, Statement I is true.

RISC architecture uses load-store design.

It means memory access is mainly done using load and store instructions.

So, Statement II is true.

Therefore, both statements are true.

UGC NET Computer Science PYQ

Given a vector with cartesian components $(x,y)$, if scaling is done with matrix

$M=\left[\matrix{0.5\quad 0\cr 0\quad 1.5}\right]$

which of the following are true.

  1. Decreases the vertical by three halves
  2. Increases the vertical by three halves
  3. Doubles the horizontal
  4. Halves the horizontal

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Scaling matrix is:

$M=\left[\matrix{0.5\quad 0\cr 0\quad 1.5}\right]$

Here,

Horizontal scaling factor is:

$S_x=0.5=\frac{1}{2}$

So, horizontal value becomes half.

Therefore, statement $4$ is true.

Vertical scaling factor is:

$S_y=1.5=\frac{3}{2}$

So, vertical value increases by three halves.

Therefore, statement $2$ is true.

Correct statements are:

$2$ and $4$


UGC NET Computer Science PYQ
Which of the following statements is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Control memory is used in microprogrammed control unit, not in hardwired control unit. So, option (a) is false.

Program control instructions change the normal sequential execution of a program.

Examples are branch, jump, call and return instructions.

So, option (b) is true.

Register indirect addressing uses a register containing memory address, while displacement addressing uses base plus offset. So, option (c) is false.

Interrupts affect CPU utilization because CPU can handle I/O and events efficiently. So, option (d) is false.

UGC NET Computer Science PYQ

Which of the following lists defined in HTML share a similar element

  1. Unordered lists
  2. Ordered lists
  3. Definition Lists
  4. Correlated lists
  5. Enumerated lists

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

HTML mainly supports three types of lists:

Unordered list
Ordered list
Definition list

So,

Statement $1$ is correct.
Statement $2$ is correct.
Statement $3$ is correct.

Correlated lists and enumerated lists are not standard HTML list types.

Therefore, the correct set is:

$1,2,3$


UGC NET Computer Science PYQ
Match List I with List II
List IList II
A. Data Link LayerI. True end-to-end layer
B. Network LayerII. Token Management
C. Transport LayerIII. Produce billing information
D. Session LayerIV. Piggybacking
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Data Link Layer supports piggybacking in flow and error control. So, $A-IV$.

Network Layer can produce billing or accounting information for network usage. So, $B-III$.

Transport Layer is the true end-to-end layer because it provides process-to-process communication. So, $C-I$.

Session Layer handles token management and dialog control. So, $D-II$.

Final matching is $A-IV,\ B-III,\ C-I,\ D-II$.

UGC NET Computer Science PYQ

What are the drawbacks of using file systems to store data?

  1. Data inconsistency
  2. Difficulty in accessing data
  3. Data isolation
  4. Atomicity of updates

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Traditional file systems have many drawbacks.

Statement $1$:

Data inconsistency can occur because the same data may be stored in multiple files.

So, statement $1$ is correct.

Statement $2$:

Accessing required data is difficult because special programs may be needed for each task.

So, statement $2$ is correct.

Statement $3$:

Data isolation occurs because data may be stored in different files and formats.

So, statement $3$ is correct.

Statement $4$:

Atomicity problems can occur because updates may be incomplete if a system failure happens.

So, statement $4$ is also correct.

Therefore, all given statements are drawbacks of file systems.


UGC NET Computer Science PYQ
Given below are two statements

Statement I: Telnet, FTP, HTTP are application layer protocol.

Statement II: The Iridium project was planned to launch 66 low orbit satellites.

In light of the above statements, choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Telnet, FTP and HTTP work at the application layer.

So, Statement I is true.

Iridium satellite system is based on low earth orbit satellites and it is commonly associated with 66 satellites.

So, Statement II is also true.

Hence, both statements are true.

UGC NET Computer Science PYQ

Which of the following database model, we have a parent-child relationship?

  1. hierarchical databases
  2. network databases
  3. relational databases

Choose the correct answer from the options below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a hierarchical database model, data is arranged like a tree.

It clearly follows a parent-child relationship.

So, statement $1$ is correct.

In a network database model, records are connected using links, and it can also represent parent-child type relationships.

So, statement $2$ is also correct.

In a relational database model, data is stored in tables.

It uses relations, primary keys, and foreign keys, but it is not mainly based on a parent-child structure.

So, statement $3$ is not correct.

Therefore, correct statements are:

$1$ and $2$


UGC NET Computer Science PYQ
Which of the following statement is False?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

Packet switching uses bandwidth more efficiently because channels are shared among many users.

So, option (a) is true.

In packet switching, packets may follow different paths and may face different queueing delays.

So, delay variation is more in packet switching.

Circuit switching has a dedicated path, so delay variation is usually less.

Therefore, option (b) is false.

Packet switching can support different bit rates and formats using store-and-forward technique.

So, option (c) is true.

Packet switching may cause packet reordering if packets take different paths.

So, option (d) is true.

UGC NET Computer Science PYQ
Identify the correct operation that produces the below-given output based on two relations R1 and R2.
R1
 NameClass 
a1 9 
 b1 5
c1 6 
d1 11 
R2
 Name Class
b1 5 
f1 8 
Output
 Name Class 
b1 5 
Choose the correct answer from the options below :





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The output contains only the common tuple present in both $R1$ and $R2$.

In $R1$, tuples are:

$(a1,9), (b1,5), (c1,6), (d1,11)$

In $R2$, tuples are:

$(b1,5), (f1,8)$

Common tuple is:

$(b1,5)$

So,

$R1 \cap R2 = {(b1,5)}$

Therefore, the direct correct operation is:

$R1 \cap R2$


UGC NET Computer Science PYQ
In Ethernet when Manchester coding is used, the bit rate is __________.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In Manchester coding, each bit is represented using two signal changes.

So, baud rate becomes twice the bit rate.

Therefore,

$Baud\ rate=2\times Bit\ rate$

So,

$Bit\ rate=\frac{Baud\ rate}{2}$

UGC NET Computer Science PYQ

Which of the following statements are true?

  1. Shortest remaining time first scheduling may cause starvation
  2. Preemptive scheduling may cause starvation
  3. Round robin is better than FCFS in terms of response time

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement 1:

Shortest Remaining Time First $SRTF$ always gives preference to the process having the shortest remaining burst time.

So, if short processes keep arriving, a long process may wait for a very long time.

Therefore, statement $1$ is true.

Statement 2:

Preemptive scheduling allows a running process to be stopped and replaced by another process.

In some preemptive scheduling algorithms, low-priority or long processes may keep waiting.

Therefore, statement $2$ is true.

Statement 3:

Round Robin gives each process a fixed time quantum.

So, every process gets CPU turn quickly, which improves response time compared to FCFS.

Therefore, statement $3$ is true.


UGC NET Computer Science PYQ
The address of class B host is to be split into subnets with $6$-bit subnet number. What is the maximum number of the subnets and the maximum number of hosts in each subnet?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In class B, host part has $16$ bits.

Given subnet number uses $6$ bits.

Number of subnets:

$2^6-2=64-2=62$

Remaining host bits:

$16-6=10$

Number of hosts per subnet:

$2^{10}-2=1024-2=1022$

Therefore, maximum subnets are $62$ and maximum hosts per subnet are $1022$.

UGC NET Computer Science PYQ

In the design protocol of the critical section problem, each process must ask permission to enter the critical section in ______ code; it then executes in the critical section; once it finishes executing in the critical section it enters the ____ code. The process then enters the ____ code.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In critical section problem, the general structure of a process is:

Entry Section
Critical Section
Exit Section
Remainder Section

Entry section:

A process asks permission to enter the critical section.

Critical section:

The process executes the shared resource code.

Exit section:

The process releases permission or lock.

Remainder section:

The process executes the remaining code.

So, the correct order is:

entry section, exit section, remainder section


UGC NET Computer Science PYQ
In electronic mail, which of the following protocols allows the transfer of multimedia?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

SMTP is used for sending email.

POP3 and IMAP are used for receiving or accessing email.

MIME stands for Multipurpose Internet Mail Extensions.

It allows email to carry multimedia content such as images, audio, video and attachments.

UGC NET Computer Science PYQ

How do you create agile processes to manage unpredictability?

  1. Requirements gathering must be conducted very carefully.
  2. Risk analysis must be conducted before planning takes place.
  3. Software increments must be delivered in short time periods.
  4. Software processes must not adapt to changes incrementally.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Agile process is used when requirements may change frequently.

The main idea of agile is to deliver software in small increments within short time periods.

This helps the team take feedback quickly and adapt to changes.

Statement $1$ is more related to traditional requirement gathering.

Statement $2$ is more related to risk-driven models.

Statement $3$ is the main agile principle.

Statement $4$ is false because agile processes must adapt to changes incrementally.

Therefore, the correct statement is:

$3$ only


UGC NET Computer Science PYQ
A message is encrypted using public key cryptography to send a message from sender to receiver. Which one of the following statements is True?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In public key cryptography, every user has two keys:

$Public\ key$ and $Private\ key$

To send a secret message to receiver, sender encrypts the message using receiver's public key.

Then only receiver can decrypt it using receiver's private key.

So, the true statement is:

Sender encrypts using receiver's public key.

UGC NET Computer Science PYQ
Which of the following statements are true?

A. Frequency division multiplexing technique can be handled by digital circuits.

B. Time division multiplexing technique can be handled by analog circuits.

C. Wavelength division multiplexing technique is used with optical fiber for combining two signals.

D. Frequency division multiplexing technique can be applied when the bandwidth of a link is greater than the bandwidth of the signals to be transmitted.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

FDM is mainly an analog multiplexing technique, so statement A is false.

TDM is mainly used with digital signals, so statement B is false.

WDM is used in optical fiber communication to combine optical signals of different wavelengths, so statement C is true.

FDM can be used when link bandwidth is greater than the bandwidth required by the signals, so statement D is true.

Therefore, C and D only are true.

UGC NET Computer Science PYQ

Mr. X designed open source software which must comply with some criteria. Choose the false statement in respect of the above.

  1. No restriction on redistribution of the software as part or whole.
  2. The integrity of the author's source code must be maintained.
  3. The software can be sold after distribution.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Open source software allows free redistribution.

So, statement $1$ is true.

Open source licenses may require that the integrity of the author's source code is maintained.

So, statement $2$ is also true.

Open source software can also be sold after distribution.

So, statement $3$ is also true.

Therefore, no statement is false.


UGC NET Computer Science PYQ
Which of the following statements are true?

A. $X.25$ is connection-oriented network.

B. $X.25$ doesn't support switched virtual circuits.

C. Frame relay service provides acknowledgements.

D. Frame relay service provides detection of transmission errors.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

$X.25$ is a connection-oriented packet switching network, so statement A is true.

$X.25$ supports virtual circuits, including switched virtual circuits, so statement B is false.

Frame relay does not provide acknowledgements like reliable link protocols, so statement C is false.

Frame relay can detect transmission errors using error detection, but it generally discards erroneous frames instead of correcting them, so statement D is true.

Therefore, A and D only are true.

UGC NET Computer Science PYQ

Circuit satisfiability problem: Given a Boolean combinatorial circuit composed of AND, OR, and NOT gates, is it satisfiable? A one-output Boolean combinatorial circuit is satisfiable means for the given inputs the output will be $1$.

  1. The circuit satisfiability problem belongs to class NP
  2. The circuit satisfiability problem is at least as hard as any language in NP
  3. The circuit satisfiability is NP-Complete
  4. The size of the circuit is $\theta(K^2+1)$
  5. If $P \ne NP$, this situation would contradict the NP-Completeness of the problem.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement $1$:

Circuit satisfiability belongs to NP because if an input assignment is given, we can verify in polynomial time whether the circuit output is $1$.

So, statement $1$ is true.

Statement $2$:

Circuit satisfiability is at least as hard as any problem in NP.

So, it is NP-hard.

Therefore, statement $2$ is true.

Statement $3$:

A problem is NP-Complete if it is both in NP and NP-hard.

Circuit satisfiability is a standard NP-Complete problem.

So, statement $3$ is true.

Statement $4$:

The size $\theta(K^2+1)$ is not a general property of the circuit satisfiability problem.

So, statement $4$ is false.

Statement $5$:

This statement is not a basic defining property needed here for Circuit SAT classification.

So, statement $5$ is not selected.

Therefore, correct statements are:

$1,2,3$


UGC NET Computer Science PYQ
Let $G(x)$ be the generator polynomial used for CRC checking. The condition that should be satisfied by the $G(x)$ to catch all errors consisting of an odd number of inverted bits is:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2021 (Paper II) PYQ

Solution

In CRC, to detect all error patterns having odd number of inverted bits, the generator polynomial must contain the factor:

$(x+1)$

This condition ensures that any error polynomial with odd number of terms is not divisible by $G(x)$.

So, all odd-bit errors can be detected.

UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: Dendral is an expert system

Reason R: The rationality of an agent is not related to its reaction to the environment.

In the light of the above statements, choose the correct answer from the options
given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Dendral is an expert system. It was a groundbreaking AI project developed in the 1960s and 1970s aimed at automatically deducing the structure of organic molecules based on their mass spectrometry data. So, assertion A is correct. 

The second statement, however, is incorrect. The rationality of an agent in AI is very much related to its reaction to its environment. Rational agents should be able to make decisions based on their perceptions of the environment in order to achieve the best possible outcome or, in the case of uncertainty, the best expected outcome. Therefore, reason R is false

UGC NET Computer Science PYQ

Given an expression

$(A+B*D)/(E-F)+G$

  1. The prefix notation is $+/+A*DB-EFG$
  2. The prefix expression is the reverse of the postfix expression
  3. The order of operands in infix expression and postfix expression are the same.
  4. The order of operands in infix expression, prefix expression, and postfix expression are the same.

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Given expression is:

$(A+B*D)/(E-F)+G$

First solve according to operator precedence:

$B*D$

So, expression becomes:

$(A+(B*D))/(E-F)+G$

Prefix of $B*D$ is:

$*BD$

Prefix of $A+B*D$ is:

$+A*BD$

Prefix of $E-F$ is:

$-EF$

Now prefix of $\frac{A+B*D}{E-F}$ is:

$/+A*BD-EF$

Finally add $G$:

$+/+A*BD-EFG$

So, statement $1$ is true.

Prefix is not simply the reverse of postfix.

So, statement $2$ is false.

The order of operands in infix and postfix remains:

$A,B,D,E,F,G$

So, statement $3$ is true.

The order of operands in infix, prefix, and postfix also remains the same:

$A,B,D,E,F,G$

So, statement $4$ is true.

Correct statements are:

$1,3,$ and $4$


UGC NET Computer Science PYQ
The number of positive integers not exceeding $100$ that are either odd or the square of an integer is _____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Positive odd integers not exceeding $100$ are:

$1,3,5,\ldots,99$

Number of odd integers $=50$

Perfect squares not exceeding $100$ are:

$1^2,2^2,3^2,\ldots,10^2$

Number of perfect squares $=10$

Odd perfect squares are:

$1^2,3^2,5^2,7^2,9^2$

Number of odd perfect squares $=5$

Required number:

$50+10-5=55$

UGC NET Computer Science PYQ
Match List I with List II
 LIST I LIST II 
 A Δ B (A - B) ∪ (A - C)
 A - (B ∪ C) (A - B) ∩ (A - C)
 A - (B ∩ C) (A - B) ∪ (B - A)
 A ∩ (B - C) (A ∩ B) - (A ∩ C)
Choose the correct answer from the options given below: 





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

• A Δ B:
○ This represents the symmetric difference between sets A and B. It includes all those elements which are in A and B but not in their intersection. Mathematically, it can be represented as (A - B) ∪ (B - A). So, A matches with III.

• A - (B ∪ C):
○ This represents all elements in A not in (B or C). Another way to represent it would be (A - B) ∩ (A - C) because it is the intersection of elements that are only in A and not in B or C. So, B matches with II.

• A - (B ∩ C):
○ This represents all elements in A that are not common to both B and C, or equivalently, the elements just in A and not in the intersection of B and C. So, C matches with I.

• A ∩ (B - C):
○ This represents the intersection of A and the elements in B not in C. It is equivalent to (A ∩ B) - (A ∩ C) because you're taking all elements in both A and B, then removing any elements that are also in C. So, D matches with IV.

Therefore, the correct option is A - III, B - II, C - I, D - IV. So, the correct option is 1).

UGC NET Computer Science PYQ

Which of the following is (are) correct about the regular expression?

a a* b b* c c* d d*

  1. The language for the given expression is:

$L={a^n b^n c^m d^m \mid n\ge 1,\ m\ge 1}\cup{a^n b^m c^m d^n \mid n\ge 1,\ m\ge 1}$

  1. The Context Free Language for the given expression is:

$S\to AB\mid C$

$A\to aAb\mid ab$

$B\to cBd\mid cd$

$C\to aCd\mid aDd$

$D\to bDc\mid bc$

  1. The language generated by this expression is equal number of $a$'s, followed by equal number of $b$'s, followed by equal number of $c$'s and followed by equal number of $d$'s.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

The given regular expression is $aa^*bb^*cc^dd^$, where:

  • $a^*$ denotes zero or more occurrences of $a$
  • $b^*$ denotes zero or more occurrences of $b$
  • $c^*$ denotes zero or more occurrences of $c$
  • $d^*$ denotes zero or more occurrences of $d$
  1. The language generated by the regular expression

$L={a^n b^n c^m d^m \mid n \ge 1, m \ge 1}\cup{a^n b^m c^m d^n \mid n \ge 1, m \ge 1}$

consists of strings where $a$'s are followed by $b$'s, which are followed by $c$'s, and then $d$'s.

Each of these letters $a, b, c, d$ can occur one or more times in any order. For example, $abcd$, $aabcdd$, etc. So the language $L$ can generate regular expressions $aa^*bb^*cc^dd^$.

  1. The Context Free Language for the given expression is:

$S \to AB \mid C$

$A \to aAb \mid ab$

$B \to cBd \mid cd$

$C \to aCd \mid aDd$

$D \to bDc \mid bc$

This is true.

For example:

$S \to AB \mid C$

$S \to abcd$

  1. The language generated by this expression is equal number of $a$'s, followed by equal number of $b$'s, followed by equal number of $c$'s and followed by equal number of $d$'s.

This statement is false.

The regular expression $aa^*bb^*cc^dd^$ generates strings where each letter $a, b, c, d$ can occur one or more times, but there is no constraint that the number of occurrences of each letter must be equal.

For example, the regular expression can generate strings like $abcd$, $abccdd$, $aaaabbbccddd$, etc., where the number of occurrences of each letter is not necessarily equal.

So option C is the correct answer.


UGC NET Computer Science PYQ
How many ways are there to pack six copies of the same book into four identical boxes, where a box contains six books?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Books are identical and boxes are also identical.

So, we need to find the number of partitions of $6$ into at most $4$ parts.

Possible distributions are:

$6$

$5+1$

$4+2$

$4+1+1$

$3+3$

$3+2+1$

$3+1+1+1$

$2+2+2$

$2+2+1+1$

Total ways $=9$

UGC NET Computer Science PYQ
Which of the following is not a solution representation in a genetic algorithm?
1.Binary valued
2.Real valued
3.Permutation
4.Combinations





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

In a genetic algorithm, solution representation refers to how the potential solutions, or individuals in the population, are encoded. The given options can be categorized as follows:

• Binary valued: Represents solutions using binary encoding, where each gene is typically represented as either 0 or 1.

• Real valued: Represents solutions using real numbers, allowing for a more continuous representation.

• Permutation: Represents solutions as permutations of elements, where the order of elements matters.

• Combinations: This is not a standard representation in genetic algorithms. While permutations represent ordered arrangements, combinations represent unordered selections of elements. Genetic algorithms typically use representations that capture the structure and relationships among elements, and combinations may not be suitable for many optimization problems.


UGC NET Computer Science PYQ

Consider two hosts P and Q are connected through a router R. The maximum transfer unit $MTU$ value of the link between P and R is $1500$ bytes and between R and Q is $820$ bytes. A TCP segment of size of $1400$ bytes is transferred from P to Q through R with IP identification value of $0x1234$. Assume that IP header size is $20$ bytes. Further, the packet is allowed to be fragmented that is Don't Fragment $DF$ flag in the IP Header is not set by P. Which of the following statements is/are true?

I. Two fragments are created at R and IP datagram size carrying the second fragment is $620$ bytes
II. If the second fragment is lost then R resends the fragment with IP Identification value of $0x1234$
III. If the second fragment is lost then P is required to resend the entire TCP segment
IV. TCP destination port can be determined by analyzing the second fragment only

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

TCP segment size:

$1400$ bytes

IP header size:

$20$ bytes

So, original IP datagram size is:

$1400+20=1420$ bytes

Since $1420 < 1500$, no fragmentation is required between P and R.

Now, between R and Q:

$MTU=820$ bytes

Each fragment will have an IP header of $20$ bytes.

So, maximum data in each fragment is:

$820-20=800$ bytes

Original data size is:

$1400$ bytes

So, fragments will be:

First fragment data:

$800$ bytes

First fragment total size:

$800+20=820$ bytes

Second fragment data:

$1400-800=600$ bytes

Second fragment total size:

$600+20=620$ bytes

So, statement I is true.

Now check statement II:

If the second fragment is lost, router R does not retransmit the fragment. IP is unreliable and does not handle retransmission.

So, statement II is false.

Now check statement III:

If the fragment is lost, TCP at source P will retransmit the TCP segment.

So, statement III is true.

Now check statement IV:

TCP destination port is present in the TCP header.

The TCP header is present only in the first fragment, not in the second fragment.

So, TCP destination port cannot be determined by analyzing only the second fragment.

So, statement IV is false.

Correct statements are:

I and III only


UGC NET Computer Science PYQ
Which of the following pairs of propositions are not logically equivalent?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Check option (a):

$(p\to r)\land(q\to r)$

$=(\neg p\lor r)\land(\neg q\lor r)$

$=(\neg p\land\neg q)\lor r$

$=\neg(p\lor q)\lor r$

$=(p\lor q)\to r$

So, option (a) is logically equivalent.

Option (b) is also equivalent because if $p$ and $q$ have same truth value, then $\neg p$ and $\neg q$ also have same truth value.

Option (c) is the standard form of biconditional:

$p\leftrightarrow q\equiv(p\land q)\lor(\neg p\land\neg q)$

So, option (c) is logically equivalent.

Now check option (d):

$((p\land q)\to r)=\neg(p\land q)\lor r=\neg p\lor\neg q\lor r$

But,

$(p\to r)\land(q\to r)=(\neg p\lor r)\land(\neg q\lor r)$

Both are not always same.

UGC NET Computer Science PYQ
Match List I with List II

 LIST I

 LIST II

 A. Parallel FFT

 I. Θ(n²)
 B. Iterative FFTII. Θ(n) 
 C. Evaluation of polynomial at n points by Horner method III. Θ(lg n)
 D. Product of two polynomials that are represented in point value form IV. Θ(n lg n)
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A – Parallel Fast Fourier Transform (FFT):

The FFT can be executed in parallel, which reduces the time complexity from O(n log n) to O(log n) under ideal conditions, as the operations required to calculate the FFT can be effectively divided among multiple processors. Thus, it corresponds to III. Θ(lg n).


B – Iterative Fast Fourier Transform (FFT):

The FFT, even when implemented iteratively, has a time complexity of O(n log n) because we divide the problem into smaller chunks recursively, and for each level of division, we do a constant amount of work. Hence it matches with IV. Θ(n lg n).


C – Evaluation of polynomial at n points by Horner method:

If evaluated using the Horner method, a polynomial can be evaluated in O(n) operations. However, if we are evaluating the polynomial at n points, and the polynomial itself has degree n, the total complexity becomes O(n²). Therefore, it corresponds to I. Θ(n²).


D – Product of two polynomials that are represented in point value form:

If the polynomials are represented in point-value form, their product can be computed pretty efficiently in O(n) time complexity. This is due to the fact that to compute the product polynomial at a point, you simply multiply the evaluations of the input polynomials at that point.


Therefore, D corresponds to II. Θ(n).


UGC NET Computer Science PYQ

Which of the following statements are correct?

  1. The first three-address instruction in the intermediate code is a leader.
  2. The instruction which is exactly at the middle of the given three address code is a leader.
  3. Any instruction that is the target of a conditional or unconditional jump is a leader.
  4. Any instruction that immediately follows a conditional or unconditional jump is a leader.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In compiler design, leaders are used to form basic blocks.

Rules for finding leaders:

  1. The first instruction of the intermediate code is always a leader.

So, statement $1$ is true.

  1. The middle instruction is not necessarily a leader.

So, statement $2$ is false.

  1. Any instruction which is the target of a conditional or unconditional jump is a leader.

So, statement $3$ is true.

  1. Any instruction immediately following a conditional or unconditional jump is also a leader.

So, statement $4$ is true.

Correct statements are:

$1,3,4$


UGC NET Computer Science PYQ
Consider the following linear programming $(LP)$:

Maximize $z=2x_1+3x_2$

Such that

$2x_1+x_2\le 4$

$x_1+2x_2\le 5$

$x_1,x_2\ge 0$

The optimum value of the LP is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Corner points are checked for maximum value.

At $(0,0)$:

$z=2(0)+3(0)=0$

At $(2,0)$:

$z=2(2)+3(0)=4$

At $(0,2.5)$:

$z=2(0)+3(2.5)=7.5$

Now solve intersection:

$2x_1+x_2=4$

$x_1+2x_2=5$

From first equation,

$x_2=4-2x_1$

Put in second equation:

$x_1+2(4-2x_1)=5$

$x_1+8-4x_1=5$

$-3x_1=-3$

$x_1=1$

Then,

$x_2=4-2(1)=2$

At $(1,2)$:

$z=2(1)+3(2)=2+6=8$

Maximum value is $8$.

UGC NET Computer Science PYQ
The following table shows the time between failures for a software:
 Error number: 12 3 4 5 
 Time since last failure (Hours): 6 48 5 6 
The reliability of the system for one hour operation assuming an exponential model is-





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Therefore, the correct option is: Option 3: $e^{-\frac{5}{29}}$

The reliability of a system in the context of reliability engineering is often modeled using the exponential distribution. The exponential reliability function is given by:

$R(t) = e^{-\lambda t}$

where:

• $R(t)$ is the reliability at time $t$,

• $\lambda$ is the failure rate (reciprocal of the mean time between failures).

• In this case, you are given the time between failures for the software:
○ Time between failures = $[6, 4, 8, 5, 6]$

• To find the failure rate $\lambda$, you can use the formula:
○ $\lambda = \frac{1}{\text{Mean time between failures}}$

• Mean time between failures (MTBF) is calculated as the average of the time between failures:
○ $\text{MTBF} = \frac{6+4+8+5+6}{5} = \frac{29}{5}$

• Now, the failure rate $(\lambda)$ is:
○ $\lambda = \frac{1}{\text{MTBF}} = \frac{5}{29}$

• Substitute this into the reliability function:
○ $R(t) = e^{-\frac{5}{29}t}$

• For one hour of operation $(t = 1)$, the reliability becomes:
○ $R(1) = e^{-\frac{5}{29}\times 1} = e^{-\frac{5}{29}}$

So, the correct answer is: $e^{-\frac{5}{29}}$

UGC NET Computer Science PYQ

Which of the following are correct on regular expressions?

a. $\varphi + L = L + \varphi = L$
b. $\epsilon L = L\epsilon = L$
c. $\varphi L = L\varphi = \varphi$
d. $\varphi L = L\varphi = L$

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement a:

Union with empty language gives the same language.

$\varphi + L = L$

So, statement a is true.

Statement b:

Concatenation with empty string does not change the language.

$\epsilon L = L\epsilon = L$

So, statement b is true.

Statement c:

Concatenation with empty language gives empty language.

$\varphi L = L\varphi = \varphi$

So, statement c is true.

Statement d:

This says concatenation with empty language gives $L$, which is false.

So, statement d is false.

Correct statements are:

a, b and c only


UGC NET Computer Science PYQ
Consider a machine with a byte addressable main memory of $2^{16}$ bytes and block size of $8$ bytes. Assume that a direct mapped cache consisting of $32$ lines used with this machine. How many bits will be there in Tag, line and word field of format of main memory addresses?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Main memory size $=2^{16}$ bytes

So, address size $=16$ bits.

Block size $=8$ bytes $=2^3$ bytes

So, word field bits $=3$

Cache has $32$ lines $=2^5$ lines

So, line field bits $=5$

Now,

Tag bits $=16-5-3=8$

Therefore, Tag, line and word bits are:

$8,5,3$

UGC NET Computer Science PYQ
Given below are two statements:

Which of the following concurrency control protocol ensures both conflict serializability and freedom from deadlock?

Statement I: Two phase locking

Statement II: Timestamp ordering

In the light of the above statements, choose the most appropriate answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Two phase locking ensures conflict serializability, but it may cause deadlock. So, it does not ensure freedom from deadlock.

Timestamp ordering ensures conflict serializability and it is deadlock-free because transactions do not wait for locks.

So, Statement I is incorrect and Statement II is correct.

UGC NET Computer Science PYQ

The Solution to Silly Window Syndrome problem is/are:

I. Nagle's Algorithm
II. Clark's Algorithm
III. Jacobson's Algorithm
IV. Piggy backing Algorithm

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Silly Window Syndrome happens when very small amounts of data are sent repeatedly, which reduces network efficiency.

Statement I:

Nagle's Algorithm is used to reduce the sending of small packets.

So, statement I is correct.

Statement II:

Clark's Algorithm is used at the receiver side to avoid advertising very small window sizes.

So, statement II is correct.

Statement III:

Jacobson's Algorithm is related to RTT estimation and timeout calculation, not Silly Window Syndrome.

So, statement III is false.

Statement IV:

Piggy backing is used to combine acknowledgment with outgoing data, but it is not a standard solution for Silly Window Syndrome.

So, statement IV is false.

Correct statements are:

I and II only


UGC NET Computer Science PYQ
The following program is stored in memory unit of the basic computer. What is the content of the accumulator after the execution of program? All location numbers listed below are in hexadecimal.
LocationInstruction
210CLA
211ADD 217
212INC
213STA 217
214LDA 218
215CMA
216AND 217
2171234H
2189CE2H





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Initially,

$AC=0000H$

After $CLA$:

$AC=0000H$

After $ADD\ 217$:

$AC=0000H+1234H=1234H$

After $INC$:

$AC=1235H$

After $STA\ 217$:

$M[217]=1235H$

After $LDA\ 218$:

$AC=9CE2H$

After $CMA$:

$AC=\overline{9CE2H}=631DH$

Now execute $AND\ 217$:

$AC=631DH\ AND\ 1235H$

$631DH=0110\ 0011\ 0001\ 1101$

$1235H=0001\ 0010\ 0011\ 0101$

So,

$AC=0000\ 0010\ 0001\ 0101=0215H$

UGC NET Computer Science PYQ
The clipping process in computer graphics is used for





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Clipping in computer graphics is used to remove the portion of objects, lines, or images that lie outside the viewing window.

So, the correct answer is Removing objects and lines.

UGC NET Computer Science PYQ

Which AI System mimics the evolutionary process to generate increasingly better solutions to a problem?

I. Self organizing neural network.
II. Back propagation neural network.
III. Genetic algorithm.
IV. Forward propagation neural network.

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A Genetic Algorithm is based on the idea of natural selection and evolution.

It improves solutions using operations like:

Selection
Crossover
Mutation

So, the AI system that mimics the evolutionary process is:

III. Genetic algorithm


UGC NET Computer Science PYQ
A non-pipeline system takes $50\ ns$ to process a task. The same task can be processed in six-segment pipeline with a clock cycle of $10ns$. Determine approximately the speedup ratio of the pipeline for $500$ tasks.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Non-pipeline time for $500$ tasks:

$500\times50=25000\ ns$

For pipeline:

Number of stages $=6$

Clock cycle $=10ns$

Pipeline time:

$(k+n-1)\times clock$

$=(6+500-1)\times10$

$=505\times10=5050\ ns$

Speedup:

$\frac{25000}{5050}=4.95$

UGC NET Computer Science PYQ
Which of the followings are White box Testing ?

A. Path Testing
B. Loop Testing
C. Regression Testing
D. Non functional Testing





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

White-box testing focuses on the internal structure and logic of the program.

• Path Testing checks different execution paths inside the program → White box
• Loop Testing checks loop structures and iterations → White box
• Regression Testing verifies that new changes do not break existing functionality → not white box specifically
• Non-functional testing tests performance, usability, etc. → not white box

Therefore, the correct options are A and B.


UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: I/O protection is ensured by a hardware trap

Reason R: I/O interrupt caused by the condition like I/O completion and device malfunction occurring within the I/O devices

In the light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because I/O protection is ensured using privileged instructions and hardware trap.

Reason R is also true because I/O interrupts may occur due to I/O completion or device malfunction.

But Reason R does not explain Assertion A.

UGC NET Computer Science PYQ

Consider the following Learning algorithms.

I. Logistic regression.
II. Back propagation.
III. Linear regression.
IV. Forward propagation.

Which of the following options represents classification algorithm?

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement I:

Logistic regression is a classification algorithm.

So, I is correct.

Statement II:

Back propagation is used for training neural networks, and in such questions it is treated as part of classification learning.

So, II is taken as correct.

Statement III:

Linear regression is used for predicting continuous values, not for classification.

So, III is false.

Statement IV:

Forward propagation is a computation step, not a classification algorithm.

So, IV is false.

Correct answer is:

I and II only


UGC NET Computer Science PYQ
What is the radix of the numbers if the solution to the quadratic equation $x^2-10x+26=0$ is $x=4$ and $x=7$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Let radix be $r$.

In base $r$,

$10=r$

$26=2r+6$

Given roots are $4$ and $7$.

Sum of roots:

$4+7=11$

For equation $x^2-10x+26=0$, sum of roots $=10$ in base $r$.

So,

$r=11$

Also, product of roots:

$4\times7=28$

And,

$26=2r+6=2(11)+6=28$

So, radix is $11$.

UGC NET Computer Science PYQ

The techniques used to handle the phantom problem are

A. Time stamping
B. Index locking
C. Predicate locking
D. Execution indexing






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

The phantom problem occurs in database concurrency control when a transaction re-executes a query and finds new rows inserted by another transaction.

Techniques used to prevent phantom problem:

• Index locking – locks index ranges to prevent insertion of new tuples in the range.
• Predicate locking – locks records satisfying a condition.

Time stamping and execution indexing are not specifically used to solve phantom problem.

Therefore, correct options are B and C.


UGC NET Computer Science PYQ
Let R = {x : x ∈ N, x is multiple of 3 and x ≤ 100} and S = {x : x ∈ N, x is multiple of 5 and x < 100}. What is the number of elements in (R ∩ S) × (S ∩ R)?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Solution: $R=\{x:x\in N,\ x\text{ is multiple of }3,\ x\le 100\}$ $S=\{x:x\in N,\ x\text{ is multiple of }5,\ x<100\}$ $R\cap S$ contains numbers which are multiples of both $3$ and $5$. So, $R\cap S$ contains multiples of $15$. Multiples of $15$ less than $100$ are: $15,30,45,60,75,90$ So, $|R\cap S|=6$ Also, $S\cap R=R\cap S$ Therefore, $|(R\cap S)\times(S\cap R)|=6\times6=36$ So, the correct answer is $36$.

UGC NET Computer Science PYQ

Which Boolean operation on two variables can be represented by a single perception layer?

I. X1 AND X2
II. X1 OR X2
III. X1 NOR X2
IV. X1 XOR X2

Choose the most appropriate answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

A single perceptron can represent only linearly separable Boolean functions.

Check each operation:

I. AND → linearly separable
II. OR → linearly separable
III. NOR → linearly separable
IV. XOR → not linearly separable

So, a single perceptron can represent:

I, II, and III only


UGC NET Computer Science PYQ
Consider the following pseudo-code fragment, where $a$ and $b$ are integer variables that have been initialized:

Pre-conditions: $(a>1\land a<b)$

Assume that overflow never occurs.

int $x=0$; int $p=1$;

while $(p<b)$ {
$p=p*a$;
$x=x+1$;
}

When the while loop terminates, what will be the value of $x$ in terms of $a$ and $b$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Initially,

$p=1=a^0$

After $1$ iteration:

$p=a^1$

After $2$ iterations:

$p=a^2$

After $x$ iterations:

$p=a^x$

Loop stops when:

$p\ge b$

So,

$a^x\ge b$

Minimum such value of $x$ is:

$x=\lceil \log_a b\rceil$

UGC NET Computer Science PYQ

Which of the following are type of interface in an ATM network ?


A. user-to-user

B. user-to-network

C. network-to-network

D. host-to-network

E. user-to-host






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In an ATM (Asynchronous Transfer Mode) network, the two standard interfaces are:

• UNI (User-to-Network Interface)
• NNI (Network-to-Network Interface)

Hence the correct options are B and C.


UGC NET Computer Science PYQ
Given below are two statements:

Statement I: Fuzzifier is a part of a fuzzy system

Statement II: Inference engine is a part of fuzzy system

In the light of the above statements, choose the most appropriate answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A fuzzy system generally includes fuzzifier, knowledge base, inference engine, and defuzzifier.

Statement I: Fuzzifier is a part of a fuzzy system. Correct.

Statement II: Inference engine is a part of fuzzy system. Correct.

UGC NET Computer Science PYQ
Match the List-I and List-II
 List-I

List-II 

 a. Planar Graph
I. Probabilistic Model
 
 b. Bipartite Graph
 II. Deterministic Model
 c. PERT
 III. 4-Colorable
 d. CPM

 IV. 2-Colorable
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Planar Graph:

According to the four color theorem, every planar graph is $4$-colorable.

So,

a → III

Bipartite Graph:

A bipartite graph can be colored using $2$ colors.

So,

b → IV

PERT:

PERT is used when activity time is uncertain. Hence, it is a probabilistic model.

So,

c → I

CPM:

CPM is used when activity time is fixed and known. Hence, it is a deterministic model.

So,

d → II

Correct matching:

a-III; b-IV; c-I; d-II


UGC NET Computer Science PYQ
In HTML, $<map>$ tag is used for





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

The $<map>$ tag is used with the $<area>$ tag to create an image map.

Image map means different clickable regions can be defined inside an image.

UGC NET Computer Science PYQ

Arrange the following in correct order, so that they can follow a proper run time environment :


A. Programming statement

B. Compilation

C. Memory allocation

D. Type of variable

E. Memory deallocation






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

The correct execution flow in a programming environment is:


Programming statement (A) – Program is written.


Compilation (B) – Code is compiled to machine/intermediate code.


Type of variable (D) – Variables are recognized with their types.


Memory allocation (C) – Memory is allocated during execution.


Memory deallocation (E) – Memory is released after execution.


Thus the correct order is:


UGC NET Computer Science PYQ
What will be the output of the following code?
include <stdio.h>

int main() {

int a, b, c;

a = 0x10; b = 010;

c = a + b;

printf("%d", c);

return 0;

}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

0x10 is a hexadecimal number.

0x10 = 16

010 is an octal number.

010 = 8

So,

c = 16 + 8 = 24

UGC NET Computer Science PYQ
Match List-I and List-II
 List-I

List-II 

 a. Direct Addressing
I. MVI A, FFH
 
 b. Indirect addressing
 II. MOV A, B
 c. Register Addressing
 III. STA, FFFFA
 d. Immediate addressing

 IV. MOV A, M

 Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Direct Addressing:

In direct addressing, the memory address is directly given in the instruction.

So, STA, FFFFA is direct addressing.

a → III

Indirect Addressing:

In indirect addressing, the memory address is given indirectly through a register pair.

In MOV A, M, M represents the memory location pointed by HL register pair.

b → IV

Register Addressing:

In register addressing, operands are registers.

MOV A, B uses registers A and B.

c → II

Immediate Addressing:

In immediate addressing, data is directly given in the instruction.

MVI A, FFH means FFH is directly loaded into A.

d → I

Correct matching:

a-III, b-IV, c-II, d-I


UGC NET Computer Science PYQ
Suppose you are compiling on a machine with $1$-byte chars, $2$-byte shorts, $4$-byte ints, and $8$-byte doubles, and with alignment rules that require the address of every primitive data element to be an integer multiple of the element's size. Suppose further that the compiler is not permitted to reorder fields; padding is used to ensure alignment. How much space will be consumed by the following array?

struct {
short s;
char c;
short t;
char d;
double r;
int i;
} A[10];





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

$short\ s$: starts at offset $0$, size $2$, next offset $2$

$char\ c$: starts at offset $2$, size $1$, next offset $3$

$short\ t$: needs multiple of $2$, so $1$ byte padding, starts at offset $4$, next offset $6$

$char\ d$: starts at offset $6$, size $1$, next offset $7$

$double\ r$: needs multiple of $8$, so $1$ byte padding, starts at offset $8$, next offset $16$

$int\ i$: needs multiple of $4$, starts at offset $16$, next offset $20$

Struct size must be multiple of maximum alignment $8$.

So, $20$ is padded to $24$ bytes.

For $A[10]$:

$10\times24=240$ bytes

UGC NET Computer Science PYQ

Match List-I with List-II.

$f(n) = a f(n/b) + g(n)$ is a divide-and-conquer recurrence relation for the Listed-I algorithms, match their recurrence in Listed-II.

 List-I (Algorithms)

List-II (Recurrence Relation)

 
 A. Binary Search
 I. $f(n) = 7f(n/2) + 15n^2/4$
 B. Find maximum and minimum of a sequence
 II. $f(n) = 2f(n/2) + n$
 C. Merge Sort
 III. $f(n) = 2f(n/2) + 2$
 D. Fast Matrix Multiplication

 IV. $f(n) = f(n/2) + 2$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

• Binary Search halves the input and performs constant work

$f(n) = f(n/2) + O(1)$ → IV


• Find maximum and minimum (divide and conquer)

Two recursive calls with constant comparisons

$f(n) = 2f(n/2) + 2$ → III


• Merge Sort divides into two parts and merges in linear time

$f(n) = 2f(n/2) + n$ → II


• Fast Matrix Multiplication (Strassen)

$f(n) = 7f(n/2) + O(n^2)$ → I


Thus matching:


A → IV

B → III

C → II

D → I


UGC NET Computer Science PYQ
What is the output of following code?

main()

struct s1

{
char *z;

int i;

struct s1 *p;

}

static struct s1 a[] = {

{"Nagpur", 1, a + 1}

{"Raipur", 2, a + 2}

{"Kanpur", 3, a}

};

struct s1 *ptr = a;

printf("%s %s %s\n", a[0].z, ptr -> z, a[2].p -> z);

}





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

a[0].z = Nagpur

ptr = a, so ptr -> z = a[0].z = Nagpur

a[2].p = a, so a[2].p -> z = a[0].z = Nagpur

Final Answer: (b) Nagpur Nagpur Nagpur

UGC NET Computer Science PYQ

Match the List-I and List-II

 List-I

 List-II

 a. If the implementation of generated or derived classes differs only through a parameter we have
 I. to use class hierarchy
 b. If the actual types of objects used cannot be known at compile time, then we have
II. improved run-time efficiency
 
 c. If inline operations are essential and templates are used then we have
 III. to use templates
 d. To gain access to differing instances for derived classes through base we have

 IV. to use explicit casting

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For a:

If implementation differs only through a parameter, templates are useful.

So,

a → III

For b:

If actual object types are not known at compile time, class hierarchy and runtime polymorphism are used.

So,

b → I

For c:

Templates allow inline operations and can improve run-time efficiency.

So,

c → II

For d:

To access derived class instances through base class reference or pointer, explicit casting may be used.

So,

d → IV

Correct matching:

a-III, b-I, c-II, d-IV


UGC NET Computer Science PYQ
Consider the following recursive Java function $f$ that takes two long arguments and returns a float value:

public static float f(long m, long n) {
float result = (float)m / (float)n;
if (m < 0 || n < 0) return 0.0f;
else result -= f(m * 2, n * 3);
return result;
}

Which of the following real values best approximates the value of $f(1,3)$?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution


$f(1,3)=\frac{1}{3}-f(2,9)$

$=\frac{1}{3}-\frac{2}{9}+\frac{4}{27}-\frac{8}{81}+\cdots$

This is a geometric series with first term $\frac{1}{3}$ and common ratio $-\frac{2}{3}$.

Sum:

$\frac{\frac{1}{3}}{1-(-\frac{2}{3})}=\frac{\frac{1}{3}}{\frac{5}{3}}=\frac{1}{5}=0.2$

UGC NET Computer Science PYQ

Match List-I with List-II :

 List-I
 List-II
 A. Channelization protocol
 I. ALOHA
 B. Bit-oriented protocol
 II. TDMA
 C. Random-access protocol
 III. Reservation
 D. Controlled-access protocol

 IV. HDLC







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Channelization protocol divides the channel into multiple portions → example TDMA

A → II


• Bit-oriented protocol works with frames and bits → HDLC

B → IV


• Random-access protocol allows stations to transmit randomly → ALOHA

C → I


• Controlled-access protocol controls which station transmits → Reservation

D → III


Thus matching:


A → II

B → IV

C → I

D → III


UGC NET Computer Science PYQ
Match List I with List II
 List I List II
 A. The running time of straight forward recursive method to compute nth Fibonacci number Fn I. O(n²)
 B. The running time to compute Fn using memoization II. O(lg n)

 C. The running time to compute Fibonacci number Fn using only integer addition and multiplication III. O(n)
 D. The running time to determine an optimal bitonic tour IV. θ(φⁿ)
Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A. Straight forward recursive Fibonacci method takes exponential time.

So, A matches with IV.

B. Fibonacci using memoization takes linear time.

So, B matches with III.

C. Fibonacci number using integer addition and multiplication can be computed in logarithmic time.

So, C matches with II.

D. Optimal bitonic tour takes O(n²) time.

So, D matches with I.

Final Answer: (b) A – IV, B – III, C – II, D – I

UGC NET Computer Science PYQ

Match the List-I and List-II

 List-I

 List-II

a. Apache Kafka
I. Platform for constructing data flows for extract, transform, and load ETL processing and analysis of large datasets
b. Pig
II. General-purpose computing model and runtime system for distributed data analytics
 
c. Apache Mahout
III. Open-source platform that was created by LinkedIn

d. MapReduce

IV. Open-source platform used for creating scalable machine learning algorithms

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Apache Kafka was originally created by LinkedIn.

So,

a → III

Pig is used for constructing data flows for ETL processing and analysis of large datasets.

So,

b → I

Apache Mahout is used for creating scalable machine learning algorithms.

So,

c → IV

MapReduce is a general-purpose computing model for distributed data analytics.

So,

d → II

Correct matching:

a-III, b-I, c-IV, d-II


UGC NET Computer Science PYQ
The data node and name node in HADOOP are





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In Hadoop, DataNode stores actual data blocks, so it works as worker node.

NameNode manages metadata of files and blocks, so it works as master node.

Hence, DataNode and NameNode are Worker Node and Master Node respectively.

UGC NET Computer Science PYQ

An IPv4 packet has arrived with the first few hexadecimal digits as shown below. How many hops can this packet travel before being dropped? The data belongs to what upper-layer protocol?

$(5400001800100110040601\ldots)_{16}$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Convert header bytes of IPv4 packet:


Hex sequence (grouped in bytes):


54 00 00 18 00 10 01 10 04 06 01 ...


Important fields:


• TTL (Time To Live) field = 04 (in hex)

TTL = 4 → packet can travel 4 hops before being discarded.


• Protocol field = 06 (in hex)

Protocol number 6 corresponds to TCP.


Therefore:


TTL = 4 hops

Protocol = TCP


UGC NET Computer Science PYQ
Consider a disk system with cylinders. The request to access the cylinders occurs in the following sequence:

4, 34, 10, 7, 19, 73, 2, 15, 6, 20

Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first policy is used?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Using SSTF, the head will move to the nearest request each time.

Movement order:

50 → 34 → 20 → 19 → 15 → 10 → 7 → 6 → 4 → 2 → 73

Total movement:

16 + 14 + 1 + 4 + 5 + 3 + 1 + 2 + 2 + 71 = 119

Since 1 cylinder movement takes 1 ms,

Total time = 119 ms

UGC NET Computer Science PYQ

Match the List-I and List-II

 List-I

 List-II

a. IPC
I. Resource Allocation
b. Demand Paging
II. Computational speedup
 
c. Banker's Algorithm
III. Task Control Block

d. PCB

IV. Virtual Memory

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

IPC means Inter Process Communication. It helps cooperating processes communicate and can provide computational speedup.

So,

a → II

Demand Paging is a technique used in Virtual Memory.

So,

b → IV

Banker's Algorithm is used for safe Resource Allocation and deadlock avoidance.

So,

c → I

PCB means Process Control Block. It is also related to task control information.

So,

d → III

Correct matching:

a-II, b-IV, c-I, d-III


UGC NET Computer Science PYQ
Consider a relational schema

$S=(U,V,W,X,Y,Z)$

on which the following functional dependencies hold:

$\{U\to V,\ VW\to X,\ Y\to W,\ X\to U\}$

Which are the candidate keys among following options?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Attributes $Y$ and $Z$ are not present on RHS of any FD.

So, every candidate key must contain $Y$ and $Z$.

Now check:

$(UYZ)^+=\{U,Y,Z,V,W,X\}$, so $UYZ$ is a key.

$(VYZ)^+=\{V,Y,Z,W,X,U\}$, so $VYZ$ is a key.

$(XYZ)^+=\{X,Y,Z,U,V,W\}$, so $XYZ$ is a key.

Thus, candidate keys are:

$UYZ,\ VYZ,\ XYZ$


UGC NET Computer Science PYQ

Which of the following control problem does not exist, when processes unaware of each other during interaction?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

When processes are unaware of each other, they do not coordinate or compete for shared resources in a way that forms circular waiting.


• Mutual exclusion → may still be required for shared resources

• Starvation → possible if scheduling is unfair

• Deadlock → possible if processes wait on each other


Data coherence problems occur when processes share and modify common data.

If processes are unaware and do not share data directly, this issue does not arise.


UGC NET Computer Science PYQ
Find the sum of all four digit numbers formed using the digits 1, 2, 4 and 6.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Digits are 1, 2, 4 and 6.

Sum of digits:

1 + 2 + 4 + 6 = 13

Total four digit numbers formed using all four digits:

4! = 24

Each digit appears 6 times at each place.

So, required sum:

6 × 13 × 1111 = 86658


UGC NET Computer Science PYQ

Match the List-I and List-II

 List-I

 List-II

a. Product Complexity
I. System Requirements Design
b. Structured System analysis
II. Software design
 
c. Coupling and Cohesion
III. Validation techniques

d. Symbolic Execution

IV. Software cost estimation

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Product Complexity is an important factor in Software Cost Estimation.

So,

a → IV

Structured System analysis is related to System Requirements Design.

So,

b → I

Coupling and Cohesion are important concepts of Software Design.

So,

c → II

Symbolic Execution is used as a Validation technique.

So,

d → III

Correct matching:

a-IV, b-I, c-II, d-III


UGC NET Computer Science PYQ
 Consider a hypothetical machine with $3$ pages of physical memory, $5$ pages of virtual memory, and

$\langle A,B,C,D,A,B,E,A,B,C,D,E,B,A,B\rangle$

as the stream of page references by an application. If $P$ and $Q$ are the number of page faults with FIFO and LRU page replacement algorithms respectively, then $(P,Q)=$ _____.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

There are $3$ page frames.

For FIFO page replacement, page faults are:

$P=11$

For LRU page replacement, page faults are:

$Q=12$

So,

$(P,Q)=(11,12)$

UGC NET Computer Science PYQ

Which of the following is the Markup language?


A. HTML

B. XML

C. DHTML

D. LML

E. PML






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

HTML (HyperText Markup Language) → Markup language

• XML (Extensible Markup Language) → Markup language

• DHTML (Dynamic HTML) → Extension of HTML used for dynamic webpages


LML and PML are not standard markup languages


UGC NET Computer Science PYQ
How will you free the memory allocated by the following program?
#include <stdio.h>

#define MAXROW 3
#define MAXCOL 4

int main()
{
    int **p, i, j;

    p = (int **)malloc(MAXROW * sizeof(int*));

    return 0;
}






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Memory allocated using malloc() is released using free().


Here, memory is allocated to pointer p, so it should be freed as: free(p);


UGC NET Computer Science PYQ

Match the List-I and List-II

 List-I

 List-II

a. Dijkstra's Algorithm
I. Calculates path matrix
b. Prim's Algorithm
II. Stores minimum cost edge
 
c. Warshall's Algorithm
III. Stores the total cost from a source node to the current node

d. Kruskal's Algorithm

IV. Finds Minimum Spanning Tree

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Dijkstra's Algorithm is used to find the shortest path from a single source. It stores the total minimum cost from source node to current node.

So,

a → III

Prim's Algorithm selects the minimum cost edge to construct a minimum spanning tree.

So,

b → II

Warshall's Algorithm calculates the path matrix or transitive closure.

So,

c → I

Kruskal's Algorithm is used to find Minimum Spanning Tree.

So,

d → IV

Correct matching:

a-III, b-II, c-I, d-IV


UGC NET Computer Science PYQ
Consider a disk system having $60$ cylinders. Disk requests are received for cylinders $10,22,20,2,40,6,38$ in that order. Assuming the disk head is currently at cylinder $20$, what is the time taken to satisfy all the requests if it takes $2$ milliseconds to move from one cylinder to adjacent one and SSTF algorithm is used?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Using SSTF, from cylinder $20$ the order is approximately:

$20\to20\to22\to10\to6\to2\to38\to40$

Total head movement:

$0+2+12+4+4+36+2=60$ cylinders

Time for one cylinder movement $=2$ ms

Total time:

$60\times2=120$ milliseconds

UGC NET Computer Science PYQ

Arrange the following prefix expressions based on their values in increasing order:


A. + - * 2 / 8 4 3 2

B. ↑ - * 3 3 * 4 2 5

C. + - ↑ 3 2 ↑ 2 3 / 6 - 4 2

D. * + 3 + 3 ↑ 3 + 1 1 3






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Evaluate each prefix expression.

A:

      • 2 / 8 4 3 2
        = + - * 2 2 3 2
        = + - 4 3 2
        = + 1 2
        = 3

B:
↑ - * 3 3 * 4 2 5
= ↑ - 9 8 5
= ↑ 1 5
= 1

C:

    • ↑ 3 2 ↑ 2 3 / 6 - 4 2
      = + - 9 8 / 6 2
      = + 1 3
      = 4

D:

    • 3 + 3 ↑ 3 + 1 1 3
      = * + 3 + 3 9 3
      = * + 3 12 3
      = * 15 3
      = 45

Values:

A = 3
B = 1
C = 4
D = 45

Increasing order:

B < A < C < D



UGC NET Computer Science PYQ
Sutherland Hodgeman method is used on





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Sutherland Hodgeman algorithm is used for polygon clipping, mainly for convex polygons.


UGC NET Computer Science PYQ
Match the following based on the language accepted by using brute force method of parsing.
 List-I

 List-II

a. $S \to aSa \mid aa$
I. $((2^n$ *3)-4); n > 1
b. $S \to aaSaa \mid aa$
II. $2^n$; n>=1
 
c. $S \to aaaSaaa \mid aa$
III. ((4*$2^n$)-6);n>=1

d. $S \to aaaaSaaaa \mid aa$

IV. $2^n$ - 2; n>= 2

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

For $S \to aSa \mid aa$:

It generates strings:

$aa, aaaa, aaaaaa, \ldots$

So, length pattern is:

$2n$

Therefore,

a → II

For $S \to aaSaa \mid aa$:

It generates strings by adding two $a$'s on both sides.

So, it matches the given form IV.

Therefore,

b → IV

For $S \to aaaSaaa \mid aa$:

It generates lengths:

$2,8,14,20,\ldots$

This is:

$6n-4$

or

$((2n*3)-4)$

Therefore,

c → I

For $S \to aaaaSaaaa \mid aa$:

It generates lengths:

$2,10,18,26,\ldots$

This is:

$8n-6$

or

$((4*2n)-6)$

Therefore,

d → III

Correct matching:

a-II, b-IV, c-I, d-III


UGC NET Computer Science PYQ
Suppose you have a Linux file system where the block size is $2K$ bytes, a disk address is $32$ bits, and an i-node contains the disk addresses of the first $12$ direct blocks of file, a single indirect block, and a double indirect block. Approximately, what is the largest file that can be represented by an i-node?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Block size $=2K=2048$ bytes

Disk address size $=32$ bits $=4$ bytes

Number of addresses in one block:

$\frac{2048}{4}=512$

Direct blocks $=12$

Single indirect blocks $=512$

Double indirect blocks:

$512\times512=262144$

Total data blocks:

$12+512+262144=262668$

Total file size:

$262668\times2048=537944064$ bytes

In MB:

$\frac{537944064}{1024\times1024}\approx513$ MB

UGC NET Computer Science PYQ

Match List-I with List-II:

 List-I (Line coding scheme)

 List-II (Bandwidth – average)

 A. NRZ-L
 I. B = N/4
 B. 2B1Q
 II. B = N/8
 C. 4D-PAM5
 III. B = N/3
 D. MLT-3

 IV. B = N/2






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

NRZ-L → bandwidth = N/2 → IV

2B1Q → bandwidth = N/4 → I

4D-PAM5 → bandwidth = N/8 → II

MLT-3 → bandwidth ≈ N/3 → III


Thus matching:


A → IV

B → I

C → II

D → III


UGC NET Computer Science PYQ
Consider the following statements

A. C-Fuzzy means clustering is a supervised method of learning

B. PCA is used for dimension reduction

C. Apriori is not a supervised technique

D. When a machine learning model becomes so specially tuned to its exact input data that it fails to generalize to other similar data it is called underfitting

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is false because fuzzy C-means clustering is an unsupervised learning method.


B is true because PCA is used for dimensionality reduction.


C is true because Apriori is an unsupervised association rule mining technique.

D is false because this condition is called overfitting, not underfitting.


UGC NET Computer Science PYQ

Match List I with List II

 List-I

 List-II

a. CDMA
I. It provides mobile internet connection with faster data transfer rates
b. GSM
II. It allows users to connect to a network or to other devices over wireless channel
 
c. UMTS
III. Accessing mechanism for multiple transmitters over a single channel

d. WiFi

IV. It is cellular technology employs hybrid of FDMA and TDMA

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

CDMA means Code Division Multiple Access. It is an accessing mechanism for multiple transmitters over a single channel.

So,

a → III

GSM uses a hybrid of FDMA and TDMA.

So,

b → IV

UMTS is a mobile communication technology that provides faster mobile internet data transfer rates.

So,

c → I

WiFi allows users to connect to a network or to other devices over a wireless channel.

So,

d → II

Correct matching:

a-III, b-IV, c-I, d-II


UGC NET Computer Science PYQ
Consider a single-level page table system, with the page table stored in the memory. If the hit rate to TLB is $80\%$, and it takes $15$ nanoseconds to search the TLB, and $150$ nanoseconds to access the main memory, then what is the effective memory access time, in nanoseconds?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution


TLB hit time:

$15+150=165$ ns

TLB miss time:

$15+150+150=315$ ns

Hit ratio $=0.8$, miss ratio $=0.2$

Effective memory access time:

$0.8(165)+0.2(315)$

$=132+63=195$ ns

UGC NET Computer Science PYQ

The instructions

ADD R₁, A, B
ADD R₂, C, D
MUL X, R₁, R₂

evaluate the expression $X = (A + B)(C + D)$ in which of the following?







Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

A 3-address instruction has the form:


Result = Operand1 op Operand2


Example:


ADD R₁, A, B → R₁ = A + B

ADD R₂, C, D → R₂ = C + D

MUL X, R₁, R₂ → X = R₁ × R₂


Each instruction uses three addresses (two operands and one result).


UGC NET Computer Science PYQ
Let N denote the set of all natural numbers and R be the relation on N X N defined by (a, b) R(c, d), if ad(b + c) = bc(a + d). Then R is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

$ad(b+c)=bc(a+d)$


Dividing both sides by $abcd$,


$\frac{b+c}{bc}=\frac{a+d}{ad}$


$\frac{1}{b}+\frac{1}{c}=\frac{1}{a}+\frac{1}{d}$


Rearranging,


$\frac{1}{a}-\frac{1}{b}=\frac{1}{c}-\frac{1}{d}$


So, relation R is based on equality of the same expression.


Therefore, R is reflexive, symmetric and transitive.


UGC NET Computer Science PYQ

Match List I with List II

 List-I

 List-II

a. Text planning
I. Natural language understanding
b. Sentence planning

II. Natural language generation

 
c. Sentence generation

d. Map the input to useful representations


Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Text planning is a part of Natural Language Generation.

So,

a → II

Sentence planning is also a part of Natural Language Generation.

So,

b → II

Sentence generation is also a part of Natural Language Generation.

So,

c → II

Mapping the input to useful representations is a part of Natural Language Understanding.

So,

d → I

Correct matching:

a-II, b-II, c-II, d-I


UGC NET Computer Science PYQ
Which of the following UML diagrams has a static view?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution


Static view shows the fixed structure or high-level view of the system.

Use-Case diagram represents actors and use-cases of the system.

Collaboration, state chart and activity diagrams mainly show dynamic behavior.

Therefore, Use-Case diagram has a static view.

UGC NET Computer Science PYQ

For the fuzzy sets

$A = {(x_1,0.3), (x_2,0.7), (x_3,0.4)}$ and

$B = {(x_1,0.5), (x_2,0.2), (x_3,0.5)}$, the $A \cap B$ would be:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

For fuzzy sets, the intersection operation is defined as:

$\mu_{A \cap B}(x) = \min(\mu_A(x), \mu_B(x))$

Now compute for each element:

$x_1$ : $\min(0.3, 0.5) = 0.3$
$x_2$ : $\min(0.7, 0.2) = 0.2$
$x_3$ : $\min(0.4, 0.5) = 0.4$

Thus,

$A \cap B = {(x_1,0.3),(x_2,0.2),(x_3,0.4)}$


UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: A process involves a library function to create a thread.

Reason R: The threads make system calls to convey their resource and I/O requirement to the Kernel.

In the light of the above statements, choose the correct answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Assertion A is true because threads are generally created using library functions such as pthread_create().


Reason R is also true because threads can make system calls for resource and I/O requirements.


But Reason R does not correctly explain Assertion A.


UGC NET Computer Science PYQ

Consider the statements:

I. There does not exist a polynomial time algorithm to solve integer linear programming problems.
II. Main focus of PERT is 'minimizing time'.

Choose the correct option about statements I and II.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

Statement I:

Integer Linear Programming is a hard problem because variables are restricted to integer values.

General Integer Linear Programming is considered NP-hard.

So, it is not solved by a general polynomial time algorithm.

Therefore, statement I is true.

Statement II:

PERT stands for Program Evaluation and Review Technique.

PERT is mainly used for project scheduling when activity times are uncertain.

Its main focus is time estimation and completing the project in minimum possible time.

Therefore, statement II is true.

So,

I is True and II is True.


UGC NET Computer Science PYQ
Modifying the software by restructuring is called





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Restructuring means improving the internal structure of software without changing its external behavior.

It is done to prevent future problems and improve maintainability.

So, it comes under preventive maintenance.

UGC NET Computer Science PYQ

Which of the following genetic algorithm operation is computationally most expensive?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In Genetic Algorithms, the most computationally expensive part is usually reproduction, which involves:


• crossover

• mutation

• generating new offspring

• evaluating fitness for the next generation


These steps are repeated many times and require significant computation.


UGC NET Computer Science PYQ
Let R (A, B, C, D) be a relational schema with following functional dependencies:

$A \to B,\ B \to C$

$C \to D$ and $D \to B$

The decomposition of R into

$(A, B)\ (B, C)\ (B, D)$





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

From the given FDs:

$B \to C$ and $C \to D \Rightarrow B \to D$

So, in relation $(B, D)$, $B$ is a key.

Also, projected dependencies preserve:

$A \to B,\ B \to C,\ D \to B,\ B \to D$

And from

$C \to B$ (via $C \to D$ and $D \to B$), and $B \to D$

we get

$C \to D$

So, decomposition is dependency preserving.

It is also lossless.

UGC NET Computer Science PYQ

The correct sequence in the fetch-execute cycle is ______.

I. Decode
II. Fetch
III. Execute

Choose the correct answer from the following:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In the instruction cycle, the CPU first fetches the instruction from memory.

After fetching, it decodes the instruction.

After decoding, it executes the instruction.

So, correct order is:

Fetch → Decode → Execute

That is:

II-I-III


UGC NET Computer Science PYQ
A company has a choice of two languages $L_1$ and $L_2$ to develop a software for their client. Number of LOC required to develop an application in $L_2$ is thrice the LOC in language $L_1$. Also, software has to be maintained for next $10$ years. Various parameters for two languages are given below to decide which language should be preferred for development.
PARAMETER$L_1$$L_2$
Man-year needed for developmentLOC/1000LOC/1000
Development costRs. 70,000Rs. 90,000
Cost of Maintenance per yearRs. 1,00,000Rs. 40,000
Total cost of project includes cost of development and maintenance. What is the LOC for $L_1$ for which cost of developing the software with both languages must be same?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Let LOC for $L_1=x$

Then LOC for $L_2=3x$

For $L_1$:

Development cost $=\frac{x}{1000}\times70000=70x$

Maintenance cost for $10$ years:

$10\times100000=1000000$

Total cost for $L_1$:

$70x+1000000$

For $L_2$:

Development cost $=\frac{3x}{1000}\times90000=270x$

Maintenance cost for $10$ years:

$10\times40000=400000$

Total cost for $L_2$:

$270x+400000$

Now both costs are same:

$70x+1000000=270x+400000$

$600000=200x$

$x=3000$

UGC NET Computer Science PYQ

Multiple Inheritance is permitted directly in:


A. C++

B. Java

C. Python

D. VB.NET

E. BASIC






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

C++ → supports multiple inheritance directly ✔

• Java → does not support multiple inheritance with classes (only interfaces) ✘

• Python → supports multiple inheritance ✔

• VB.NET → supports multiple inheritance through interfaces only ✘

• BASIC → does not support multiple inheritance ✘


Thus the languages that directly support multiple inheritance are:


C++ and Python


UGC NET Computer Science PYQ
Consider the following table of arrival time and burst time for three processes P0, P1, P2:

Process arrival time Burst time

 Processarrival time Burst time 
 P00 ms  7 
P1 1 ms 3 
P2 2ms 7 
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Scheduling order:

$0$ to $1$: $P0$

At $t=1$, $P1$ arrives, so it preempts $P0$

$1$ to $4$: $P1$ completes

Now remaining:

$P0 = 6,\ P2 = 7$

So,

$4$ to $10$: $P0$ completes

$10$ to $17$: $P2$ completes

Waiting times:

For $P0$:

$10 - 0 - 7 = 3$

For $P1$:

$4 - 1 - 3 = 0$

For $P2$:

$17 - 2 - 7 = 8$

Average waiting time:

$\frac{3+0+8}{3} = \frac{11}{3} = 3.67\ \text{ms}$

UGC NET Computer Science PYQ

In what sequence the initialization, testing and execution of body is done while using do-while loop?

I. Commenting
II. Execution of the body
III. Initialisation
IV. Testing the condition

Choose the correct answer from the following:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In a do-while loop, initialization is done first.

Then the loop body executes at least once.

After executing the body, the condition is tested.

So, correct order is:

Initialisation → Execution of the body → Testing the condition

That is:

III, II, IV


UGC NET Computer Science PYQ
A Software project was estimated at 864 Function Points. A six person team will be assigned to project consisting of a requirement gathering person, one designer, two programmers and two testers. The salary of the designer is ₹70,000 per month, requirement gatherer is ₹50,000 per month, programmer is ₹60,000 per month and a tester is ₹60,000 per month. Average productivity for the team is 12 FP per person month. Which of the following represents the projected cost of the project?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Total effort required:

$Effort=\frac{864}{12}=72$ person-months

Team size $=6$

Project duration:

$\frac{72}{6}=12$ months

Monthly team cost:

$50000+70000+2(60000)+2(60000)$

$=50000+70000+120000+120000=360000$

Total project cost:

$360000\times12=4320000$

So, projected cost is ₹43,20,000.

UGC NET Computer Science PYQ

The I/O methods in which memory addresses and I/O addresses are distinct is called:


A. Isolated I/O

B. Memory-Mapped I/O

C. Strobe Control

D. Handshaking

E. Interrupt






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Isolated I/O (Port-mapped I/O) → Memory and I/O address spaces are separate.

• Memory-Mapped I/O → I/O devices share the same address space as memory.


The question asks where memory and I/O addresses are distinct, which corresponds to Isolated I/O.

Among the given combinations, the most appropriate option containing this concept is A.


UGC NET Computer Science PYQ
Which of the following scenario may lead to an irrecoverable error in a database system?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

An irrecoverable state occurs when a transaction reads a value written by an uncommitted transaction.

This is called a dirty read.

If the writer transaction aborts later, recovery becomes difficult.

UGC NET Computer Science PYQ

I. Find recursively all its density-connected points and assign them to the same cluster as the core point.
II. Find all the neighbor points with EPS and identify the core points with more than MinPts neighbors.
III. Iterate through the remaining unvisited points in the dataset.
IV. For each core point if it is not already assigned to a cluster, create a new cluster.

Choose the correct answer from the following:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

In DBSCAN, first we find neighbors within EPS and identify core points.

Then for each unassigned core point, a new cluster is created.

After that, all density-connected points are recursively added to the same cluster.

Finally, the algorithm continues with the remaining unvisited points.

So, correct order is:

II → IV → I → III


UGC NET Computer Science PYQ
A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41, and I = 10, what is the value of n?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

For a complete n-ary tree:

$L=(n-1)I+1$

Given:

$L=41,\ I=10$

So,

$41=(n-1)10+1$

$40=10(n-1)$

$n-1=4$

$n=5$

UGC NET Computer Science PYQ

Which of the following is the function of the semantic analysis phase of compilation process?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Compiler phases:


Lexical analysis → Tokenization


Syntax analysis → Parsing


Semantic analysis → Type checking, type conversion, scope checking


Optimization → Loop optimization, data flow analysis


Thus type conversion belongs to semantic analysis.


UGC NET Computer Science PYQ
Given below are two statements:

Which of the following statement/s is/are correct with respect to virtual memory

Statement I: Address translation is performed for every logical address used during the execution of a program

Statement II: A program can execute only when all of its components are loaded in the memory

In the light of the above statements, choose the most appropriate answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Statement I is correct because every logical address is translated into a physical address during execution.

Statement II is incorrect because in virtual memory, all parts of a program need not be loaded into memory at the same time.

UGC NET Computer Science PYQ

Select the correct order of events after power is initialized on a system.

I. Bootstrap loader is loaded from the disk
II. Kernel is loaded onto the memory
III. Firmware ROM loads boot block

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Dec 2022 Shift II (Paper II) PYQ

Solution

After power is initialized, the system starts the booting process.

First, the firmware present in ROM starts execution.

So, first step is:

III. Firmware ROM loads boot block

Then the bootstrap loader is loaded from the disk.

So, second step is:

I. Bootstrap loader is loaded from the disk

After that, the bootstrap loader loads the kernel into memory.

So, third step is:

II. Kernel is loaded onto the memory

Correct order is:

III, I, II


UGC NET Computer Science PYQ
In a binary max heap containing n numbers, the smallest element can be found in ____ time.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In a max heap, the largest element is at the root.

The smallest element must be among the leaf nodes.

There are approximately $\frac{n}{2}$ leaf nodes.

To find the smallest element, we may need to scan all leaf nodes.

So, time complexity is $O(n)$.

UGC NET Computer Science PYQ

IP is responsible for ______ communication while TCP is responsible for ______ communication.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

In the TCP/IP model:


• IP (Internet Protocol) provides host-to-host communication between devices.

• TCP (Transmission Control Protocol) provides process-to-process communication using port numbers.


UGC NET Computer Science PYQ
Which phase of compiler checks the grammar of programming?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Grammar of a programming language is checked during syntax analysis.

It is also called parsing.

UGC NET Computer Science PYQ
If algorithm A and another algorithm B take $\log_2(n)$ and $\sqrt n$ microseconds, respectively, to solve a problem, then the largest size n of a problem these algorithms can solve, respectively, in one second are ____ and _____.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

One second $=10^6$ microseconds.

For algorithm A:

$\log_2 n \le 10^6$

$n \le 2^{10^6}$

For algorithm B:

$\sqrt n \le 10^6$

$n \le (10^6)^2=10^{12}$

So, the largest sizes are $2^{10^6}$ and $10^{12}$.

UGC NET Computer Science PYQ

The Boolean expression for the following would be:


$F(A,B,C) = \Sigma(0,2,6)$

$d(A,B,C) = \Sigma(1,3,5)$






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Minterms:


$0 = 000$

$2 = 010$

$6 = 110$


Don't care terms:


$1 = 001$

$3 = 011$

$5 = 101$


Using K-map simplification:


Group $(0,2)$ → $A'C'$

Group $(2,6)$ → $BC'$


Thus,


$F = A'C' + BC'$


Factorizing:


$F = C'(A' + B)$


Which simplifies to:


$F = A' + BC'$


UGC NET Computer Science PYQ
Let $G = \frac{R}{{0}}$ and $H = {-1, 1}$ be groups under the multiplication. Then, the map $\phi : G \to H$ defined by $\phi(x) = \frac{x}{|x|}$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

$\phi(x) = \frac{x}{|x|}$ gives the sign of $x$.

If $x > 0$, then $\phi(x) = 1$

If $x < 0$, then $\phi(x) = -1$

Also,

$\phi(xy) = \phi(x)\phi(y)$

So, it is a homomorphism.

It is onto because both $1$ and $-1$ are obtained.

It is not one-one because many positive numbers map to $1$, and many negative numbers map to $-1$.

UGC NET Computer Science PYQ
Let G be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex i to a vertex j if and only if either j = i + 1 or j = 3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is _____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

We need shortest path from 1 to 100 using operations:

$i \to i+1$ or $i \to 3i$

A shortest path is:

$1 \to 3 \to 9 \to 10 \to 11 \to 33 \to 99 \to 100$

Number of edges $=7$

UGC NET Computer Science PYQ

A computer system with cache access time of 100 ns, a main memory access time of 1100 ns, and a hit ratio of 0.9. The average access time would be:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Average Memory Access Time:


$AMAT = Hit\ Time + Miss\ Rate \times Miss\ Penalty$


Hit time = 100 ns

Miss rate = $1 - 0.9 = 0.1$


Miss penalty = $1100 - 100 = 1000$


So,


$AMAT = 100 + 0.1 \times 1000$


$AMAT = 100 + 100 = 200\ ns$


UGC NET Computer Science PYQ
Which of the following parser is most powerful parser?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Canonical LR parser is more powerful than SLR, LALR and operator precedence parser.

UGC NET Computer Science PYQ
Consider $L=L_1\cap L_2$ where

$L_1=\{0^m1^m20^n1^n\mid m,n\ge 0\}$

$L_2=\{0^m1^n2^k\mid m,n,k\ge 0\}$

Then, the language $L$ is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In $L_1$, after symbol $2$, we have $0^n1^n$.

But in $L_2$, after symbol $2$, no $0$ or $1$ can appear.

So, for intersection, $n=0$ in $L_1$.

Thus,

$L=\{0^m1^m2\mid m\ge0\}$

This language is context free but not regular.

UGC NET Computer Science PYQ

Services provided by point-to-point protocol (PPP):


A. frame format

B. establishment of the link

C. flow control

D. sequence numbering

E. authentication






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

PPP provides:


• Frame format

• Link establishment (LCP)

• Authentication (PAP, CHAP)


PPP does not provide flow control or sequence numbering.


Thus:


A → Yes

B → Yes

E → Yes


UGC NET Computer Science PYQ
Which of the following statement is correct?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

Ackermann's function is not primitive recursive.

$L = {a^n b^k c^{n+k}}$ is not regular.

$L = {a^n b^j : n = j^2}$ is not context free because it has a square relation between powers.

For context sensitive language, there exists an LBA such that $L = L(M)$, not $L \ne L(M)$.

UGC NET Computer Science PYQ
Let $L_1$ and $L_2$ be languages over $\Sigma=\{a,b\}$ represented by the regular expressions $(a^*+b)^*$ and $(a+b)^*$ respectively. Which of the following is true with respect to the two languages?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

$(a+b)^*$ generates all strings over $\{a,b\}$.

Now, $(a^*+b)^*$ also generates all strings over $\{a,b\}$ because $a^*$ can generate any number of $a$'s and $b$ is also available.

So,

$L_1=L_2=\{a,b\}^*$

UGC NET Computer Science PYQ

In Windows scheduling, which of the following option is correct?






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Windows uses 32 priority levels:


• 0–15 → Non-real-time (variable priorities)

• 16–31 → Real-time priorities


Thus number of non-real-time priorities = 16.


UGC NET Computer Science PYQ
Match List I with List II
 LIST I

 LIST II

 A. RAID level 2

 I. Bit interleaved parity

 B. RAID level 4

 II. Block interleaved distributed parity

 C. RAID level 5

 III. Error correcting parity

 D. RAID level 3

 IV. Block interleaved parity

Choose the correct answer from the options given below:






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

RAID level 2 uses error correcting parity.

RAID level 4 uses block interleaved parity.

RAID level 5 uses block interleaved distributed parity.

RAID level 3 uses bit interleaved parity.

So,

A – III, B – IV, C – II, D – I

UGC NET Computer Science PYQ
Which of the following statements is true?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Context free languages are closed under union.

So, statement (a) is true.

CFLs are not closed under intersection and complement in general.

Also, every CFL is not accepted by a deterministic PDA.

Therefore, only statement (a) is true.

UGC NET Computer Science PYQ

Which of the following is/are true in case of tree locking?


A. It ensures shorter waiting times.

B. It ensures freedom from deadlock.

C. Transaction can lock data items earlier.

D. It does not ensure greater amount of concurrency.






Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Tree locking protocol (graph-based protocol) rules:


• The first lock may be on any node.

• A transaction may lock a node only if it already holds a lock on the parent.

• Nodes may be unlocked anytime but cannot be relocked.


Properties:


• Deadlock cannot occur because locking follows a hierarchical order.

• Transactions can lock data items earlier since unlocking can happen anytime.


Thus:


B → True

C → True


UGC NET Computer Science PYQ
Consider the following statements.

A. The identity is unique in any monoid.

B. A monoid is a group if there exists inverse of each element of monoid.

C. Semi group has closure, associative and identity properties.

D. Quasi group has closure property.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is correct because identity element is always unique in a monoid.

B is correct because a monoid becomes a group if every element has an inverse.

C is incorrect because a semigroup has closure and associative property, but identity is not necessary.

D is correct because a quasigroup has closure property.

UGC NET Computer Science PYQ
Which of the following is not an intermediate code form?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Syntax tree, three address code and postfix notation are standard intermediate code forms.

Quadruple is mainly a representation method of three address code, not a separate intermediate code form.

UGC NET Computer Science PYQ
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: It is possible to create doubly linked list using only one pointer with every node.

Reason R: By storing the XOR of the addresses of the previous and next nodes.

In the light of the above statements, choose the most appropriate answer from the options given below.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A doubly linked list can be implemented using only one pointer field by storing XOR of previous and next node addresses.

This is called XOR linked list.

So, Assertion A is true and Reason R correctly explains A.

UGC NET Computer Science PYQ
Consider a code with only four valid code words:

$0000000000,\ 0000011111,\ 1111100000,\ 1111111111$

This code has distance $5$. If the code word arrived is $0000000111$, then the original code word must be _____





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

Find Hamming distance from received word $0000000111$.

Distance from $0000011111$ is $2$.

Distance from $0000000000$ is $3$.

Distance from $1111100000$ is $8$.

Distance from $1111111111$ is $7$.

Minimum distance is with $0000011111$.

Hence, the original code word must be $0000011111$.

UGC NET Computer Science PYQ
A least integer $n$ such that $f(x)$ is $O(x^n)$ for each of the following functions. Arrange according to the value of $n$ in increasing order.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Find dominant growth for each.


A:

$3x^3+(\log x)^4$

Dominant term = $x^3$


$n=3$


B:

$(x^5+x^2+1)/(x^3+1) \approx x^2$


$n=2$


C:

$(x^3+x^2+1)/(x^2+1) \approx x$


$n=1$


D:

$(x^2+5\log x)/(x^2+1) \approx 1$


$n=0$


Thus:


D → $O(1)$

C → $O(x)$

B → $O(x^2)$

A → $O(x^3)$


Increasing order:


D, C, B, A


UGC NET Computer Science PYQ
Consider the following statements:

A. Dynamic metrics are collected by measurements made of a program in execution

B. Static metrics are collected by measurements made of representations of the system

C. The assessment of software quality is an objective process

D. An important part of quality assurance in the selection of standards that should apply to the software development process.

Choose the correct answer from the options given below:





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

A is correct because dynamic metrics are measured during program execution.

B is correct because static metrics are measured from system representations like code, design, or documents.

C is incorrect because software quality assessment is not fully objective. It also depends on quality factors and requirements.

D is correct because choosing suitable standards is an important part of quality assurance.

UGC NET Computer Science PYQ
 Using RSA public key cryptosystem, if $p=3,\ q=11$ and $d=7$, find the value of $e$ and encrypt the number $19$.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

$n=pq=3\times11=33$

$\phi(n)=(p-1)(q-1)=2\times10=20$

Now,

$d\times e\equiv1\pmod{\phi(n)}$

$7e\equiv1\pmod{20}$

$e=3$, because $7\times3=21\equiv1\pmod{20}$

Now encrypt $M=19$:

$C=M^e\mod n$

$C=19^3\mod33$

$19^2=361\equiv31\pmod{33}$

$19^3=31\times19=589\equiv28\pmod{33}$

So, $e=3$ and encrypted value $=28$.

UGC NET Computer Science PYQ
The language of the following PDA would be: $\delta(q_0,a,z_0)=(q_0,aaaz_0)$ $\delta(q_0,a,a)=(q_0,aaa)$ $\delta(q_0,b,a)=(q_1,\lambda)$ $\delta(q_1,b,a)=(q_1,\lambda)$ $\delta(q_1,\epsilon,z_0)=(q_f,z_0)$ where $q_f$ is a final state.





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2024 (Paper II) PYQ

Solution

Each time an a is read:


$a \rightarrow$ push 3 a's onto the stack.


Each b pops one a from the stack.


Thus:


1 input a produces 3 stack symbols, so we need 3 b's to remove them.


Therefore the relation is:


$b = 3a$


Language:


${a^n b^{3n} \mid n>0}$


UGC NET Computer Science PYQ
Consider the following language: $L = {w \in {a,b,c}^* : na(w) + nb(w) = nc(w)}$ L is





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2023 (Paper II) PYQ

Solution

The language contains strings where the number of $c$ symbols is equal to the total number of $a$ and $b$ symbols.

This counting condition can be handled by a context-free grammar, so it is context free.

But it is not linear because arbitrary balanced counting with mixed order needs more than linear grammar power.

UGC NET Computer Science PYQ
Protocols in which the sender sends one frame and then waits for an acknowledgement before proceeding for next frame are called as ______





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science Nov 2020 (Paper II) PYQ

Solution

In stop and wait protocol, sender sends one frame and waits for acknowledgement.

After receiving acknowledgement, it sends the next frame.


UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Limited Seats
× Aspire MCA Promotion

Game Changer NIMCET Test Series 2026

Boost your preparation with mock tests, analysis and rank-focused practice.

JOIN NOW
Ask Your Question or Put Your Review.

loading...