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 2021 PYQ


UGC NET Computer Science PYQ 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
 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 2021
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 2021
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 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
 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 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
. 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 2021
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 2021
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 2021
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 2021
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 2021
 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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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 2021
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


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