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


UGC NET Computer Science PYQ 2019

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

Which of the following is correct for the given poset?






Go to Discussion

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

Solution

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

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

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

So, least element does not exist.

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

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

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

So, greatest element does not exist.

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


UGC NET Computer Science PYQ 2019

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






Go to Discussion

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

Solution

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

Then,

$x_1+x_2+x_3+x_4=8$

Here, balls are indistinguishable and bins are distinguishable.

So, the number of non-negative integral solutions is

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

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

So,

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

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

$=165$


UGC NET Computer Science PYQ 2019

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






Go to Discussion

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

Solution

Total length of bit string is $10$.

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

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

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

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

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

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

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

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

Remaining $7$ bits are free.

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

Therefore,

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

$=512+256-128$

$=640$


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





Go to Discussion

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

Solution

Given,

$V=6$

Each vertex has degree $4$.

So, sum of degrees is

$6 \times 4=24$

By handshaking theorem,

$2E=24$

$E=12$

For a connected planar graph, Euler’s formula is

$V-E+R=2$

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

$6-12+R=2$

$R=8$


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





Go to Discussion

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

Solution

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

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

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

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

Therefore,

$m=n$

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

So,

$m,n \ge 2$

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

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


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





Go to Discussion

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

Solution

Given statement is

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

We know that

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

So,

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

Now truth table se false cases:

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

$p \vee q$

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

$\neg p \vee q$

Therefore, PCNF is

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

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


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





Go to Discussion

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

Solution

A standard deck has

$13$ hearts

and

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

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

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

Then, we may select only $2$ hearts.

So, cards selected without guaranteeing $3$ hearts:

$39+2=41$

Now, the next card must be a heart.

So, required number of cards is

$41+1=42$


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





Go to Discussion

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

Solution

First,

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

So,

$(a) \rightarrow (iv)$

Now,

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

So,

$(b) \rightarrow (iii)$

Now,

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

Therefore,

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

Using De Morgan’s law,

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

$=p \wedge q$

So,

$(c) \rightarrow (i)$

Now,

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

Using De Morgan’s law,

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

So,

$(d) \rightarrow (ii)$

Therefore, the correct matching is

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


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





Go to Discussion

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

Solution

Given matrix is

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

From the matrix, the relation contains:

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

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

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

So, the transitive closure matrix is

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

Hence, the correct answer is Option 1.


UGC NET Computer Science PYQ 2019

Consider an LPP given as:

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

subject to the constraints:

$2x_1+x_2\le 10$

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

$x_1+2x_3\le 5$

$x_1,x_2,x_3\ge 0$

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






Go to Discussion

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

Solution

Given objective function is

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

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

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

From the constraints:

$2x_1+x_2\le 10$

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

$x_1+2x_3\le 5$

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

So,

$2x_3=5$

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

At the first iteration,

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

Now,

$Z=2x_1-x_2+2x_3$

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

$Z=5$


UGC NET Computer Science PYQ 2019

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






Go to Discussion

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

Solution

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

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

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


UGC NET Computer Science PYQ 2019
Suppose that the register $A$ and the register $K$ have the bit configuration. Only the three leftmost bits of $A$ are compared with memory words because $K$ has $1$'s in these positions. Because of its organization, this type of memory is uniquely suited to parallel searches by data association. This type of memory is known as:





Go to Discussion

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

Solution

Content addressable memory is also called associative memory.

In this memory, data is searched by content instead of address.

Register $A$ contains the bit pattern and register $K$ decides which bits are to be compared.

Since this memory supports parallel searching by data association, it is called content addressable memory.


UGC NET Computer Science PYQ 2019

How many different Boolean functions of degree $n$ are there?






Go to Discussion

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

Solution

For a Boolean function of $n$ variables, the number of possible input combinations is

$2^n$

For each input combination, the output can be either $0$ or $1$.

So, total number of Boolean functions is

$2^{2^n}$


UGC NET Computer Science PYQ 2019

The fault can be easily diagnosed in the micro-program control unit using diagnostic tools by maintaining the contents of:






Go to Discussion

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

Solution

In a micro-program control unit, diagnostic tools help in detecting faults by observing and maintaining important internal states.

These internal states include flags, registers and counters.

Flags store status information, registers store intermediate data and counters help in tracking sequence or control steps.

Therefore, fault diagnosis becomes easier by maintaining the contents of flags, registers and counters.


UGC NET Computer Science PYQ 2019
What will be the number of states when a $MOD-2$ counter is followed by a $MOD-5$ counter?





Go to Discussion

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

Solution

When one counter is followed by another counter, the total number of states is the product of their mod values.

Here,

First counter is $MOD-2$

Second counter is $MOD-5$

So, total number of states is

$2 \times 5=10$


UGC NET Computer Science PYQ 2019
For a magnetic disk with concentric circular tracks, the seek latency is not linearly proportional to the seek distance due to:





Go to Discussion

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

Solution

Seek latency is the time taken by the disk arm to move the read/write head to the required track.

The arm does not move with uniform speed throughout the seek operation.

It takes time to start moving and also takes time to stop at the required track due to inertia.

Because of this starting and stopping inertia, seek latency is not linearly proportional to the seek distance.


UGC NET Computer Science PYQ 2019
The parallel bus arbitration technique uses an external priority encoder and a decoder. Suppose, a parallel arbiter has $5$ bus arbiters. What will be the size of the priority encoder and decoder respectively?





Go to Discussion

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

Solution

For $5$ bus arbiters, we need at least $3$ bits because

$2^2=4<5$

and

$2^3=8\ge 5$

So, the priority encoder must handle $8$ inputs and produce $3$ outputs.

Thus, priority encoder size is

$8 \times 3$

The decoder will take $3$ inputs and produce $8$ outputs.

Thus, decoder size is

$3 \times 8$


UGC NET Computer Science PYQ 2019
Consider the equation$(146)_b+(313)_{b-2}=(246)_8$. Which of the following is the value of $b$?





Go to Discussion

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

Solution

Given equation is

$(146)b+(313){b-2}=(246)_8$

Now,

$(146)_b=1\cdot b^2+4\cdot b+6$

$=b^2+4b+6$

Also,

$(313)_{b-2}=3(b-2)^2+1(b-2)+3$

$=3(b^2-4b+4)+b-2+3$

$=3b^2-12b+12+b+1$

$=3b^2-11b+13$

Now,

$(246)_8=2\cdot 8^2+4\cdot 8+6$

$=128+32+6$

$=166$

So,

$b^2+4b+6+3b^2-11b+13=166$

$4b^2-7b+19=166$

$4b^2-7b-147=0$

Now factorizing,

$4b^2-28b+21b-147=0$

$4b(b-7)+21(b-7)=0$

$(b-7)(4b+21)=0$

So,

$b=7$


UGC NET Computer Science PYQ 2019

How many address lines and data lines are required to provide a memory capacity of $16K \times 16$?






Go to Discussion

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

Solution

Memory capacity is

$16K \times 16$

Here, $16K$ means number of memory locations.

$16K=16 \times 1024$

$=2^4 \times 2^{10}$

$=2^{14}$

So, number of address lines required is

$14$

Each memory location stores $16$ bits.

So, number of data lines required is

$16$

Therefore, address lines and data lines are

$14,\ 16$


UGC NET Computer Science PYQ 2019
Suppose that a computer program takes $100$ seconds of execution time on a computer with multiplication operation responsible for $80$ seconds of this time. How much do you have to improve the speed of multiplication operation if you are asked to execute this program four times faster?





Go to Discussion

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

Solution

Total execution time is

$100$ seconds

Time taken by multiplication operation is

$80$ seconds

Time taken by other operations is

$100-80=20$ seconds

Now, the program is required to run $4$ times faster.

So, new execution time should be

$\dfrac{100}{4}=25$ seconds

Other operations still take

$20$ seconds

So, time left for multiplication operation is

$25-20=5$ seconds

Originally multiplication operation takes

$80$ seconds

Now it should take

$5$ seconds

So, required improvement in multiplication speed is

$\dfrac{80}{5}=16$

Hence, multiplication operation must be improved by $16$ times.


UGC NET Computer Science PYQ 2019

Consider the following pseudo-code fragment in which an invariant for the loop is $m \times x^k=p^n$ and $k\ge 0$.

Pre-conditions: $p\ge 1$ and $n\ge 0$

Assume that overflow never occurs.

int x = p;
int k = n;
int m = 1;

while (k != 0) {
if (k is odd) then m = m * x;
x = x * x;
k = floor(k / 2);
}

Which of the following must be true at the end of the while loop?






Go to Discussion

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

Solution

Given loop invariant is

$m \times x^k=p^n$

At the end of the while loop, condition becomes false.

So,

$k=0$

Putting $k=0$ in invariant,

$m \times x^0=p^n$

Since,

$x^0=1$

Therefore,

$m=p^n$


UGC NET Computer Science PYQ 2019

Consider the following C-code fragment running on a $32$-bit x86 machine:

typedef struct {
union {
unsigned char a;
unsigned short b;
} U;
unsigned char c;
} S;

S B[10];
S *p = address of B[4];
S *q = address of B[5];

p->U.b = 0x1234;

If $M$ is the value of $q-p$ and $N$ is the value of address of $(p->c)$ minus address of $p$, then $(M,N)$ is:






Go to Discussion

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

Solution

Given that structure $S$ takes $32$ bits.

So,

$32\text{ bits}=4\text{ bytes}$

Now,

$p$ points to $B[4]$

$q$ points to $B[5]$

Since $p$ and $q$ are pointers of type $S$, pointer subtraction gives the difference in number of structures.

So,

$q-p=1$

Therefore,

$M=1$

Now, union $U$ contains $unsigned\ char\ a$ and $unsigned\ short\ b$.

Size of union $U$ is $2$ bytes.

After union $U$, variable $c$ is stored.

So, offset of $c$ from the beginning of structure is $2$ bytes.

Therefore,

$N=2$

Hence,

$(M,N)=(1,2)$


UGC NET Computer Science PYQ 2019

What is the output of the following JAVA program?

