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


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