Previous Year Paper

UGC NET Paper 2: Computer Science17th June 2023 (Previous Year Paper)

Held in 2023

100 questions120 minutes
With answers
Free

Paper last updated:

Practise under exam conditions

Take this paper as a timed mock test. Review your answers after you submit.

Attempt timed test

Questions & answers

Read the paper at your pace. Open an explanation when you need it.

Computer Science (100 questions)

Question 1

Which of the following is not a solution representation in a genetic algorithm?

  1. Binary valued
  2. Real valued
  3. Permutation
  4. Combinations
  1. AOption (a)

    Binary valued

  2. BOption (b)

    Real valued

  3. COption (c)

    Permutation 

  4. DOption (d)

    Combinations

View answer & explanation

Correct answer

Answer: (d)D.

Combinations

Why this answer is correct

The correct answer is Combinations

Key PointsIn a genetic algorithm, solution representation refers to how the potential solutions (individuals in the population) are encoded. The given options can be categorized as follows:

  • Binary valued: Represents solutions using binary encoding, where each gene is typically represented as either 0 or 1.
  • Real valued: Represents solutions using real numbers, allowing for a more continuous representation.
  • Permutation: Represents solutions as permutations of elements, where the order of elements matters.
  • Combinations: This is not a standard representation in genetic algorithms. While permutations represent ordered arrangements, combinations represent unordered selections of elements. Genetic algorithms typically use representations that capture the structure and relationships among elements, and combinations may not be suitable for many optimization problems.

So, the correct answer is 4) Combinations.

Question 2

Match List I with List II

LIST ILIST II
A.Parallel FFTI.Θ (n2)
B.Iterative FFTII.Θ (n)
C.Evaluation of polynomial at n points by Horner methodIII.Θ (lg n)
D.Product of two polynomials that are represented in point value formIV.Θ (n lg n)

Choose the correct answer from the options given below:

  1. AOption (a)

    A - III, B - I, C - II, D - III

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

The correct answer is A - III, B - IV, C - I, D - II

Key Points

  • A - Parallel Fast Fourier Transform (FFT):
  • The FFT can be executed in parallel, which reduces the time complexity from O(n log n) to O(log n) under ideal conditions, as the operations required to calculate the FFT can be effectively divided among multiple processors. Thus, it corresponds to III. Θ (lg n).
  • B - Iterative Fast Fourier Transform (FFT):
  • The FFT, even when implemented iteratively, has a time complexity of O(n log n) because we divide the problem into smaller chunks recursively, and for each level of division, we do a constant amount of work. Hence it matches with IV. Θ (n lg n).
  • C - Evaluation of polynomial at n points by Horner method:
  • If evaluated using the Horner method, a polynomial can be evaluated in O(n) operations. However, if we're evaluating the polynomial at n points, and the polynomial itself has degree n, the total complexity becomes O(n^2). Therefore, it corresponds to I. Θ (n^2).
  • D - Product of two polynomials that are represented in point value form:
  • If the polynomials are represented in point-value form, their product can be computed pretty efficiently in O(n) time complexity. This is due to the fact that to compute the product polynomial at a point, you simply multiply the evaluations of the input polynomials at that point. However, a complete Fast Fourier Transform involves conversion back from point-value representation to coefficient representation, which takes O(n log n). As the question doesn't ask for this final conversion back, we'll go with II. Θ (n).

That's why the correct answer is option 3.

Question 3

The following table shows the time between failures for a software:

Error number12345
time since last failure (Hours)64856

The reliability of the system for one hour operation assuming an exponential model is-

  1. AOption (a)

    e−929e^{\frac{-9}{29}}

  2. BOption (b)

    e−729e^{\frac{-7}{29}}

  3. COption (c)

    e−529e^{\frac{-5}{29}}

  4. DOption (d)

    e−329e^{\frac{-3}{29}}

View answer & explanation

Correct answer

Answer: (c)C.

e−529e^{\frac{-5}{29}}

Why this answer is correct

The correct answer is e−529e^{\frac{-5}{29}}

Key PointsThe reliability of a system in the context of reliability engineering is often modeled using the exponential distribution. The exponential reliability function is given by: R(t)=e−λt R(t) = e^{-\lambda t}

where:

  • R(t)R(t) is the reliability at time  t,
  • λ \lambda is the failure rate (reciprocal of the mean time between failures).
  • In this case, you are given the time between failures for the software:
  • ​Time between failures=[6,4,8,5,6]\text{Time between failures} = [6, 4, 8, 5, 6]
  • To find the failure rate λ \lambda, you can use the formula:
  • ​λ=1Mean time between failures\lambda = \frac{1}{\text{Mean time between failures}}
  • Mean time between failures (MTBF) is calculated as the average of the time between failures:
  • ​MTBF=6+4+8+5+65=295\text{MTBF} = \frac{6 + 4 + 8 + 5 + 6}{5} = \frac{29}{5}
  • Now, the failure rate (λ \lambda) is:
  • λ=1MTBF=529 \lambda = \frac{1}{\text{MTBF}} = \frac{5}{29}
  • Substitute this into the reliability function:
  • ​R(t)=e−529tR(t) = e^{-\frac{5}{29} t}
  • For one hour of operation (t=1t=1

), the reliability becomes:

  • ​R(1)=e−529×1=e−529R(1) = e^{-\frac{5}{29} \times 1} = e^{-\frac{5}{29}}

So, the correct answer is: e−529 \text{e}^{-\frac{5}{29}}

Therefore, the correct option is: Option 3: e−529\text{Option 3: } e^{-\frac{5}{29}}

Question 4

Given below are two statements:

Which of the following concurrency control protocol ensures both conflict serializability and freedom from deadlock?

Statement I: Two phase locking

Statement II: Timestamp ordering

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

  1. AOption (a)

    Both Statement I and Statement II are correct

  2. BOption (b)

    Both Statement I and Statement II are incorrect

  3. COption (c)

    Statement I is correct but Statement II is incorrect

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (d)D.

Statement I is incorrect but Statement II is correct

Why this answer is correct

The correct answer is Statement I is incorrect but Statement II is correct

Key Points

  • Two-phase locking (2PL):
  • In this protocol, each transaction goes through two phases:
  • The expanding (or growing) phase where locks are acquired, and the shrinking phase where locks are released.
  • The name "two-phase" comes from the fact that all lock acquisitions occur before any lock is released.
  • This ensures a level of consistency and conflict serializability, as two conflicting transactions can't be running at the same time.
  • However, this method doesn't guarantee a deadlock-free environment.
  • A deadlock situation can occur when two (or more) transactions each hold a resource the other needs, creating a standoff where neither can proceed.
  • Timestamp-based protocol:
  • In timestamp-based protocols, each transaction is assigned a unique timestamp at the moment it is created.
  • There are two types of timestamp protocols:
  • Thomas Write Rule and Basic Timestamp Ordering. The one that provides both conflict serializability and freedom from deadlock is the Basic Timestamp Ordering.
  • This protocol ensures each transaction respects the chronological (timestamp) order of other transactions. When conflicts arise (for example if a later (younger) transaction tries to write data that an earlier (older) transaction is reading or writing), the conflicting transaction can be rolled back and restarted to prevent the scenario from causing inconsistency, thus ensuring conflict serializability.
  • And since a younger transaction will always concede to an older one by being rolled back and restarted, there's no chance for deadlocks to occur, thus ensuring freedom from deadlock.

So, Statement I is incorrect because Two-phase locking (2PL) does not ensure freedom from deadlock, and Statement II is correct because Timestamp-based protocol ensures both conflict serializability and freedom from deadlock.

Question 5

The clipping process in computer graphics is used for 

  1. AOption (a)

    Adding graphics

  2. BOption (b)

    Copying

  3. COption (c)

    Zooming

  4. DOption (d)

    Removing objects and lines

View answer & explanation

Correct answer

Answer: (d)D.

Removing objects and lines

Why this answer is correct

The correct answer is Removing objects and lines

Key PointsClipping in computer graphics is the process of constraining the visibility of objects and lines within a defined view or volume, typically a rectangular window view. In simpler terms, it means cutting off areas of geometric shapes that lie outside the viewing volume.

This process is incredibly crucial in 2D and 3D graphics alike for several reasons:

  • Performance Optimization: Rendering all elements in a given scene could be computationally intensive. By clipping objects that are not in the field of view, it significantly reduces the processing requirement, because these objects, despite being concealed, would still consume computational resources if not clipped.
  • Visibility Maintenance: Clipping is also necessary for maintaining proper visibility of elements in the scene. For example, an object behind the viewer in a 3D scene doesn't need to be rendered. In complex scenes, this also accounts for different layers of objects, where objects in the foreground should block objects in the background.
  • Correct perspectives in 3D spaces: 3D rendering involve translating three-dimensional coordinates to two-dimensional points to be displayed on the screen. Clipping ensures that the objects further away appear smaller and the ones closer look bigger, giving a sense of depth and maintaining correct perspective.

The primary types of clipping include Point Clipping, Line Clipping, Area Clipping (or Polygon Clipping), and Text Clipping. Each type has specific algorithms that work most efficiently for their respective tasks. The most well-known of these are the Cohen-Sutherland and the Liang-Barsky line-clipping algorithms.

Question 6

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: I/O protection is ensured by a hardware trap

Reason R: I/O interrupt caused by the condition like I/O completion and device malfunction occuring within the I/O devices

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

  1. AOption (a)

    Both A and R are true and R is the correct explanation of A

  2. BOption (b)

    Both A and R are true but R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (d)D.

A is false but R is true

Why this answer is correct

The correct answer is A is false but R is true

Key Points

  • Assertion A:
  • I/O protection is ensured by a hardware trap is not true because  I/O protection is ensured by operating system routines.
  • This is usually part of the kernel's responsibility, the core component of most operating systems. Kernel takes care of input/output (I/O) operations to ensure that they are performed safely, efficiently, and in accordance with the permissions of the active processes and users.
  • This way, the operating system helps to prevent unauthorized access to I/O devices and maintains system integrity and security.
  • Reason R:
  • I/O interrupt caused by the condition like I/O completion and device malfunction occuring within the I/O devices is true because an I/O interrupt can be triggered by events such as I/O completion and device malfunctions.

Question 7

Let R = {x : x ∈ N, x is multiple of 3 and x ≤ 100} and S = {x : x ∈ N, x is a multiple of 5 and x < 100}. What is the number of elements in (R ∩ S) × (S ∩ R)?

  1. AOption (a)

    36

  2. BOption (b)

    33

  3. COption (c)

    20

  4. DOption (d)

    6

View answer & explanation

Correct answer

Answer: (a)A.

36

Why this answer is correct

The correct answer 36

Key Points

  • The set R is the set of natural numbers less than or equal to 100 that are multiples of 3, while the set S is the set of natural numbers less than 100 that are multiples of 5.
  • The intersection of these two sets, R ∩ S, would be multiples of both 3 and 5, or multiples of 15, that are less than 100. The multiples of 15 that are less than or equal to 100 are {15, 30, 45, 60, 75, 90}, so there are 6 elements in the intersection of these sets.
  • The cartesian product (R ∩ S) × (S ∩ R) would involve all ordered pairs where the first element is chosen from R ∩ S and the second element is chosen from S ∩ R. However, since the sets R ∩ S and S ∩ R are the same, this is basically choosing two elements from the set R ∩ S, which has 6 elements.
  • The number of pairs we could form are 6 * 6 = 36.

So, the answer is: 36

Question 8

Given below are two statements:

Statement I: Fuzzifier is a part of a fuzzy system

Statement II: Inference engine is a part of fuzzy system

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

  1. AOption (a)

    Both Statement I and Statement II are correct 

  2. BOption (b)

    Both Statement I and Statement II are incorrect 

  3. COption (c)

    Statement I is correct but Statement II is incorrect 

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (a)A.

Both Statement I and Statement II are correct 

Why this answer is correct

The correct answer is Both Statement I and Statement II are correct.

Key Points"Fuzzy" in this context refers to a systems or control method that smooths the harsh transitions of binary (on-off, true-false, yes-no) responses to more human-like spectrums of response. Fuzzy systems deal with degrees of truth, as opposed to binary logic which deals with true or false (1 or 0, on or off).

  • Fuzzifier:
  • ​A Fuzzifier is a component of a fuzzy logic system that transforms crisp data inputs to fuzzy logic variables. In simpler terms, it takes a precise or specific input and decides the degree to which this input belongs to each of several predefined fuzzy sets.
  • Fuzzy sets could be something like "Cold", "Warm", "Hot", when you're talking about expressing the temperature in a fuzzy system.
  • For instance, If we input temperature data, a Fuzzifier will convert the exact temperature value to a degree of membership to the fuzzy sets of “Cold,” “Warm,” and “Hot.” For example, if the temperature is 25 degrees Celcius, the fuzzifier could interpret that as being "0% Cold", "50% Warm," and "50% Hot." This isn't a binary, it's a smooth transition between sets.
  • Inference Engine:
  • ​Then we have the Fuzzy Inference Engine, which is also a part of any fuzzy system. The Fuzzy Inference Engine applies certain rules (which can be thought of as something similar to if-then clauses) to the fuzzy inputs after they've been calculated by the fuzzifier, to derive fuzzy outputs. This engine basically applies these rules to produce a new fuzzy set as a result.
  • Continuing the temperature example, the fuzzy inference engine might apply rules like, "IF temperature is Warm THEN fan speed is Medium". These rules are usually set by the human designer of the system, based on some interpretation of what should happen under different circumstances.
  • After the inference engine processes, a Defuzzifier then turns this fuzzy output back into a specific, crisp (clear and precise) value.

Both Fuzzifier and Inference Engine are indeed components of a fuzzy system, and they are pivotal in making any fuzzy logic model work. So, statement I and statement II are correct.

Question 9

What will be the output of the following code?

include < sidio. h >

int main ( ) {

int a, b, c;

a = ox10; b = o10;

c = a + b:

printf ("%d", c);

return 0;

}

  1. AOption (a)

    20

  2. BOption (b)

    24

  3. COption (c)

    Garbage

  4. DOption (d)

    error

View answer & explanation

Correct answer

Answer: (b)B.

24

Why this answer is correct

The correct answer is 24

EXPLANATION:

#include <stdio.h>

int main() {

    int a, b, c;

    a = 0x10;   // Hexadecimal notation for 16

    b = 010;    // Octal notation for 8

    c = a + b;

    printf("%d", c);

    return 0;

}

0x10 is a hexadecimal representation which is equivalent to 16 in decimal and 010 is an octal representation which is equivalent to 8 in decimal.

So, c = a + b calculates as c = 16 + 8.

Hence, the output will be 24.

Question 10

What is the output of following code?

main ()

struct s1

{char * z;

int i;

struct s1 * p;

}

static struct s1 a [ ] = {

{"Nagpur", 1, a + 1}

{"Raipur', 2, a + 2}

{"Kanpur', 3, a}

}:

struct s1* ptr = a:

printf (%s %s %s\n", a[0].z, ptr → z, a[2].p → z);

}

  1. AOption (a)

    Nagpur Raipur Kanpur

  2. BOption (b)

    Nagpur Nagpur Nagpur

  3. COption (c)

    Kanpur Kanpur Kanpur

  4. DOption (d)

    Error

View answer & explanation

Correct answer

Answer: (b)B.

Nagpur Nagpur Nagpur

Why this answer is correct

The correct answer is Nagpur Nagpur Nagpur

Key PointsIn C programming, a structure (struct) is a user-defined data type that groups related variables of different data types together. A struct is used for packaging data where each element, known as a member, can have a different type.

#include<stdio.h>

typedef struct s1  {

  char * z;

  int i;

  struct s1 * p;

} s1;

int main() {

  static s1 a[3] = {{"Nagpur", 1, a + 1}, {"Raipur", 2, a + 2}, {"Kanpur", 3, a}};

  s1* ptr = a;

  printf("%s %s %s\n", a[0].z, ptr -> z, a[2].p -> z);

  return 0;

}

a[0].z refers to the string "Nagpur", which is the z value of the first structure.

ptr -> z also points to "Nagpur" because ptr was initialized to point to the first structure in the array.

a[2].p -> z also gives "Nagpur" because p of the third structure was initialized to point to the first structure in the array.

Therefore, the output of the corrected version of the provided code would be: Nagpur Nagpur Nagpur

This means the correct option from the given choices is 2) Nagpur Nagpur Nagpur.

Question 11

Match List I with List II

LIST ILIST II
A.The running time of straight forward recursive method to compute nth Fibonacci number FnI.O (n2)
B.The running time to compute Fn using memoizationII.O (lg n)
C.The running time to compute Fibonacci number Fn using only integer addition and multiplicationIII.O (n)
D.The running time to determine an optimal bitonic tourIV.Θ{ϕn}

Choose the correct answer from the options given below:

  1. AOption (a)

    ​ A - I, B - III, C - IV, D - II

  2. BOption (b)

    ​ A - IV, B - III, C - II, D - I

  3. COption (c)

    ​ A - I, B - II, C - IV, D - III

  4. DOption (d)

    ​ A - IV, B - II, C - III, D - I

View answer & explanation

Correct answer

Answer: (b)B.

​ A - IV, B - III, C - II, D - I

Why this answer is correct

The correct answer is ​ A - IV, B - III, C - II, D - I

Key Points

  • A. The running time of a straightforward recursive algorithm to compute the nth Fibonacci number is exponential in the worst case, which can be represented as O(2^n) (this complexity is larger than any options provided). But, as an approximation, we can denote this as Θ{ϕn}, where ϕ is the golden ratio. So, A matches with IV.
  • B. Using memoization (or dynamic programming), the time complexity of calculating the nth Fibonacci number will become linear, i.e., O(n), because we store and reuse the results of the sub-problems. So, B matches with III.
  • C. When we use the matrix exponentiation method to compute Fibonacci numbers, the running time is O(log n), as it computes the nth Fibonacci number by performing only integer addition and multiplication using the matrix [[1,1], [1,0]]. So, C matches with II.
  • D. The time complexity of determining an optimal bitonic tour is quadratic as it involves computations for each pair of points so Θ(n^2) is applicable. So, D matches with I.

Question 12

Consider a disk system with cylinders. The request to access the cylinders occurs in the following sequence:

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

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

  1. AOption (a)

    119 ms

  2. BOption (b)

    120 ms

  3. COption (c)

    142 ms

  4. DOption (d)

    146 ms

View answer & explanation

Correct answer

Answer: (a)A.

119 ms

Why this answer is correct

The correct answer is 119 ms

Key PointsThe Shortest Seek Time First (SSTF) Algorithm operates on the principle of servicing all requests in proximity to the current head location before moving further away. This strategy centralizes on serving requests that are nearest to the present location of the head, with the rationale being that the distance traversed by the head increases with the number of cylinders, so the SSTF algorithm prioritizes pending requests that are closest to the current position of the head.

=> 50 - 2 = 48

=> 73 - 2 = 71

=> time taken to satisfy all requests = 48 + 71 = 119

Question 13

Find the sum of all four digit numbers formed using the digits 1, 2, 4 and 6. 