public class Good {
private int m;

public Good(int m) {
this.m = m;
}

public Boolean equals(Good n) {
return n.m == m;
}

public static void main(String args[]) {
Good m1 = new Good(22);
Good m2 = new Good(22);
Object s1 = new Good(22);
Object s2 = new Good(22);

System.out.println(m1.equals(m2));
System.out.println(s1.equals(s2));
System.out.println(m1.equals(s2));
System.out.println(s1.equals(m2));
}






Go to Discussion

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

Solution

Here, the class has a method

$equals(Good\ n)$

This method does not override the original $equals(Object)$ method of Java because the parameter type is $Good$, not $Object$.

For Line 1:

$m1.equals(m2)$

Here both are objects of class $Good$, so $equals(Good\ n)$ is called.

Both values are $22$, so output is

$True$

For Line 2:

$s1.equals(s2)$

Here $s1$ and $s2$ are declared as $Object$ type.

So, Java calls $Object$ class $equals()$ method, which compares references.

Since both are different objects, output is

$False$

For Line 3:

$m1.equals(s2)$

Here $s2$ is of type $Object$, so $equals(Good\ n)$ is not called.

It calls $equals(Object)$, so reference comparison is done.

Output is

$False$

For Line 4:

$s1.equals(m2)$

Here $s1$ is of type $Object$, so again $Object$ class $equals()$ method is called.

Output is

$False$

Therefore, output is:

$True,\ False,\ False,\ False$


UGC NET Computer Science PYQ 2019

Consider the following C++ function $f()$:

unsigned int f(unsigned int n) {
unsigned int b = 0;
while (n) {
b = b + (n bitwise AND 1);
n = n shifted right by 1;
}
return b;
}

The function $f()$ returns the integer that represents the $P$ in the binary representation of positive integer $n$, where $P$ is:






Go to Discussion

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

Solution

The expression $n$ bitwise AND $1$ checks the last bit of $n$.

If the last bit is $1$, then $b$ increases by $1$.

After that, $n$ is shifted right by one bit.

So, the loop checks each bit of $n$ one by one.

Therefore, $b$ counts the total number of $1$'s in the binary representation of $n$.


UGC NET Computer Science PYQ 2019

Which of the following statements is/are true?

$P$: In a scripting language like JavaScript, types are typically associated with values, not variables.

$Q$: It is not possible to show images on a web page without the &lt;img&gt; tag of HTML.

Select the correct answer from the options given below:






Go to Discussion

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

Solution

Statement $P$ is true.

JavaScript is dynamically typed. In JavaScript, variables can store values of different types at different times.

So, types are associated with values, not fixed permanently with variables.

Statement $Q$ is false.

Images can also be shown on a web page using CSS background images, SVG, canvas, object tag, embed tag, etc.

So, it is possible to show images without using the &lt;img&gt; tag.

Therefore, only $P$ is true.


UGC NET Computer Science PYQ 2019

Which of the following statements is/are true?

$P$: An XML document with correct syntax as specified by W3C is called "Well Formed".

$Q$: An XML document validated against a DTD is both "Well formed" and "Valid".

$R$: An XML declaration written without the required question-mark based declaration format is syntactically correct for an XML document.

Select the correct answer from the options given below:






Go to Discussion

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

Solution

Statement $P$ is true.

An XML document with correct syntax is called a well-formed XML document.

Statement $Q$ is also true.

If an XML document is validated against a DTD, then it is well formed and valid.

Statement $R$ is false.

An XML declaration must follow the proper XML declaration format. Without the required question-mark based syntax, it is not syntactically correct.

Therefore, only $P$ and $Q$ are true.


UGC NET Computer Science PYQ 2019

Consider a raster system with resolution $640$ by $480$. What size is frame buffer in bytes for this system to store $12$ bits per pixel?






Go to Discussion

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

Solution

Resolution of raster system is

$640 \times 480$

Total number of pixels is

$640 \times 480=307200$

Each pixel requires $12$ bits.

So, total memory required is

$307200 \times 12=3686400$ bits

Convert bits into bytes:

$\dfrac{3686400}{8}=460800$ bytes

Now,

$1\text{ KB}=1024\text{ bytes}$

So,

$\dfrac{460800}{1024}=450\text{ KB}$


UGC NET Computer Science PYQ 2019
Consider the following statements regarding $2D$ transforms in computer graphics:

$S1$: [
1 0
0 -1
]
is a $2 \times 2$ matrix that reflects any $2D$ point about the $X$-axis.

$S2$: A $2 \times 2$ matrix which mirrors any $2D$ point about the $X$-axis, is a rotation matrix.

What can you say about the statements $S1$ and $S2$?





Go to Discussion

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

Solution

Given matrix is

[
1 0
0 -1
]

When this matrix is applied on point $(x,y)$, then the point becomes $(x,-y)$.

This means the sign of $x$ remains same and the sign of $y$ changes.

So, this represents reflection about the $X$-axis.

Therefore, statement $S1$ is true.

But reflection about the $X$-axis is not a rotation matrix.

Therefore, statement $S2$ is false.

Hence, the correct answer is Option 2.


UGC NET Computer Science PYQ 2019

In the context of $3D$ computer graphics, which of the following statements is/are true?

$P$: Orthographic transformations keep parallel lines parallel.

$Q$: Orthographic transformations are affine transformations.

Select the correct answer from the options given below:






Go to Discussion

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

Solution

Orthographic transformation preserves parallelism.

So, parallel lines remain parallel after orthographic projection.

Therefore, statement $P$ is true.

Orthographic transformation is also an affine transformation because it preserves points, lines and parallelism.

Therefore, statement $Q$ is also true.


UGC NET Computer Science PYQ 2019
Using the Phong reflectance model, the strength of the specular highlight is determined by the angle between:





Go to Discussion

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

Solution

In the Phong reflectance model, specular reflection depends on how close the viewer direction is to the reflected light direction.

If the reflected vector and the view vector are close to each other, the specular highlight becomes stronger.

So, the strength of the specular highlight is determined by the angle between the reflected vector and the view vector.


UGC NET Computer Science PYQ 2019

Which of the following has same expressive power with regard to relational query language?

$(a)$ Relational algebra and domain relational calculus

$(b)$ Relational algebra and tuple relational calculus

$(c)$ Relational algebra and domain relational calculus restricted to safe expression

$(d)$ Relational algebra and tuple relational calculus restricted to safe expression






Go to Discussion

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

Solution

Relational algebra has the same expressive power as relational calculus only when relational calculus expressions are restricted to safe expressions.

Safe expressions ensure that the query result is finite and depends only on the database.

So,

Relational algebra is equivalent to domain relational calculus restricted to safe expressions.

Also,

Relational algebra is equivalent to tuple relational calculus restricted to safe expressions.

Therefore, $(c)$ and $(d)$ are correct.


UGC NET Computer Science PYQ 2019

With respect to relational algebra, which of the following operations are included for mathematical set theory?

$(a)$ Join
$(b)$ Intersection
$(c)$ Cartesian product
$(d)$ Project






Go to Discussion

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

Solution

In relational algebra, some operations are based on mathematical set theory.

Intersection is a set operation.

Cartesian product is also a set operation.

Join and project are relational algebra operations, but they are not basic mathematical set theory operations.

So, the operations included for mathematical set theory are:

$(b)$ Intersection

$(c)$ Cartesian product


UGC NET Computer Science PYQ 2019

In relational databases, if relation $R$ is in $BCNF$, then which of the following is true about relation $R$?






Go to Discussion

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

Solution

If a relation is in $BCNF$, then it is also in $3NF$.

Also, if a relation is in $3NF$, then it is already in $2NF$.

So, if $R$ is in $BCNF$, then $R$ must be in $2NF$ and $3NF$.


UGC NET Computer Science PYQ 2019

Which of the following key constraints is required for functioning of foreign key in the context of relational databases?






Go to Discussion

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

Solution

A foreign key is used to create a relationship between two tables.

A foreign key in one table generally refers to the primary key of another table.

This ensures referential integrity between the two tables.


UGC NET Computer Science PYQ 2019

In relational database management, which of the following is/are property/properties of candidate key?

$P$: Uniqueness

$Q$: Irreducibility






Go to Discussion

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

Solution

A candidate key must uniquely identify each tuple in a relation.

So, uniqueness is a property of candidate key.

Also, a candidate key must be minimal. It means no proper subset of it can uniquely identify tuples.

This property is called irreducibility.

Therefore, both $P$ and $Q$ are true.


UGC NET Computer Science PYQ 2019

Which of the following statements are DML statements?

$(a)$ Update $[tablename]$ Set $[columnname]=VALUE$

$(b)$ Delete $[tablename]$

$(c)$ Select $*$ from $[tablename]$






Go to Discussion

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

Solution

A candidate key must uniquely identify each tuple in a relation.

So, uniqueness is a property of candidate key.

Also, a candidate key must be minimal. It means no proper subset of it can uniquely identify tuples.

This property is called irreducibility.

Therefore, both $P$ and $Q$ are true.


UGC NET Computer Science PYQ 2019

Hadoop, a big data tool, works with a number of related tools. Choose from the following, the common tools included into Hadoop:






Go to Discussion

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

Solution

Hadoop ecosystem includes several tools used for big data storage and processing.

Map Reduce is used for distributed data processing.

HBase is a NoSQL database used in the Hadoop ecosystem.

Hive is used for querying large datasets stored in Hadoop.

Therefore, the common Hadoop tools are Map Reduce, HBase and Hive.


UGC NET Computer Science PYQ 2019

Which of the following features is supported in the relational database model?






Go to Discussion

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

Solution

In the relational database model, data is stored in the form of relations or tables.

Complex data-types are not directly supported in the basic relational model because values are generally atomic.

Multivalued attributes are also not directly stored in a single attribute; they are usually represented by creating another relation.

Generalization relationships are mainly part of the ER model or enhanced ER model.

But associations between entities can be represented using relations, primary keys and foreign keys. Multiplicity like one-to-one or one-to-many can also be represented using constraints.

Therefore, the supported feature is associations with multiplicities.


UGC NET Computer Science PYQ 2019
The following table has two attributes Employee_id and Manager_id, where Employee_id is a primary key and Manager_id is a foreign key referencing Employee_id with on-delete cascade:

Employee_id Manager_id
20 40
25 40
30 35
35 20
40 45
45 25

On deleting the tuple $(20,40)$, the set of other tuples that must be deleted to maintain the referential integrity of the table is:





Go to Discussion

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

Solution

Deleting tuple $(20,40)$ means employee id $20$ is deleted.

Since $Manager_id$ is a foreign key referencing $Employee_id$ with on-delete cascade, all tuples having $Manager_id=20$ must also be deleted.

So, tuple $(35,20)$ must be deleted.

Now, deleting employee id $35$ will again affect tuples having $Manager_id=35$.

So, tuple $(30,35)$ must also be deleted.

No tuple has $Manager_id=30$, so the cascade stops here.

Therefore, the other tuples that must be deleted are

$(35,20)$ and $(30,35)$


UGC NET Computer Science PYQ 2019

$K$-mean clustering algorithm has clustered the given $8$ observations into $3$ clusters after $1^{st}$ iteration as follows:

$C1:{(3,3),(5,5),(7,7)}$

$C2:{(0,6),(6,0),(3,0)}$

$C3:{(8,8),(4,4)}$

What will be the Manhattan distance for observation $(4,4)$ from cluster centroid $C1$ in second iteration?






Go to Discussion

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

Solution

Cluster $C1$ contains the points

$(3,3),(5,5),(7,7)$

Centroid of $C1$ is

$\left(\dfrac{3+5+7}{3},\dfrac{3+5+7}{3}\right)$

$=(5,5)$

Now, Manhattan distance between $(4,4)$ and $(5,5)$ is

$|4-5|+|4-5|$

$=1+1$

$=2$


UGC NET Computer Science PYQ 2019

Consider a disk system with $100$ cylinders. The requests to access the cylinders occur in the following sequence:

$4,34,10,7,19,73,2,15,6,20$

Assuming that the head is currently at cylinder $50$, what is the time taken to satisfy all requests if it takes $1$ ms to move from one cylinder to adjacent one and the shortest seek time first policy is used?






Go to Discussion

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

Solution

Using shortest seek time first policy, the head always moves to the nearest request.

Initial head position is

$50$

Request sequence in SSTF order will be:

$50 \to 34 \to 20 \to 19 \to 15 \to 10 \to 7 \to 6 \to 4 \to 2 \to 73$

Now, total head movement is

$|50-34|+|34-20|+|20-19|+|19-15|+|15-10|+|10-7|+|7-6|+|6-4|+|4-2|+|2-73|$

$=16+14+1+4+5+3+1+2+2+71$

$=119$

Since $1$ cylinder movement takes $1$ ms,

Total time taken is

$119$ ms


UGC NET Computer Science PYQ 2019
Match List-I with List-II:
List-I List-II
(a) Disk (i) Thread
(b) CPU (ii) Signal
(c) Memory (iii) File system
(d) Interrupt (iv) Virtual address space
Choose the correct option from those given below:





Go to Discussion

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

Solution

Disk is related to file system because files are stored and managed on disk.

So,

$(a) \rightarrow (iii)$

CPU is related to thread because a thread is the basic unit of CPU scheduling.

So,

$(b) \rightarrow (i)$

Memory is related to virtual address space.

So,

$(c) \rightarrow (iv)$

Interrupt is related to signal because signals are software-level notifications similar to interrupts.

So,

$(d) \rightarrow (ii)$

Therefore, correct matching is

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


UGC NET Computer Science PYQ 2019

Which of the following are NOT shared by the threads of the same process?

$(a)$ Stack
$(b)$ Registers
$(c)$ Address space
$(d)$ Message queue






Go to Discussion

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

Solution

Threads of the same process share resources like address space, code section, data section and other process resources.

But each thread has its own stack.

Also, each thread has its own register set because the CPU state of each thread must be stored separately.

So, stack and registers are not shared by threads of the same process.


UGC NET Computer Science PYQ 2019
Consider that a process has been allocated $3$ frames and has a sequence of page referencing as $1,2,1,3,7,4,5,6,3,1$. What shall be the difference in page faults for the above string using the algorithms of LRU and optimal page replacement for referencing the string?





Go to Discussion

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

Solution

Given reference string is

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

Number of frames is

$3$

Using LRU page replacement, total page faults are

$9$

Using optimal page replacement, total page faults are

$7$

Therefore, required difference is

$9-7=2$


UGC NET Computer Science PYQ 2019
Consider three CPU intensive processes, which require $10,20$ and $30$ units of time and arrive at times $0,2$ and $6$ respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end.





Go to Discussion

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

Solution

Let the processes be $P_1,P_2,P_3$.

$P_1$: arrival time $0$, burst time $10$
$P_2$: arrival time $2$, burst time $20$
$P_3$: arrival time $6$, burst time $30$

At time $0$, $P_1$ starts executing.

At time $2$, $P_2$ arrives, but remaining time of $P_1$ is $8$, which is less than $20$. So, $P_1$ continues.

At time $6$, $P_3$ arrives, but remaining time of $P_1$ is $4$, which is less than $30$. So, $P_1$ continues.

$P_1$ completes at time $10$.

Then context switch occurs from $P_1$ to $P_2$.

$P_2$ completes at time $30$.

Then context switch occurs from $P_2$ to $P_3$.

So, total context switches are

$2$


UGC NET Computer Science PYQ 2019
At a particular time of computation, the value of a counting semaphore is $7$. Then $20$ $P$ wait operations and $15$ $V$ signal operations are completed on this semaphore. What is the resulting value of the semaphore?





Go to Discussion

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

Solution

Initial value of semaphore is

$7$

Each $P$ wait operation decreases the semaphore value by $1$.

So, after $20$ $P$ operations:

$7-20=-13$

Each $V$ signal operation increases the semaphore value by $1$.

So, after $15$ $V$ operations:

$-13+15=2$

Therefore, resulting value of semaphore is

$2$


UGC NET Computer Science PYQ 2019
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by:





Go to Discussion

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

Solution

The minimum number of page frames required depends on the maximum number of pages that may be referenced by a single instruction.

This depends on the instruction format and addressing modes.

Therefore, it is determined by the instruction set architecture.


UGC NET Computer Science PYQ 2019
A computer has six tape drives with $n$ processes competing for them. Each process may need two drives. What is the maximum value of $n$ for the system to be deadlock free?





Go to Discussion

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

Solution

Total tape drives are

$6$

Each process may need maximum $2$ tape drives.

For deadlock free condition:

$R \ge n(m-1)+1$

Here,

$R=6$ and $m=2$

So,

$6 \ge n(2-1)+1$

$6 \ge n+1$

$n \le 5$

Therefore, maximum value of $n$ is

$5$


UGC NET Computer Science PYQ 2019
A basic feasible solution of an $m \times n$ transportation problem is said to be non-degenerate, if basic feasible solution contains exactly $...............$ number of individual allocation in $...............$ positions.





Go to Discussion

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

Solution

In an $m \times n$ transportation problem, a basic feasible solution is called non-degenerate when it has exactly $m+n-1$ occupied cells or allocations.

These allocations should be in independent positions, means they should not form a closed loop.

So, the required blanks are $m+n-1$ and independent.


UGC NET Computer Science PYQ 2019
A processor can support a maximum memory of $4GB$ where memory is word addressable and a word is $2$ bytes. What will be the size of the address bus of the processor?





Go to Discussion

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

Solution

Maximum memory supported is

$4GB=2^{32}$ bytes

One word is

$2$ bytes

Since memory is word addressable, number of addressable words is

$\dfrac{2^{32}}{2}=2^{31}$

So, number of address lines required is

$31$


UGC NET Computer Science PYQ 2019

Consider the following Linear Programming Problem $($LPP$)$:

Maximize $z=x_1+x_2$

Subject to the constraints:

$x_1+2x_2\le 2000$

$x_1+x_2\le 1500$

$x_2\le 600$

and $x_1,x_2\ge 0$

The solution of the above LPP is:






Go to Discussion

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

Solution

$x_1=1000,\ x_2=500$

Now,

$x_1+2x_2=1000+2(500)=2000\le 2000$

$x_1+x_2=1000+500=1500\le 1500$

$x_2=500\le 600$

Also,

$z=x_1+x_2=1000+500=1500$

So, all constraints are satisfied.


UGC NET Computer Science PYQ 2019
Which of the following UNIX/Linux pipes will count the number of lines in all the files having $.c$ and $.h$ as their extension in the current working directory?





Go to Discussion

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

Solution

To select files with extension $.c$ and $.h$, we use the pattern

star dot bracket ch bracket

Here, bracket ch bracket means either $c$ or $h$.

So, it selects files ending with $.c$ and $.h$.

Then, the output is passed to $wc-l$ to count the number of lines.

Therefore, the correct command is:

cat star dot bracket ch bracket pipe wc hyphen l


UGC NET Computer Science PYQ 2019
The Boolean expression $AB+A\overline{B}+\overline{A}C+AC$ is unaffected by the value of the Boolean variable $...............$





Go to Discussion

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

Solution

$AB+A\overline{B}+\overline{A}C+AC$

Take $A$ common from first two terms:

$A(B+\overline{B})+\overline{A}C+AC$

Since,

$B+\overline{B}=1$

So,

$A(1)+\overline{A}C+AC$

$=A+\overline{A}C+AC$

Now,

$A+AC=A$

So,

$A+\overline{A}C$

Using identity $A+\overline{A}C=A+C$

Therefore, the simplified expression is:

$A+C$

The final expression does not contain $B$, so it is unaffected by the value of $B$.


UGC NET Computer Science PYQ 2019

Which of the following statements is/are true?

$P$: In software engineering, defects that are discovered earlier are more expensive to fix.

$Q$: A software design is said to be a good design, if the components are strongly cohesive and weakly coupled.

Select the correct answer from the options given below:






Go to Discussion

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

Solution

Statement $P$ is false.

Defects discovered earlier are generally less expensive to fix. Defects found in later phases become more costly to correct.

Statement $Q$ is true.

A good software design should have high cohesion and low coupling.

So, only $Q$ is true.


UGC NET Computer Science PYQ 2019
What are the greatest lower bound $($GLB$)$ and the least upper bound $($LUB$)$ of the sets $A={3,9,12}$ and $B={1,2,4,5,10}$ if they exist in poset $(Z^+,/)$?





Go to Discussion

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

Solution

In the poset $(Z^+,/)$, the relation is based on divisibility.

Here,

$GLB=$ greatest common divisor $($GCD$)$

$LUB=$ least common multiple $($LCM$)$

For set $A={3,9,12}$:

$GLB(A)=GCD(3,9,12)=3$

$LUB(A)=LCM(3,9,12)=36$

For set $B={1,2,4,5,10}$:

$GLB(B)=GCD(1,2,4,5,10)=1$

$LUB(B)=LCM(1,2,4,5,10)=20$

So,

$A(GLB-3,\ LUB-36)$

and

$B(GLB-1,\ LUB-20)$


UGC NET Computer Science PYQ 2019
The $M$ components in MVC are responsible for:





Go to Discussion

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

Solution

Statement $P$ is false.

Defects discovered earlier are generally less expensive to fix. Defects found in later phases become more costly to correct.

Statement $Q$ is true.

A good software design should have high cohesion and low coupling.

So, only $Q$ is true.


UGC NET Computer Science PYQ 2019
Let $P$ be the set of all people. Let $R$ be a binary relation on $P$ such that $(a,b)\in R$ if $a$ is a brother of $b$. Is $R$ symmetric, transitive, an equivalence relation, a partial order relation?





Go to Discussion

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

Solution

Relation $R$ is defined as:

$(a,b)\in R$ if $a$ is a brother of $b$.

Symmetric:

If $a$ is brother of $b$, then it is not necessary that $b$ is brother of $a$.

For example, $b$ can be female. So, $b$ will not be brother of $a$.

Therefore, $R$ is not symmetric.

Transitive:

If $a$ is brother of $b$ and $b$ is brother of $c$, then $a$ is also brother of $c$.

Therefore, $R$ is transitive.

Equivalence relation:

For equivalence relation, relation must be reflexive, symmetric and transitive.

Here, $R$ is not symmetric and not reflexive.

So, $R$ is not an equivalence relation.

Partial order relation:

For partial order relation, relation must be reflexive, antisymmetric and transitive.

Here, $R$ is not reflexive.

So, $R$ is not a partial order relation.


UGC NET Computer Science PYQ 2019

In the context of software testing, which of the following statements is/are NOT correct?

$P$: A minimal test set that achieves $100%$ path coverage will also achieve $100%$ statement coverage.

$Q$: A minimal test set that achieves $100%$ path coverage will generally detect more faults than one that achieves $100%$ statement coverage.

$R$: A minimal test set that achieves $100%$ statement coverage will generally detect more faults than one that achieves $100%$ branch coverage.






Go to Discussion

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

Solution

Statement $P$ is correct.

If all paths are covered, then all statements will also be covered.

Statement $Q$ is correct.

Path coverage is stronger than statement coverage, so it generally detects more faults.

Statement $R$ is NOT correct.

Branch coverage is stronger than statement coverage, so statement coverage generally cannot detect more faults than branch coverage.

Therefore, only $R$ is not correct.


UGC NET Computer Science PYQ 2019
The weight of minimum spanning tree in graph $G$, calculated using Kruskal's algorithm is:





Go to Discussion

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

Solution

Using Kruskal’s algorithm, arrange all edges in increasing order of weight:

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

Now select the minimum weight edges without forming a cycle.

Selected edges are:

$2,\ 3,\ 4,\ 6$

Here, edge $5$ is skipped because it forms a cycle.

So, total weight of minimum spanning tree is:

$2+3+4+6=15$


UGC NET Computer Science PYQ 2019
Software reuse is:





Go to Discussion

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

Solution

Software reuse means using already existing software components, artifacts, designs, code, libraries or knowledge to develop new software.

It saves time, reduces cost and improves reliability.

Option 1 and Option 4 are related to reverse engineering.

Option 3 is related to software re-engineering.


UGC NET Computer Science PYQ 2019
A tree has $2n$ vertices of degree $1$, $3n$ vertices of degree $2$, $n$ vertices of degree $3$. Determine the number of vertices and edges in tree.





Go to Discussion

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

Solution

Total number of vertices:

$V=2n+3n+n=6n$

For a tree,

$E=V-1=6n-1$

Sum of degrees:

$2n(1)+3n(2)+n(3)$

$=2n+6n+3n=11n$

By handshaking theorem,

$2E=\text{sum of degrees}$

$2(6n-1)=11n$

$12n-2=11n$

$n=2$

So,

$V=6n=6(2)=12$

$E=V-1=12-1=11$


UGC NET Computer Science PYQ 2019
Which of the following terms best describes Git?





Go to Discussion

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

Solution

Git is used to track changes in source code during software development.

It allows multiple developers to work on the same project and maintain different versions of files.

Git is distributed because every user has a complete copy of the repository.

Therefore, Git is a distributed version control system.


UGC NET Computer Science PYQ 2019
How many reflexive relations are there on a set with $4$ elements?





Go to Discussion

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

Solution

For a set with $n$ elements, total ordered pairs are:

$n^2$

Here,

$n=4$

So, total ordered pairs:

$4^2=16$

For a reflexive relation, all diagonal pairs must be present.

Number of compulsory diagonal pairs:

$4$

Remaining pairs:

$16-4=12$

Each remaining pair can be either selected or not selected.

So, number of reflexive relations:

$2^{12}$


UGC NET Computer Science PYQ 2019
A Web application and its support environment has not been fully fortified against attack. Web engineers estimate that the likelihood of repelling an attack is only $30%$. The application does not contain sensitive or controversial information, so the threat probability is $25%$. What is the integrity of the web application?





Go to Discussion

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

Solution

Likelihood of repelling an attack is

$30%=0.30$

So, likelihood of not repelling an attack is

$1-0.30=0.70$

Threat probability is

$25%=0.25$

Now,

$Risk=Threat\ probability \times Attack\ success\ probability$

$Risk=0.25 \times 0.70$

$Risk=0.175$

Integrity is

$1-Risk$

$=1-0.175$

$=0.825$


UGC NET Computer Science PYQ 2019
A non-pipelined system takes $30\ ns$ to process a task. The same task can be processed in a four-segment pipeline with a clock cycle of $10\ ns$. Determine the speed up of the pipeline for $100$ tasks.





Go to Discussion

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

Solution

Time taken by non-pipelined system for $100$ tasks:

$100\times 30=3000\ ns$

For pipeline,

Number of stages:

$k=4$

Number of tasks:

$n=100$

Clock cycle time:

$10\ ns$

Pipeline time:

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

$=(4+100-1)\times 10$

$=103\times 10$

$=1030\ ns$

Speed up:

$\dfrac{3000}{1030}=2.91$


UGC NET Computer Science PYQ 2019

Match List-I with List-II:

List-I (Software Process Models) List-II (Software Systems)
(a) Waterfall model (i) e-business software that starts with only the basic functionalities and then moves on to advanced features
(b) Incremental development (ii) An inventory control system for a supermarket to be developed within three months
(c) Prototyping (iii) A virtual reality system for simulating vehicle navigation in a highway
(d) RAD (iv) Automate the manual system for student record maintenance in a school
Choose the correct option from those given below:





Go to Discussion

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

Solution

Waterfall model is suitable when requirements are clear and well understood. Automating a manual student record maintenance system is a clear and structured requirement.

So,

$(a) \rightarrow (iv)$

Incremental development is used when basic functionality is developed first and advanced features are added later.

So,

$(b) \rightarrow (i)$

Prototyping is useful when the system is complex and requirements need to be understood through a working model. A virtual reality simulation system is suitable for prototyping.

So,

$(c) \rightarrow (iii)$

RAD means Rapid Application Development. It is suitable when software needs to be developed quickly within a short time.

So,

$(d) \rightarrow (ii)$

Therefore, the correct matching is

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


UGC NET Computer Science PYQ 2019

A computer uses a memory unit of $512K$ words of $32$ bits each. A binary instruction code is stored in one word of the memory. The instruction has four parts: an addressing mode field to specify one of the two-addressing mode $($direct and indirect$)$, an operation code, a register code part to specify one of the $256$ registers and an address part. How many bits are there in addressing mode part, opcode part, register code part and the address part?






Go to Discussion

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

Solution

Memory size is $512K$ words.

$512K=512\times 1024=2^9\times 2^{10}=2^{19}$

So, address part requires $19$ bits.

There are $2$ addressing modes, direct and indirect.

So, addressing mode part requires:

$\log_2 2=1$ bit

There are $256$ registers.

So, register code part requires:

$\log_2 256=8$ bits

Total instruction size is $32$ bits.

Opcode bits:

$32-(1+8+19)$

$=32-28$

$=4$

So, bits are:

$1,4,8,19$


UGC NET Computer Science PYQ 2019
Software products need adaptive maintenance for which of the following reasons?





Go to Discussion

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

Solution

Adaptive maintenance is done when software needs to adapt to a changed environment.

For example, if the software must run on a new operating system, new hardware or new platform, adaptive maintenance is required.

So, the correct reason is that customers need the product to run on new platforms.


UGC NET Computer Science PYQ 2019

A micro instruction format has microoperation field which is divided into $2$ subfields $F1$ and $F2$, each having $15$ distinct microoperations, condition field $CD$ for four status bits, branch field $BR$ having four options used in conjunction with address field $AD$. The address space is of $128$ memory words. The size of micro instruction is:






Go to Discussion

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

Solution

Each subfield $F1$ and $F2$ has $15$ microoperations.

To represent $15$ operations, we need:

$\lceil \log_2 15 \rceil=4$ bits

So,

$F1=4$ bits

$F2=4$ bits

Condition field $CD$ has $4$ options/status bits:

$\log_2 4=2$ bits

Branch field $BR$ has $4$ options:

$\log_2 4=2$ bits

Address space is $128$ memory words:

$\log_2 128=7$ bits

Total size of microinstruction:

$4+4+2+2+7=19$ bits


UGC NET Computer Science PYQ 2019

Which of the following are the primary objectives of risk monitoring in software project tracking?

$P$: To assess whether predicted risks do, in fact, occur

$Q$: To ensure that risk aversion steps defined for the risk are being properly applied

$R$: To collect information that can be used for future risk analysis






Go to Discussion

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

Solution

Risk monitoring is used to track risks during a software project.

It checks whether predicted risks actually occur.

It also checks whether risk avoidance or risk reduction steps are being applied properly.

It also collects risk-related information so that it can be used in future risk analysis.

Therefore, all $P,Q,R$ are correct.


UGC NET Computer Science PYQ 2019
$(142)_b+(112)_{b-2}=(75)_8$, find base $b$.





Go to Discussion

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

Solution

Convert each number into decimal form.

$(142)_b=1\cdot b^2+4\cdot b+2$

$=b^2+4b+2$

Now,

$(112)_{b-2}=1\cdot (b-2)^2+1\cdot (b-2)+2$

$=(b-2)^2+(b-2)+2$

$=b^2-4b+4+b-2+2$

$=b^2-3b+4$

Also,

$(75)_8=7\cdot 8+5=56+5=61$

Now,

$(142)b+(112){b-2}=(75)_8$

$(b^2+4b+2)+(b^2-3b+4)=61$

$2b^2+b+6=61$

$2b^2+b-55=0$

$2b^2+11b-10b-55=0$

$b(2b+11)-5(2b+11)=0$

$(b-5)(2b+11)=0$

So,

$b=5$


UGC NET Computer Science PYQ 2019

Software validation mainly checks for inconsistencies between:






Go to Discussion

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

Solution

Software validation checks whether the software specification actually satisfies the user's real requirements.

It answers the question:

Are we building the right product?

So, validation mainly checks inconsistencies between detailed specifications and user requirements.


UGC NET Computer Science PYQ 2019
The following program is stored in the memory unit of the basic computer. Give the content of accumulator register in hexadecimal after the execution of the program.
Location Instruction
010 CLA
011 ADD 016
012 BUN 014
013 HLT
014 AND 017
015 BUN 013
016 C1A5
017 93C6





Go to Discussion

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

Solution

Initially, accumulator register is cleared by instruction $CLA$.

So,

$AC=0000$

Next instruction is:

$ADD\ 016$

At location $016$, data is:

$C1A5$

So,

$AC=0000+C1A5=C1A5$

Next instruction is:

$BUN\ 014$

So, control goes to location $014$.

At location $014$, instruction is:

$AND\ 017$

At location $017$, data is:

$93C6$

Now,

$AC=C1A5\ AND\ 93C6$

Convert into binary:

$C1A5=1100\ 0001\ 1010\ 0101$

$93C6=1001\ 0011\ 1100\ 0110$

Now perform bitwise AND:

$1100\ 0001\ 1010\ 0101$

$AND$

$1001\ 0011\ 1100\ 0110$

$=1000\ 0001\ 1000\ 0100$

Now convert back to hexadecimal:

$1000\ 0001\ 1000\ 0100=8184$

So, final content of accumulator is:

$AC=8184$


UGC NET Computer Science PYQ 2019
Match List-I with List-II:
List-I List-II
(a) Prim's algorithm (i) $O(V^3\log V)$
(b) Dijkstra's algorithm (ii) $O(VE^2)$
(c) Faster all-pairs shortest path (iii) $O(E\log V)$
(d) Edmonds-Karp algorithm (iv) $O(V^2)$
Choose the correct option from those given below:





Go to Discussion

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

Solution

Prim's algorithm has time complexity:

$O(E\log V)$

So,

$(a)\rightarrow(iii)$

Dijkstra's algorithm has time complexity:

$O(V^2)$

So,

$(b)\rightarrow(iv)$

Faster all-pairs shortest path algorithm has time complexity:

$O(V^3\log V)$

So,

$(c)\rightarrow(i)$

Edmonds-Karp algorithm has time complexity:

$O(VE^2)$

So,

$(d)\rightarrow(ii)$

Therefore, the correct matching is

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


UGC NET Computer Science PYQ 2019
What is the output of following C program?
#include <stdio.h>

main()
{
    int i, j, x = 0;

    for (i = 0; i < 5; ++i)
        for (j = 0; j < i; ++j)
        {
            x += (i + j - 1);
            break;
        }

    printf("%d", x);
}





Go to Discussion

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

Solution

Outer loop runs for:

$i=0,1,2,3,4$

Inner loop runs only when $j<i$.

But inside inner loop, there is a $break$ statement, so inner loop executes only one time for each valid value of $i$.

For $i=0$:

$j<0$ is false, so inner loop does not execute.

For $i=1$:

$x=x+(1+0-1)=0+0=0$

For $i=2$:

$x=x+(2+0-1)=0+1=1$

For $i=3$:

$x=x+(3+0-1)=1+2=3$

For $i=4$:

$x=x+(4+0-1)=3+3=6$

So, final value of $x$ is:

$x=6$


UGC NET Computer Science PYQ 2019
There are many sorting algorithms based on comparison. The running time of heapsort algorithm is $O(n\lg n)$. Like $P$, but unlike $Q$, heapsort sorts in place where $(P,Q)$ is equal to:





Go to Discussion

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

Solution

Heapsort is an in-place sorting algorithm.

Insertion sort is also an in-place sorting algorithm.

But merge sort is not considered in-place because it requires extra memory for merging.

So, heapsort sorts in place like insertion sort, but unlike merge sort.

Therefore,

$(P,Q)=(Insertion\ sort,\ Merge\ sort)$


UGC NET Computer Science PYQ 2019
Let $A$ be the base class in $C++$ and $B$ be the derived class from $A$ with protected inheritance. Which of the following statement is false for class $B$?





Go to Discussion

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

Solution

In protected inheritance:

Public members of base class become protected members in derived class.

Protected members of base class also remain protected in derived class.

Private members of base class are not directly accessible in derived class.

So, member functions of class $B$ can access public and protected members of class $A$.

But object of class $B$ cannot access public base class data directly, because it becomes protected after protected inheritance.


UGC NET Computer Science PYQ 2019

Consider the Euler's phi function given by

$\phi(n)=n\prod\left(1-\dfrac{1}{p}\right)$

where $p$ runs over all the primes dividing $n$. What is the value of $\phi(45)$?






Go to Discussion

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

Solution

We have,

$45=3^2\times 5$

So, prime divisors of $45$ are $3$ and $5$.

Using Euler's phi function,

$\phi(45)=45\left(1-\dfrac{1}{3}\right)\left(1-\dfrac{1}{5}\right)$

$=45\times \dfrac{2}{3}\times \dfrac{4}{5}$

$=24$


UGC NET Computer Science PYQ 2019
Which tag is used to enclose any number of javascript statements in HTML document?





Go to Discussion

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

Solution

<script>