  1. AOption (a)

    86,658 

  2. BOption (b)

    88,8858

  3. COption (c)

    91,958

  4. DOption (d)

    93,358

View answer & explanation

Correct answer

Answer: (a)A.

86,658 

Why this answer is correct

The correct answer is 86,658 

Key PointsWe want to find the sum of all four-digit numbers that can be formed using the digits 1, 2, 4, and 6. Each distinct digit will occupy each place value (Thousands, Hundreds, Tens, and Units) the same number of times when we consider all possible permutations.

There are total 4! = 432*1 = 24 ways to permute 4 different digits in 4 places.

The sum of all 4-digit numbers can be found by calculating the sum for each of the 4 positions (Thousands, Hundreds, Tens, and Units), then summing those results.

  • For each position:
  • Each of the 4 numbers (1, 2, 4, 6) will appear in each position 1/4th of the time in the total permutations, so 24 / 4 = 6 times for each.
  • The sum of the digits is 1 + 2 + 4 + 6 = 13.
  • So, the contribution for each position will be 13 * 6 = 78.
  • Now, we calculate the total sum taking into account the place value:
  • The Thousands place contributes 78 * 1000 = 78,000.
  • The Hundreds place contribute 78 * 100 = 7,800.
  • The Tens place gives 78 * 10 = 780.
  • The Units place contributes 78 * 1 = 78.

Adding those up, the total sum of all 4-digit numbers that can be made with the digits 1, 2, 4, and 6 is 78,000 + 7,800 + 780 + 78 = 86,658. So the answer is option 1) 86,658.

Question 14

How will you free the memory allocated by the following program?

include <stdio.h>

#i nclude < stdio.h >

#define MAXROW 3

#define MAXCOL 4

int main()

{

int ** p, i, j;

p = (int )malloc (MAXROW size of (int));

return 0:

}

  1. AOption (a)

    memfree (int p);

  2. BOption (b)

    dealloc (p);

  3. COption (c)

    malloc (p, 0);

  4. DOption (d)

    free (p):

View answer & explanation

Correct answer

Answer: (d)D.

free (p):

Why this answer is correct

The correct answer is free(p);

Key PointsThe way to free the memory allocated by the given C program is option 4) free(p);.

The malloc function is used to dynamically allocate memory in the heap to store a 2D array (matrix) with MAXROW number of pointers to int. 

#include <stdio.h>

#include <stdlib.h>

#define MAXROW 3

#define MAXCOL 4

int main() {

    int **p, i, j;

    // Allocate memory for MAXROW pointers to int

    p = (int *)malloc(MAXROW * sizeof(int));

    // Allocate memory for each row

    for(i = 0; i < MAXROW; i++) {

        p[i] = (int *)malloc(MAXCOL * sizeof(int));

    }

    // Free memory for each row

    for(i = 0; i < MAXROW; i++) {

        free(p[i]);

    }

    // Finally, free the memory for the pointers

    free(p);

    return 0;

}

The fixed version of the program allocates the memory for each row in the array and then frees it sequentially before at the end, releasing the memory used for the array of pointers itself.

Question 15

If A = {4n + 2 | n is a natural number} and B = {3n | n is a natural number}. Which of the following is correct for A ⋂ B?

  1. AOption (a)

    {12n2 + 6n | n is a natural number}

  2. BOption (b)

    {24n - 12 | n is a natural number}

  3. COption (c)

    {60n + 30 | n is a natural number} 

  4. DOption (d)

    {12n - 6 | n is a natural number}

View answer & explanation

Correct answer

Answer: (d)D.

{12n - 6 | n is a natural number}

Why this answer is correct

The correct answer is {12n - 6 | n is a natural number}

Key Points Set A generates numbers of the form 4n + 2, and set B generates numbers of the form 3n, both when n is a natural number. The intersection of the two sets will be numbers that can be generated by both formats.

Set A generates number:

n = 1, 2, 3, 4, ...

  • 4*1 + 2 = 6
  • 4*2 + 2 = 10
  • 4*3 + 2 = 14
  • 4*4 + 2 = 18

​Set B generates number:

n = 1, 2, 3, 4, ...

  • 3*1 = 3
  • 3*2 = 6
  • 3*3 = 9
  • 3*4 = 12
  • 3*5 = 15
  • 3*5 = 18

 A ⋂ B = (6, 10, 14, 18) ⋂ (3, 6, 9, 12, 15, 18)

 A ⋂ B = (6, 18)

Upon closer inspection, the option 4) {12n - 6 | n is a natural number} can indeed generate the sequence of numbers that belong to both A and B.

This sequence starts with ... when n = 1, 121 - 6 = 6 when n = 2, 122 - 6 = 18 when n = 3, 12*3 - 6 = 30 and so on.

These are indeed the terms that are common to sets A and B.

So, the correct answer is indeed option 4) {12n - 6 | n is a natural number}.

Question 16

The total cost of retrieving records in sorted order using an unclustered B+ tree is

(P-Average number of records per data page

N-Data pages

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

  1. AOption (a)

    (F*N) + P

  2. BOption (b)

    (F + P) * N

  3. COption (c)

    FNP

  4. DOption (d)

    F + P/N

View answer & explanation

Correct answer

Answer: (b)B.

(F + P) * N

Why this answer is correct

The correct answer is (F + P) * N

Key PointsWhen using an un-clustered B+ tree to retrieve records in sorted order, the total cost varies depending on the parameters you've provided: the average number of records per page (P), the number of data pages (N), and the ratio of the size of a data entry to the size of a data record (F).

We can calculate the cost as follows:

  • We need to access each data page once N. However, for each data entry, because of the un-clustered nature of the B+ Tree, there might be repeated access to a data page. So, the cost to retrieve the data entries is F*N.
  • Secondary, we also need to consider the average number of records in a data page. When we retrieve the data, we have to consider this factor. As we're retrieving records in sorted order, we need to look at each record at least once, so average number of records per page (P) comes into the play.

So from the given options, it seems like the closest one is: (F + P) * N which represents the cost of retrieving records in sorted order from an un-clustered B+ tree. It combines the cost of retrieving each data entries (F*N) and retrieving the ,records (P*N).

Question 17

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

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

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

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

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

  1. AOption (a)

    Both A and R are true and R is the correct explanation of A

  2. BOption (b)

    Both A and R are true but R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (b)B.

Both A and R are true but R is NOT the correct explanation of A

Why this answer is correct

The correct answer is Both A and R are true but R is NOT the correct explanation of A

Key Points

  • Assertion A is true because of the phenomenon known as Belady's Anomaly -
  • In some instances, increasing the number of page frames may result in an increased page fault rate.
  • This unexpected result typically has to do with the specific page replacement algorithm being used not always behaving the way you'd expect as more and more page frames are added.
  • In this case, the algorithm mentioned is First-In-First-Out (FIFO).
  • Reason R is also true, because some programs do not exhibit locality of reference.
  • Locality of reference means that programs tend to request pages which are related to the pages they have already requested, or are likely to request pages they have requested recently. Not all programs follow this pattern.

However, R is not the correct explanation of A. Belady's Anomaly isn't caused by a lack of locality of reference, rather it is related to the particular nuances of the replacement algorithm in question (in this case, FIFO). So while both statements are true, they aren't connected in the way the question implies. Hence the answer is option 2.

Question 18

At a particular time of computation, the value of a counting semaphore is 7. Then 20 p operations and 'x' V operations were completed on this semaphore. If the final value of semaphore is 5. x will be

  1. AOption (a)

    15

  2. BOption (b)

    22

  3. COption (c)

    18

  4. DOption (d)

    13

View answer & explanation

Correct answer

Answer: (c)C.

18

Why this answer is correct

The correct answer is 18

Key Points

A counting semaphore is a synchronization mechanism used in concurrent programming to control access to a shared resource. It maintains a counter that can be incremented or decremented, allowing a specified number of threads or processes to access the resource simultaneously. The semaphore helps prevent race conditions and ensures orderly access to shared resources in a multithreaded or multiprocess environment.

  • P stands for a wait operation. It reduces the value of counting semaphore by one for each wait operation.
  • V stands for a signal operation. It increases the value of counting semaphore by one for each signal operation.

The current value of counting semaphore is 7. After performing 20P the value of counting semaphore becomes -13. Now 'n' V operations are to be performed, which makes the value of counting semaphore as 5.

The generated equation is like this: −13+n=5=>n=5+13=>n=18-13+n=5 => n=5+13 => n=18

Question 19

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

  1. AOption (a)

    2.0

  2. BOption (b)

    1.06

  3. COption (c)

    1.18 

  4. DOption (d)

    2.5

View answer & explanation

Correct answer

Answer: (c)C.

1.18 

Why this answer is correct

The correct answer is 1.18 

Key PointsTo answer this question, we can use Amdahl's law, which is used to find the maximum improvement to an overall system when only part of the system is improved. The formula is:

  • Speedup=1(1−p)+ps\text{Speedup} = \frac{1}{(1 - p) + \frac{p}{s}}

where:

  • p is the proportion of the execution time that the part to be improved contributes to the system and
  • s is the speedup for that part.

In this problem, 30% of the execution time (or 0.30) is spent on floating point addition, so p = 0.30.

The floating point addition is being made twice as fast, so s = 2.

Let's plug these values into Amdahl's law to calculate the speedup.

Speedup=1(1−0.30)+0.302\text{Speedup} = \frac{1}{(1 - 0.30) + \frac{0.30}{2}}

Speedup=10.70+0.15=10.85\text{Speedup} = \frac{1}{0.70 + 0.15} = \frac{1}{0.85}

Speedup≈1.18\text{Speedup} \approx 1.18

Thus, a maximum speedup of 1.18 could be achieved by making the floating point addition twice as fast. Therefore, the correct answer is option 3) 1.18.

Question 20

Which of the following transforms in 2 dimension is used to resize a 2-dimensional object? 

  1. AOption (a)

    Translation

  2. BOption (b)

    Rotation

  3. COption (c)

    Scaling 

  4. DOption (d)

    Shearing

View answer & explanation

Correct answer

Answer: (c)C.

Scaling 

Why this answer is correct

The correct answer is Scaling

Key Points

  • Scaling:
  • Scaling is a geometric transformation that changes the size of a figure or a space, but not its shape.
  • This transformation can either enlarge (scale up) or reduce (scale down) the dimensions of the object by a specific scale factor.
  • This is the transform used to resize a 2D object.

Additional Information

  • Translation:

  • This is a geometric transformation that moves every point of a figure or a space by the same distance in a given direction. In 2D space, you can think of it as simply sliding the entire object either horizontally, vertically, or both.

  • Rotation:

  • Rotation is a transformation that turns a figure or a space around a fixed point, called the center of rotation. The amount of rotation is typically specified in degrees.

  • Shearing:

  • Shearing is a transformation that distorts the shape of an object such that the angles between its points are changed, but not their collinearity or incidence relationships. You can think of it as a sort of "skew" transformation, slanting the object in a specific direction while keeping all points along a shear invariant parallel line in their original locations.

Question 21

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

  1. AOption (a)

    & A [0] [0] [0] + w (bcs + c*r + t) 

  2. BOption (b)

    & A [0] [0] [0] + w (bcr* + c*s + t) 

  3. COption (c)

    & A [0] [0] [0] + w (abr* + c*s + t)

  4. DOption (d)

    & A [0] [0] [0] + w (abs + c*r + t)

View answer & explanation

Correct answer

Answer: (b)B.

& A [0] [0] [0] + w (bcr* + c*s + t) 

Why this answer is correct

The correct answer is & A [0] [0] [0] + w (bcr + cs + t)**

EXPLANATION:

In C++, for a 3-dimensional array declared as int A[a][b][c], the memory is allocated in a sequence such that it increases with 'c' first, then 'b', and finally 'a'. This is because the elements are stored in row-major order.

  • So, when we are trying to find the address of an element A[r][s][t]:
  • 't' will contribute to its value directly, because we are moving in the 'c' dimension,
  • 's' will have to consider all 'c' steps we have to take for every shift in the 'b' direction, hence 's' contributes 'c*s' shifts,
  • 'r' will have to consider all 'bc' steps we have to take for every shift in the 'a' direction, hence 'r' contributes 'bc*r' shifts.

Therefore, the correct formula would be: & A[0][0][0] + w * (bcr + c*s + t)

So, the correct answer would be option 2: & A [0] [0] [0] + w (bcr + c*s + t)

Question 22

Consider the following statements:

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

B. A BCNF schema can have transitive dependency

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

D. There are multivalued dependencies in 4NF

  1. AOption (a)

    A, B and C only 

  2. BOption (b)

    B, C and D only 

  3. COption (c)

    A, B and D only

  4. DOption (d)

    A, C and D only

View answer & explanation

Correct answer

Answer: (d)D.

A, C and D only

Why this answer is correct

The correct answer is A, C and D only

Key Points

  • A. A database design is in BCNF if each member of the set of relation schemas that constitutes the design is in BCNF.
  • This is true. BCNF (Boyce-Codd Normal Form) applies at the relation schema level (a set of attributes); if all relation schemas are in BCNF, the database design can be said to be in BCNF.
  • B. A BCNF schema can have transitive dependency.
  • This is false. The definition of BCNF is that for every dependency X -> Y in a relation, X must be a superkey. This disallows transitive dependencies, which would imply that there's a non-superkey attribute that determines another attribute.
  • C. It is always possible to obtain a 3NF design without sacrificing a lossless join.
  • This is true. The process of normalizing a database schema to 3NF can be done in such a way that it does not lose the ability to perform a lossless join. This is ensured by taking care that when a functional dependency X -> Y causes a violation, the decomposition of the relation includes X in all decomposed relations.
  • D. There are multivalued dependencies in 4NF.
  • This is True. 4NF (Fourth Normal Form) is specifically designed to handled multivalued dependencies. A multivalued dependency always requires at least three attributes because it consists of at least two attributes that are dependent on a third.

Based on these explanations, we can see that only statements A, C and D are true. Therefore, the correct option using the provided choices is: A, C, and D only

Question 23

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

  1. AOption (a)

    8 megabits per second 

  2. BOption (b)

    4 megabits per second 

  3. COption (c)

    6 megabits per second

  4. DOption (d)

    2 megabits per second

View answer & explanation

Correct answer

Answer: (b)B.

4 megabits per second 

Why this answer is correct

The correct answer is 4 megabits per second 

EXPLANATION:

  • First, we need to determine the amount of data transferred in one transaction.
  • The length of an average article is 3k bytes.
  • In terms of bits, this would be 3000 bytes * 8 bits/byte = 24000 bits.
  • Next, let's calculate the total amount of data transferred in one minute.
  • There are 20,000 users, each of whom submits a request once every 2 minutes.
  • Therefore, in one minute, there will be 20,000 users / 2 = 10,000 transactions.
  • For each transaction, we've determined that there are 24,000 bits.
  • So, the total amount of data transferred in one minute is 10,000 transactions * 24,000 bits/transaction = 240 x 106 bits.
  • Since this question asked for throughput in megabits per second, we need to convert this quantity.
  • 1 minute = 60 seconds,
  • therefore, throughput = 240 x 106 bits**/minute / 60 seconds/minute**
  • =  4 x **106 bits/second = 4 megabits/second. (**megabits = 106)

So, the answer is: 4 megabits per second

Question 24

A TCP server application is programmed to listen on port P on host S. A TCP client is connected to the TCP server over the network, Consider that while TCP connection is active the server is crashed and rebooted. Assume that the client does not use TCP keepalive timer. Which of the following behaviour/s is/are possible?

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

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

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

  1. AOption (a)

    Both Statement I and Statement II are true 

  2. BOption (b)

    Both Statement I and Statement II are false

  3. COption (c)

    Statement I is true but Statement II is false

  4. DOption (d)

    Statement I is false but Statement II is true

View answer & explanation

Correct answer

Answer: (a)A.

Both Statement I and Statement II are true 

Why this answer is correct

The correct answer is Both Statement I and Statement II are true

Key Points

  • Statement I:
  • After the server is rebooted, the TCP server application can indeed start listening again on the same port P.
  • There is nothing technically preventing this. After a crash, provided there are no other issues (like issues with the OS, hardware, the network, etc.), the server software can start up again and bind to the same port it was listening on before the crash.
  • Statement II:
  • ​When the client sends a packet after the server rebooted, it's very likely to receive a RST (reset) segment in response.
  • This is because from the server's perspective, it has no knowledge of any prior connection that might have existed before it rebooted, so if it gets a packet from the client for what the client thinks is an ongoing connection, the server's response will be to send a RST to effectively tell the client "I don't know about any such connection."

Question 25

Consider the following statements:

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

S2: Shortest remaining time first scheduling may cause starvations

S3: Stack is shared by all threads in a process

  1. AOption (a)

    S1, S2 and S3 are true

  2. BOption (b)

    S1, S3 false and S2 is true 

  3. COption (c)

    S1, S2 are false and S3 is true

  4. DOption (d)

    S1, S2 and S3 are false

View answer & explanation

Correct answer

Answer: (b)B.

S1, S3 false and S2 is true 

Why this answer is correct

The correct answer is S1, S3 false and S2 is true

Key Points

  • S1: LRU (Least Recently Used) page replacement algorithm suffers from belady's anomaly. False -
  • **���**The LRU (Least Recently Used) page replacement algorithm does not suffer from Belady's anomaly.
  • Belady's anomaly is the phenomenon where increasing the number of page frames results in an increase in the number of page faults.
  • This anomaly is typically associated with the FIFO (First-in, First-out) page replacement algorithm, not with LRU.
  • S2: Shortest remaining time first scheduling may cause starvations. True -
  • ​The Shortest Remaining Time First (SRTF) scheduling algorithm can indeed cause starvation.
  • This happens when short processes keep coming. This can indefinitely postpone the execution of longer processes, leading to their starvation.
  • S3: Stack is shared by all threads in a process. False -
  • In a multithreaded process, each thread has its own separate stack space.
  • This is necessary to keep track of the execution state for each individual thread.
  • Other parts of the process such as the heap, global variables, and code segment are shared among all threads.

So, according to the given statements: S1: False S2: True S3: False

The appropriate choice is: 2) S1, S3 false and S2 is true.

Question 26

Which of the following is used to determine the cost performance index? 

  1. AOption (a)

    Budgeted cost of work performed - budget at completion

  2. BOption (b)

    Budgeted cost of work performed ÷ budget at completion

  3. COption (c)

    Budgeted cost of work performed ÷ Actual cost of work performed

  4. DOption (d)

    Budgeted cost of work performed - Actual cost of work performed

View answer & explanation

Correct answer

Answer: (c)C.

Budgeted cost of work performed ÷ Actual cost of work performed

Why this answer is correct

The correct answer is Budgeted cost of work performed ÷ Actual cost of work performed

Key PointsThe Cost Performance Index (CPI) is a key performance indicator in project management, particularly in the context of earned value management. It is used to assess the efficiency of cost performance on a project. The formula for calculating CPI is:

  • CPI=BCWPACWP\text{CPI} = \frac{\text{BCWP}}{\text{ACWP}}

Where:

  • BCWP (Budgeted Cost of Work Performed): The value of the work actually performed and completed according to the budget.
  • ACWP (Actual Cost of Work Performed): The actual cost incurred for the work performed.

So, the CPI is essentially a ratio that helps you understand how well the project is performing in terms of cost efficiency. If the CPI is greater than 1, it indicates that the project is under budget, which is generally a positive sign. On the other hand, if the CPI is less than 1, it suggests that the project is over budget.

Now, let's relate this to the given options: Budgeted cost of work performedActual cost of work performed \frac{\text{Budgeted cost of work performed}}{\text{Actual cost of work performed}}

This is the correct formula for calculating the Cost Performance Index (CPI) based on the explanation above. It compares the budgeted cost of the work performed to the actual cost of the work performed. Therefore, option 3 is the correct choice for determining the Cost Performance Index.

Question 27

Which is not a basic approach to the problem of conflict resolution in a production system? 

  1. AOption (a)

    Assigning a preference based on the rule that matched

  2. BOption (b)

    Assigning a preference based the object that matched

  3. COption (c)

    Assigning a preference based on the action that the matched rule would perform

  4. DOption (d)

    Assigning a preference based on the action that the matched object would perform

View answer & explanation

Correct answer

Answer: (d)D.

Assigning a preference based on the action that the matched object would perform

Why this answer is correct

The correct answer is Assigning a preference based on the action that the matched object would perform

Key PointsIn the context of conflict resolution in a production system, different rules may be applicable or relevant to a given situation, and there could be conflicts when multiple rules are triggered. Resolving these conflicts involves deciding which rule should take precedence or have a higher priority.

  • Assigning a preference based on the rule that matched:
  • This approach involves giving priority to the rule itself. If multiple rules are triggered, the one with the highest priority or preference based on some criteria will be selected.
  • Assigning a preference based on the object that matched:
  • This approach involves giving priority to the object (data, entity, etc.) that the rule is applied to. Depending on the characteristics or properties of the matched object, priority is assigned.
  • Assigning a preference based on the action that the matched rule would perform:
  • This approach involves considering the action or operation that each rule would perform. The rule with the action that is deemed more critical or appropriate in the given context is given higher priority.
  • Assigning a preference based on the action that the matched object would perform:
  • This option is not typically a basic approach in conflict resolution. Assigning preference based on the action that the matched object would perform is less common in traditional conflict resolution strategies. Usually, the focus is on rules, objects, or both.

In summary, assigning a preference based on the action that the matched object would perform (Option 4) is less common in the context of basic conflict resolution strategies in production systems. The more common approaches involve prioritizing rules, objects, or actions associated with the rules.

Question 28

Let R (A, B, C, D, E, F) be a relational schema with following functional dependencies:

C → F, E → A, EC → D, A → B. Which of the following is a key for R?

  1. AOption (a)

    CD 

  2. BOption (b)

    EC

  3. COption (c)

    AE

  4. DOption (d)

    AC

View answer & explanation

Correct answer

Answer: (b)B.

EC

Why this answer is correct

The correct answer is EC

Key Points 

EXPLANATION:

In order to find the key for a relational schema, we need to find a minimal set of attributes which can determine all other attributes. This is usually done by calculating the closure of each set of attributes.Given the functional dependencies:

  • C → F, E → A, EC → D, A → B

Let's compute the closure of each candidate key:

  • For CD closure: CD C gives F by the dependency C → F. But no other attributes can be determined. So, CD closure is CDF. It does not include all attributes.
  • For EC closure: EC E gives A by the dependency E → A, and EC gives D by the dependency EC → D. Then, A gives B. Now we have ECABDF which includes all the attributes.

So, the key for R is EC.

Mistake PointsAbove Official question some mistake in data R (A, B, C, D, F)  the relation mention attribute F but option they don't give F in any key pair so we have change the relation R (A, B, C, D, E, F) and solve them.

Question 29

Consider the following statements about heap sort algorithm:

A. The MAX-HEAPIFY procedure which runs in O lg (n) time, is the key to maintaining the max heap property

B. The BUILD-MAX-HEAP procedure, which runs in O lg (n) time, produces max-heap from an unordered input array

C. The MAX-HEAP-INSERT, which runs in O (lg n) time, implements the insertion operation

D. The HEAP-INCREASE-KEY procedure runs in O (n lg n) time, to set the key of new node of its correct value

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B only

  2. BOption (b)

    A, C only 

  3. COption (c)

    B, D only

  4. DOption (d)

    A, B, C, D

View answer & explanation

Correct answer

Answer: (b)B.

A, C only 

Why this answer is correct

The correct answer is A, C only

Key Points

  • A. The MAX-HEAPIFY procedure which runs in O(lg n) time, is the key to maintaining the max heap property.
  • This statement is true. The MAX-HEAPIFY procedure is responsible for maintaining the max-heap property, and it indeed runs in O(log n) time.
  • B. The BUILD-MAX-HEAP procedure, which runs in O(lg n) time, produces a max-heap from an unordered input array.
  • This statement is incorrect. The BUILD-MAX-HEAP procedure has a time complexity of O(n), not O(log n). It builds a max-heap from an unordered input array in linear time.
  • C. The MAX-HEAP-INSERT, which runs in O(lg n) time, implements the insertion operation.
  • This statement is true. The MAX-HEAP-INSERT operation involves inserting a new element into the max-heap and then maintaining the max-heap property. Its time complexity is O(log n).
  • D. The HEAP-INCREASE-KEY procedure runs in O(n lg n) time to set the key of a new node to its correct value.
  • This statement is incorrect. The time complexity of HEAP-INCREASE-KEY is O(log n), not O(n log n). It is used to increase the key of a node in a max-heap to its correct value.

Therefore, the correct answer is option 2) A, C only.

Question 30

Consider the following statements about the software product line system:

Statement I: At the interaction level, components provide an operator display interface and an interface with the communication system used.

Statement II: At the I/O management level, components handle operator authentication, report generator and query manager.

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

  1. AOption (a)

    Both Statement I and Statement II are correct

  2. BOption (b)

    Both Statement I and Statement II are incorrect

  3. COption (c)

    Statement I is correct but Statement II is incorrect 

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (a)A.

Both Statement I and Statement II are correct

Why this answer is correct

The correct answer is Both Statement I and Statement II are correct

Key Points 

  • Statement I: "At the interaction level, components provide an operator display interface and an interface with the communication system used." -
  • It is true that at the interaction level, components often provide the user interface (which could include operator display) and the interface with the various other systems it needs to communicate with such as databases, files, other external systems, etc.
  • Statement II: "At the I/O management level, components handle operator authentication, report generator and query manager." -
  • The handling of operator authentication, report generation, and query management indeed seems to be the responsibilities of components at the I/O management level.

 So, Option 1) Both Statement I and Statement II are correct.

Question 31

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: The AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion

Reason R: A Red Black tree with n nodes has height that is greater than 2 log2 (n + 1) and the AVL tree with n nodes has height less than logΦ (√5 (n+2)) -2 (where Φ is golden ratio)

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

  1. AOption (a)

    Both A and R are correct and R is the correct explanation of A

  2. BOption (b)

    Both A and R are correct and R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (c)C.

A is true but R is false

Why this answer is correct

The correct answer is A is true but R is false

EXPLANATION:

  • Assertion A: "AVL trees are more balanced as compared to Red Black trees, but they may cause more rotations during insertion and deletion."
  • This assertion is correct. AVL trees are more strictly balanced than Red-Black trees, meaning that the height difference between the left and right subtrees of any node (called the balance factor) is at most 1 in AVL trees, whereas it can be up to 2 in Red-Black trees.
  • However, this strict balancing in AVL trees can lead to more rotations during insertion and deletion operations compared to Red-Black trees.
  • Reason R: "A Red-Black tree with n nodes has a height that is greater than 2 log₂ (n + 1), and the AVL tree with n nodes has a height less than logΦ (√5 (n+2)) - 2 (where Φ is the golden ratio)."
  • This reason is incorrect. The correct upper bound for the height of a Red-Black tree with n nodes is 2 log₂ (n + 1), not greater than.
  • The statement for AVL trees is also incorrect; the correct upper bound for the height of an AVL tree with n nodes is approximately 1.44 * log₂(n+2) - 1.329.

Therefore, Assertion A is correct, but Reason R is incorrect. The correct answer is option 3: "A is true but R is false."

Question 32

256 Mb DRAM is organized as a 32M × 8 memory externally and as a 16K × 16K square array internally. Each row must be refreshed at least once every 50 mili second to forestall loss of data; refreshing one row takes 100 nanoseconds. What fraction of the total memory bandwidth is lost to refresh cycles? 

  1. AOption (a)

    6.6%

  2. BOption (b)

    3.3%

  3. COption (c)

    9.9%

  4. DOption (d)

    4.3%

View answer & explanation

Correct answer

Answer: (b)B.

3.3%

Why this answer is correct

The correct answer is 3.3%

SOLUTION:

To calculate the fraction of total memory bandwidth lost to refresh cycles, we need to consider the time spent on refreshing compared to the total time available.

First, let's find out how many rows are there in the DRAM:

Number of Rows=Total Memory SizeNumber of Columns\text{Number of Rows} = \frac{\text{Total Memory Size}}{\text{Number of Columns}}

Number of Rows=256 MB×832 MB\text{Number of Rows} = \frac{256 \text{ MB} \times 8}{32 \text{ MB}}

Number of Rows=64\text{Number of Rows} = 64

Now, let's calculate the time required to refresh all rows:

Total Refresh Time=Number of Rows×Time to Refresh One Row\text{Total Refresh Time} = \text{Number of Rows} \times \text{Time to Refresh One Row}

Total Refresh Time=64×100 ns\text{Total Refresh Time} = 64 \times 100 \text{ ns}

Total Refresh Time=6400 ns\text{Total Refresh Time} = 6400 \text{ ns}

Now, let's find the time available for data access in one refresh cycle:

Time Available for Data Access=Refresh Cycle Time−Total Refresh Time\text{Time Available for Data Access} = \text{Refresh Cycle Time} - \text{Total Refresh Time}

Time Available for Data Access=499935600 nsTime Available for Data Access=499935600 ns

Time Available for Data Access=50 ms−6400 ns\text{Time Available for Data Access} = 50 \text{ ms} - 6400 \text{ ns}

Finally, let's find the fraction of time lost to refresh cycles:

Fraction of Time Lost=Total Refresh TimeRefresh Cycle Time×100%\text{Fraction of Time Lost} = \frac{\text{Total Refresh Time}}{\text{Refresh Cycle Time}} \times 100\%

Fraction of Time Lost=6400 ns50 ms×100%\text{Fraction of Time Lost} = \frac{6400 \text{ ns}}{50 \text{ ms}} \times 100\%

Fraction of Time Lost≈3.2%\text{Fraction of Time Lost} \approx 3.2\%

Now, let's compare this result with the given options:

The closest option is 3.3%, so the correct answer is: 2) 3.3%

Question 33

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: Validity checks real need of system users

Reason R: Completeness checks system user defined requirements.

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

  1. AOption (a)

    Both A and R are true and R is the correct explanation of A

  2. BOption (b)

    Both A and R are true but R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false 

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (b)B.

Both A and R are true but R is NOT the correct explanation of A

Why this answer is correct

The correct answer is Both A and R are true but R is NOT the correct explanation of A

EXPLANATION:

  • A validation check in software development ensures that the system is structured to meet the specified requirements and helps determine if the system meets the needs of the system users.
  • The statement "Completeness checks system user-defined requirements," entails that a completeness check ensures all necessary parts of the system have been included and all requirements are fulfilled.
  • Therefore, while both statements are true, Reason R does not directly explain Assertion A. They pertain to different aspects of system checks in software development. Validation is more about ensuring the system works as intended for the users, whereas completeness is about fulfilling all defined requirements, whether user-specific or functional.

Question 34

Given the basic E R diagram and relational model, which of the the following is incorrect? 

  1. AOption (a)

    An attribute of an entity can have more than one value

  2. BOption (b)

    An attribute of an entity can be composite

  3. COption (c)

    In a row of relational table, an attribute can have more than one value

  4. DOption (d)

    In a row of a relational table, an attribute can have exactly one value or a NULL value

View answer & explanation

Correct answer

Answer: (c)C.

In a row of relational table, an attribute can have more than one value

Why this answer is correct

The correct answer is In a row of relational table, an attribute can have more than one value

Key Points

  • In a relational database model, each attribute of a tuple (or row) must have only one value.
  • This is a reflection of the atomicity property of the relational model.
  • If more than one value is required, it should be represented as another row, or possibly in another table depending on the relationship.
  • This is to maintain the integrity and simplicity of the design.
  • However, it's worth mentioning that some modern DBMS do support multi-valued attributes, although this is outside the scope of the classical relational model.

Additional Information

  • An attribute in an ER diagram refers to a property or characteristic of an entity or relationship. In a relational model, it's equivalent is a table column.
  • In ER modeling, an attribute can be single-valued or multi-valued. However, in a strict relational database model, each attribute of a row must have a single value (atomicity). If multiple values are needed, they can be normalized and placed in separate rows or tables.
  • A composite attribute can be divided into smaller sub-attributes, which come together to represent a fuller concept. For example, an entity "Person" might have a composite attribute "Full Name", subdivided into "First Name" and "Last Name".
  • In relational model, an attribute in a row can hold a single value or be marked as NULL, representing the absence of a value or unknown information.

Question 35

Match List I with List II

LIST ILIST II
A.Expert systemI.Decision tree
B.Fuzzy systemII.Scramble
C.Operator in genetic algorithmIII.Inference engine
D.Supervised techniqueIV.Mycin

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

The correct answer is A - IV, B - III, C - II, D - I

Key Points

  • A. Expert system - IV. Mycin:
  • An expert system is a computer program that emulates the decision-making ability of a human expert. It uses a knowledge base of human expertise and an inference engine to draw conclusions.
  • Mycin is a classic example of an expert system designed for medical diagnosis. It used a rule-based system to analyze patient symptoms and recommend treatments.
  • B. Fuzzy system - III. Inference engine:
  • Fuzzy systems deal with uncertainty and imprecision in data by using fuzzy logic, which allows for degrees of truth rather than strict true or false values.
  • The inference engine is a component of an expert system that processes the rules and facts to draw conclusions. In the context of fuzzy systems, it handles the fuzzy logic rules.
  • C. Operator in genetic algorithm - II. Scramble:
  • Genetic algorithms are optimization algorithms inspired by the process of natural selection. They use operators like mutation and crossover to evolve a population of solutions over generations.
  • Scramble is a type of crossover operator in genetic algorithms. It involves randomly reordering segments of genetic information within individuals to create new offspring.
  • D. Supervised technique - I. Decision tree:
  • Supervised learning involves training a model on a labeled dataset, where the algorithm learns from input-output pairs to make predictions on new, unseen data.
  • Decision trees are a type of supervised learning technique used for both classification and regression tasks. They make decisions by recursively partitioning the data based on features.

Question 36

In a multiuser operating system, 20 requests are made to use a particular resource per hour, on an average. The probability that no request is made in 45 minutes is 

  1. AOption (a)

    e-15

  2. BOption (b)

    e-5

  3. COption (c)

    1 - e<sub>-5</sub>

  4. DOption (d)

    1 - e-10

View answer & explanation

Correct answer

Answer: (a)A.

e-15

Why this answer is correct

The correct answer is e-15EXPLANATION:

To solve this problem, we can use the Poisson distribution, which is often used to model the number of events occurring in fixed intervals of time or space.

The Poisson distribution is given by the formula:

  • P(X=k)=e−λ⋅λkk!P(X = k) = \frac{e^{-\lambda} \cdot \lambda^k}{k!}

Where:

  • P(X=k)P(X = k)  is the probability of observing  k events,
  • e is the base of the natural logarithm (approximately 2.71828),
  • λ\lambda is the average rate of events per interval,
  • k is the actual number of events observed.

In this case, the average rate of requests per hour (λ \lambda) is 20. We want to find the probability of no requests in 45 minutes. We can adjust the rate for the given time interval:

  • Adjusted rate for 45 minutes=4560×Average rate per hour \text{Adjusted rate for 45 minutes} = \frac{45}{60} \times \text{Average rate per hour}
  • Adjusted rate for 45 minutes=34×20=15 \text{Adjusted rate for 45 minutes} = \frac{3}{4} \times 20 = 15

Now, let λ=15 \lambda = 15 in the Poisson distribution formula to find the probability of no requests (P(X=0) P(X = 0)):

  • P(X=0)=e−15⋅1500!=e−15P(X = 0) = \frac{e^{-15} \cdot 15^0}{0!} = e^{-15}

Therefore, the correct answer is: e−15 e^{-15}

Question 37

Given below are two statements:

Statement I: subsystem models show logical grouping of objects into coherent subsystem

Statement II: State machine models show how objects change their states in response to events.

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

  1. AOption (a)

    Both Statement I and Statement II are correct 

  2. BOption (b)

    Both Statement I and Statement II are incorrect 

  3. COption (c)

    Statement I is correct but Statement II is incorrect

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (a)A.

Both Statement I and Statement II are correct 

Why this answer is correct

The correct answer is Both Statement I and Statement II are correct 

Key Points

  • Statement I: Subsystem models show logical grouping of objects into coherent subsystems.
  • Explanation:
  • This statement is correct. Object-oriented design often involves many different objects, each with their own attributes and methods.
  • Subsystems are one way of managing this complexity by grouping related objects together.
  • A subsystem model therefore shows these groups of objects that are related and interact closely with each other.
  • For instance, in an online shopping system, all classes dealing with payment (like CreditCard, DebitCard, PayPal, etc.) could be grouped into a Payment subsystem.
  • Statement II: State machine models show how objects change their states in response to events.
  • Explanation:
  • This statement is also correct. In a substantial number of software applications, specifically those that deal with real-time systems, complex control systems, or certain types of business logic, objects can have different states.
  • For instance, an 'Order' object might have states like "New", "Payment Processing", "Dispatched", "Delivered", etc.
  • A state machine model represents the different states an object can have, and the ways (events or conditions) in which a transition happens from one state to another.

Question 38

How many integral solutions are there to x + y + z + w = 29, where x ≥ 1, y ≥ 2, z ≥ 3 and w ≥ 0? 

  1. AOption (a)

    2400

  2. BOption (b)

    2600

  3. COption (c)

    2800

  4. DOption (d)

    3000

View answer & explanation

Correct answer

Answer: (b)B.

2600

Why this answer is correct

The correct answer is 2600

Key PointsThis problem deals with integer partitions and combinations. A standard trick for these kinds of problems is to shift everything to the left side to make all the variables unconstrained.

  • Firstly, let's subtract the constraints from each variable:
  • x' = x - 1
  • y' = y - 2
  • z' = z - 3
  • w' = w - 0
  • We can then express the equation in terms of the transformed variables:
  • x' + y' + z' + w' = 29 - (1 + 2 + 3 + 0) => x' + y' + z' + w' = 23
  • Instead of four positive integers x, y, z, and w satisfying the original equation, we are looking for four non-negative integers x', y', z', and w' satisfying the new equation.
  • This amounts to partitioning 23 into four parts allowing that some of the parts could possibly be 0.
  • The basic formula for combinations with repetitions (stars-and-bars method) is C(n + r - 1, r - 1), where "n" is the sum and "r" is the number of variables.
  • So we have C(23 + 4 - 1, 4 - 1) = C(26, 3) = 26! / ((26-3)! * 3!) = 2600.