    // JavaScript code

</script>


UGC NET Computer Science PYQ 2019
Which of the following is best running time to sort $n$ integers in the range $0$ to $n^2-1$?





Go to Discussion

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

Solution

The numbers are in the range

$0$ to $n^2-1$

Using radix sort with base $n$, each number can be represented using $2$ digits.

Radix sort takes

$O(d(n+b))$

Here,

$d=2$ and $b=n$

So,

$O(2(n+n))=O(n)$

Hence, the best running time is $O(n)$.


UGC NET Computer Science PYQ 2019
A rectangle is bound by the lines $x=0,\ y=0,\ x=5$ and $y=3$. The line segment joining $(-1,0)$ and $(4,5)$, if clipped against this window will connect the points $...............$





Go to Discussion

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

Solution

Given line segment joins the points:

$(-1,0)$ and $(4,5)$

Slope of line:

$m=\dfrac{5-0}{4-(-1)}=\dfrac{5}{5}=1$

Equation of line using point $(-1,0)$:

$y-0=1(x+1)$

$y=x+1$

Window boundaries are:

$x=0,\ y=0,\ x=5,\ y=3$

At $x=0$:

$y=0+1=1$

So, first clipped point is:

$(0,1)$

At $y=3$:

$3=x+1$

$x=2$

So, second clipped point is:

$(2,3)$


UGC NET Computer Science PYQ 2019

Which of the following is application of depth-first search?






Go to Discussion

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

Solution

Depth-first search is used in topological sorting of directed acyclic graphs.

DFS is also used in finding strongly connected components, such as in Kosaraju's algorithm and Tarjan's algorithm.

So, both topological sort and strongly connected components are applications of DFS.


UGC NET Computer Science PYQ 2019
Which of the following algorithms is not used for line clipping?





Go to Discussion

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

Solution

Cohen-Sutherland algorithm is used for line clipping.

Liang-Barsky algorithm is used for line clipping.

Nicholl-Lee-Nicholl algorithm is also used for line clipping.

But Sutherland-Hodgeman algorithm is mainly used for polygon clipping, not line clipping.


UGC NET Computer Science PYQ 2019

Consider double hashing of the form

$h(k,i)=(h_1(k)+ih_2(k))\ \text{mod}\ m$

where

$h_1(k)=k\ \text{mod}\ m$

$h_2(k)=1+(k\ \text{mod}\ n)$

where $n=m-1$ and $m=701$.

For $k=123456$, what is the difference between first and second probes in terms of slots?






Go to Discussion

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

Solution

In double hashing, the difference between the first and second probe is decided by $h_2(k)$.

Here,

$m=701$

So,

$n=m-1=700$

Now,

$h_2(k)=1+($remainder when $123456$ is divided by $700)$

$123456=700\times 176+256$

So, remainder is $256$.

Therefore,

$h_2(k)=1+256=257$


UGC NET Computer Science PYQ 2019
If we want to resize a $1024 \times 768$ pixels image to one that is $640$ pixels wide with the same aspect ratio, what would be the height of the resized image?





Go to Discussion

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

Solution

Original image size is:

$1024 \times 768$

New width is:

$640$

Since aspect ratio remains same,

$\dfrac{\text{New Height}}{\text{New Width}}=\dfrac{\text{Original Height}}{\text{Original Width}}$

So,

$\dfrac{h}{640}=\dfrac{768}{1024}$

$h=\dfrac{768}{1024}\times 640$

$h=480$


UGC NET Computer Science PYQ 2019

Consider the complexity class $CO-NP$ as the set of languages $L$ such that $\overline{L}\in NP$, and the following two statements:

$S_1: P\subseteq CO-NP$

$S_2:$ If $NP\ne CO-NP$, then $P\ne NP$

Which of the following is/are correct?






Go to Discussion

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

Solution

Statement $S_1$ is true.

Class $P$ is closed under complement. Also, $P\subseteq NP$.

So,

$P\subseteq CO-NP$

Statement $S_2$ is also true.

If $P=NP$, then since $P$ is closed under complement, we would get

$NP=CO-NP$

But the statement says $NP\ne CO-NP$.

Therefore, $P\ne NP$.

Hence, both $S_1$ and $S_2$ are correct.


UGC NET Computer Science PYQ 2019
 Which of the component module of DBMS does rearrangement and possible ordering of operations, eliminate redundancy in query and use efficient algorithms and indexes during the execution of a query?





Go to Discussion

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

Solution

In DBMS, the query optimizer is responsible for choosing the most efficient way to execute a query.

It performs tasks like:

Rearranging operations

Choosing proper order of operations

Removing redundant operations

Using efficient algorithms and indexes

So, the required component is:

$query\ optimizer$


UGC NET Computer Science PYQ 2019

Consider the following steps:

$S_1$: Characterize the structure of an optimal solution

$S_2$: Compute the value of an optimal solution in bottom-up fashion

Which of the step(s) is/are common to both dynamic programming and greedy algorithms?






Go to Discussion

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

Solution

Both dynamic programming and greedy algorithms use the idea of optimal substructure.

So, characterizing the structure of an optimal solution is common to both.

Therefore, $S_1$ is common.

But computing the value of an optimal solution in bottom-up fashion is mainly a dynamic programming approach.

It is not a necessary step in greedy algorithms.

So, $S_2$ is not common.


UGC NET Computer Science PYQ 2019

Given two tables $R1(x,y)$ and $R2(y,z)$ with $50$ and $30$ numbers of tuples respectively. Find the maximum number of tuples in the output of natural join between tables $R1$ and $R2$ i.e. $R1 * R2$.

$(*-$ Natural Join$)$






Go to Discussion

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

Solution

Tables are:

$R1(x,y)$ has $50$ tuples

$R2(y,z)$ has $30$ tuples

Natural join will be performed on the common attribute:

$y$

Maximum number of tuples will occur when every tuple of $R1$ matches with every tuple of $R2$ on attribute $y$.

So, maximum number of tuples:

$50 \times 30=1500$


UGC NET Computer Science PYQ 2019

Consider the following properties with respect to a flow network $G=(V,E)$ in which a flow is a real-valued function $f:V\times V\to R$:

$P_1$: For all $u,v\in V,\ f(u,v)=-f(v,u)$

$P_2$: $\sum_{v\in V} f(u,v)=0$ for all $u\in V$

Which one of the following is/are correct?






Go to Discussion

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

Solution

Property $P_1$ is the skew-symmetry property of flow.

So, $P_1$ is correct.

Property $P_2$ represents flow conservation, but in a flow network, flow conservation holds for all vertices except the source and sink.

The statement says it holds for all $u\in V$, which is not correct.

So, $P_2$ is false.


UGC NET Computer Science PYQ 2019

Given two tables $EMPLOYEE(EID,ENAME,DEPTNO)$ and $DEPARTMENT(DEPTNO,DEPTNAME)$.

Find the most appropriate statement of the given query:

Select count(*) 'total'

from EMPLOYEE

where DEPTNO IN (D1, D2)

group by DEPTNO

having count(*) > 5;






Go to Discussion

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

Solution

The query first selects employees whose department number is either $D1$ or $D2$.

Then,

$group\ by\ DEPTNO$

means employees are grouped department-wise.

After that,

$having\ count(*)>5$

means only those department groups will be displayed whose employee count is greater than $5$.

So, the query displays the total number of employees of departments $D1$ and $D2$ only if their count is greater than $5$.


UGC NET Computer Science PYQ 2019

Consider the following statements:

$S_1$: For any integer $n>1$, $a^{\phi(n)}\equiv 1\ (\text{mod }n)$ for all $a\in Z_n^*$, where $\phi(n)$ is Euler's phi function.

$S_2$: If $p$ is prime, then $a^p\equiv 1\ (\text{mod }p)$ for all $a\in Z_p^*$.

Which one of the following is/are correct?






Go to Discussion

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

Solution

Statement $S_1$ is true by Euler's theorem.

If $a\in Z_n^*$, then $a$ and $n$ are relatively prime.

So,

$a^{\phi(n)}\equiv 1\ (\text{mod }n)$

Now consider $S_2$.

For prime $p$, Fermat's theorem gives

$a^{p-1}\equiv 1\ (\text{mod }p)$

for $a\in Z_p^*$.

But $S_2$ says

$a^p\equiv 1\ (\text{mod }p)$

This is not generally true.

Actually,

$a^p\equiv a\ (\text{mod }p)$

So, $S_2$ is false.


UGC NET Computer Science PYQ 2019

Find the minimum number of tables required for converting the following entity relationship diagram into a relational database.







Go to Discussion

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

Solution

In the given ER diagram:

Entity $R_1$ has attributes $A$, $B$, and $C$.

Here, $B$ is shown as a double oval, so $B$ is a multivalued attribute.

A multivalued attribute requires a separate table.

So, for $R_1$:

One table for entity $R_1$

One separate table for multivalued attribute $B$

Entity $R_2$ has attributes $X$ and $Y$.

So, one table is required for $R_2$.

The relationship between $R_1$ and $R_2$ is $1:M$.

For a $1:M$ relationship, no separate relationship table is required. We can add the primary key of the $1$ side as a foreign key in the $M$ side table.

Total number of tables:

$1$ table for $R_1$

$1$ table for multivalued attribute $B$

$1$ table for $R_2$

Total:

$1+1+1=3$


UGC NET Computer Science PYQ 2019

Which data structure is used by the compiler for managing variables and their attributes?






Go to Discussion

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

Solution

A compiler stores information about variables, functions, identifiers and their attributes in a symbol table.

Attributes may include name, type, scope, address and value.

Therefore, the data structure used for managing variables and their attributes is symbol table.


UGC NET Computer Science PYQ 2019
A counting semaphore is initialized to $8$. $3$ wait $()$ operations and $4$ signal $()$ operations are applied. Find the current value of the semaphore variable.





Go to Discussion

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

Solution

Initial value of semaphore:

$S=8$

Each wait $()$ operation decreases semaphore value by $1$.

After $3$ wait $()$ operations:

$S=8-3=5$

Each signal $()$ operation increases semaphore value by $1$.

After $4$ signal $()$ operations:

$S=5+4=9$


UGC NET Computer Science PYQ 2019
On translating the expression given below into quadruple representation, how many operations are required?

$(ij)+(e+f)(a*b+c)$





Go to Discussion

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

Solution

Given expression is

$(ij)+(e+f)(a*b+c)$

Count each arithmetic operation:

$i*j$ gives $1$ operation.

$e+f$ gives $1$ operation.

$a*b$ gives $1$ operation.

$a*b+c$ gives $1$ operation.

$(e+f)(ab+c)$ gives $1$ operation.

Finally,

$(ij)+[(e+f)(a*b+c)]$ gives $1$ operation.

Total operations:

$1+1+1+1+1+1=6$


UGC NET Computer Science PYQ 2019
Which of the following is not needed by an encryption algorithm used in Cryptography?





Go to Discussion

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

Solution

An encryption algorithm mainly needs:

Plain message

Key

Encryption method

After encryption, it produces ciphertext.

But user details are not required for the encryption algorithm.


UGC NET Computer Science PYQ 2019

Replacing the expression $4*2.14$ by $8.56$ is known as:






Go to Discussion

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

Solution

Constant folding is a compiler optimization technique.

In this technique, constant expressions are evaluated at compile time.

Here,

$4*2.14=8.56$

So, replacing $4*2.14$ by $8.56$ is constant folding.


UGC NET Computer Science PYQ 2019
Which of the following CPU scheduling algorithms is/are supported by LINUX operating system?





Go to Discussion

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

Solution

Linux operating system supports preemptive priority scheduling.

Linux also supports time-sharing CPU scheduling for normal user processes.

So, both preemptive priority scheduling and time-sharing CPU scheduling are supported by Linux.


UGC NET Computer Science PYQ 2019

Shift-reduce parser consists of:

$(a)$ Input buffer
$(b)$ Stack
$(c)$ Parse table

Choose the correct option from those given below:






Go to Discussion

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

Solution

A shift-reduce parser uses an input buffer to read the input string.

It uses a stack to store grammar symbols during parsing.

In table-driven shift-reduce parsing, a parse table is also used to decide shift and reduce actions.

Therefore, shift-reduce parser consists of input buffer, stack and parse table.


UGC NET Computer Science PYQ 2019

Consider a paging system where translation lookaside buffer $($TLB$)$, a special type of associative memory, is used with a hit ratio of $80%$.

Assume that memory reference takes $80$ nanoseconds and reference time to TLB is $20$ nanoseconds. What will be the effective memory access time given an $80%$ hit ratio?






Go to Discussion

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

Solution

TLB access time $=20$ ns

Memory access time $=80$ ns

Hit ratio $=80%=0.8$

Miss ratio $=20%=0.2$

For TLB hit:

Effective time $=20+80=100$ ns

For TLB miss:

First TLB is checked, then page table is accessed from memory, then actual memory is accessed.

Effective time $=20+80+80=180$ ns

Now,

Effective memory access time:

$EAT=0.8(100)+0.2(180)$

$EAT=80+36$

$EAT=116$ ns


UGC NET Computer Science PYQ 2019

How many states are there in a minimum state automata equivalent to regular expression given below?

Regular expression is $a^*b(a+b)$






Go to Discussion

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

Solution

The regular expression is

$a^*b(a+b)$

It means:

Any number of $a$'s, followed by one $b$, followed by either $a$ or $b$.

So, strings accepted are like:

$ba,\ bb,\ aba,\ abb,\ aaba,\ aabb$

Minimum DFA states needed:

State $q_0$: Initial state, reads any number of $a$'s.
State $q_1$: After reading required $b$.
State $q_2$: Final state after reading last symbol $a$ or $b$.
State $q_d$: Dead state for extra or invalid symbols.

Thus, total minimum states are

$4$


UGC NET Computer Science PYQ 2019
Suppose a system has $12$ magnetic tape drives and at the time $t_0$, three processes are allotted tape drives out of their need as given below:
Process Maximum Needs Current Needs
$p_0$ $10$ $5$
$p_1$ $4$ $2$
$p_2$ $9$ $2$
At time $t_0$, the system is in a safe state. Which of the following is a safe sequence so that deadlock is avoided?





Go to Discussion

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

Solution

Total tape drives $=12$

Current allocated tape drives:

$5+2+2=9$

Available tape drives:

$12-9=3$

Now calculate remaining need:

For $p_0$:

$10-5=5$

For $p_1$:

$4-2=2$

For $p_2$:

$9-2=7$

Initially available tape drives are $3$.

Since $p_1$ needs only $2$ tape drives, so $p_1$ can execute first.

After completion of $p_1$, it releases $2$ tape drives.

Available tape drives become:

$3+2=5$

Now $p_0$ needs $5$ tape drives, so $p_0$ can execute.

After completion of $p_0$, it releases $5$ tape drives.

Available tape drives become:

$5+5=10$

Now $p_2$ needs $7$ tape drives, so $p_2$ can execute.

Hence, the safe sequence is:

&lt;$p_1$ , $p_0$ , $p_2$&gt;

Therefore, the correct answer is option (B).

UGC NET Computer Science PYQ 2019
Match List-I with List-II:
List-I List-II
(a) $\overline{L_3}\cup L_4$ (i) Context-free language
(b) $\overline{L_2}\cup L_3$ (ii) Recursively enumerable language
(c) $L_1^*\cap L_2$ (iii) Recursive language
where $L_1$: Regular language $L_2$: Context-free language $L_3$: Recursive language $L_4$: Recursively enumerable language Choose the correct option from those given below:





Go to Discussion

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

Solution

For $(a)$:

$L_3$ is a recursive language.

Complement of a recursive language is also recursive.

So,

$\overline{L_3}$ is recursive.

Also, $L_4$ is recursively enumerable.

Union of a recursive language and a recursively enumerable language is recursively enumerable.

Therefore,

$\overline{L_3}\cup L_4$ is recursively enumerable.

So,

$(a)\rightarrow(ii)$

For $(b)$:

$L_2$ is context-free language.

Every context-free language is recursive.

So, complement of $L_2$ is also recursive.

Also, $L_3$ is recursive.

Union of two recursive languages is recursive.

Therefore,

$\overline{L_2}\cup L_3$ is recursive.

So,

$(b)\rightarrow(iii)$

For $(c)$:

$L_1$ is regular.

Regular languages are closed under Kleene star.

So,

$L_1^*$ is regular.

Intersection of a regular language and a context-free language is context-free.

Therefore,

$L_1^*\cap L_2$ is context-free.

So,

$(c)\rightarrow(i)$

Hence, correct matching is

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


UGC NET Computer Science PYQ 2019
Which of the following interprocess communication model is used to exchange messages among co-operative processes?





Go to Discussion

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

Solution

Co-operating processes can communicate with each other using two main IPC models:

Shared memory model

Message passing model

In shared memory, processes communicate by sharing a common memory area.

In message passing, processes communicate by sending and receiving messages.

So, interprocess communication can be done using both shared memory and message passing model.


UGC NET Computer Science PYQ 2019

How can the decision algorithm be constructed for deciding whether context-free language $L$ is finite?

$(a)$ By constructing redundant CFG $G$ in CNF generating language $L$

$(b)$ By constructing non-redundant CFG $G$ in CNF generating language $L$

$(c)$ By constructing non-redundant CFG $G$ in CNF generating language $L-{\Lambda}$, where $\Lambda$ stands for null

Which of the following is correct?






Go to Discussion

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

Solution

To decide whether a context-free language is finite or infinite, we can convert the CFG into a non-redundant CFG in CNF.

Usually, the CNF grammar is considered for $L-{\Lambda}$.

After converting into CNF, we check whether there is any recursive derivation or cycle among variables.

If such a recursive structure exists, then the language is infinite.

If no such recursive structure exists, then the language is finite.

So, the correct construction is given in statement $(c)$.


UGC NET Computer Science PYQ 2019
Given a CPU time slice of $2$ ms and the following list of processes.
Process Burst time $($ms$)$ Arrival time
$P1$ $3$ $0$
$P2$ $4$ $2$
$P3$ $5$ $5$
Find average turnaround time and average waiting time using round-robin CPU scheduling.





Go to Discussion

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

Solution

Time quantum $=2$ ms

Gantt chart:

$P1(0-2),\ P2(2-4),\ P1(4-5),\ P2(5-7),\ P3(7-9),\ P3(9-11),\ P3(11-12)$

Completion time:

$CT(P1)=5$

$CT(P2)=7$

$CT(P3)=12$

Turnaround time:

$TAT=CT-AT$

For $P1$:

$TAT=5-0=5$

For $P2$:

$TAT=7-2=5$

For $P3$:

$TAT=12-5=7$

Average turnaround time:

$\dfrac{5+5+7}{3}=\dfrac{17}{3}=5.66$

Waiting time:

$WT=TAT-BT$

For $P1$:

$WT=5-3=2$

For $P2$:

$WT=5-4=1$

For $P3$:

$WT=7-5=2$

Average waiting time:

$\dfrac{2+1+2}{3}=\dfrac{5}{3}=1.66$


UGC NET Computer Science PYQ 2019

Consider the following grammar:

$S\to XY$

$X\to YaY\mid a$

$Y\to bbX$

Which of the following statements is/are true about the above grammar?

$(a)$ Strings produced by the grammar can have consecutive three $a$'s.

$(b)$ Every string produced by the grammar has alternate $a$ and $b$.

$(c)$ Every string produced by the grammar has at least two $a$'s.

$(d)$ Every string produced by the grammar has $b$'s in multiple of $2$.






Go to Discussion

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

Solution

Given grammar is

$S\to XY$

$X\to YaY\mid a$

$Y\to bbX$

Since $S\to XY$, the string contains one part from $X$ and one part from $Y$.

Now, $X$ can generate at least one $a$.

Also, $Y\to bbX$, so $Y$ also contains one $X$, which again gives at least one $a$.

Therefore, every string generated by $S$ has at least two $a$'s.

So, statement $(c)$ is true.

Also, every use of $Y$ contributes $bb$, that is $2$ occurrences of $b$.

So, the number of $b$'s is always in multiple of $2$.

Therefore, statement $(d)$ is true.

The grammar contains $bb$, so alternate $a$ and $b$ condition is false.

Also, consecutive three $a$'s are not necessarily produced.


UGC NET Computer Science PYQ 2019
Which of the following methods are used to pass any number of parameters to the operating system through system calls?





Go to Discussion

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

Solution

Parameters can be passed to the operating system through system calls using different methods.

Registers can be used, but registers are limited in number.

For passing any number of parameters, better methods are:

Block or table in main memory

Stack

So, any number of parameters can be passed using block in main memory and stack.


UGC NET Computer Science PYQ 2019

Which of the following problems is/are decidable problem(s) on Turing machine $M$?

$(a)$ $G$ is a CFG with $L(G)=\phi$

$(b)$ There exist two TMs $M_1$ and $M_2$ such that $L(M)\subseteq L(M_1)\cup L(M_2)$

$(c)$ $M$ is a TM that accepts $\omega$ using at most $2^{|\omega|}$ cells of tape






Go to Discussion

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

Solution

Statement $(a)$ is decidable because emptiness of a context-free grammar is decidable.

Statement $(b)$ is also decidable in this form, because recursively enumerable languages are closed under union, and the condition can be satisfied by suitable Turing machines.

Statement $(c)$ is decidable because the tape usage is bounded by $2^{|\omega|}$. With bounded tape, the number of configurations becomes finite, so we can decide whether $M$ accepts $\omega$ within this bound.

Therefore, all three statements are decidable.


UGC NET Computer Science PYQ 2019
Java Virtual Machine $($JVM$)$ is used to execute architectural neutral byte code. Which of the following is needed by the JVM for execution of Java Code?





Go to Discussion

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

Solution

JVM executes Java bytecode.

For execution, JVM mainly needs:

Class loader to load the class files

Java Interpreter to interpret and execute bytecode

So, JVM needs class loader and Java interpreter.


UGC NET Computer Science PYQ 2019

for a statement, a language $L\subseteq \Sigma^*$ is recursive if there exists some Turing machine $M$.

Which of the following conditions is satisfied for any string $\omega$?






Go to Discussion

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

Solution

A recursive language is decided by a Turing machine that halts on every input.

If $\omega\in L$, then the machine halts and accepts $\omega$.

If $\omega\notin L$, then the machine halts and rejects $\omega$.

Rejecting means it halts without reaching an acceptable state.

Therefore, the correct condition is:

If $\omega\notin L$, then $M$ halts without reaching an acceptable state.


UGC NET Computer Science PYQ 2019

In a system for a restaurant, the main scenario for placing an order is given below:

(a) Customer reads menu
(b) Customer places order
(c) Order is sent to the kitchen for preparation
(d) Ordered items are served
(e) Customer requests for a bill for the order
(f) Bill is prepared for this order
(g) Customer is given the bill
(h) Customer pays the bill

A sequence diagram for the scenario will have at least how many objects among whom the messages will be exchanged.






Go to Discussion

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

Solution

In this restaurant ordering system, the minimum important objects are:

Customer

Menu

Order

Kitchen

Bill

Messages are exchanged among these objects during order placement, food preparation, serving, bill generation and payment.

So, at least $5$ objects are required in the sequence diagram.


UGC NET Computer Science PYQ 2019
A fully connected network topology is a topology in which there is a direct link between all pairs of nodes. Given a fully connected network with $n$ nodes, the number of direct links as a function of $n$ can be expressed as:





Go to Discussion

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

Solution

In a fully connected network, every pair of nodes has a direct link.

So, the number of direct links is equal to the number of ways of choosing $2$ nodes from $n$ nodes.

Therefore,

${}^{n}C_2=\dfrac{n(n-1)}{2}$


UGC NET Computer Science PYQ 2019
An $...............$ chart is a project schedule representation that presents project plan as a directed graph. The critical path is $...............$ the sequence of $...............$ tasks and it defines project $...............$





Go to Discussion

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

Solution

An activity chart represents a project schedule as a directed graph.

In project scheduling, the critical path is the longest path in the project network.

It contains dependent tasks because one task depends on the completion of another task.

The critical path defines the total project duration.

So, the correct sequence is:

$Activity,\ Longest,\ Dependent,\ Duration$


UGC NET Computer Science PYQ 2019
What is the name of the protocol that allows a client to send a broadcast message with its MAC address and receive an IP address in reply?





Go to Discussion

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

Solution

RARP stands for Reverse Address Resolution Protocol.

It is used when a client knows its MAC address but wants to find its IP address.

The client sends a broadcast request with its MAC address and receives the corresponding IP address in reply.


UGC NET Computer Science PYQ 2019
Let $a^{2c}\bmod n=(a^c)^2\bmod n$ and $a^{2c+1}\bmod n=a\cdot(a^c)^2\bmod n$. For $a=7,\ b=17$ and $n=561$, what is the value of $a^b\bmod n$?





Go to Discussion

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

Solution

We have to find:

$7^{17}\bmod 561$

Now,

$7^2=49$

$7^4=49^2=2401$

$2401\bmod 561=157$

So,

$7^4\bmod 561=157$

Now,

$7^8\bmod 561=157^2\bmod 561$

$157^2=24649$

$24649\bmod 561=526$

So,

$7^8\bmod 561=526$

Now,

$7^{16}\bmod 561=526^2\bmod 561$

$526^2=276676$

$276676\bmod 561=103$

So,

$7^{16}\bmod 561=103$

Now,

$7^{17}\bmod 561=7^{16}\times 7\bmod 561$

$=103\times 7\bmod 561$

$=721\bmod 561$

$=160$


UGC NET Computer Science PYQ 2019
You are designing a link layer protocol for a link with a bandwidth of $1$ Gbps over a fiber link with a length of $800$ km. Assume the speed of light in this medium is $200000$ km/second. What is the propagation delay in this link?





Go to Discussion

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

Solution

Propagation delay is given by

$\text{Propagation delay}=\dfrac{\text{Distance}}{\text{Propagation speed}}$

Here,

Distance $=800$ km

Speed $=200000$ km/second

So,

$\text{Propagation delay}=\dfrac{800}{200000}$

$=0.004$ seconds

$=4$ milliseconds


UGC NET Computer Science PYQ 2019
A clique in an undirected graph $G=\langle V,E\rangle$ is a subset $V'\subseteq V$ of vertices, such that





Go to Discussion

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

Solution

A clique in an undirected graph is a subset of vertices in which every pair of distinct vertices is connected by an edge.

That means if we take any two vertices from $V'$, there must be an edge between them.

So, a clique forms a complete subgraph.


UGC NET Computer Science PYQ 2019
You need $500$ subnets, each with about $100$ usable host addresses per subnet. What network mask will you assign using a class B network address?





Go to Discussion

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

Solution

Class B default mask is

$255.255.0.0$

or

$/16$

We need at least $500$ subnets.

$2^8=256<500$

$2^9=512\ge 500$

So, we need to borrow $9$ bits for subnetting.

New prefix length is

$16+9=25$

So, subnet mask is

$/25=255.255.255.128$

Host bits left:

$32-25=7$

Usable hosts per subnet:

$2^7-2=126$

This satisfies about $100$ usable hosts.


UGC NET Computer Science PYQ 2019

What is the worst case running time of Insert and Extract-min, in an implementation of a priority queue using an unsorted array? Assume that all insertions can be accommodated.






Go to Discussion

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

Solution

In an unsorted array implementation of priority queue:

For Insert operation, we can insert the new element directly at the end of the array.

So, worst case time for Insert is:

$\theta(1)$

For Extract-min operation, the array is unsorted, so we must search the entire array to find the minimum element.

So, worst case time for Extract-min is:

$\theta(n)$


UGC NET Computer Science PYQ 2019

Consider the following two statements with respect to IPv4 in computer networking:

$P$: The loopback IP address is a member of the class B network.

$Q$: The loopback IP address is used to send a packet from the host to itself.

What can you say about the statements $P$ and $Q$?






Go to Discussion

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

Solution

Loopback addresses belong to the $127.0.0.0/8$ range.

This range belongs to class A, not class B.

So, statement $P$ is false.

Loopback address is used by a host to send packets to itself for testing and internal communication.

So, statement $Q$ is true.


UGC NET Computer Science PYQ 2019
In a B-Tree, each node represents a disk block. Suppose one block holds $8192$ bytes. Each key uses $32$ bytes. In a B-tree of order $M$ there are $M-1$ keys. Since each branch is on another disk block, we assume a branch is of $4$ bytes. The total memory requirement for a non-leaf node is:





Go to Discussion

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

Solution

In a B-tree of order $M$:

Number of keys $=M-1$

Memory used by keys:

$(M-1)\times 32=32M-32$

Number of branches in non-leaf node $=M$

Memory used by branches:

$M\times 4=4M$

Total memory requirement:

$(32M-32)+4M$

$=36M-32$


UGC NET Computer Science PYQ 2019

In the TCP/IP model, encryption and decryption are functions of the _____ layer.






Go to Discussion

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

Solution

In the OSI model, encryption and decryption are generally associated with the presentation layer.

But in the TCP/IP model, there is no separate presentation layer.

Its functions are included in the application layer.

Therefore, encryption and decryption are functions of the application layer in TCP/IP model.


UGC NET Computer Science PYQ 2019

Give asymptotic upper and lower bound for $T(n)$ given below. Assume $T(n)$ is constant for $n\le 2$.

$T(n)=4T(\sqrt n)+\lg^2 n$






Go to Discussion

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

Solution

Let,

$m=\lg n$

So,

$n=2^m$

Also,

$\sqrt n=2^{m/2}$

Now define:

$S(m)=T(2^m)$

Then recurrence becomes:

$S(m)=4S(m/2)+m^2$

Using Master Theorem:

$a=4,\ b=2$

$m^{\log_b a}=m^{\log_2 4}=m^2$

Here,

$f(m)=m^2$

So,

$S(m)=\theta(m^2\lg m)$

Now put $m=\lg n$:

$T(n)=\theta((\lg n)^2\lg(\lg n))$

So,

$T(n)=\theta(\lg^2 n\lg\lg n)$


UGC NET Computer Science PYQ 2019

Which of the following statements is/are true with regard to various layers in the Internet stack?

$P$: At the link layer, a packet of transmitted information is called a frame.

$Q$: At the network layer, a packet of transmitted information is called a segment.






Go to Discussion

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

Solution

At the link layer, the data unit is called a frame.

So, statement $P$ is true.

At the network layer, the data unit is generally called a packet or datagram.

A segment is used at the transport layer.

So, statement $Q$ is false.


UGC NET Computer Science PYQ 2019
Consider a weighted directed graph. The current shortest distance from source $S$ to node $x$ is represented by $d[x]$. Let $d[v]=29,\ d[u]=15,\ w[u,v]=12$. What is the updated value of $d[v]$ based on current information?





Go to Discussion

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

Solution

In shortest path relaxation:

$d[v]=\min(d[v],d[u]+w[u,v])$

Given:

$d[v]=29$

$d[u]=15$

$w[u,v]=12$

So,

$d[u]+w[u,v]=15+12=27$

Now,

$d[v]=\min(29,27)$

$d[v]=27$


UGC NET Computer Science PYQ 2019
What percentage of the IPv4 address space do all class C addresses consume?





Go to Discussion

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

Solution

Class C addresses start with bits $110$.

So, first $3$ bits are fixed.

Remaining bits are

$32-3=29$

Total class C addresses are

$2^{29}$

Total IPv4 addresses are

$2^{32}$

So, fraction of class C address space is

$\dfrac{2^{29}}{2^{32}}=\dfrac{1}{8}$

Now,

$\dfrac{1}{8}\times 100=12.5%$


UGC NET Computer Science PYQ 2019
When using Dijkstra's algorithm to find shortest path in a graph, which of the following statement is not true?





Go to Discussion

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

Solution

Dijkstra's algorithm finds the shortest path based on minimum total weight.

It does not necessarily choose the path with the least number of vertices.

A path with more vertices can have smaller total weight than a path with fewer vertices.

Dijkstra's algorithm also requires all edge weights to be non-negative.

So, the statement “Shortest path always passes through least number of vertices” is not true.


UGC NET Computer Science PYQ 2019
The ability to inject packets into the Internet with a false source address is known as:





Go to Discussion

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

Solution

IP spoofing means creating IP packets with a false or forged source IP address.

It is used to hide the real sender or impersonate another system.

Therefore, injecting packets with a false source address is called IP spoofing.


UGC NET Computer Science PYQ 2019
The time complexity to multiply two polynomials of degree $n$ using Fast Fourier transform method is:





Go to Discussion

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

Solution

Using the Fast Fourier Transform $($FFT$)$ method, polynomial multiplication can be done faster than the normal multiplication method.

Normal polynomial multiplication takes:

$\theta(n^2)$

But FFT based polynomial multiplication takes:

$\theta(n\lg n)$


UGC NET Computer Science PYQ 2019
The RSA encryption algorithm also works in reverse, that is, you can encrypt a message with the private key and decrypt it using the public key. This property is used in:





Go to Discussion

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

Solution

In RSA, a message can be encrypted using the private key and verified or decrypted using the public key.

This proves that the message was created by the holder of the private key.

This property is used in digital signatures.


UGC NET Computer Science PYQ 2019