So the answer is: 2600

Question 39

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: Dendral is an expert system

Reason R: The rationality of an agent is not related to its reaction to the environment.

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

  1. AOption (a)

    Both A and R are true and R is the correct explanation of A

  2. BOption (b)

    Both A and R are true but R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (c)C.

A is true but R is false

Why this answer is correct

The correct answer is A is true but R is false

Key PointsDendral is an expert system. It was a groundbreaking AI project developed in the 1960s and 1970s aimed at automatically deducing the structure of organic molecules based on their mass spectrometry data. So, assertion A is correct.

The second statement, however, is incorrect. The rationality of an agent in AI is very much related to its reaction to its environment. Rational agents should be able to make decisions based on their perceptions of the environment in order to achieve the best possible outcome or, in the case of uncertainty, the best expected outcome. Therefore, reason R is false.

Question 40

Match List I with List II

LIST ILIST II
A.A Δ BI.(A - B) ∪ (A - C)
B.A - (B ∪ C)II.(A - B) ∩ (A - C)
C.A - (B ∩ C)III.(A - B) ∪ (B - A)
D.A ∩ (B - C)IV.(A ∩ B) - (A ∩ C)

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (a)A.

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

Why this answer is correct

The correct answer is A - III, B - II, C - I, D - IV

Key Points

  • A Δ B:
  • This represents the symmetric difference between sets A and B. It includes all those elements which are in A and B but not in their intersection. Mathematically, it can be represented as (A - B) ∪ (B - A). So, A matches with III.
  • A - (B ∪ C):
  • This represents all elements in A not in (B or C). Another way to represent it would be (A - B) ∩ (A - C) because it is the intersection of elements that are only in A and not in B or C. So, B matches with II.
  • A - (B ∩ C):
  • This represents all elements in A that are not common to both B and C, or equivalently, the elements just in A and not in the intersection of B and C. So, C matches with I.
  • A ∩ (B - C):
  • This represents the intersection of A and the elements in B not in C. It is equivalent to (A ∩ B) - (A ∩ C) because you're taking all elements in both A and B, then removing any elements that are also in C. So, D matches with IV.

Therefore, the correct option is A - III, B - II, C - I, D - IV. So, the correct option is 1).

Question 41

Consider the following table of arrival time and burst time for three processes P0, P1, P2:

Processarrival timeBurst time
P00 ms7
P11 ms3
P22 ms7

The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of a process. What is the average waiting time for the three processes?

  1. AOption (a)

    3 ms 

  2. BOption (b)

    3.67 ms

  3. COption (c)

    4.47 ms 

  4. DOption (d)

    4 ms

View answer & explanation

Correct answer

Answer: (b)B.

3.67 ms

Why this answer is correct

The correct answer is 3.67 ms

Key PointsIn Shortest Job First (SJF) scheduling, the process with the smallest burst time is processed next. In Preemptive SJF, if a new process arrives with CPU burst length less than remaining time of current executing process, CPU is preempted, and that new process starts execution.

Gantt chart

Processarrival timeBurst timeWaiting time
P00 ms73
P11 ms30
P22 ms78

So, the average waiting time is:

(3ms + 0ms + 8ms) / 3 = 3.67ms (rounded to nearest hundredth)

So, the average waiting time for the processes under a preemptive SJF scheduling algorithm is approximately 3.67ms.

Question 42

Which of the following scenario may lead to an irrecoverable error in a database system? 

  1. AOption (a)

    A transaction writes a data item after it is read by an uncommitted transaction 

  2. BOption (b)

    A transaction reads a data item after it is read by an uncommitted transaction 

  3. COption (c)

    A transaction reads a data item after it is written by a committed transactions

  4. DOption (d)

    A transaction reads a data item after it is written by an uncommitted transaction.

View answer & explanation

Correct answer

Answer: (d)D.

A transaction reads a data item after it is written by an uncommitted transaction.

Why this answer is correct

The correct answer is A transaction reads a data item after it is written by an uncommitted transaction.

Key PointsAn irrecoverable error is an error that does not permit the database to return to a consistent state after a failure. They are primarily caused by inconsistencies that occur during transactions. Looking at the provided scenarios:

  1. A transaction writes a data item after it is read by an uncommitted transaction  -
  • This is known as a Dirty Write. This is not necessarily an irrecoverable error, as a rollback operation can undo the changes if the uncommitted transaction fails.
  1. A transaction reads a data item after it is read by an uncommitted transaction -
  • This is known as a Dirty Read. This is not necessarily an irrecoverable error. Rollback operations can be implemented to maintain consistency.
  1. A transaction reads a data item after it is written by a committed transaction -
  • This is a normal operation within DBMS systems and doesn't lead to an irrecoverable error.
  1. A transaction reads a data item after it is written by an uncommitted transaction -
  • This results in a Dirty Read, which can lead to an irrecoverable error under specific circumstances:
  • if the transaction that issued the read operation commits before the transaction that issued the write operation, and then the system fails which causing the uncommitted transaction to abort.
  • In this case, the committed transaction read and used uncommitted data, which can't be rolled back, leading to an irrecoverable state.

So, scenario 4 can cause an irrecoverable error, but it's worth noting that the specific set of circumstances to cause such an error is relatively rare in well-designed systems that use transaction isolation levels to avoid these types of issues.

Question 43

Let G=R0G=\frac{R}{{0}}  and H = {-1, 1} be groups under the multiplication. Then, the map ϕ : G → H defined by ϕ(x)=x∣x∣\phi(x)=\frac{x}{|x|} is

  1. AOption (a)

    Not a homomorphism

  2. BOption (b)

    A one-one homomorphism, which is not onto

  3. COption (c)

    An onto homomorphism, which is not one to one

  4. DOption (d)

    An homomorphism

View answer & explanation

Correct answer

Answer: (c)C.

An onto homomorphism, which is not one to one

Why this answer is correct

The correct answer is An onto homomorphism, which is not one to one

Key Points

  • The map ϕ: G → H is defined by ϕ(x) = x / |x|. G here is the set of non-zero real numbers and H is the set {-1, 1}. We are considering these groups under multiplication.
  • Now, a mapping φ: G → H is called a homomorphism if for all a, b in G, we have ϕ(ab) = ϕ(a) * ϕ(b).
  • Our mapping here, ϕ(x) = x / |x|, takes any positive number in G to 1 in H and any negative number in G to -1 in H. So, if we take two elements a and b in G, we have:
  • ϕ(ab) = ab / |ab| ϕ(a) * ϕ(b) = (a / |a|) * (b / |b|)
  • If a and b are both positive or both negative, |ab| = |a||b| so ϕ(ab) = ϕ(a) * ϕ(b). If a and b are of opposite signs, |ab| = |a||b| holds as well, therefore ϕ(ab) = ϕ(a) * ϕ(b) is true in this case, too.

This shows that the mapping ϕ is a homomorphism.

check whether it is one-one (injective) or onto (surjective).

  • The function is not one-one, because multiple distinct elements in G (all positive numbers, for example) get mapped to the same element in H (1 in this case).
  • The function is onto, because every element in H can be reached by some element in G (positive numbers map to 1 and negative numbers map to -1).

So, applying these conclusions to the options, the answer is:

3) An onto homomorphism, which is not one to one.

Question 44

Which of the following parser is most powerful parser? 

  1. AOption (a)

    Operator precedence

  2. BOption (b)

    SLR

  3. COption (c)

    Canonical LR

  4. DOption (d)

    LALR

View answer & explanation

Correct answer

Answer: (c)C.

Canonical LR

Why this answer is correct

The correct answer is Canonical LR

Key PointsThe Canonical LR parser is the most powerful among the ones you listed.

Explanation:

  • Operator Precedence Parser: Only parses a certain subset of context-free grammars.
  • Simple LR (SLR) Parser: This has more power than the Operator Precedence Parser and can parse a larger subset of context-free grammars.
  • Lookahead LR (LALR) Parser: More powerful than SLR, it generates fewer states and is able to parse an even larger subset of context-free grammars.
  • Canonical LR Parser: The most powerful of the four. It can parse all deterministic context-free grammars.

However, it's worth noting that although the Canonical LR parser is the most powerful, it also requires the most computational resources, which can make it less practical in some real-world scenarios. LALR parsers, for example, are widely used in various applications due to their balance of power and efficiency.

Question 45

Which of the following statement is correct? 

  1. AOption (a)

    Ackermann's function is primitive recursive. 

  2. BOption (b)

    L= {anbkcn+k : n ≥ 0, k ≥ 0} is regular language.

  3. COption (c)

    L = {anbj : n = J2} is not context free language

  4. DOption (d)

    For every context sensitive language L not including λ, there exists some linear bounded automata M such that L ≠ L(M).

View answer & explanation

Correct answer

Answer: (c)C.

L = {anbj : n = J2} is not context free language

Why this answer is correct

The correct answer is L = {anbj : n = J2} is not context free language

EXPLANATION:

  • Ackermann's function is not primitive recursive.
  • The primitive recursive functions form a subset of the total recursive functions or effectively calculable functions; however, there are total recursive functions which are not primitive recursive, such as the Ackermann function.
  • The language L= {anbkcn+k : n ≥ 0, k ≥ 0} is not regular.
  • Regular languages adhere to the pumping lemma, which this language would violate. Given language is a Context free language.
  • L = {anbj : n = J2} is not context free language
  • This is the correct statement. The language L isn't context-free as it represents a language where the number of 'a's is equal to the square of the number of 'b's.
  • A context-free language wouldn't be able to generate or parse this kind of language, as it would require more context (like specific knowledge of numerical relationships) than a simple context-free grammar can provide. Because PDA can't able to calculation.
  • For any context sensitive language L, excluding λ (the empty string), there exists a linear bounded automaton M that recognizes the language such that  L ≠ L(M).
  • This is because a context-sensitive language is defined as a language that can be recognized by a linear bounded automaton. As such, the fourth statement as it stands is incorrect.

Question 46

Match List I with List II

LIST ILIST II
A.RAID level 2I.Bit interleaved parity
B.RAID level 4II.Block interleaved distributed parity
C.RAID level 5III.Error correcting parity
D.RAID level 3IV.Block interleaved parity

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

    A - I, B - III, C - IV, D - I

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

The correct answer is A - III, B - IV, C - II, D - I

Key Points

  • RAID level 2 ( III - Error correcting parity):
  • RAID 2 uses an error-correcting code known as Hamming code, which is a set of parity bits for error detection and correction. Each bit of data is written to a separate disk drive in the array, and corresponding parity bits are written to additional drives, which allows the error correction to occur.
  • RAID level 4 (IV - Block interleaved parity):
  • In RAID 4, data is split into blocks and written across multiple drives in an array (i.e., block-level striping). But unlike other RAID levels, RAID 4 has a dedicated disk for storing parity information. This configuration allows for high read data transaction rates because the data blocks and the parity are stored on different drives.
  • RAID level 5 (II - Block interleaved distributed parity):
  • The parity information, which is used for data redundancy, is not written to a single, dedicated drive as in RAID 4. Instead, it is interspersed across all the drives in the array. This leads to a system where read and write operations can occur simultaneously on multiple drives, improving overall performance compared to RAID 4.
  • RAID level 3 (I - Bit interleaved parity):
  • RAID 3 is similar to RAID 2 but it uses a simpler parity calculation. Data is split at the bit level and written across the drives in the array (i.e., bit-level striping) with parity being stored on a dedicated drive.

By matching RAID levels with their corresponding strategies, we get option 2 as the correct one: A - III, B - II, C - II, D - I.

Question 47

Consider the following statements.

A. The identity is unique in any monoid.

B. A monoid is a group if there exists inverse of each element of monoid.

C. Semi group has closure, associative and identity properties.

D. Quasi group has closure property.

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B and D only 

  2. BOption (b)

    B, C and D only 

  3. COption (c)

    A, B and C only

  4. DOption (d)

    A, C and D only

View answer & explanation

Correct answer

Answer: (a)A.

A, B and D only 

Why this answer is correct

The correct answer is A, B and D only

Key Points

  • A. The identity is unique in any monoid.
  • This is true. There is always exactly one identity element in any monoid structure.
  • B. A monoid is a group if there exists inverse of each element of monoid.
  • This is true. A group must satisfy all the axioms of a monoid and additionally each element must have an inverse.
  • C. Semi group has closure, associative and identity properties.
  • This is false. A semigroup only needs to have closure and associativity properties. The property of identity is not necessary for a structure to be considered a semigroup.
  • D. Quasi group has closure property.
  • This is true. Quasigroups need to have an operation that is defined for every pair of group elements and which outputs an element from the group, providing closure property.

Question 48

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: It is possible to create doubly linked list using only one pointer with every node.

Reason R: By storing the XOR of the addresses of the previous and next nodes.

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

  1. AOption (a)

    Both A and R are true and R is the correct explanation of A

  2. BOption (b)

    Both A and R are true but R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (a)A.

Both A and R are true and R is the correct explanation of A

Why this answer is correct

The correct answer is Both A and R are true and R is the correct explanation of A

Key PointsIn a doubly linked list, each node typically maintains two references (or pointers): one to the next node and one to the previous node. However, it is indeed possible to create a doubly linked list using only one pointer per node. This can be achieved by storing the XOR of the addresses of the previous node and the next node in place of the two pointers. This technique is called XOR-linking.

Here's how it works:

  • The XOR operation has a property whereby (A XOR B) XOR A equals B and (A XOR B) XOR B equals A.
  • For each node, you are storing (address of previous node) XOR (address of next node). To traverse nodes in this list forward or backward, you start with a pointer to the current node and a pointer to its predecessor (for forward traversal) or its successor (for backward traversal). Then you can get the address of the next node or the previous node with XOR operations.
  • So if you're traversing forward, your next node is (address of predecessor) XOR (current node's XOR value). To traverse backward, (address of successor) XOR (current node's XOR value) gives you the address of the previous node.

Using this technique you can successfully traverse both forward and backward in the list using only one pointer in each node. So, both the Assertion A and the Reason R are true and R is indeed a correct explanation of A.

Question 49

Consider the following statements:

A. Dynamic metrics are collected by measurements made of a program in execution

B. Static metrics are collected by measurements made of representations of the system

C. The assessment of software quality is an objective process

D. An important part of quality assurance in the selection of standards that should apply to the software development process.

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B, C only

  2. BOption (b)

    B, C and D only 

  3. COption (c)

    A, C and D only 

  4. DOption (d)

    A, B and D only

View answer & explanation

Correct answer

Answer: (d)D.

A, B and D only

Why this answer is correct

The correct answer is A, B and D only

Key PointsStatement C is not correct. While some aspects of software quality assessment can be measured objectively, like code efficiency or bug count, other aspects are often subjective and may vary based on individual needs and context. For example, usability, readability of code, or fitness for a particular purpose can be quite subjective. 

Other options:

  • A. Dynamic metrics are indeed collected by measuring a program while in execution.
  • B. Static metrics are collected by analyzing representations of the system (such as source code, design documents, etc.) without executing the program.
  • D. The selection of the appropriate standards and methodologies to apply during the software development process is a crucial part of software quality assurance.

Hence A, B and D only correct.

Question 50

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

  1. AOption (a)

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

  2. BOption (b)

    3, 8, 1, _, 10, 5

  3. COption (c)

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

  4. DOption (d)

    _1, 3, 8, 10, 5, _

View answer & explanation

Correct answer

Answer: (d)D.

_1, 3, 8, 10, 5, _

Why this answer is correct

The correct answer is _1, 3, 8, 10, 5, _

Key PointsTo insert each element into the hash table using closed hashing, we can use the given hash function (6x + 3) mod 4. Let's go through each element in the sequence and insert them into the hash table:

  1. Insert 1:
  • Hash value = (6 * 1 + 3) mod 4 = 9 mod 4 = 1
  • The table becomes: _, 1, _, _, _, _, _
  1. Insert 3:
  • Hash value = (6 * 3 + 3) mod 4 = 21 mod 4 = 1 (collision, linear probing)
  • The table becomes: _, 1, 3, _, _, _, _
  1. Insert 8:
  • Hash value = (6 * 8 + 3) mod 4 = 51 mod 4 = 3
  • The table becomes: _, 1, 3, 8, _, _, _
  1. Insert 10:
  • Hash value = (6 * 10 + 3) mod 4 = 63 mod 4 = 3 (collision, linear probing)
  • The table becomes: _, 1, 3, 8, 10, _, _
  1. Insert 5:
  • Hash value = (6 * 5 + 3) mod 4 = 33 mod 4 = 1 (collision, linear probing)
  • The table becomes: _, 1, 3, 8, 10, 5, _

So, the correct answer is: 4) _, 1, 3, 8, 10, 5, _

Question 51

Consider the following finite automata F1 that accepts a language L

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

  1. AOption (a)

    L(F1) ≠ L(F2)

  2. BOption (b)

    L(F1) = L(F2)

  3. COption (c)

    L(F1) ≤ L(F2)

  4. DOption (d)

    L(F1) ≥ L(F2)

View answer & explanation

Correct answer

Answer: (b)B.

L(F1) = L(F2)

Why this answer is correct

The correct answer is L(F1) = L(F2)

EXPLANATION:

Finite automata, also known as finite state machines, are abstract machines utilized in computer science and mathematical computations. They serve as a simple model for computation, providing a mathematical abstraction to describe and understand various systems' behaviors.

A finite automaton can be formally defined as a 5-tuple (Q, Σ, δ, q0, F) where:

  • Q is a finite set of states.
  • Σ (Sigma) is a finite set of symbols, called the alphabet of the automaton.
  • δ (delta) is the transition function. It takes two arguments - a state and an input symbol, and returns the next state. δ : Q x Σ → Q
  • q0 is the initial state from which any input is processed (q0 ∈ Q).
  • F is a set of final state/states of Q (F ⊆ Q).

F1:

F2:  Reversal of F1

Both are accept same string so L(F1) = L(F2)

Question 52

The maximum yield length of the following CNF CFG is

S → AB

A → CD

B → e

C → a

D → b

  1. AOption (a)

    8

  2. BOption (b)

    7

  3. COption (c)

    4

  4. DOption (d)

    5

View answer & explanation

Correct answer

Answer: (c)C.

4

Why this answer is correct

The correct answer is 4

Key PointsCFG stands for Context-Free Grammar. It is a formalism used in formal language theory and computer science to describe the syntax or structure of languages.  In this CFG, S, A, B, C, D are non-terminal symbols, and a, b, and e are terminal symbols. These rules show that every non-terminal symbol eventually maps to a single terminal symbol.

  • S → AB
  • A → CD
  • B → e
  • C → a
  • D → b

The production of S gives us AB, which can further be expanded as follows: A gives CD and B gives e.

So AB becomes CDe.

Further expanding C and D (which give a and b respectively), we obtain: CDe becomes ab and then e, leading to the string abe.

So, apparently, the yielded string has length three. However, note that the grammar rule B → e is part of Chomsky Normal Form (CNF) grammar, and although it appears to produce a single terminal symbol, it is considered to produce two symbols in terms of its yield length. This is because in CNF, each production either produces two non-terminals or one terminal.

With that understanding, we would have: S (yield length = 4) → A (yield length = 2) + B (yield length = 2)

This sums up to a total yield length of 4, which corresponds to option 3) 4.

Therefore, the maximum yield length of this CFG is 4, and the correct answer is 3) 4.

Question 53

___________ is intended to show that a system both conforms to its specifications and meets the expectations of the system customer. 

  1. AOption (a)

    Software specification

  2. BOption (b)

    Software design

  3. COption (c)

    Software evaluation

  4. DOption (d)

    software validation

View answer & explanation

Correct answer

Answer: (d)D.

software validation

Why this answer is correct

The correct answer is software validation

Key Points

  • Software Validation:
  • This is the process to evaluate the system during or at the end of the development process to determine whether it satisfies the specified requirements. That is, to ensure that 'you built the right thing'. This often involves acceptance testing, where the customer themselves provide the final validation that the system meets their needs and expectations. So it is correct answer of the given question.

Additional Information

  • Software Specification:
  • This involves detailed documentation of the requirements and functionalities that the software is supposed to provide. It's essentially the 'what' - explaining what the software is intended to achieve, without detailing how it will do it. It includes elements like functional requirements, performance, interfaces, design constraints, etc.
  • Software Design:
  • This the process of envisioning and defining the software solutions to one or more sets of problems. It is the 'how' in the process - covering how the software will achieve the goals set in the software specification. One might think about it as a blueprint that describes the parts and how they should interact with each other. It can have different levels like high-level (or architectural) design and detailed (or low-level) design.
  • Software Evaluation:
  • This involves assessment or review of a software product during its development or after its completion to know its usability, quality, performance, etc. It also finds out whether the software meets its intended purpose and satisfies the predefined requirements or not.

Question 54

Which is not the component of the natural language understanding process? 

  1. AOption (a)

    Morphological analysis

  2. BOption (b)

    Semantic analysis

  3. COption (c)

    Pragmatic analysis

  4. DOption (d)

    Meaning analysis

View answer & explanation

Correct answer

Answer: (d)D.

Meaning analysis

Why this answer is correct

The correct answer is Meaning analysis

Key PointsMeaning analysis is not a conventional component in the process of Natural Language Understanding (NLU). The usual components include:

  • Morphological analysis: This refers to the process of identifying and analyzing the structure of words. This is significant in NLU as words have different forms and these forms can have different meanings in different contexts.
  • Semantic analysis: This is the process that determines the meaning of sentences by understanding the meaning of the individual words in the context that they are used within the sentence.
  • Pragmatic analysis: It implies interpreting the intended meaning of the sentence. This can depend on context, the previous conversation, the speaker's intended meaning, and general world knowledge.

"Meaning Analysis" is not a conventionally distinguished step in the NLU process. It seems too broad and vague and potentially encompasses semantic analysis and/or pragmatic analysis.

Additional InformationNatural Language Understanding (NLU) is a subfield of Artificial Intelligence that focuses on machine reading comprehension. The goal of NLU is to create systems that understand input presented in natural language, including slang, jargon, or colloquial speech. The process typically involves several steps:

  • Tokenization: This is the first step in NLU where the text input is broken down into 'tokens' or individual words. For example, the sentence "I love apples" would be tokenized into "I", "love", "apples".
  • Morphological Analysis: Here, words are further broken down into their smallest meaningful components, called morphemes. This step considers prefixes, suffixes, and root words which may affect a word's meaning. For instance, "unhappiness" would be split into three morphemes: "un", "happi", "ness".
  • Part of Speech Tagging (POS): Each token is categorized according to its part of speech (noun, verb, adjective, etc.). This analysis can help in understanding the grammatical structure of the sentence.
  • Dependency Parsing/Syntactic Analysis: This step aims to analyze the grammatical structure of a sentence, establishing relationships between "head" words and words that modify or depend on them. For example, in the sentence "A cat chases a mouse", "cat" is the subject and "chases" is the verb with "mouse" as its object.
  • Semantic Analysis: This step aims to understand the meaning of the words and how they combine to form the meaning of the sentence. It involves understanding aspects like named entities (people, organizations, locations), numerical entities (dates, times, numbers), and coreferences (linking pronouns to the entities they refer to).
  • Pragmatic Analysis: Pragmatic Analysis goes beyond the literal meaning of the text to understand the context and intention behind the words. It can involve factors like the conversation history, the speaker's attitudes, and cultural knowledge.
  • Discourse Integration: This step involves understanding the text in the context of the full conversation or textual context.
  • Common Sense and World Knowledge: Often, understanding language requires more than just understanding the words and structure of the sentence. A system also needs to have some knowledge of the world and about what is common or likely in certain situations.

Question 55

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

  1. AOption (a)

    EMPTY : REAR == FRONT

    FULL : (REAR + 1) mod n == FRONT

  2. BOption (b)

    EMPTY : (FRONT + 1) mod n == REAR

    FULL : (REAR + 1) mod n == FRONT

  3. COption (c)

    EMPTY (REAR + 1) mod n == FRONT

    FULL : REAR == FRONT

  4. DOption (d)

    EMPTY : REAR == FRONT

    FULL : (FRONT + 1) mod n == REAR

View answer & explanation

Correct answer

Answer: (a)A.

EMPTY : REAR == FRONT

FULL : (REAR + 1) mod n == FRONT

Why this answer is correct

The Correct answer is  EMPTY : REAR == FRONT and FULL : (REAR + 1) mod n == FRONT

Key Points A circular queue is a queue whose last position is connected back to the first position.

  • ENQUEUE – It is the operation to insert elements into the queue.
  • DEQUEUE – It is the operation to delete elements from the queue.

After inserting an element in the last position, the next element again gets inserted into the first position.

EXPLANATION:

  • Given, Rear = Front = 0
  • Here, the Rear is used to insert elements & the front is used to delete elements.
  • To check full condition in queue:
  • (Rear + 1) % n == Front
  • Example: Consider queue is full that means Rear = 6, front = 0, n = 7
  • (6+1) % 7 = 7 % 7 = 0
  • To check empty condition in queue:
  • Rear == Front
  • Example: Consider queue is empty that means Rear = 0, front = 0, n = 7
  • Rear = Front = 0

Hence, the correct answer is “option 1”.

Question 56

Given below are two statements:

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

Statement I: f(n) ≥ 1 and f(n) = O(g(n)) ⇒ g(n) = Ω(f(n))

Statement II: f(n)  = O(g(n)) ⇒ Ig(f(n)) = O(1g(g(n))) where Ig(g(n)) ≥1 for all sufficient large n.

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

  1. AOption (a)

    Both Statement I and Statement II are correct 

  2. BOption (b)

    Both Statement I and Statement II are incorrect

  3. COption (c)

    Statement I is correct but Statement II is incorrect

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (a)A.

Both Statement I and Statement II are correct 

Why this answer is correct

The correct answer is Both Statement I and Statement II are correct

Key PointsIn the asymptotic analysis, we refer to Big O notation (O) and Big Omega notation (Ω) to describe upper and lower bounds of functions respectively.

  • Statement I is asserting that if f(n) ≥ 1 and f(n) is upper-bounded by g(n) (f(n) = O(g(n))), then g(n) should be lower-bounded by f(n) (g(n) = Ω(f(n))). In other words, if f(n) grows no faster than g(n), then g(n) grows at least as quickly as f(n). This statement is correct.
  • Statement II, If f(n) = O(g(n)), then a function Ig(f(n)), which is presumably larger or equal to 1 for all sufficiently large n, would be bound by O(1g(g(n))). This seems to depend on the specific nature of the functions f(n) and g(n). This statement is correct.

Additional Information

  • Reflexivity: f(n) = (f(n)). Valid for O and 2.
  • Transitivity: f(n) = (g(n)) and g(n) = (h(n)) = f(n) = (h(n)). Valid for O and Ω as well.
  • Symmetry: f(n) = (g(n)) if and only if g(n) = (f(n)).
  • Transpose symmetry: f(n) = O(g(n)) if and only if g(n) = (f(n)).
  • If f(n) is in O(kg(n)) for any constant k > 0, then f(n) is in O(g(n)).
  • If f₁(n) is in O(g₁(n)) and f₂(n) is in O(92(n)), then (f₁ + f2)(n) is in O(max(9₁(n)), (g₁(n))).
  • If f₁(n) is in O(g₁(n)) and f₂(n) is in O(g₂(n)) then f₁(n) f₂(n) is in O(g₁(n) g₁(n)).

Question 57

Consider following statements:

A. A context free language is generated by LR(o) grammar if and only if it is accepted by a deterministic pushdown automata and has prefix property

B. If M1 is the single tape TM simulating multilape TM M, then time taken by M1 to simulate n moves is (n3)

C. Push down automata behaves like a Turning machine when it has one auxiliary memory.

D. L= {anbncn : n ≥ 1} is not context free but context sensitive.

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B and C only

  2. BOption (b)

    A, B only

  3. COption (c)

    D only

  4. DOption (d)

    B, C only

View answer & explanation

Correct answer

Answer: (c)C.

D only

Why this answer is correct

The correct answer is D only

Key Points

  • A. A context free language is generated by LR(0) grammar if and only if it is accepted by a deterministic pushdown automata and has prefix property:
  • This statement is incorrect because a context-free language can be generated by an LR(0) grammar, but it does not need to be accepted by a deterministic pushdown automaton (DPDA).
  • Moreover, LR(0) grammars don't necessarily generate languages with the prefix property; they can produce languages where a prefix of a valid string is also a valid string, which is not always handled well by a DPDA.
  • B. If M1 is the single tape TM simulating multilape TM M, then time taken by M1 to simulate n moves is (n3):
  • ​This statement is incorrect because the best known upper bound for simulating a multi-tape Turing machine M on a single-tape Turing machine M1 is quadratic, i.e., O(n2), not cubic.
  • C. Push down automata behaves like a Turing machine when it has one auxiliary memory:
  • This statement is incorrect. While a PDA with two or more stacks does have the same computational power as a Turing machine, the concepts are distinct, and a multi-stack PDA should not directly be referred to as a Turing machine.ed so far, effectively simulating the 'unbounded' nature of a Turing machine's tape.
  • D. L= L= {anbncn : n ≥ 1} is not context free but context sensitive:
  • This statement is correct. The language L= {anbncn : n ≥ 1} is a context-sensitive language, not a context-free language.
  • It cannot be represented by a context-free grammar (CFG) because it requires a mechanism to enforce that the number of a's, b's, and c's are equal, which is beyond the capabilities of a CFG.
  • However, it can be represented by a context-sensitive grammar which has the power to enforce such constraints.

So, only Statement D is correct. 

Mistake Points Official paper UGC don't give option D individual so UGC dropped the question.

Question 58

Match List I with List II

LIST ILIST II
A.Bezier curvesI.3 dim objects that have translation rotational symmetry
B.B-SplinesII.Fractal geometry
C.Sweep representationsIII.Bias and tension
D.Natural objectsIV.painting drawing CAD

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

The correct answer is A - IV, B - III, C - I, D - II 

Key Points

  • A. Bezier curves and IV (painting drawing CAD):
  • Bezier curves are mathematical descriptions of curves that can accurately describe various shapes. They are widely used in computer graphics, including painting, drawing, and Computer-Aided Design (CAD), because of their power to model smooth and flexible curves with just a few parameters.
  • B. B-Splines and III (Bias and tension):
  • B-splines, short for Basis Splines, are a highly generalized version of Bezier curves and can represent the same curves, but also provide more control over curves' shapes. The notion of bias and tension are key features of design layouts which B-Splines can often accommodate. They allow for control over how "tight" or "loose" a curve is and in which direction the curve tends to lean. Thus these tools can offer accurate control over graphical structures, matching the B-Splines with tense and biased controls.
  • C. Sweep representations and I (3 dim objects that have translation rotational symmetry):
  • Sweep representations refer to the methods in computer graphics and solid modeling that represent a 3D object as a 2D profile swept along a path. These methods are capable of creating complex 3D objects with translation and rotational symmetry, as the same pattern is repeated in different orientations and positions.
  • D. Natural objects and II (Fractal geometry):
  • Many natural objects - like mountain ranges, clouds, trees, and more - show a self-similar pattern: they have parts that resemble the whole, at many scales of magnification. Fractal geometry is a special form of graphical representation of mathematical functions or set of numbers generated by a mathematical function. This helps to explain structures in the world which have complexity, detail and hierarchy, such as those found in natural landscapes. As a result, fractal geometry has wide-ranging applications in many fields, including the representation of natural objects in computer graphics.

Question 59

There are M points on one straight line AB and n points on another straight line AC none of them being A. How many triangles can be formed with these points as vertices? 

  1. AOption (a)

    mn(m + n - 2)

  2. BOption (b)

    12\frac{1}{2}mn(m + n - 2)

  3. COption (c)

    12\frac{1}{2}mn(m + n - 1)

  4. DOption (d)

    mn(m + n - 1)

View answer & explanation

Correct answer

Answer: (b)B.

12\frac{1}{2}mn(m + n - 2)

Why this answer is correct

The correct answer is 12\frac{1}{2}mn(m + n - 2)

EXPLANATION:

Let's consider a triangle with vertices B, C, and a point D on line AB. This way, we have two vertices from line AB (B and D) and one from line AC (C).

So, the vertices of the triangle would be B, C, and D.

This creates a triangle without using vertex A. If you have any specific requirements or constraints

= mC2 x nC1 + nC2 x mC1

=m(m−1)2×n+n(n−1)2×m=\frac{m(m-1)}{2} \times n + \frac{n(n-1)}{2} \times m

=mn2(m−1+n−1)=\frac{mn}{2}(m - 1 + n - 1)

=mn2(m+n−2)=\frac{mn}{2}(m + n - 2)

Question 60

Which of the following is not a mutation operator in a genetic algorithm?

A. Random resetting

B. Scramble

C. Inversion

D. Difference

Choose the correct answer from the options given below:

  1. AOption (a)

    A and B only

  2. BOption (b)

    B and D only

  3. COption (c)

    C and D only

  4. DOption (d)

    D only

View answer & explanation

Correct answer

Answer: (d)D.

D only

Why this answer is correct

The correct answer is D only

Key PointsMutation operators in a Genetic Algorithm are used for perturbing the genes in a solution. They help in keeping the diversity of the population and avoiding premature convergence on local optima. Here's a brief explanation of the operators mentioned:

  • A. Random Resetting: This is a type of mutation operator where a specific gene in a chromosome is randomly chosen and assigned a new value from the feasible parameter range.
  • B. Scramble: This operator randomly selects two points in the chromosome and then shuffles the genes between those points.
  • C. Inversion: Inversion mutation operators select a substring (i.e., a portion of the chromosome) and revert the order of genes within that.
  • D. Difference: This is not a known mutation operator in the context of genetic algorithms.

Therefore, the answer is 4) D only.

Question 61

A. The set of turning machine codes for TM's that accept all inputs that are palindromes (possible along with some other inputs) is decidable

B. The language of codes for TM's M that when started with blank tape, eventually write a 1 somewhere on the tape is undecidable

C. The language accepted by a TM M is L (M) is always recursive

D. Post's correspondence problem is undecidable

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B and C only 

  2. BOption (b)

    B, C and D only 

  3. COption (c)

    A and C only

  4. DOption (d)

    B and D only

View answer & explanation

Correct answer

Answer: (d)D.

B and D only

Why this answer is correct

The correct answer is B and D only

Key Points

  • A. The set of Turing machine codes for TMs that accept all inputs that are palindromes is decidable:
  • A Turing machine accepts an input it if halts in an accept state. To say that a TM accepts all inputs that are palindromes means that every palindrome string needs to be an accepted input.
  • This essentially needs us to determine the behavior of a Turing machine, which is generally undecidable due to the halting problem. The halting problem is a famous problem in computation which implies that there is no way to know with certainty whether a Turing machine will halt or continue forever.
  • Therefore, a set of Turing Machine codes that accept palindromes is not decidable.
  • B. The language of codes for TM's M that when started with blank tape, eventually write a 1 somewhere on the tape is undecidable:
  • This is a form of the halting problem, because in order to know if a Turing machine will eventually write '1' on the tape means we are asked to determine if a Turing machine will halt (write '1' and stop) or not. As we discussed earlier with point A, the halting problem is known to be undecidable.
  • C. The language accepted by a TM M is L(M) is always recursive:
  • It's true that Turing machines recognize recursively enumerable languages, but it's not true that all languages a TM recognizes are recursive.
  • A recursive language (also called a decidable language) is one where a TM will always halt with a 'yes' or 'no' answer - i.e., it will always accept or reject.
  • However, there are languages where the TM might not halt for some strings — these are the recursively enumerable (r.e.) but not recursive languages. For this reason, statement C is false.
  • D. Post's correspondence problem is undecidable:
  • Post's Correspondence Problem (PCP) is known to be undecidable, which means there is no algorithm that exists that can solve all instances of the PCP.
  • Introduced by Emil Post in 1946 as a way of demonstrating that there were problems that were even impossible for a Turing Machine to solve, it serves as a classic example of the limits of computation.

So, the Option 4) B and D only remains the correct answer.

Question 62

Consider universe positive integer X= {1 ≤ n ≤ 8}, proposition P= "n is an even integers", Q = "(3 ≤ n ≤ 7) ^ (n ≠ 6)". Then truth set of P ↔ Q is 

  1. AOption (a)

    {1, 4}

  2. BOption (b)

    {2, 6}

  3. COption (c)

    {3, 4, 5}

  4. DOption (d)

    {1}

View answer & explanation

Correct answer

Answer: (a)A.

{1, 4}

Why this answer is correct

The correct answer is {1, 4}

SOLUTION:

X= {1 ≤ n ≤ 8} So, X = {1, 2, 3, 4, 5, 6, 7, 8}

P= "n is an even integers" So, P = {2, 4, 6, 8}

Q = "(3 ≤ n ≤ 7) ^ (n ≠ 6)" So, Q = {3, 4, 5, 7}

P ↔ Q = (¬P v Q)  ^ (P v ¬Q)