 Consider the following grammars:

$G_1:S\rightarrow aSb\mid bSa\mid aa$

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

$G_3:S\rightarrow aSb\mid bSa\mid SS\mid a$

$G_4:S\rightarrow aSb\mid bSa\mid SS\mid SSS\mid \lambda$

Which of the following is correct w.r.t. the above grammars?






Go to Discussion

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

Solution

In $G_2$, productions are:

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

In $G_4$, productions are:

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

The only extra production in $G_4$ is:

$S\rightarrow SSS$

But this production is already possible using $S\rightarrow SS$ again and again.

For example:

$S\rightarrow SS\rightarrow SSS$

So, $SSS$ does not generate anything extra.

Hence, $G_2$ and $G_4$ generate the same language.


UGC NET Computer Science PYQ 2019
Consider the game tree given below. Here circular nodes represent $MIN$ nodes and rectangular nodes represent $MAX$ nodes. The value of the root node of the game tree is:





Go to Discussion

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

Solution

The root node is a $MAX$ node.

In minimax method:

$MAX$ node selects the maximum value from its children.

$MIN$ node selects the minimum value from its children.

From the left subtree, the minimum level gives values such that the final value of the left side becomes

$7$

From the right subtree, the available minimum values make the right side value less than or equal to $5$.

Now, root is a $MAX$ node, so it selects maximum of left and right subtree values.

$\max(7,\le 5)=7$

Hence, the value of the root node is

$7$


UGC NET Computer Science PYQ 2019
Consider the language $L={a^n b^{n-3}\mid n>2}$ on $\Sigma={a,b}$. Which one of the following grammars generates the language $L$?





Go to Discussion

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

Solution

Given language is:

$L={a^n b^{n-3}\mid n>2}$

When $n=3$:

$a^3b^0=aaa$

When $n=4$:

$a^4b^1=aaaab$

When $n=5$:

$a^5b^2=aaaaabb$

So, every string starts with at least three $a$ symbols.

After that, for every extra $a$, one $b$ is added at the end.

Grammar:

$S\rightarrow aaaA$

$A\rightarrow aAb\mid \lambda$

If $A\rightarrow \lambda$, then string is:

$aaa$

If $A\rightarrow aAb$, then it generates:

$aaaab,\ aaaaabb,\ldots$

So, this grammar generates $a^n b^{n-3}$ for $n>2$.


UGC NET Computer Science PYQ 2019
Match List-I with List-II:
List-I List-II
(a) Greedy best-first (i) Minimal cost $p+h(p)$
(b) Lowest cost-first (ii) Minimal $h(p)$
(c) $A^*$ Algorithm (iii) Minimal cost $p$
Choose the correct option from those given below:





Go to Discussion

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

Solution

Greedy best-first search selects the node with minimum heuristic value.

So,

$(a)\rightarrow(ii)$

Lowest cost-first search selects the node with minimum path cost.

So,

$(b)\rightarrow(iii)$

$A^*$ algorithm selects the node using cost plus heuristic value.

So,

$(c)\rightarrow(i)$

Therefore, the correct matching is

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


UGC NET Computer Science PYQ 2019

Consider the following grammar:

$S\rightarrow 0A\mid 0BB$

$A\rightarrow 00A\mid \lambda$

$B\rightarrow 1B\mid 11C$

$C\rightarrow B$

Which language does this grammar generate?






Go to Discussion

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

Solution

From production:

$S\rightarrow 0A$

and

$A\rightarrow 00A\mid \lambda$

So, $A$ can generate:

$\lambda,\ 00,\ 0000,\ldots$

Hence, $S$ generates:

$0,\ 000,\ 00000,\ldots$

This is represented by:

$(00)^*0$

Now consider:

$S\rightarrow 0BB$

But $B$ has productions:

$B\rightarrow 1B\mid 11C$

and

$C\rightarrow B$

Here, $B$ never terminates into $\lambda$ or any final terminal-only string.

So, this branch does not generate any valid finite string.

Hence, the grammar generates only:

$L((00)^*0)$


UGC NET Computer Science PYQ 2019
The STRIPS representation is:





Go to Discussion

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

Solution

STRIPS is used in AI planning.

In STRIPS, actions are represented using:

Preconditions
Add list
Delete list

So, it mainly describes how actions change the state of the world.

Therefore, STRIPS representation is an action-centric representation.


UGC NET Computer Science PYQ 2019

Consider $\Sigma={w,x}$ and $T={x,y,z}$. Define homomorphism $h$ by:

$h(x)=xzy$

$h(w)=zxyy$

If $L$ is the regular language denoted by $r=(w+x^)(ww)^$, then the regular language $h(L)$ is given by:






Go to Discussion

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

Solution


UGC NET Computer Science PYQ 2019
A fuzzy conjunction operator denoted as $t(x,y)$ and a fuzzy disjunction operator denoted as $s(x,y)$ form a dual pair if they satisfy the condition:





Go to Discussion

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

Solution

For fuzzy conjunction and fuzzy disjunction to be dual, they must satisfy De Morgan type relation.

The duality condition is:

$t(x,y)=1-s(1-x,1-y)$


UGC NET Computer Science PYQ 2019

Consider the following statements with respect to the language $L={a^n b^n\mid n\ge 0}$

$S_1:L^2$ is context free language

$S_2:L^k$ is context-free language for any given $k\ge 1$

$S_3:\overline{L}$ and $L^*$ are context free languages

Which one of the following is correct?






Go to Discussion

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

Solution

Given language:

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

This is a context free language.

Now check each statement.

For $S_1$:

$L^2=L\cdot L$

Context free languages are closed under concatenation.

So, $L^2$ is also context free.

Hence, $S_1$ is true.

For $S_2$:

$L^k$ means concatenation of $L$ with itself $k$ times.

For any fixed $k\ge 1$, context free languages are closed under finite concatenation.

So, $L^k$ is context free.

Hence, $S_2$ is true.

For $S_3$:

$L^*$ is context free because context free languages are closed under Kleene star.

Also, for this specific language $L={a^n b^n\mid n\ge 0}$, its complement $\overline{L}$ is also context free.

So, $\overline{L}$ and $L^*$ both are context free languages.

Hence, $S_3$ is true.

Therefore, all three statements $S_1,\ S_2$ and $S_3$ are correct.


UGC NET Computer Science PYQ 2019
Let $A_{\alpha_0}$ denotes the $\alpha$-cut of a fuzzy set $A$ at $\alpha_0$. If $\alpha_1<\alpha_2$, then:





Go to Discussion

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

Solution

In fuzzy sets, a higher $\alpha$-cut gives a smaller or equal set.

Since,

$\alpha_1<\alpha_2$

the cut at $\alpha_1$ will contain all elements of the cut at $\alpha_2$.

So,

$A_{\alpha_1}\supseteq A_{\alpha_2}$



UGC NET Computer Science PYQ 2019

Consider the following languages:

$L_1={a^n b^n c^m}\cup{a^n b^m c^m},\ n,m\ge 0$

$L_2={ww^R\mid w\in{a,b}^*}$ where $R$ represents reversible operation.

Which one of the following is/are inherently ambiguous language(s)?






Go to Discussion

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

Solution

$L_1={a^n b^n c^m}\cup{a^n b^m c^m}$ is a standard example of an inherently ambiguous language.

Reason: strings of the form $a^n b^n c^n$ can be generated from both parts:

First part: $a^n b^n c^m$ when $m=n$

Second part: $a^n b^m c^m$ when $m=n$

So, ambiguity is unavoidable for $L_1$.

Now,

$L_2={ww^R\mid w\in{a,b}^*}$ is the language of even length palindromes.

This language is context-free and not inherently ambiguous.


UGC NET Computer Science PYQ 2019

Consider the following methods:

$M1$: Mean of maximum
$M2$: Centre of area
$M3$: Height method

Which of the following is/are defuzzification method(s)?






Go to Discussion

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

Solution

Defuzzification converts fuzzy output into a crisp value.

Mean of maximum is a defuzzification method.

Centre of area is also a defuzzification method.

Height method is also used for defuzzification.

Therefore, all $M1,M2$ and $M3$ are defuzzification methods.


UGC NET Computer Science PYQ 2019

Let $G=(V,T,S,P)$ be any context-free grammar without any $\lambda$-productions or unit productions. Let $K$ be the maximum number of symbols on the right of any production in $P$. The maximum number of production rules for any equivalent grammar in Chomsky normal form is given by:

Where $|\ |$ denotes the cardinality of the set.






Go to Discussion

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

Solution

In Chomsky Normal Form, every production must be of the form:

$A\rightarrow BC$

or

$A\rightarrow a$

If a production has maximum $K$ symbols on the right side, then to convert it into binary productions, at most $K-1$ productions are needed.

So, for $|P|$ productions, maximum productions required are:

$(K-1)|P|$

Also, for terminals, we may need separate productions for each terminal.

Number of terminals $=|T|$

So, total maximum number of productions:

$(K-1)|P|+|T|$


UGC NET Computer Science PYQ 2019

Consider the following:

$(a)$ Evolution
$(b)$ Selection
$(c)$ Reproduction
$(d)$ Mutation

Which of the following are found in genetic algorithms?






Go to Discussion

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

Solution

Genetic algorithms are based on the idea of natural evolution.

They use selection to choose better individuals.

They use reproduction to create new generations.

They use mutation to introduce variations.

So, evolution, selection, reproduction and mutation are all related to genetic algorithms.


UGC NET Computer Science PYQ 2019