P ↔ Q = ({1, 3, 5, 7} v {{3, 4, 5, 7}) ^ ({2, 4, 6, 8} v {1, 2, 6, 8})

P ↔ Q = {1,3, 4, 5, 7} ^ {1, 2, 4, 6, 8}

P ↔ Q = {1, 4}

So, Correct answer is Option 1 {1, 4}

Question 63

An observational technique that can be used to understand operational process and help to derive requirement for software to support operational process is known as 

  1. AOption (a)

    Requirement specification

  2. BOption (b)

    Structural specification

  3. COption (c)

    Ethnography

  4. DOption (d)

    Natural language specification

View answer & explanation

Correct answer

Answer: (c)C.

Ethnography

Why this answer is correct

The correct answer is Ethnography

Key Points

  • Understand the Environment: Ethnography requires an understanding of the environment where the software will be operational. This understanding is often achieved through immersion in the environment and observing processes directly.
  • Observing Daily Routines: The researcher observes the day-to-day tasks, operations, and interactions of users within the system. This provides first-hand data about the activities that the software needs to support.
  • Insights Into Behavior and Interaction: Ethnography doesn't just focus on the tasks to be done, but on how they are done, the interaction between different users, and the social aspects that could influence the software requirements.
  • Cultural Understanding: Software isn't used in a vacuum but within a cultural context. Ethnography takes this into account, ultimately informing the design of a more user-friendly and efficient system.
  • Identifying User Needs: Users may not always explicitly know or state what they need from a system. Ethnographic research can help identify these needs by observing how users perform tasks and handle processes.
  • Informing Design and Functionality: The insights gained from ethnography inform the design and functionality of the software, focusing on real-life requirements of the users.
  • Beneficial in Agile development: Ethnography is particularly beneficial in Agile development as it gives a chance to uncover hidden aspects of user needs and preferences which can be addressed in iterative development phases.

In conclusion, through ethnography, requirements for software can be derived organically from the environment in which it will be used, rather than being imposed based on assumptions or out-of-context criteria.

Additional Information

  • Requirement Specification: This refers to a document that describes what the software must do. It includes descriptions of system properties, functionalities, and constraints. Its role is to set the guidelines for the software development process, serving as a reference for developers and testers.
  • Structural Specification: This defines the structure of software system components. It outlines how different parts of the system interact with each other and their individual responsibilities. The specification can manifest in the form of architectural diagrams, UML models, or API instructions.
  • Natural Language Specification: This is a common method for communicating software requirements. They are written in natural, everyday language which makes it easy to understand for all stakeholders, including those who may not have a technical background. However, natural language specifications may lead to ambiguity and misunderstanding due to the inherent vagueness of languages and differences in interpretation, so they often need to be complemented with more formal methods of specification.

Question 64

Southerland Hodgeman method is used on 

  1. AOption (a)

    Smooth curves 

  2. BOption (b)

    Line segment 

  3. COption (c)

    Convex polygons 

  4. DOption (d)

    Concave polygons

View answer & explanation

Correct answer

Answer: (c)C.

Convex polygons 

Why this answer is correct

The correct answer is Convex polygons 

Key Points

  • Smooth curves:
  • The Sutherland-Hodgman algorithm is not designed for dealing with smooth curves. It works with polygons, and smooth curves typically involve mathematical representations like Bezier curves, which require different algorithms for processing.
  • Line segment:
  • While the Sutherland-Hodgman algorithm can be adapted for clipping line segments, it is more commonly used for polygon clipping. There are other algorithms, like the Cohen-Sutherland or Liang-Barsky algorithms, that are specifically designed for clipping line segments.
  • Convex polygons:
  • The primary use of the Sutherland-Hodgman algorithm is for clipping convex polygons against a convex clipping window. Convex polygons are well-suited for this algorithm because the method relies on the convexity of the polygons to simplify the clipping process.
  • Concave polygons:
  • The Sutherland-Hodgman algorithm is not well-suited for clipping concave polygons. The algorithm assumes convexity to simplify the process of finding the intersection points between the polygon edges and the clipping window.

So, the Sutherland-Hodgman algorithm is mainly used for convex polygon clipping and is not intended for dealing with smooth curves or concave polygons. If you need to clip line segments or work with concave polygons, other algorithms may be more suitable for those specific tasks.

Question 65

Let N denote the set of all natural numbers and R be the relation on NXN defined by (a, b) R(c, d), if ad(b + c) = bc(a + d). Then R is 

  1. AOption (a)

    Symmetric only

  2. BOption (b)

    Reflexive only 

  3. COption (c)

    Transitive only 

  4. DOption (d)

    An equivalence relation

View answer & explanation

Correct answer

Answer: (d)D.

An equivalence relation

Why this answer is correct

The correct answer is An equivalence relation

Key Points We are given a relation R defined on pairs of natural numbers, where (a, b) R (c, d) if ad(b + c) = bc(a + d).

We can check whether R is symmetric, reflexive, transitive, or an equivalence relation by verifying the condition for each .

  • Symmetry:
  • For a relation to be symmetric, if (a, b) R (c, d) then (c, d) R (a, b).
  • Say we have (a, b) R (c, d), then we have ad(b + c) = bc(a + d).
  • Swap a and b with c and d, then we get: cd(a + b) = ab(c + d) which is the original formula, therefore R is symmetric.
  • Reflexivity:
  • For a relation to be reflexive, (a, b) R (a, b) must be true for all a, b.
  • Let's plug (a, b) into the formula: ab(a + b) = ba(a + b) which is always true. Therefore R is reflexive.
  • Transitivity:
  • For a relation to be transitive, if (a, b) R (c, d) and (c, d) R (e, f), then (a, b) R (e, f).
  • However, checking the transitive property for this expression is
  • ab/(a - d) = cd/(c - d) and cd/(c - d) = ef/(e - f)
  • ab/(a - d) = ef/(e - f)
  • af(b + e) = be(a + f)
  • (a, b) R (e, f)
  • Hence ,R is transitive

Above question follow all condition so it is an equivalence relation.

Question 66

let R (A, B, C, D) be a relational schema with following function dependencies:

A → B, B → C

C → D and D → B

The decomposition of R into

(A, B) (B, C) (B, D)

  1. AOption (a)

    gives a lossless join, and is dependency preserving

  2. BOption (b)

    gives lossless join, but is not dependency preserving 

  3. COption (c)

    does not give a lossless join, but is dependency preserving 

  4. DOption (d)

    does not give a lossless join and is not dependency preserving

View answer & explanation

Correct answer

Answer: (b)B.

gives lossless join, but is not dependency preserving 

Why this answer is correct

The correct answer is: option 2) gives lossless join, but is not dependency preserving

Key Points

Given:

  • Relation: R(A, B, C, D)
  • Functional Dependencies:
  • A → B
  • B → C
  • C → D
  • D → B
  • Decomposition: R1(A, B), R2(B, C), R3(B, D)

Step 1: Candidate Key Identification

  • From A → B, and B → C, we get A → C
  • From A → C, and C → D, we get A → D
  • Therefore, A → B, C, D implies A is a candidate key

Step 2: Check for Lossless Join

  • The common attribute B is present in all three relations.
  • And we know that A → B, and A is a candidate key.
  • Therefore, the decomposition gives a lossless join as per the lossless join property using functional dependency and shared attributes.

Step 3: Check for Dependency Preservation

Functional DependencyPreserved?Reason
A → B✅ YesPresent in R1 (A, B)
B → C✅ YesPresent in R2 (B, C)
C → D❌ NoC is in R2, D is in R3 – not in a single relation
D → B✅ YesPresent in R3 (B, D)

Since C → D is not preserved in any of the decomposed relations, the decomposition is not dependency preserving.

Additional Information

  • Lossless Join: Ensures that joining the decomposed relations yields the original relation without any spurious tuples.
  • Dependency Preservation: Ensures that all functional dependencies are maintained in the decomposed schema without needing to perform joins to validate them.
  • To preserve all dependencies, especially C → D, the decomposition should include a relation like R3(C, D) instead of R3(B, D).

Hence, the correct answer is: option 2) gives lossless join, but is not dependency preserving

Question 67

Given below are two statements:

Which of the following statement/s is/are correct with respect to virtual memory

Statement I: Address translation is performed for every logical address used during the execution of a program

Statement II: A program can execute only when all of its components are loaded in the memory

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

  1. AOption (a)

    Both Statement I and Statement II are correct 

  2. BOption (b)

    Both Statement I and Statement II are incorrect 

  3. COption (c)

    Statement I is correct but Statement II is incorrect

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (c)C.

Statement I is correct but Statement II is incorrect

Why this answer is correct

The correct answer is Statement I is correct but Statement II is incorrect

Key Points

  • Statement I is correct - Address translation is performed for every logical address used during the execution of a program
  • Virtual memory systems use a process known as address translation to convert a program's logical addresses into physical addresses used to access the actual memory hardware. This translation is done for each logical address that is generated during the execution of a program.
  • Statement II is incorrect - A program can execute only when all of its components are loaded in the memory
  • One of the significant advantages of virtual memory is that it allows programs to be executed even when all of its components are not loaded into memory. This is done by loading parts of the program that are currently needed, or pages, into physical memory while the rest of the program remains on the disk. This technique is also known as demand paging.

Question 68

In the standard Ethernet with transmission rate of 10 Mbps, asssume that the length of the medium is 2500 m and size of a frame is 512 bits. The propagation speed of a signal in a cable is normally 2 × 108 m/s. The transmission delay and propogation delay are

  1. AOption (a)

    25.25 μs and 51.2 μs

  2. BOption (b)

    51.2 μs and 12.5 μs 

  3. COption (c)

    10.24 μs and 50.12 μs 

  4. DOption (d)

    12.5 μs and 51.2 μs 

View answer & explanation

Correct answer

Answer: (b)B.

51.2 μs and 12.5 μs 

Why this answer is correct

The correct answer is Option 2

Key Points

  • Transmission Delay (ttx): Time taken to push all bits of the frame onto the medium.
  • Propagation Delay (tprop): Time taken for the first bit to travel from the sender to the receiver through the medium.
  • Formulae:
  • ttx = (Frame size in bits) / (Data rate in bps)
  • tprop = (Distance) / (Propagation speed)

Step-by-Step Calculation:

  1. Transmission Delay:

Frame size = 512 bits, Data rate = 10 Mbps

ttx = 512 / (10 × 106)

= 51.2 × 10-6 sec = 51.2 μs 2. Propagation Delay:

Distance = 2500 m, Propagation speed = 2 × 108 m/s

tprop = 2500 / (2 × 108)

= 1.25 × 10-5 sec = 12.5 μs

Options Analysis:

  • Option 1: 25.25 μs and 51.2 μs – Incorrect
  • Option 2: 51.2 μs and 12.5 μs – Correct
  • Option 3: 10.24 μs and 50.12 μs – Incorrect
  • Option 4: 12.5 μs and 51.2 μs – Incorrect

Additional Information

  • Transmission delay depends only on the frame size and bandwidth, while propagation delay depends only on the distance and propagation speed.
  • In high-speed networks with long cables, propagation delay can become comparable to or even exceed the transmission delay for small frames.

Question 69

Match List I with List II

LIST ILIST II
A.Critical regionI.Hoare's monitor
B.Wait signalII.Mutual exclusion
C.Working setIII.Principle of locality
D.DeadlockIV.Circular wait

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

The correct answer is A - II, B - I, C - III, D - IV

EXPLANATION:

A. Critical region - II. Mutual exclusion:

  • The critical region is a piece of code in a process where shared resources are accessed, and as such requires the principle of mutual exclusion to be followed so that race conditions are avoided.

B. Wait signal - I. Hoare's monitor:

  • In the context of concurrent programming, a monitor is a synchronization construct that allows threads to have both mutual exclusion and the ability to wait (block) for a certain condition to become true.

C. Working set - III. Principle of locality:

  • The working set of a process in a system typically refers to the set of pages in the most recent page references. The working set is based on the principle of locality, that suggests that most memory references within a process are localized to a few clusters in the memory space.

D. Deadlock - IV. Circular wait:

  • Deadlock is a situation in computer systems where a set of processes or threads are each waiting for each other to release resources, causing a circular wait condition.

Question 70

Match List I with List II

LIST ILIST II
A.Physical layerI.Transforming the raw bits in the form of frame for transmission
B.Data Link LayerII.Control and monitoring of subnet
C.Network layerIII.Transmission of raw bits over communication channel
D.Transport layerIV.Datagrams transmission data through connection oriented or connectionless using datagram

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

The correct answer is A - III, B - I, C - II, D - IV

Key Points

  • A. Physical layer -
  • ​It is the lowest layer of the OSI model and it deals with the transmission and reception of the unstructured raw bit stream over a physical medium. So, it corresponds to III. Transmission of raw bits over communication channel.
  • B. Data Link Layer -
  • ​It is responsible for the node-to-node delivery of the packet. It transforms raw bits into frames, so it corresponds to I. Transforming the raw bits in the form of frame for transmission.
  • C. Network layer -
  • It decides which physical path the data will take based on the network conditions, the priority of service, and other factors. Thus, it corresponds to II. Control and monitoring of subnet.
  • D. Transport layer -
  • It provides transparent transfer of data between devices and can use either connection oriented communication or connectionless, so it corresponds to IV. Datagrams transmission data through connection oriented or connectionless using datagram.

Question 71

Consider the rectangle with vertices (0, 0), (0, 2), (3, 0), (3, 2). There is scaling of 2 towards x-axis and 3 towards y-axis. The new cordinates of the rectangle are 

  1. AOption (a)

    (0, 0), (6, 0), (0, 4), (6, 4)

  2. BOption (b)

    (0, 0), (6, 0), (0, 4), (3, 2)

  3. COption (c)

    (0, 0), (6, 0), (0, 6), (6, 6)

  4. DOption (d)

    (0, 0), (4, 0), (0, 6), (4, 6)

View answer & explanation

Correct answer

Answer: (c)C.

(0, 0), (6, 0), (0, 6), (6, 6)

Why this answer is correct

The correct answer is (0, 0), (6, 0), (0, 6), (6, 6)

Key PointsThe scaling operation does not change the origin (0,0).

When you apply the scale of 2 towards the x-axis to a point (x,y), you get (2*x, y) because you're scaling only on the x-axis.

Similarly, when you apply the scale of 3 towards the y-axis to a point (x,y), you get (x, 3*y) because you're scaling only on the y-axis.

So:

  • (0,0) remains (0,0) because 0*scale is still 0 on both axes
  • (0,2) becomes (0,2*3) = (0,6) because the y coordinate is multiplied by 3
  • (3,0) becomes (3*2,0) = (6,0) because the x coordinate is multiplied by 2
  • (3,2) becomes (32,23) = (6,6) because both the coordinates are scaled

The new coordinates of the rectangle are (0, 0), (0, 6), (6, 0), (6, 6)

Mistake Points Option 3 (0, 0), (6, 0), (0, 6), (6, 6) was sequence mistake but UGC consider it correct. correct order is (0, 0), (0, 6), (6, 0), (6, 6)

Question 72

Match List I with List II

LIST ILIST II
A.PERTI.used for non repetitive jobs
B.Optimistic timeII.Used for repetitive jobs
C.CPMIII.The shortest possible time to complete the activity if all goes well
D.Pessimistic timeIV.The longest time that an activity takes

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

    A - I, B - III, C - II, D - II 

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (d)D.

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

Why this answer is correct

The correct answer is A - I, B - III, C - II, D - IV

Key Points

  • A. PERT (Project Evaluation and Review Technique)
  • PERT is a statistical tool used in project management, designed to analyze a range of tasks involved in completing a given project. It is used for non-repetitive work because of its ability to manage uncertainties.
  • PERT involves identifying the longest path in a network of tasks based on their time estimates and dependencies. It allocates a time estimate to each phase of the project, making it possible to anticipate the time needed to complete the project.
  • B. Optimistic Time
  • In project management, optimistic time is the best possible time in which an activity can be completed. It assumes that everything will go exactly as planned, with no interruptions or unforeseen delays. This scenario is quite ideal and often doesn’t occur.
  • Optimistic time is used in three-point estimating techniques and PERT calculation. It helps project managers create a time cushion for uncertainties, adjusting the project timeline realistically.
  • C. CPM (Critical Path Method)
  • CPM is a step-by-step project management technique to identify activities on the critical path. It is an algorithm for scheduling a set of project activities.
  • The critical path method (CPM) is used for projects that are repetitive, involve activities that are related in a sequence. The primary goal of CPM is to calculate the longest path of planned activities to the end point, to determine key deadlines or schedule compression needs.
  • D. Pessimistic Time
  • Pessimistic Time is a term used in project management to estimate the maximum amount of time that it would require to complete a project activity or task.
  • It assumes situations where everything that could go wrong, does go wrong. Essentially, it's the longest time that you'd expect an activity to take. The pessimistic time is used in risk analysis and three-point estimates.

Question 73

What is the output of following code?

main ( )