 Consider the following language families:

$L_1\equiv$ The context-free languages

$L_2\equiv$ The context-sensitive languages

$L_3\equiv$ The recursively enumerable languages

$L_4\equiv$ The recursive languages

Which one of the following options is correct?






Go to Discussion

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

Solution

The Chomsky hierarchy and decidability relation is:

Context-free languages $\subseteq$ Context-sensitive languages

Context-sensitive languages $\subseteq$ Recursive languages

Recursive languages $\subseteq$ Recursively enumerable languages

So,

$L_1\subseteq L_2\subseteq L_4\subseteq L_3$


UGC NET Computer Science PYQ 2019

Which of the following is an example of unsupervised neural network?






Go to Discussion

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

Solution

A self-organizing feature map is an unsupervised neural network.

It groups similar input patterns without using labelled output data.

Back-propagation is generally supervised learning.


UGC NET Computer Science PYQ 2019

Consider the following statements:

$S_1:$ There exists no algorithm for deciding if any two Turing machines $M_1$ and $M_2$ accept the same language.

$S_2:$ Let $M_1$ and $M_2$ be arbitrary Turing machines. The problem to determine $L(M_1)\subseteq L(M_2)$ is undecidable.

Which of the statements is/are correct?






Go to Discussion

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

Solution

Checking whether two Turing machines accept the same language means checking:

$L(M_1)=L(M_2)$

This is undecidable.

So, $S_1$ is true.

For $S_2$:

Checking whether:

$L(M_1)\subseteq L(M_2)$

for arbitrary Turing machines is also undecidable.

So, $S_2$ is also true.


UGC NET Computer Science PYQ 2019

The value of the derivative of the Sigmoid function given by

$f(x)=\dfrac{1}{1+e^{-2x}}$

at $x=0$ is:






Go to Discussion

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

Solution

Given,

$f(x)=\dfrac{1}{1+e^{-2x}}$

Differentiate with respect to $x$:

$f'(x)=\dfrac{2e^{-2x}}{(1+e^{-2x})^2}$

At $x=0$,

$e^{-2(0)}=e^0=1$

So,

$f'(0)=\dfrac{2}{(1+1)^2}$

$=\dfrac{2}{4}$

$=\dfrac{1}{2}$


UGC NET Computer Science PYQ 2019
 Let $A={001,0011,11,101}$ and $B={01,111,111,010}$. Similarly, let $C={00,001,1000}$ and $D={0,11,011}$. Which of the following pairs have a post-correspondence solution?





Go to Discussion

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

Solution

For pair $(A,B)$:

Take sequence of indices:

$3,4,1$

From $A$ side:

$A_3A_4A_1=11\ 101\ 001=11101001$

From $B$ side:

$B_3B_4B_1=111\ 010\ 01=11101001$

Both strings are equal.

So, pair $(A,B)$ has a PCP solution.

For pair $(C,D)$:

Starting must be with first pair because only it gives matching prefix:

$C_1=00,\ D_1=0$

After this, extra $0$ remains on upper side. Repeating first pair keeps increasing extra zeros, and other pairs do not match the required prefix properly.

So, pair $(C,D)$ has no PCP solution.


UGC NET Computer Science PYQ 2019
Reinforcement learning can be formalized in terms of _____ in which the agent initially only knows the set of possible _____ and the set of possible actions.





Go to Discussion

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

Solution

Reinforcement learning is generally formalized using a Markov decision process.

In a Markov decision process, the agent interacts with an environment using states and actions.

The agent knows the set of possible states and the set of possible actions.

Therefore, the blanks are:

Markov decision process, states


UGC NET Computer Science PYQ 2019
Which of the following class of IP address has the last address as $223.255.255.255$?





Go to Discussion

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

Solution

Classful IP address ranges are:

Class A: $0$ to $127$

Class B: $128$ to $191$

Class C: $192$ to $223$

Class D: $224$ to $239$

Given last address is:

$223.255.255.255$

This belongs to Class C.


UGC NET Computer Science PYQ 2019
Consider a subnet with $720$ routers. If a three-level hierarchy is chosen, with eight clusters, each containing $9$ regions of $10$ routers, then total number of entries in hierarchical table of each router is:





Go to Discussion

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

Solution

Total routers:

$8\times 9\times 10=720$

For each router, routing table entries are counted as:

Entries for routers in its own region:

$10$

Entries for other regions in same cluster:

$9-1=8$

Entries for other clusters:

$8-1=7$

Total entries:

$10+8+7=25$


UGC NET Computer Science PYQ 2019
Piconet is a basic unit of a bluetooth system consisting of $...............$ master node and up to $...............$ active slave nodes.





Go to Discussion

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

Solution

A Bluetooth piconet consists of:

$1$ master node

Up to $7$ active slave nodes

So, the blanks are:

one and seven

Therefore, the correct answer is


UGC NET Computer Science PYQ 2019
A network with bandwidth of $10$ Mbps can pass only an average of $12000$ frames per minute with each frame carrying an average of $10000$ bits. What is the throughput of this network?





Go to Discussion

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

Solution

Throughput means actual data transferred per second.

Given,

Number of frames per minute $=12000$

Bits per frame $=10000$

Total bits per minute:

$12000\times 10000=120000000$

Now convert into bits per second:

$\dfrac{120000000}{60}=2000000\ bps$


UGC NET Computer Science PYQ 2019
 The full form of ICANN is:





Go to Discussion

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

Solution

ICANN stands for:

Internet Corporation for Assigned Names and Numbers

It manages domain names, IP address allocation and related internet identifiers.


UGC NET Computer Science PYQ 2019
According to Dempster-Shafer theory for uncertainty management, where $Bel(A)$ denotes belief of event $A$.





Go to Discussion

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

Solution

In probability theory,

$P(A)+P(\neg A)=1$

But in Dempster-Shafer theory, belief values need not add up to $1$ because some uncertainty may remain unassigned.

So,

$Bel(A)+Bel(\neg A)\le 1$


UGC NET Computer Science PYQ 2019

Consider the following statements:

$S_1:\forall xP(x)\vee \forall xQ(x)$ and $\forall x(P(x)\vee Q(x))$ are not logically equivalent.

$S_2:\exists xP(x)\wedge \exists xQ(x)$ and $\exists x(P(x)\wedge Q(x))$ are not logically equivalent.

Which of the following statements is/are correct?






Go to Discussion

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

Solution

For $S_1$:

$\forall xP(x)\vee \forall xQ(x)$ means either $P(x)$ is true for all $x$, or $Q(x)$ is true for all $x$.

But $\forall x(P(x)\vee Q(x))$ means for every $x$, at least one of $P(x)$ or $Q(x)$ is true.

These two statements are not logically equivalent.

So, $S_1$ is true.

For $S_2$:

$\exists xP(x)\wedge \exists xQ(x)$ means there exists some $x$ for $P(x)$ and there exists some $x$ for $Q(x)$. These may be different values.

But $\exists x(P(x)\wedge Q(x))$ means there exists the same $x$ for which both $P(x)$ and $Q(x)$ are true.

These two statements are also not logically equivalent.

So, $S_2$ is true.


UGC NET Computer Science PYQ 2019

Consider the game tree given below.

Here $\circ$ and $\square$ represent MIN and MAX nodes respectively. The value of the root node of the game tree is:






Go to Discussion

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

Solution

In the given game tree:

$\square$ represents MAX node

$\circ$ represents MIN node

So, we evaluate the tree from bottom to top using the minimax rule.

At MIN node, minimum value is selected.

At MAX node, maximum value is selected.

From the left side of the tree:

$\min(17,19)=17$

After applying MAX and MIN levels, the left subtree gives value:

$17$

From the right side of the tree:

The available minimum values include $15$ and $14$, so the right subtree gives a value less than $17$.

At the root node, we have MAX node.

So root will select maximum value:

$\max(17,14)=17$

Therefore, the value of the root node is:

$17$


UGC NET Computer Science PYQ 2019

Consider the following models:

$M_1:$ Mamdani model
$M_2:$ Takagi-Sugeno-Kang model
$M_3:$ Kosko's additive model $($SAM$)$

Which of the following option contains examples of additive rule model?






Go to Discussion

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

Solution

Additive rule models combine the contribution of rules in an additive manner.

Takagi-Sugeno-Kang model is an additive rule model.

Kosko's Standard Additive Model $($SAM$)$ is also an additive rule model.

Mamdani model is not generally considered an additive rule model in this classification.

So, examples of additive rule model are:

$M_2$ and $M_3$


UGC NET Computer Science PYQ 2019

A fuzzy conjunction operator $t(x,y)$ and a fuzzy disjunction operator $s(x,y)$ form a pair if they satisfy:

$t(x,y)=1-s(1-x,1-y)$

If $t(x,y)=\dfrac{xy}{x+y-xy}$, then $s(x,y)$ is given by:






Go to Discussion

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

Solution

Given:

$t(x,y)=1-s(1-x,1-y)$

So,

$s(x,y)=1-t(1-x,1-y)$

Now,

$t(1-x,1-y)=\dfrac{(1-x)(1-y)}{(1-x)+(1-y)-(1-x)(1-y)}$

Numerator:

$(1-x)(1-y)=1-x-y+xy$

Denominator:

$(1-x)+(1-y)-(1-x)(1-y)$

$=2-x-y-(1-x-y+xy)$

$=1-xy$

So,

$t(1-x,1-y)=\dfrac{1-x-y+xy}{1-xy}$

Now,

$s(x,y)=1-\dfrac{1-x-y+xy}{1-xy}$

$s(x,y)=\dfrac{1-xy-1+x+y-xy}{1-xy}$

$s(x,y)=\dfrac{x+y-2xy}{1-xy}$


UGC NET Computer Science PYQ 2019

Let $W_{ij}$ represents weight between node $i$ at layer $k$ and node $j$ at layer $(k-1)$ of a given multilayer perceptron. The weight updation using gradient descent method is given by:






Go to Discussion

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

Solution

In gradient descent, weights are updated in the opposite direction of the gradient.

The general rule is:

$New\ Weight=Old\ Weight-\alpha\times Gradient$

Here,

$\alpha$ is the learning rate.

So,

$W_{ij}(t+1)=W_{ij}(t)-\alpha\dfrac{\partial E}{\partial W_{ij}}$


UGC NET Computer Science PYQ 2019
The order of schema $?10?101?$ and $???0??1$ are $...............$ and $...............$ respectively.





Go to Discussion

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

Solution

In genetic algorithm, the order of a schema is the number of fixed positions.

Fixed positions are symbols other than $?$

For schema $?10?101?$:

Fixed symbols are:

$1,\ 0,\ 1,\ 0,\ 1$

So, order is:

$5$

For schema $???0??1$:

Fixed symbols are:

$0,\ 1$

So, order is:

$2$


UGC NET Computer Science PYQ 2019

. Let the population of chromosomes in genetic algorithm is represented in terms of binary number. The strength of fitness of a chromosome in decimal form, $x$, is given by

$Sf(x)=\dfrac{f(x)}{\sum f(x)}$ where $f(x)=x^2$

The population is given by $P$ where:

$P={(01101),(11000),(01000),(10011)}$

The strength of fitness of chromosome $(11000)$ is $...............$






Go to Discussion

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

Solution

Convert chromosomes into decimal form:

$(01101)_2=13$

$(11000)_2=24$

$(01000)_2=8$

$(10011)_2=19$

Now calculate $f(x)=x^2$

For $13$:

$f(13)=13^2=169$

For $24$:

$f(24)=24^2=576$

For $8$:

$f(8)=8^2=64$

For $19$:

$f(19)=19^2=361$

Now,

$\sum f(x)=169+576+64+361=1170$

Strength of fitness for chromosome $(11000)$:

$Sf(24)=\dfrac{576}{1170}$

$Sf(24)=0.4923$

In percentage:

$0.4923\times 100=49.23%\approx 49.2$


UGC NET Computer Science PYQ 2019
Consider the following statements: $S_1:$ If a group $(G,*)$ is of order $n$, and $a\in G$ is such that $a^m=e$ for some integer $m\le n$, then $m$ must divide $n$. $S_2:$ If a group $(G,)$ is of even order, then there must be an element $a\in G$ such that $a\ne e$ and $aa=e$. Which of the statements is/are correct?





Go to Discussion

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

Solution

For $S_1$:

By Lagrange theorem, the order of every element of a finite group divides the order of the group.

So, if $m$ is the order of element $a$, then $m$ divides $n$.

Hence, $S_1$ is true.

For $S_2$:

If a finite group has even order, then there exists at least one non-identity element of order $2$.

So, there exists $a\ne e$ such that:

$a*a=e$

Hence, $S_2$ is also true.


UGC NET Computer Science PYQ 2019

Consider the following statements with respect to duality in LPP:

(a) The final simplex table giving optimal solution of the primal also contains optimal solution of its dual in itself.

(b) If either the primal or the dual problem has a finite optimal solution, then the other problem also has a finite optimal solution.

(c) If either problem has an unbounded optimum solution, then the other problem has no feasible solution at all.

Which of the statements is/are correct?






Go to Discussion

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

Solution

The final simplex table of the primal problem also gives information about the optimal solution of the dual problem.

Statement (b) is correct.

By strong duality theorem, if one problem has a finite optimal solution, then the other also has a finite optimal solution.

Statement (c) is correct.

If one problem is unbounded, then the other problem is infeasible.

So, all three statements are correct.


UGC NET Computer Science PYQ 2019

The Reduced Instruction Set Computer $($RISC$)$ characteristics are:
(a) Single cycle instruction execution
(b) Variable length instruction formats
(c) Instructions that manipulates operands in memory
(d) Efficient instruction pipeline

Choose the correct characteristics from the options given below:






Go to Discussion

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

Solution

RISC processors have simple instructions, mostly fixed length instructions and efficient pipelining.

In RISC:

Single cycle instruction execution is a characteristic.

Efficient instruction pipeline is also a characteristic.

Variable length instruction format is generally a CISC characteristic.

Instructions manipulating operands directly in memory is also generally a CISC characteristic.

So, correct statements are:

(a) and (d)


UGC NET Computer Science PYQ 2019

Which of the following binary codes for decimal digits are self complementing?

(a) $8421$ code
(b) $2421$ code
(c) excess-$3$ code
(d) excess-$3$ gray code

Choose the correct option:






Go to Discussion

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

Solution

A self-complementing code is a code in which the $9$'s complement of a decimal digit is obtained by complementing all bits.

$8421$ code is not self-complementing.

$2421$ code is self-complementing.

Excess-$3$ code is also self-complementing.

So, correct codes are:

(b) and (c)


UGC NET Computer Science PYQ 2019

Consider the following statements with respect to approaches to fill areas on raster systems:

P: To determine the overlap intervals for scan lines that cross the area.

Q: To start from a given interior position and paint outward from this point until we encounter the specified boundary conditions.

Select the correct answer from the options given below:






Go to Discussion

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

Solution

Statement P describes the scan-line area filling approach.

In this method, overlap intervals for scan lines crossing the area are determined.

Statement Q describes the boundary-fill or flood-fill approach.

In this method, filling starts from an interior point and moves outward until boundary conditions are reached.

So, both P and Q are correct approaches for filling areas on raster systems.


UGC NET Computer Science PYQ 2019

Which of the following statements are true regarding C++?

(a) Overloading gives the capability to an existing operator to operate on other data types.
(b) Inheritance in object oriented programming provides support to reusability.
(c) When object of a derived class is defined, first the constructor of derived class is executed then constructor of a base class is executed.
(d) Overloading is a type of polymorphism.

Choose the correct option from those given below:






Go to Discussion

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

Solution

Statement (a) is true.

Operator overloading allows an existing operator to work with user-defined or other data types.

Statement (b) is true.

Inheritance supports code reusability in object oriented programming.

Statement (c) is false.

When an object of derived class is created, the base class constructor is executed first, then derived class constructor is executed.

Statement (d) is true.

Overloading is a form of compile-time polymorphism.

So, correct statements are:

(a), (b) and (d)


UGC NET Computer Science PYQ 2019

Which of the following are legal statements in C programming language?

(a) int *P = &44;
(b) int *P = &r;
(c) int P = &a;
(d) int P = a;






Go to Discussion

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

Solution

Statement (a) is not legal because we cannot take the address of a constant value like $44$.

Statement (b) is legal because if $r$ is an integer variable, then &r gives its address and it can be stored in an integer pointer.

Statement (c) is not legal because &a gives address, but $P$ is declared as normal integer, not pointer.

Statement (d) is legal because if $a$ is an integer variable, then its value can be assigned to integer variable $P$.

So, legal statements are:

(b) and (d)


UGC NET Computer Science PYQ 2019

Two concurrent executing transactions $T_1$ and $T_2$ are allowed to update same stock item say $A$ in an uncontrolled manner. In such scenario, following problems may occur:

(a) Dirty read problem
(b) Lost update problem
(c) Transaction failure
(d) Inconsistent database state

Which of the following option is correct if database system has no concurrency module and allows concurrent execution of above two transactions?






Go to Discussion

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

Solution

If two transactions update the same data item without concurrency control, then many problems may occur.

Dirty read problem can occur when one transaction reads uncommitted data of another transaction.

Lost update problem can occur when one transaction update is overwritten by another transaction.

Inconsistent database state can occur because uncontrolled concurrent execution may violate consistency.

But transaction failure is not necessarily due to concurrency control absence.

So, correct problems are:

(a), (b) and (d)


UGC NET Computer Science PYQ 2019

Identify the circumstances under which pre-emptive CPU scheduling is used:

(a) A process switches from Running state to Ready state
(b) A process switches from Waiting state to Ready state
(c) A process completes its execution
(d) A process switches from Ready to Waiting state






Go to Discussion

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

Solution

Pre-emptive scheduling is used when the currently running process can be interrupted and CPU can be given to another process.

Statement (a) is correct because when a process moves from Running to Ready state, CPU is taken away from it.

Statement (b) is also correct because when a process moves from Waiting to Ready state, it may have higher priority and may preempt the current process.

Statement (c) is not preemption because the process completes naturally.

Statement (d) is not a valid normal transition for preemption.

So, correct statements are:

(a) and (b)


UGC NET Computer Science PYQ 2019

The following multithreaded algorithm computes transpose of a matrix in parallel:

$p\ Trans(X,Y,N)$

if $N=1$

then $Y[1,1]\leftarrow X[1,1]$

else partition $X$ into four $(N/2)\times(N/2)$ submatrices $X_{11},X_{12},X_{21},X_{22}$

partition $Y$ into four $(N/2)\times(N/2)$ submatrices $Y_{11},Y_{12},Y_{21},Y_{22}$

spawn $p\ Trans(X_{11},Y_{11},N/2)$

spawn $p\ Trans(X_{12},Y_{12},N/2)$

spawn $p\ Trans(X_{21},Y_{21},N/2)$

spawn $p\ Trans(X_{22},Y_{22},N/2)$

What is the asymptotic parallelism of the algorithm?






Go to Discussion

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

Solution

Parallelism is given by:

$\dfrac{T_1}{T_\infty}$

Here, $T_1$ is total work.

The algorithm recursively divides the matrix into $4$ subproblems of size $N/2$.

So,

$T_1(N)=4T_1(N/2)+\theta(1)$

Hence,

$T_1(N)=\theta(N^2)$

Now, span or critical path time is:

$T_\infty(N)=T_\infty(N/2)+\theta(1)$

because recursive calls run in parallel.

So,

$T_\infty(N)=\theta(\lg N)$

Therefore,

$\dfrac{T_1}{T_\infty}=\dfrac{\theta(N^2)}{\theta(\lg N)}$

$=\theta(N^2/\lg N)$


UGC NET Computer Science PYQ 2019

Consider the following statements:

(a) The running time of dynamic programming algorithm is always $\theta(\rho)$ where $\rho$ is number of subproblems.

(b) When a recurrence relation has cyclic dependency, it is impossible to use that recurrence relation $($unmodified$)$ in a correct dynamic program.

(c) For a dynamic programming algorithm, computing all values in a bottom-up fashion is asymptotically faster than using recursion and memorization.

(d) If a problem $X$ can be reduced to a known NP-hard problem, then $X$ must be NP-hard.

Which of the statement(s) is/are true?






Go to Discussion

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

Solution

Statement (a) is false because running time also depends on the time required to solve each subproblem, not only the number of subproblems.

Statement (b) is true because cyclic dependency creates a circular dependency, so the recurrence cannot be used directly in a correct dynamic program.

Statement (c) is false because bottom-up DP and memoized recursion usually have the same asymptotic time complexity.

Statement (d) is false because if $X$ is reduced to an NP-hard problem, it does not prove that $X$ is NP-hard. To prove $X$ is NP-hard, a known NP-hard problem should be reduced to $X$.

So, only statement (b) is true.


UGC NET Computer Science PYQ 2019

Consider the following statements:

(a) Fiber optic cable is much lighter than copper cable.

(b) Fiber optic cable is not affected by power surges or electromagnetic interference.

(c) Optical transmission is inherently bidirectional.

Which of the statements is/are correct?






Go to Discussion

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

Solution

Statement (a) is correct because fiber optic cable is lighter than copper cable.

Statement (b) is correct because fiber optic cable uses light signals, so it is not affected by electromagnetic interference or power surges.

Statement (c) is incorrect because optical transmission is not inherently bidirectional. Separate arrangements or fibers may be needed for two-way communication.

So, correct statements are:

(a) and (b)


UGC NET Computer Science PYQ 2019

Consider the following statements:

(a) Windows Azure is a cloud-based operating system.

(b) Google App Engine is an integrated set of online services for consumers to communicate and share with others.

(c) Amazon Cloud Front is a web service for content delivery.

Which of the statements is/are correct?






Go to Discussion

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

Solution

Statement (a) is correct. Windows Azure is related to cloud-based services and platform.

Statement (b) is incorrect because Google App Engine is a platform for developing and hosting web applications, not mainly an integrated consumer communication service.

Statement (c) is correct because Amazon CloudFront is a web service for content delivery.

So, correct statements are:

(a) and (c)


UGC NET Computer Science PYQ 2019

Consider the following statements with respect to network security:

(a) Message confidentiality means that the sender and the receiver expect privacy.

(b) Message integrity means that the data must arrive at the receiver exactly as they were sent.

(c) Message authentication means the receiver is ensured that the message is coming from the intended sender.

Which of the statements is/are correct?






Go to Discussion

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

Solution

Statement (a) is correct because confidentiality means privacy of the message.

Statement (b) is correct because integrity means the message should not be altered during transmission.

Statement (c) is correct because authentication verifies that the message is coming from the intended sender.

So, all three statements are correct.


UGC NET Computer Science PYQ 2019

Consider the following:

(a) Trapping at local maxima

(b) Reaching a plateau

(c) Traversal along the ridge.

Which of the following option represents shortcomings of the hill climbing algorithm?






Go to Discussion

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

Solution

Hill climbing algorithm has some common limitations.

It may get trapped at a local maximum.

It may reach a plateau where all neighboring states have almost same value.

It may face difficulty while traversing along a ridge.

So, all three are shortcomings of hill climbing algorithm.


UGC NET Computer Science PYQ 2019

Consider the following learning algorithms:

(a) Logistic regression
(b) Back propagation
(c) Linear regression

Which of the following option represents classification algorithms?






Go to Discussion

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

Solution

Logistic regression is used for classification problems.

Back propagation is used in neural networks, and neural networks can be used for classification.

Linear regression is mainly used for regression problems, not classification.

So, classification algorithms are:

(a) and (b)


UGC NET Computer Science PYQ 2019

Match List-I and List-II:


List-I Layer List-II Description
(a) Physical layer (i) Provide token management service
(b) Transport layer (ii) Concerned with transmitting raw bits over a communication channel
(c) Session layer (iii) Concerned with the syntax and semantics of the information transmitted
(d) Presentation layer (iv) True end-to-end layer from source to destination





Go to Discussion

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

Solution

Physical layer is responsible for transmitting raw bits over a communication channel.

So,

(a) Physical layer $\rightarrow$ (ii)

Transport layer provides true end-to-end communication from source to destination.

So,

(b) Transport layer $\rightarrow$ (iv)

Session layer provides services like dialog control and token management.

So,

(c) Session layer $\rightarrow$ (i)

Presentation layer deals with syntax and semantics of transmitted information.

So,

(d) Presentation layer $\rightarrow$ (iii)

Hence, correct matching is:

(a)-(ii), (b)-(iv), (c)-(i), (d)-(iii)


UGC NET Computer Science PYQ 2019
According to the ISO-9126 Standard Quality Model, match the attributes given in List-I with their definitions in List-II:
List-I Attribute List-II Definition
(a) Functionality (i) Relationship between level of performance and amount of resources
(b) Reliability (ii) Characteristics related with achievement of purpose
(c) Efficiency (iii) Efforts needed to make for improvement
(d) Maintainability (iv) Capability of software to maintain performance of software





Go to Discussion

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

Solution

Functionality means characteristics related with achievement of purpose.

So, (a) $\rightarrow$ (ii)

Reliability means capability of software to maintain its performance.

So, (b) $\rightarrow$ (iv)

Efficiency means relationship between level of performance and amount of resources used.

So, (c) $\rightarrow$ (i)

Maintainability means efforts needed to make improvement.

So, (d) $\rightarrow$ (iii)

Hence, correct matching is:

(a)-(ii), (b)-(iv), (c)-(i), (d)-(iii)


UGC NET Computer Science PYQ 2019
Match the Agile Process models with the task performed during the model:
List-I Agile Process Model List-II Task
(a) Scrum (i) CRC cards
(b) Adaptive software development (ii) Sprint backlog
(c) Extreme programming (iii) the <by/for/of/to> a(n)
(d) Feature-driven development (iv) Time box release plan





Go to Discussion

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

Solution

Scrum uses sprint backlog.

So, (a) $\rightarrow$ (ii)

Adaptive Software Development uses time box release plan.

So, (b) $\rightarrow$ (iv)

Extreme Programming uses CRC cards.

So, (c) $\rightarrow$ (i)

Feature-Driven Development uses feature template like:

the <by/for/of/to> a(n)

So, (d) $\rightarrow$ (iii)

Hence, correct matching is:

(a)-(ii), (b)-(iv), (c)-(i), (d)-(iii)


UGC NET Computer Science PYQ 2019
Match List-I with List-II:
List-I HTML Element / Attribute List-II Use
(a) Frame attribute (i) to create link in HTML
(b) <tr> tag (ii) for vertical alignment of content in cell
(c) Valign attribute (iii) to enclose each row in table
(d) <a> tag (iv) to specify the side of the table frame that display border





Go to Discussion

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

Solution

Frame attribute is used to specify the side of the table frame that displays border.

So, (a) $\rightarrow$ (iv)

<tr> tag is used to enclose each row in a table.

So, (b) $\rightarrow$ (iii)

Valign attribute is used for vertical alignment of content in a cell.

So, (c) $\rightarrow$ (ii)

<a> tag is used to create links in HTML.

So, (d) $\rightarrow$ (i)

Hence, correct matching is:

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


UGC NET Computer Science PYQ 2019
An instruction is stored at location $500$ with its address field at location $501$. The address field has the value $400$. A processor register $R_1$ contains the number $200$. Match the addressing mode $($List-I$)$ given below with effective address $($List-II$)$ for the given instruction:
List-I Addressing Mode List-II Effective Address
(a) Direct (i) 200
(b) Register indirect (ii) 902
(c) Index with $R_1$ as the index register (iii) 400
(d) Relative (iv) 600





Go to Discussion

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

Solution

Direct addressing:

$EA=400$

So, (a) $\rightarrow$ (iii)

Register indirect addressing:

$EA=R_1=200$

So, (b) $\rightarrow$ (i)

Index addressing:

$EA=Address+R_1$

$EA=400+200=600$

So, (c) $\rightarrow$ (iv)

Relative addressing:

Instruction is stored at location $500$, address field is at $501$, so next instruction location is $502$.

$EA=PC+Address$

$EA=502+400=902$

So, (d) $\rightarrow$ (ii)

Hence, correct matching is:

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


UGC NET Computer Science PYQ 2019
Match List-I and List-II:
List-I Term List-II Description
(a) Isolated I/O (i) same set of control signal for I/O and memory communication
(b) Memory mapped I/O (ii) separate instructions for I/O and memory communication
(c) I/O interface (iii) require control signals to be transmitted between the communicating units
(d) Asynchronous data transfer (iv) resolve the difference in central computer and peripherals





Go to Discussion

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

Solution

Isolated I/O uses separate instructions for I/O and memory communication.

So, (a) $\rightarrow$ (ii)

Memory mapped I/O uses same set of control signals for I/O and memory communication.

So, (b) $\rightarrow$ (i)

I/O interface resolves the difference between central computer and peripherals.

So, (c) $\rightarrow$ (iv)

Asynchronous data transfer requires control signals to be transmitted between communicating units.

So, (d) $\rightarrow$ (iii)

Hence, correct matching is:

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


UGC NET Computer Science PYQ 2019
Match List-I with List-II:
List-I Term List-II Description
(a) Micro operation (i) Specify micro operations
(b) Micro programmed control unit (ii) Improve CPU utilization
(c) Interrupts (iii) Control Memory
(d) Micro instruction (iv) Elementary operation performed on data stored in register





Go to Discussion

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

Solution

Micro operation means elementary operation performed on data stored in register.

So, (a) $\rightarrow$ (iv)

Micro programmed control unit uses control memory.

So, (b) $\rightarrow$ (iii)

Interrupts improve CPU utilization because CPU need not wait continuously for I/O operations.

So, (c) $\rightarrow$ (ii)

Micro instruction specifies micro operations.

So, (d) $\rightarrow$ (i)

Hence, correct matching is:

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


UGC NET Computer Science PYQ 2019
The sequence diagram given in Figure $1$ for the Weather Information System takes place when an external system requests the summarized data from the weather station. The increasing order of lifeline for the objects in the system are:





Go to Discussion

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

Solution

In a sequence diagram, lifeline shows the existence or participation duration of an object during the interaction.

From the given figure, the increasing order of lifeline is from the object having the shortest lifeline to the object having the longest lifeline.

By observing the diagram:

Weather Data has the shortest lifeline.

Then comes Comms link.

Then comes Weather Station.

Sat Comms has the longest lifeline.

So, the increasing order is:

Weather Data $\rightarrow$ Comms link $\rightarrow$ Weather Station $\rightarrow$ Sat Comms


UGC NET Computer Science PYQ 2019
The Data Encryption Standard $($DES$)$ has a function consists of four steps. Which of the following is correct order of these four steps?





Go to Discussion

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

Solution

In DES, the round function follows these steps:

First, expansion permutation is applied to expand the right half from $32$ bits to $48$ bits.

Then XOR operation is performed with the round key.

After that, S-box substitution is applied to reduce $48$ bits to $32$ bits.

Finally, straight permutation is applied.

So, the correct order is:

$Expansion\ Permutation \rightarrow XOR \rightarrow S\text{-}boxes \rightarrow Straight\ Permutation$


UGC NET Computer Science PYQ 2019