{static float a [ ] = {13.24, 1.5, 4.5, 5.4, 3.5}

float *j, *k;

j = a;

k = a + 4

j = j * 2;

k = k/2;

printf("% f% f', *j, *k):

}

  1. AOption (a)

    13.25, 4.5  

  2. BOption (b)

    1.5, 3.5

  3. COption (c)

    13.24, 1.5, 4.5, 5.4, 3.5

  4. DOption (d)

    Illegal use of pointer in main function

View answer & explanation

Correct answer

Answer: (d)D.

Illegal use of pointer in main function

Why this answer is correct

The correct answer is Illegal use of pointer in main function

Key Points

The code as written would result in an error due to the illegal use of pointers, so the correct answer would be: Illegal use of pointer in main function

EXPLANATION:

Here are the problems with the code:

  • Pointers j and k are pointing to the addresses of elements in the array a. However, this line j = j * 2; and this k = k/2; are trying to perform the multiplication and division operations on these pointers, effectively trying to change the addresses they are pointing to.
  • This is illegal in C as arithmetic operations other than addition and subtraction (for increment and decrement of pointer) are not allowed on pointers.
  • The syntax of the printf function is incorrect. The correct syntax is with comma (,) instead of colon (:) and you also didn't close the first quotation mark.

The Correct Program is:

main ( )

{

   static float a [ ] = {13.24, 1.5, 4.5, 5.4, 3.5};

   float *j, *k;

   j = a;

   k = &a[4];

   *j = *j * 2;

   *k = *k / 2;

   printf("%f, %f", *j, *k);

}

Question 74

A. If some NP-complete problem P is in ℙ that ℙ = ℕℙ

B. TSP is in ℕℙ

C. SAT is in ℕℙ

D. Hamilton circuit problem is not NP-complete

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B and C only

  2. BOption (b)

    B, C and D only

  3. COption (c)

    C, D and A only

  4. DOption (d)

    D, A and B only

View answer & explanation

Correct answer

Answer: (a)A.

A, B and C only

Why this answer is correct

The correct answer is A, B and C only

Key Points

  • Statement A: "If some NP-complete problem P is in P then P = NP" is correct.
  • It states that if you can come up with a polynomial-time algorithm for a single NP-complete problem, then that would mean all NP problems have polynomial-time solutions -- that is, P would equal NP. This is the definition of NP-completeness.
  • Statement B: "TSP is in NP" is correct.
  • The Travelling Salesman Problem (TSP) is indeed an NP problem: given a list of cities and the distances between them, find the shortest possible route that visits each city and returns to the origin city. It can be verified quickly, but we do not have a quick solution on how to solve it.
  • Statement C: "SAT is in NP" is correct as well.
  • The Boolean satisfiability problem (SAT) is a decision problem, whose instance is a Boolean expression written using only AND, OR, NOT, variables, and parentheses. The question is: given the expression, is there some assignment of TRUE and FALSE values to the variables that will make the entire expression true? A SAT instance can be checked quickly, but again, we have no quick algorithm to solve it.
  • Statement D: "Hamilton circuit problem is not NP-complete" is incorrect.
  • The Hamiltonian circuit problem, which is finding a path in a graph that visits every vertex exactly once and returns to the original vertex, is a classic example of an NP-complete problem

Question 75

Which one of the following is NOT a part of ACID properties of a database transaction? 

  1. AOption (a)

    Atomicity

  2. BOption (b)

    Consistency

  3. COption (c)

    Isolation

  4. DOption (d)

    Deadlock-freedom

View answer & explanation

Correct answer

Answer: (d)D.

Deadlock-freedom

Why this answer is correct

The correct answer is Deadlock-freedom

Key PointsACID properties of a database transaction

  • Atomicity: It means that a transaction is treated as a single, indivisible logical unit of work, in which either all steps are performed or none are. If any step in a transaction fails, the entire transaction is rolled back, and the database is left unchanged.
  • Consistency: This refers to ensuring that a transaction brings the database from one valid state to another. The database has integrity constraints, and it's the responsibility of the transaction to maintain these constraints. Hence, any transaction will take a database from one consistent state to another.
  • Isolation: This property ensures that concurrent execution of transactions leaves the database in the same state as if the transactions were executed sequentially. It enables transactions to execute independently without interference.
  • Durability: This property ensures that once a transaction has been committed, it will remain committed even in the presence of failures (system crash, power loss, etc.). The effects of an executed transaction are persistent and can survive any subsequent malfunction.

On the other hand, "deadlock-freedom" is not a part of ACID. Deadlocks are a condition where two or more transactions are unable to proceed because each holds a lock that the other needs. Deadlock prevention and detection are indeed crucial aspects of database management systems but are not included in the ACID properties.

Question 76

Consider the following statements

A. C-Fuzzy means clustering is a supervised method of learning

B. PCA is used for dimension reduction

C. Apriori is not a supervised technique

D. When a machine learning model becomes so specially tuned to its exact input data that it fails to generalize to other similar data it is called underfitting

Choose the correct answer from the options given below:

  1. AOption (a)

    A and B

  2. BOption (b)

    B and C

  3. COption (c)

    C and D

  4. DOption (d)

    D and A

View answer & explanation

Correct answer

Answer: (b)B.

B and C

Why this answer is correct

The correct answer is B and C

Key PointsA. C-Fuzzy means clustering is a supervised method of learning.

            -> This statement is incorrect. Fuzzy C-means clustering is an unsupervised method, not a supervised one.

B. PCA is used for dimension reduction.

            -> This statement is correct. Principal Component Analysis (PCA) is commonly used for dimensionality reduction in machine learning.

C. Apriori is not a supervised technique.

            -> This statement is correct. Apriori is an algorithm used for association rule mining in unsupervised learning.

D. When a machine learning model becomes so specially tuned to its exact input data that it fails to generalize to other similar data, it is called underfitting.

            -> This statement is incorrect. The described scenario is an example of overfitting, not underfitting. Underfitting occurs when a model is too simple to capture the underlying                   patterns in the data.

The correct statements are B and C.

Question 77

Which phase of compiler checks the grammar of programming? 

  1. AOption (a)

    Code optimization

  2. BOption (b)

    Semantic analysis 

  3. COption (c)

    Code generators 

  4. DOption (d)

    Syntax analysis

View answer & explanation

Correct answer

Answer: (d)D.

Syntax analysis

Why this answer is correct

The correct answer is Syntax analysis

Key Points

  • Semantic Analysis:
  • This phase checks whether the parse tree constructed follows the rules of the language.
  • For example, it checks whether the variables used are declared, whether a variable is declared more than once, the compatibility of arguments in the function call and the function declaration, etc.
  • Semantic analysis produces an annotated syntax tree as an output.

Additional Information

  • ​Lexical Analysis:
  • It is a first phase of a compiler, also known as scanning. This phase reads the source code and breaks it into a stream of tokens, which are the basic units of the programming language. The tokens are then passed on to the next phase for further processing.
  • Code Optimization:
  • This phase of the compiler aims to improve the intermediate code so that the output program runs faster and takes less space. It attempts to minimize resource usage, such as memory or CPU time, and improve performance. This phase is often optional.
  • Code Generation:
  • This is the final phase of compilation. It takes the optimized intermediate code as input and maps it to the target machine language. The code generator translates the intermediate code into the output language, which is typically the machine language of a computer.
  • Syntax Analysis or Parsing:
  • This phase checks the program for grammatical errors, using the rules defined by the programming language. It receives a string of tokens from the lexical analyzer and arranges them in a way that shows the hierarchical structure of the program. This phase produces a parse tree as an output. This step is cr ucial in determining whether the code written by the user makes syntactical sense to the compiler.

Question 78

Consider the following language:

L= {w ∈ { a, b, c }* : na(ω) + nb(ω) = nc(ω)}

L is

  1. AOption (a)

    Context free but not linear

  2. BOption (b)

    Not context free

  3. COption (c)

    Context free and linear

  4. DOption (d)

    Linear

View answer & explanation

Correct answer

Answer: (a)A.

Context free but not linear

Why this answer is correct

The correct answer is Context free but not linear

Key PointsThe given language L={w ∈ { a, b, c } : na(ω) + nb(ω) = nc(ω)}* consists of strings over the alphabet {a, b, c} with the property that the total number of a's and b's in any string must be equal to the total number of c's.

  • This language is context-free.
  • A context-free language (CFL) is typically one that can be generated by a context-free grammar (CFG) or recognized by a pushdown automaton (PDA). In this case, a PDA would have to simultaneously keep count of the number of 'a's and 'b's and compare this cumulative sum with the number of 'c's.  Here the PDA can deterministically guess when to switch from pushing for 'a's/'b's to popping for 'c's. However, this is deterministic, and it can be done deterministically.
  • On the other hand, a linear language is a proper subset of context-free languages where the grammar generating the language never has more than one non-terminal in the right-hand side of any of its productions (can also be processed with a deterministic pushdown automaton).

Question 79

The compiler for high level language that runs on one machine and produces code for other machine is called- 

  1. AOption (a)

    Cross compiler

  2. BOption (b)

    Multipass compiler 

  3. COption (c)

    Optimizing Compiler

  4. DOption (d)

    One pass Compiler

View answer & explanation

Correct answer

Answer: (a)A.

Cross compiler

Why this answer is correct

The correct answer is Cross compiler

Key Points

Cross compiler

  • A cross compiler is a type of compiler that is capable of creating executable code for a platform other than the one on which the compiler is running.
  • For instance, you might be developing software on a Windows machine, but the target platform could be a different operating system or architecture, like Linux on ARM. The cross compiler allows the developer to compile the code on the Windows machine (the host machine), but the resulting executable is intended to be run on the different platform (the target machine).
  • Cross compilers are especially necessary when the target platform is not capable of running a compiler, such as embedded systems with limited computational resources or specific hardware technologies such as gaming consoles. They are also useful when developing for different operating systems to ensure platform-specific optimization and compatibility.
  • That's why the statement "The compiler for a high-level language that runs on one machine and produces code for another machine" refers to a cross compiler.
  • The other options given like Multipass compiler, Optimizing Compiler, and One pass Compiler refer to different aspects of compilers:
  • A Multipass compiler breaks down the process of translating source code into an executable form into multiple stages or "passes", each of which has its own specific task.
  • An Optimizing compiler tries to enhance the performance of the output program, by reducing the execution time or the memory footprint of the program, or both.
  • A One pass compiler scans the source code and generates the output code in a single pass over the source.

Question 80

What is the (4 + 4) fit binary fixed point equivalent of -(3.72)10?

  1. AOption (a)

    0011.1100 

  2. BOption (b)

    0011.1010

  3. COption (c)

    1100.0100 

  4. DOption (d)

    0011.1011

View answer & explanation

Correct answer

Answer: (c)C.

1100.0100 

Why this answer is correct

The correct answer is 1100.0100

Key PointsFixed point representation is a way of storing real numbers in binary form. A 4 + 4 binary fixed point accommodates 4 bits for the integer part (one of them being the sign bit) and 4 bits for the fractional part.

EXPLANATION:

Here is how we work out the binary equivalent of -3.72:

  • Integer part (-3):
  • The binary representation of 3 is 0011.
  • In the 2's complement system (which is used to represent negatives), flip the bits (1100) and then add 1 to get the representation of -3 which gives us 1101.
  • Since we are representing a 4-bit binary number, we need to consider only 4 bits which is 1100 after discarding overflow bits. Why do we do that? While overflow is generally considered an error, in 2's complement binary arithmetic, an overflow is silently ignored.
  • So the binary representation of -3 is 1100.
  • Fraction part (0.72): For the fractional part, we keep multiplying by 2:
  • 0.72 * 2 = 1.44 => the first digit after decimal point is 1.
  • 0.44 * 2 = 0.88 => the second digit after decimal point is 0.
  • 0.88 * 2 = 1.76 => the third digit after decimal point is 1.
  • 0.76 * 2 = 1.52 => the fourth digit after decimal point is 1. Therefore, the binary equivalent of 0.72 in 4-bit precision is .0100.

So the binary fixed point equivalent of -3.72 is -3 for the integer part, and 0.72 for the fractional part, combine them and we get answer: 1100.0100

Question 81

Let ⊕ denote XOR operation. Let 1 and 0 denote the binary constants and F is the Boolean expression over two variables P and Q

F(P, Q) = ((1 ⊕ P) ⊕ (P ⊕ Q)) + ((P ⊕ Q) ⊕ (Q ⊕ 0))

Which of the following is equivalent expression to F?

  1. AOption (a)

    Ρ ⊕ Q

  2. BOption (b)

    P + Q

  3. COption (c)

    P+Q‾\overline{P+Q}

  4. DOption (d)

    P⊕Q‾\overline{P \oplus Q}

View answer & explanation

Correct answer

Answer: (d)D.

P⊕Q‾\overline{P \oplus Q}

Why this answer is correct

The correct answer is P⊕Q‾\overline{P \oplus Q}

Key Points

  • XOR operator ⊕ is both commutative and associative.
  • A ⊕ B = AB̅ + A̅.B
  • A ⊕ A = 0
  • 1 ⊕ A = A̅
  • 0 ⊕ A = A

COLCULATION:

  1. F(P, Q) = ((1 ⊕ P) ⊕(P⊕Q)) ⊕((P⊕Q) ⊕(Q⊕0) )
  2. F(P, Q) = 1 ⊕ (P ⊕ P) ⊕ Q ⊕ P⊕ (Q  ⊕ Q) ⊕ 0
  3. F(P, Q) = (1 ⊕ 0) ⊕ Q ⊕ P⊕ (0 ⊕ 0)
  4. F(P, Q) = (1 ⊕ Q) ⊕ (P⊕ 0)
  5. F(P, Q) = Q̅  ⊕  P
  6. F(P, Q) = Q̅. P̅ + Q.P
  7. F(P, Q) = P ⊙ Q
  8. F(P, Q) = P⊕Q‾\overline {P \oplus Q}

Question 82

Let (Z, +) denote the group of all integers under addition. Then the number of all automorphisms of (Z, +) is

  1. AOption (a)

    1

  2. BOption (b)

    2

  3. COption (c)

    3

  4. DOption (d)

    4

View answer & explanation

Correct answer

Answer: (b)B.

2

Why this answer is correct

The correct answer is 2

Key PointsIn the group of all integers under addition, there are only two automorphisms. One is the identity map (each number maps to itself) and the other is the negation map (each number maps to its negative). This is because an automorphism in this group must preserve the group operation, which is addition, and these two functions are the only ones that do this. 

EXPLANATION:

  • An automorphism is an isomorphism from a mathematical structure onto itself. In the context of groups, it's an isomorphism from a group to itself. In terms of the algebraic structure, an isomorphism preserves the group operation. For the group of integers under addition (Z, +), the operation is addition.
  • In case of (Z, +), an automorphism must map 0 to 0 (as every group homomorphism preserves the identity) and must preserve addition. There are only two homomorphisms from (Z, +) to itself:
  • The identity mapping (the function that maps every integer to itself), f(n) = n, and
  • The negation function, f(n) = -n.
  • This is because if τ: ℤ→ℤ is a group homomorphism, then τ(n) = nτ(1) for all n ∈ ℤ. As a result, the value of τ on any integer is determined by the image of 1.

Both of these homomorphisms are in fact automorphisms since they are bijective (one-to-one and onto).

So, the correct answer is 2) 2.

Question 83

Match List I with List II

LIST ILIST II
A.CDMAI.It provides mobile internet connection with faster data transfer rates
B.GSMII.It allows user to connect to a network or to other devices over wireless channel
C.UMTSIII.Accessing mechanism for multiple transmitters over a single channel
D.WiFiIV.It is a cellular technology that employs hybrid of FDMA and TDMA

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

The correct answer is A - III, B - IV, C - I, D - II

Key Points

  • A. CDMA:
  • CDMA or Code-Division Multiple Access is a digital cellular technology that uses spread spectrum techniques.
  • The unique attribute that separates it from other technologies is its ability to allow several transmitters to send information simultaneously on a single communication channel.
  • This is accomplished by assigning a code to every transmitter, consequently enabling multiple access, hence the term in its name "Multiple Access".
  • B. GSM:
  • GSM is an abbreviation for Global System for Mobile communications (originally from Groupe Spécial Mobile).
  • It is a standard developed by the European Telecommunications Standards Institute (ETSI) to describe the protocols for second-generation digital cellular networks used by mobile devices such as mobile phones and tablets. It's a cellular technology that employs a combination of two major multiple access schemes, FDMA (Frequency Division Multiple Access) and TDMA (Time Division Multiple Access).
  • In FDMA, each user is allocated a unique frequency band or channel while TDMA allows several users to share the same frequency band by dividing it into different time slots.
  • C. UMTS:
  • UMTS which stands for Universal Mobile Telecommunications System, is a third-generation (3G) mobile cellular technology for networks based on the GSM standard.
  • With advancements from previous technologies, UMTS is capable of providing higher data transfer rates and thus can contribute to a richer and more diverse range of services.
  • It is known for offering a consistent set of services to mobile computer and phone users, irrespective of the fact that people are on the move.
  • D. WiFi:
  • WiFi is a technology that allows an electronic device to exchange data or connect to the internet wirelessly using radio waves.
  • It provides the underlying technology to create a home or business network (LAN) without physical wires or cables that is, a wireless network.
  • On this network, users connect their devices to access the internet, share files, play games and many other things.
  • This is convenient for devices like laptops, tablets, and smartphones that may frequently move throughout the space.

IP datagram has arrived with following partial information in the header (in hexadecimal)

45000054000300002006.....

Question 84

Based on Passage: View directions & passage

What is the efficiency of this datagram? 

  1. AOption (a)

    76.19%

  2. BOption (b)

    80.50%

  3. COption (c)

    82.24%

  4. DOption (d)

    85.45%

View answer & explanation

Correct answer

Answer: (a)A.

76.19%

Why this answer is correct

The correct answer is 76.19%

EXPLANATION:

The header of the IP datagram given is in hexadecimal format.

Size of the header is 20 to 60 Bytes

Version = 4 bits = (0100)2 (It is IPv4)

Header length = (0101)2 to (1111)2 = 5 bits to 15 bits

Total length = 216 bits

Identification = 216 bits

Fragment Offset = 216 bits

Time to live = 28 bits

Protocol = 28 bits

Header Checksum = 216 bits

SOLUTION:

IP Datagram = 45000054 00030000 2006.......

           4                           5                       00                                0054

The efficiency of an IP datagram can be determined by calculating the ratio of the payload (data) size to the total datagram size.

As we have determined above:

  • The total size of the datagram is 84 bytes.
  • The size of the header is 20 bytes.

Subtracting the header size from the total size gives us the payload size:

  • Payload size = Total size - Header size Payload size = 84 bytes - 20 bytes = 64 bytes

The efficiency of the datagram is then:

  • Efficiency = (Payload size / Total size) * 100%

So,

  • Efficiency = (64 bytes / 84 bytes) * 100% ≈ 76.19%

Therefore, the efficiency of this datagram is approximately 76.19%.

Question 85

Based on Passage: View directions & passage

What is the protocol of the payload being carried by the packet? 

  1. AOption (a)

    ICMP

  2. BOption (b)

    SCTP

  3. COption (c)

    TCP protocol

  4. DOption (d)

    IGMP

View answer & explanation

Correct answer

Answer: (c)C.

TCP protocol

Why this answer is correct

The correct answer is TCP protocol

EXPLANATION:

The header of the IP datagram given is in hexadecimal format.

Size of the header is 20 to 60 Bytes

Version = 4 bits = (0100)2 (It is IPv4)

Header length = (0101)2 to (1111)2 = 5 bits to 15 bits

Total length = 216 bits

Identification = 216 bits

Fragment Offset = 216 bits

Time to live = 28 bits

Protocol = 28 bits

Header Checksum = 216 bits

SOLUTION:

IP Datagram = 45000054 00030000 2006.......

                20                              06             

  

The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.

The 9th byte (which is the 7th and 8th characters in the hexadecimal representation) identifies the protocol of the contained data.

In the given header, the protocol value is "06".

This value corresponds to the TCP protocol according to the Assigned Internet Protocol Numbers. Therefore,

The payload being carried by the packet is using the TCP protocol. So, the correct answer is: TCP protocol

Question 86

Based on Passage: View directions & passage

What is the size of datagram? 

  1. AOption (a)

    64 bytes 

  2. BOption (b)

    74 bytes

  3. COption (c)

    84 bytes 

  4. DOption (d)

    104 bytes

View answer & explanation

Correct answer

Answer: (c)C.

84 bytes 

Why this answer is correct

The correct answer is 84 bytes

EXPLANATION:

The header of the IP datagram given is in hexadecimal format.

Size of the header is 20 to 60 Bytes

Version = 4 bits = (0100)2 (It is IPv4)

Header length = (0101)2 to (1111)2 = 5 bits to 15 bits

Total length = 216 bits

Identification = 216 bits

Fragment Offset = 216 bits

Time to live = 28 bits

Protocol = 28 bits

Header Checksum = 216 bits

SOLUTION:

IP Datagram = 45000054 00030000 2006.......

         4                             5                          00                           0054

 

The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.

The total length field is the second and third bytes of the IP header, "000054" in this case. These two bytes specify the total length of the whole IP datagram including the header and the data.

"000054" in hexadecimal is 84 in decimal. This value represents the total length of the datagram in bytes.

Therefore, the size of the datagram is 84 bytes.

Question 87

Based on Passage: View directions & passage

How many more routers can the packet travel to? 

  1. AOption (a)

    22

  2. BOption (b)

    26

  3. COption (c)

    30

  4. DOption (d)

    32

View answer & explanation

Correct answer

Answer: (d)D.

32

Why this answer is correct

The correct answer is 32

EXPLANATION:

The header of the IP datagram given is in hexadecimal format.

Size of the header is 20 to 60 Bytes

Version = 4 bits = (0100)2 (It is IPv4)

Header length = (0101)2 to (1111)2 = 5 bits to 15 bits

Total length = 216 bits

Identification = 216 bits

Fragment Offset = 216 bits

Time to live = 28 bits

Protocol = 28 bits

Header Checksum = 216 bits

SOLUTION:

IP Datagram = 45000054 00030000 2006.......

           20                                 06               

 

The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.

The hop limit (also known as the time-to-live limit in IPv4) is represented by the 8th byte, which in this case is "20" in hexadecimal. This value decrements by one each time the packet passes through a router. When it reaches zero, the packet is discarded.

"20" in hexadecimal translates to 32 in decimal. Therefore, the packet can travel through 32 more routers before it gets discarded.

Question 88

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

  1. AOption (a)

    5

  2. BOption (b)

    4

  3. COption (c)

    3

  4. DOption (d)

    2

View answer & explanation

Correct answer

Answer: (a)A.

5

Why this answer is correct

The correct answer is 5

Key Points 

  • Formula:
  • Considering all nodes are completely full means every node has N − 1 key.
  • If a new key is inserted, then at every level there will be a new node created, and in the worst-case root node will also be broken into two parts. Since we have 4 levels, then 5 new nodes will be created

Additional Information 

  • Diagram needs to be updated
  • First, the overflow happens at the leaf, and second on the parent of that leaf, and so on until the last overflow happens at the root node.

            

  • Therefore 4 nodes are created

​If the database table has h levels and the level of the root node is 1 then on a new key insertion, the maximum number of nodes newly created is h + 1

Question 89

Given below are two statements:

Statement I: If f and g are two functions and f = O(g) but g ≠ o(f), we say that the growth rate of g is smaller than that of f

Statement II: The class of all decision problems decided by a TM in exponential time, that is O(2k), k being a constant.

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

  1. AOption (a)

    Both Statement I and Statement II are correct

  2. BOption (b)

    Both Statement I and Statement II are incorrect 

  3. COption (c)

    Statement I is correct but Statement II is incorrect

  4. DOption (d)

    Statement I is incorrect but Statement II is correct

View answer & explanation

Correct answer

Answer: (b)B.

Both Statement I and Statement II are incorrect 

Why this answer is correct

The correct answer is Both Statement I and Statement II are incorrect 

EXPLANATION:

  • Statement I: This is incorrect.
  • The notation f = O(g) means that the growth rate of function f is bounded by the growth rate of function g, up to a constant factor and beyond a certain point.
  • If, in addition, g is not little o of f (meaning, g does not grow significantly slower than f beyond that certain point), then that doesn't bear on f growing faster than g. Instead it should mean that f does not grow faster than g and g does not grow significantly slower than f.
  • Statement II is incorrect.
  • The class of decision problems decided by a Turing Machine (TM) in exponential time is typically denoted by EXP, and it is associated with O(2poly(n)), where "poly(n)" represents a polynomial in the input size n.
  • The statement wrongly suggests that the class is O(2k), where k is a constant. In reality, the exponent in the exponential time complexity is a polynomial function of the input size.

Question 90

Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R.

Assertion A: A process involves a library function to create a thread.

Reason R: The threads make system calls to convey their resource and I/O requirement to the Kernel.

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

  1. AOption (a)

    Both A and R are true and R is the correct explanation of A

  2. BOption (b)

    Both A and R are true but R is NOT the correct explanation of A

  3. COption (c)

    A is true but R is false

  4. DOption (d)

    A is false but R is true

View answer & explanation

Correct answer

Answer: (b)B.

Both A and R are true but R is NOT the correct explanation of A

Why this answer is correct

The correct answer is Both A and R are true but R is NOT the correct explanation of A

Key Points

  • Assertion A is true because a process can indeed use a library function to create a new thread. Libraries like the Pthreads library in C and Java's built-in multi-threading functionality offer such methods.
  • Reason R is also true since threads, like processes, can make system calls to request services from the operating system's kernel, which include tasks related to resource allocation and I/O operations.

However, Reason R is not the correct explanation of Assertion A. The reason for using a library function to create a thread doesn't directly relate to threads making system calls. In other words, threads making system calls to the kernel is a thread behavior and not a direct justification or explanation for why a process would use a library function to create a thread.

Question 91

Based on Passage: View directions & passage

What is the header size ?

  1. AOption (a)

    10 bytes

  2. BOption (b)

    20 bytes 

  3. COption (c)

    30 bytes 

  4. DOption (d)

    40 bytes

View answer & explanation

Correct answer

Answer: (b)B.

20 bytes 

Why this answer is correct

The correct answer is 20 bytes

EXPLANATION:

The header of the IP datagram given is in hexadecimal format.

Size of the header is 20 to 60 Bytes

Version = 4 bits = (0100)2 (It is IPv4)

Header length = (0101)2 to (1111)2 = 5 bits to 15 bits

Total length = 216 bits

Identification = 216 bits

Fragment Offset = 216 bits

Time to live = 28 bits

Protocol = 28 bits

Header Checksum = 216 bits

SOLUTION:

IP Datagram = 45000054 00030000 2006.......

             4                   5                00                         0054

The first byte of the IP header contains two fields: the version and the Internet Header Length (IHL). In your case, the first byte is "45" in hexadecimal.

The first digit '4' is the IP version i.e., IPv4. The second digit '5' represents the Internet Header Length (IHL).

The IHL field is 4 bits long and specifies the header length in 32-bit words. '5' in hexadecimal is 5 in decimal, which means the header length is 5 words (32-bit or 4 bytes each).

So, the size of the header is 5 * 4 = 20 bytes.

Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it to screen (i is row index and j is column index):

for j = [0..... 1023]{

temp = 0;

for i = [0.... 16]:

temp = temp + T[i] [j];

print (temp/17.0); }

T [i] [j] and temp are 32 bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is page and holds 16 pages of size 1024 words, the page replacement policy is "least recently used ", If T is stored in the virtual address space in row major format.

Question 92

Based on Passage: View directions & passage

What is the main memory hit ratio?

  1. AOption (a)

    0

  2. BOption (b)

    1

  3. COption (c)

    2

  4. DOption (d)

    3

View answer & explanation

Correct answer

Answer: (a)A.

0

Why this answer is correct

The correct answer is 0

EXPLANATION:

To determine the number of page faults, let's analyze the memory accesses in the given program. Since the table T is stored in row-major format, the program accesses elements in a contiguous manner within rows. Each row has 1024 elements, and there are 17 rows.

0, 00, 10, 2.........0, 1024
1, 0
2, 0
...
17, 017, 117, 2.........17, 1024

The memory page size is 1024 words, and there are 16 pages. Each page can hold one row of the table.

Now, let's consider the nested loops:

for j in range(1024):

    temp = 0

    for i in range(17):

        temp = temp + T[i][j]

        print(temp/17.0)

The inner loop iterates over rows, so it sequentially accesses elements in a column (same column index j) for each iteration of the outer loop. This means that for each column, the inner loop will access 17 consecutive elements, which are located in 17 different rows.

Since each page can hold a full row (17 elements), accessing a column will result in a page fault for each iteration of the outer loop (for each column).

Therefore, the total number of page faults will be the number of columns multiplied by the number of page faults per column:

Number of Page Faults=Number of Columns×Number of Page Faults per Column\text{Number of Page Faults} = \text{Number of Columns} \times \text{Number of Page Faults per Column}

Number of Page Faults=1024×17=17,408 \text{Number of Page Faults} = 1024 \times 17 = 17,408

According to above solution no any page hit in the main memory

So, the correct answer is: 1) 0

Question 93

Based on Passage: View directions & passage

Consider again that T is stored in column-major format, what is the main memory hit ratio? 

  1. AOption (a)

    80%

  2. BOption (b)

    95.6%

  3. COption (c)

    97.8%

  4. DOption (d)

    99.9%

View answer & explanation

Correct answer

Answer: (d)D.

99.9%

Why this answer is correct

The correct answer is 99.9%

EXPLANATION:

In column-major format, each column contains 17 elements. The memory page size is 1024 words, and there are 16 pages. Each page can hold a complete column (60 elements) along with some remainder (4 elements).

0, 00, 10, 2.........0, 1024
1, 0
2, 0
...
17, 017, 117, 2.........17, 1024

Now, let's calculate the main memory hit ratio.

Total Hits=(17×1024)−17=17,391\text{Total Hits} = (17 \times 1024) - 17 = 17,391

Hit Ratio=(Total HitsTotal Memory Accesses)×100=(17,39117,408)×100≈99.90% \text{Hit Ratio} = \left( \frac{\text{Total Hits}}{\text{Total Memory Accesses}} \right) \times 100 = \left( \frac{17,391}{17,408} \right) \times 100 \approx 99.90\%

So, the correct answer is indeed: 4) 99.9%

Question 94

Based on Passage: View directions & passage

Consider that T is stored in column major format, how many page faults will be encountered?

  1. AOption (a)

    14

  2. BOption (b)

    15

  3. COption (c)

    16

  4. DOption (d)

    17

View answer & explanation

Correct answer

Answer: (d)D.

17

Why this answer is correct

The correct answer is 17

EXPLANATION:

In column-major format, each column contains 17 elements. Given that the memory page size is 1024 words, we can calculate how many complete columns can fit into one page. .

0, 00, 10, 2.........0, 1024
1, 0
2, 0
...
17, 017, 117, 2.........17, 1024

Columns per Page=Page SizeElements per Column=102417≈60 \text{Columns per Page} = \frac{\text{Page Size}}{\text{Elements per Column}} = \frac{1024}{17} \approx 60

This means that each page can store 60 complete columns, along with 4 additional elements (the remainder). Therefore, for every 60 columns accessed, there will be a page fault for the next column, as it crosses the boundary of the page.

Now, we can determine the total number of page faults for the entire set of columns:

Total Page Faults=Total ColumnsColumns per Page=102460≈17 \text{Total Page Faults} = \frac{\text{Total Columns}}{\text{Columns per Page}} = \frac{1024}{60} \approx 17

So, the correct number of page faults, as per the provided explanation, is 17.

Question 95

Based on Passage: View directions & passage

How many page faults will be encountered? 

  1. AOption (a)

    16,402

  2. BOption (b)

    17,408

  3. COption (c)

    18,208

  4. DOption (d)

    18,608

View answer & explanation

Correct answer

Answer: (b)B.

17,408

Why this answer is correct

The correct answer is 17,408

EXPLANATION:

To determine the number of page faults, let's analyze the memory accesses in the given program. Since the table T is stored in row-major format, the program accesses elements in a contiguous manner within rows. Each row has 1024 elements, and there are 17 rows.

0, 00, 10, 2.........0, 1024
1, 0
2, 0
...
17, 017, 117, 2.........17, 1024

The memory page size is 1024 words, and there are 16 pages. Each page can hold one row of the table.

Now, let's consider the nested loops:

for j in range(1024):

    temp = 0

    for i in range(17):

        temp = temp + T[i][j]

        print(temp/17.0)

The inner loop iterates over rows, so it sequentially accesses elements in a column (same column index j) for each iteration of the outer loop. This means that for each column, the inner loop will access 17 consecutive elements, which are located in 17 different rows.

Since each page can hold a full row (17 elements), accessing a column will result in a page fault for each iteration of the outer loop (for each column).

Therefore, the total number of page faults will be the number of columns multiplied by the number of page faults per column:

Number of Page Faults=Number of Columns×Number of Page Faults per Column\text{Number of Page Faults} = \text{Number of Columns} \times \text{Number of Page Faults per Column}

Number of Page Faults=1024×17=17,408 \text{Number of Page Faults} = 1024 \times 17 = 17,408

So, the correct answer is: 2) 17,408

Question 96

Based on Passage: View directions & passage

What is fault ratio of row major to column major arrangements? 

  1. AOption (a)

    1024 ∶ 1

  2. BOption (b)

    1301 ∶ 1

  3. COption (c)

    1240 ∶ 1

  4. DOption (d)

    9107 ∶ 8

View answer & explanation

Correct answer

Answer: (a)A.

1024 ∶ 1

Why this answer is correct

The correct answer is 1024 ∶ 1

EXPLANATION:

The fault ratio of row-major to column-major arrangements can be determined by comparing the number of page faults for each arrangement. In the row-major arrangement, as previously calculated, there are 17,408 page faults. In the column-major arrangement, there are also 17 page faults.

Now, let's find the fault ratio:

Fault Ratio=Number of Page Faults in Row MajorNumber of Page Faults in Column Major\text{Fault Ratio} = \frac{\text{Number of Page Faults in Row Major}}{\text{Number of Page Faults in Column Major}}

Fault Ratio=17,40817=10241\text{Fault Ratio} = \frac{17,408}{17} = \frac{1024}{1}

So, the correct answer is: 1) 1024 ∶ 1

Question 97

Consider two hosts P and Q that are connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes and between R and Q is 820 bytes. A TCP segment of size 1400 bytes is transferred from P to Q through R with IP identification value of 0x1234. Assume that IP header size is 20 bytes. Further the pcaket is allowed to be fragmented that is Don't fragment (DF) flag in the IP Header is not set by P. Which of the following statement/s is/are true?

A. Two fragments are created at R and IP datagram size carrying the second fragment is 620 bytes

B. If the second fragment is lost, then R resends the fragment with IP identification value of 0x1234

C. If the second fragment lost, then P requires to resend the entire TCP segment.

D. TCP destination port can be determined by analyzing the second fragment only.

Choose the correct answer from the options given below:

  1. AOption (a)

    A, B and C only

  2. BOption (b)

    A and C only

  3. COption (c)

    C and D only

  4. DOption (d)

    B and D only

View answer & explanation

Correct answer

Answer: (b)B.

A and C only

Why this answer is correct

The correct answer is A and C only

Key Points

  • A) Two fragments are created at R and IP datagram size carrying the second fragment is 620 bytes:
  • MTU between P-R = 1500 bytes. R should have received a full datagram of size 1400 bytes + 20 byte header = 1420 bytes. On R-Q link, the MTU = 820 bytes. So, R fragments the datagram received. One with 800 Bytes of data + 20 byte header = 820 bytes, and the other with the remaining data, thus 600 bytes of data + 20 byte header = 620 bytes. Fulfills condition (A).
  • B) If the second fragment is lost, then R resends the fragment with IP identification value of 0x1234:
  • Incorrect. Routers, including R, do not resend failed fragments. The retransmission responsibility lies with the hosts.
  • C) If the second fragment lost, then P requires to resend the entire TCP segment:
  • Correct. If the second fragment is lost, then the destination Q can't recognize the original TCP segment because any fragment loss leads to discarding all fragments. The destination then requests host P for a retransmission.
  • D) TCP destination port can be determined by analyzing the second fragment only:
  • Incorrect. Only the first fragment contains the TCP header, as the IP fragmentation will occur after the TCP segmentation. The TCP header contains details like Source and destination ports. The second fragment does not contain the TCP header.

The answer is (2), A and C only.

Question 98

Which of the following is not a property of a good system for representation of knowledge in a particular domain?

  1. AOption (a)

    Presentation adequacy

  2. BOption (b)

    infrential adequacy

  3. COption (c)

    Infential efficiency

  4. DOption (d)

    acquisitional efficiency

View answer & explanation

Correct answer

Answer: (a)A.

Presentation adequacy

Why this answer is correct

The correct answer is Presentation adequacy

Key Points

  • Presentation Adequacy:
  • This refers to how well the representation can convey the intended meaning to a user or another system. It involves the clarity and effectiveness of the representation for human understanding.
  • Inferential Adequacy:
  • This property is about the representation's ability to support reasoning and inference. A good representation should allow for drawing conclusions and making inferences based on the knowledge it encapsulates.
  • Inferential Efficiency:
  • This property relates to how quickly and effectively the system can perform inference operations. An efficient system can make logical deductions or draw conclusions in a timely manner.
  • Acquisitional Efficiency:
  • This property is concerned with how well the system can acquire new knowledge or adapt to changes in the environment. An efficient system for knowledge representation should be able to incorporate new information easily.

So, in the context of knowledge representation systems, presentation adequacy might not be considered a primary property because the primary focus is often on the system's ability to represent, reason, and acquire knowledge efficiently. The effectiveness of presenting information to users is crucial but might be considered as a secondary aspect in comparison to the system's overall efficiency in handling knowledge.

Question 99

What is x in the following program?

#include < stdio.h >

int main ( )

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

arrfptr x;

return 0 ;

}

  1. AOption (a)

    x is a pointer

  2. BOption (b)

    x is a array of three pointer 

  3. COption (c)

    x is an array of three function pointer

  4. DOption (d)

    Error in x declaration

View answer & explanation

Correct answer

Answer: (c)C.

x is an array of three function pointer

Why this answer is correct

The correct answer is x is an array of three function pointer

Key PointsThe given program declares an array of three function pointers named x. Each function pointer is of type (* (*arrfptr [3]) ( ) ) [10].

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

This declares arrfptr as an array of three pointers to functions with no parameters (specified by ()), and each function returns a pointer to an array of 10 elements. So, the correct answer is: x is an array of three function pointers

Additional InformationAn array of pointers in C is essentially an array where each element is a pointer. This allows you to create an ordered collection of pointers, and each pointer can point to a different location in memory. The declaration of an array of pointers involves specifying the type of the elements that the pointers will point to.

Question 100

Match List I with List II

LIST ILIST II
A.Scenario testingI.To verify the I/O behavior of text object
B.Regression testingII.user acceptance methodology
C.Component testingIII.No new bugs after changes in program
D.Beta testingIV.The documentation of a use case

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

The correct answer is A - IV, B - III, C - I, D - II

Key Points

  • Scenario Testing (A-IV):
  • This type of testing is usually based on use cases or real-life scenarios that a software program might encounter.
  • A scenario could be a specific sequence of actions a user might take when using an application.
  • For example, a scenario for an e-commerce site might be "a user logs in, adds items to the shopping cart, removes one item, and then proceeds to checkout".
  • The documentation of a use case or detailed user scenario is the basis for this kind of testing.
  • Regression Testing (B-III):
  • Any time a change is made to software (like bug fixes, patches, or new functionality), there's a risk that other parts of the software that were previously working fine can unexpectedly break.
  • To prevent such issues, testers perform regression testing, which aims to reveal any new bugs that might have been unknowingly introduced ("regressed") during the change. Essentially, the goal is to ensure there are "no new bugs after changes in the program."
  • Component Testing (C-I):
  • This type of testing takes a deep look at specific parts (or "components") of the software.
  • For example, it might focus on a specific feature or function. Testers might verify the input/output behavior of the component, which is why it is matching with "to verify the I/O behavior of a text object."
  • Beta Testing (D-II):
  • This is a type of user acceptance testing that occurs after the software has passed initial stages of testing but before it is officially released. The software is typically provided to a small group of real-world users to get their feedback.
  • This practice allows developers to catch any issues that might not have been caught during earlier testing phases. It is a type of "user acceptance methodology" as it is dependent on the feedback of actual, external users.

100 questions in the full paper