 How many nodes are there in flowgraph $F$?





Go to Discussion

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

Solution

In the given flowgraph, some statements are combined into one node, like $(2,3)$ and $(4,5)$.

Nodes are:

$1,\ (2,3),\ (4,5),\ 6,\ 7,\ 8,\ 9,\ 10,\ 11$

Total number of nodes:

$9$


UGC NET Computer Science PYQ 2019

 What is the cyclomatic complexity of flowgraph $F$?





Go to Discussion

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

Solution

Cyclomatic complexity is:

$V(G)=E-N+2$

Here,

Number of nodes:

$N=9$

Number of edges:

$E=11$

So,

$V(G)=11-9+2$

$V(G)=4$


UGC NET Computer Science PYQ 2019

How many regions are there in flowgraph $F$?





Go to Discussion

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

Solution

For a connected flowgraph:

Number of regions $=$ Cyclomatic complexity

From Q92,

Cyclomatic complexity $=4$

So, number of regions:

$4$


UGC NET Computer Science PYQ 2019

How many nodes are there in the longest independent path?





Go to Discussion

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

Solution

From the given flowgraph, one longest independent path can be written as:

$1\rightarrow(2,3)\rightarrow6\rightarrow7\rightarrow9\rightarrow10\rightarrow1\rightarrow11$

Now count the nodes in this path:

$1,\ (2,3),\ 6,\ 7,\ 9,\ 10,\ 1,\ 11$

Total nodes $=8$


UGC NET Computer Science PYQ 2019

How many predicate nodes are there and what are their names?





Go to Discussion

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

Solution

Predicate nodes are those nodes from where more than one outgoing edge is present.

From the flowgraph:

Node $1$ has more than one outgoing path.

Node $(2,3)$ has two outgoing paths.

Node $6$ has two outgoing paths.

So, predicate nodes are:

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

Number of predicate nodes $=3$


UGC NET Computer Science PYQ 2019

 Minimal cover $F'$ of functional dependency set $F$ is:

Given:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$






Go to Discussion

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

Solution

Given functional dependency set:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

First split right side of $A\rightarrow BC$:

$A\rightarrow B$

$A\rightarrow C$

So,

$F={A\rightarrow B,\ A\rightarrow C,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Now check whether $A\rightarrow D$ is redundant or not.

From:

$A\rightarrow B$

$A\rightarrow C$

we get:

$A\rightarrow BC$

And given:

$BC\rightarrow D$

So,

$A\rightarrow BC\rightarrow D$

Therefore,

$A\rightarrow D$

can be derived from other dependencies, so it is redundant.

Remove $A\rightarrow D$.

Hence minimal cover is:

$F'={A\rightarrow B,\ A\rightarrow C,\ BC\rightarrow D,\ D\rightarrow E}$


UGC NET Computer Science PYQ 2019

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Identify primary key of table $R$ with functional dependency set $F$.

Given:

$R(A,B,C,D,E)$

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$






Go to Discussion

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

Solution

To find the primary key, find closure of $A$.

Given:

$A\rightarrow BC$

So,

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

Also,

$A\rightarrow D$

So,

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

And,

$D\rightarrow E$

So,

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

Since $A^+$ contains all attributes of relation $R$, $A$ is a candidate key.

Therefore, the primary key is:

$A$


UGC NET Computer Science PYQ 2019

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Identify the normal form in which relation $R$ belong to.






Go to Discussion

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

Solution

$A$

Since the primary key contains only one attribute, there is no partial dependency.

So, relation $R$ is in $2NF$.

Now check for $3NF$.

Given dependency:

$D\rightarrow E$

Here, $D$ is not a super key and $E$ is a non-prime attribute.

So, relation is not in $3NF$.

Therefore, the highest normal form of relation $R$ is:

$2NF$


UGC NET Computer Science PYQ 2019

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Identify the redundant functional dependency in $F$.

Given:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$






Go to Discussion

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

Solution

We need to check which functional dependency can be derived from the other dependencies.

Given:

$A\rightarrow BC$

and

$BC\rightarrow D$

So, by transitivity:

$A\rightarrow BC\rightarrow D$

Therefore,

$A\rightarrow D$

can be derived from $A\rightarrow BC$ and $BC\rightarrow D$.

So, $A\rightarrow D$ is redundant.


UGC NET Computer Science PYQ 2019

An organization needs to maintain database having five attributes $A,B,C,D,E$. These attributes are functionally dependent on each other for which functional dependency set $F$ is given as:

$F={A\rightarrow BC,\ D\rightarrow E,\ BC\rightarrow D,\ A\rightarrow D}$

Consider a universal relation $R(A,B,C,D,E)$ with functional dependency set $F$. Also all attributes are simple and take atomic values only.

Assume that given table $R$ is decomposed in two tables:

$R_1(A,B,C)$ with functional dependency set

$f_1={A\rightarrow B,\ A\rightarrow C}$

and

$R_2(A,D,E)$ with FD set

$F_2={A\rightarrow D,\ D\rightarrow E}$

Which of the following option is true w.r.t. given decomposition?






Go to Discussion

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

Solution

For $R_1(A,B,C)$:

Given:

$A\rightarrow B$

$A\rightarrow C$

So,

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

Therefore, $A$ is a key of $R_1$.

Since all dependencies have left side as key $A$, $R_1$ is in $3NF$.

Now for $R_2(A,D,E)$:

Given:

$A\rightarrow D$

$D\rightarrow E$

Here,

$A^+={A,D,E}$

So, $A$ is a key of $R_2$.

But dependency $D\rightarrow E$ violates $3NF$, because $D$ is not a super key and $E$ is a non-prime attribute.

Since the key $A$ is a single attribute, there is no partial dependency.

So, $R_2$ is in $2NF$ but not in $3NF$.



UGC NET Computer Science


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