CUET PG 2024 Data Science, Artificial Intelligence, Cyber Security, and Computer Science 27th March 2024 Shift 1 Question Paper with Solution PDF is available for download here. Students found the Data Science and Artificial Intelligence sections easy, Cyber Security moderate, and Advanced Computer Science topics difficult. The Advanced Computer Science section carried the highest weightage, and the overall difficulty level was moderate to difficult.
| CUET PG 2024 Data Science Question Paper with Answer Key | Check Solution |
Consider the following statements regarding RAID and choose the right one.
(A) RAID 3 requires only a single redundant disk.
(B) In RAID 4 scheme, two different parity calculations are carried out and stored in separate blocks on different disks.
(C) RAID 5 distributes the parity strips across all disks.
(D) In RAID 2, the number of redundant disks are proportional to the log of the number of data disks.
Options:
RAID 3 uses one dedicated disk for parity. RAID 4 does not carry out two different parity calculations. RAID 5 distributes parity across disks, making it a better approach for fault tolerance. RAID 2 uses redundant disks proportional to the log of the number of data disks.
In case of DMA, after the completion of the transfer, the processor is required to be notified of the completion. This is done through:
After the completion of the DMA transfer, the processor is notified via an interrupt signal, which is commonly used to alert the processor to handle the next stage of processing.
In a two-level memory hierarchy, the access time of the cache memory is 12 nsec and the access time of the main memory is 1.5 msec. The hit ratio is 0.98. What is the average access time of the two-level memory system?
The average access time is calculated as:
Average access time = Hit ratio × Cache access time + (1 − Hit ratio) × (Main memory access time + Cache access time)
Substituting the values, we get:
Average access time = (0.98 × 12 nsec) + (0.02 × (1.5 msec + 12 nsec))
This evaluates to approximately 41.76 nsec.
Match List I with List II.
| List I | List II |
|---|---|
| A. Supervisor mode | I. Entered when the processor encounters a software interrupt instruction |
| B. Abort Mode | II. Entered in response to memory fault |
| C. Fast Interrupt Mode | III. Entered whenever the processor receives an interrupt signal from a designated fast interrupt source |
| D. Interrupt Mode | IV. Entered whenever the processor receives an interrupt signal from any other source |
The correct matches are based on the descriptions of the processor modes:
Supervisor mode is entered during a software interrupt.
Abort Mode is entered in response to a memory fault.
Fast Interrupt Mode is entered when a fast interrupt is received.
Interrupt Mode is entered for handling other general interrupts.
Deallocation of stack of thread and register contexts will take place
The deallocation of the stack and register contexts occurs when the thread terminates, as the system frees the resources used by the thread.
Match List I with List II:
| List I | List II |
|---|---|
| A. Segmentation | I. Memory is viewed as a collection of logical address spaces. |
| B. Unsegmented paged memory | II. Virtual address is the same as the physical address. |
| C. Segmented unpaged memory | III. Memory is viewed as a paged linear address space. |
| D. Segmented paged memory | IV. Manages the allocation of memory within a partition. |
In segmentation, memory is viewed as a collection of logical address spaces (A - III). Unsegmented paged memory has a virtual address mapped to physical address (B - IV). Segmented unpaged memory uses linear address space (C - II). Segmented paged memory manages memory allocation (D - I).
If L and L are recursively enumerable, then L is
Recursively enumerable languages are those that can be recognized by a Turing machine. The union of two recursively enumerable languages is always recursive, as it can be determined by a Turing machine.
Let P be a regular language and Q be a context-free language such that Q ⊆ P. Which of the following is always regular?
The difference of a regular language and a context-free language is always regular because regular languages are closed under difference.
Which of the following languages are context-free?
(A). L = 0i1j | i ≠ j
(B). L = 0i1i | i = j
(C). L = 0i1j | i, j ≥ 0
(D). L = 0i1j | i = 2j
Context-free languages include those where the number of ‘0‘s and ‘1‘s are related in a balanced manner (e.g., (B), (D)). However, languages like (A) are not context-free.
Consider the following statement. Finite Languages satisfy the pumping lemma by having n = (Consider p as the maximum string length in the language L)
The pumping lemma for finite languages requires that the pumping length (n) be at most the maximum string length in the language, which is typically denoted as ‘p’.
Let Σ be a finite non-empty alphabet and let Σ* be the power set of Σ*. Which one of the following is true?
Σ* represents the set of all possible strings formed from the alphabet Σ, and it is countable because the set of finite strings over a finite alphabet is countable. Σ is a finite non-empty alphabet, which is also countable. Hence, both Σ* and Σ are countable.
In a class B subnet, we know the IP address of one host and the mask as given below: IP address = 125.134.112.66 Mask = 255.255.224.0 what is the first address (Network address)?
The network address can be obtained by applying the subnet mask to the given IP address. The subnet mask 255.255.224.0 is equivalent to /19 in CIDR notation. The result of the bitwise AND operation between the IP address and the subnet mask gives the network address 125.134.112.0.
Match List I with List II
| LIST I | LIST II |
|---|---|
| (A) A* Algorithm | (I) Space complexity is O(d), where d = depth of the deepest optimal solution. |
| (B) Recursive Best First Search | (II) Incomplete even if the search space is finite. |
| (C) Recursive Best First Search | (III) Optimal, if optimal solution is reachable, otherwise returns the best reachable optimal solution. |
| (D) SMA* Algorithm | (IV) Computation and space complexity is too high. |
Choose the correct answer from the options given below:
- A* Algorithm (A) is incomplete even if the search space is finite, hence matched with (II).
- Recursive Best First Search (B) is optimal if the optimal solution is reachable and returns the best reachable optimal solution, matched with (III).
- SMA* Algorithm (D) has a high computation and space complexity, matched with (I).
Hence, the correct answer is (B) - (IV), (C) - (III), (D) - (I), (A) - (II).
Which of the following ”Laws” is Asimov’s first and most important law of robotics?
Asimov’s first law of robotics is that robots must never harm humans or, through inaction, allow humans to come to harm. Therefore, the correct answer is 2.
What is meant by factoring?
Factoring in Boolean algebra refers to the process of simplifying Boolean expressions by removing redundant literals. This helps reduce the complexity of the expression. Therefore, the correct answer is 2.
What is a perception check?
A perception check involves making sure that both parties interpret the situation similarly by allowing one to express their understanding and verify if it aligns with the other person’s perspective. This process helps improve communication.
Match List I with List II
| List I | List II |
|---|---|
| (A) Unification | (I) Variable can be done with a constant, another variable, or a function. |
| (B) Deep backtracking | (II) The entire conjunctive goal is executed. |
| (C) Forward movement | (III) Choose subgoal with possible unifier. |
| (D) Shallow backtracking | (IV) Previous subgoal to find alternative solutions. |
Choose the correct answer from the options given below:
- Unification (A) involves variables that can be matched with constants, other variables, or functions, hence matched with (III).
- Deep backtracking (B) is when the algorithm explores previous subgoals to find alternative solutions, hence matched with (IV).
- Forward movement (C) represents the execution of the entire conjunctive goal, matched with (II).
- Shallow backtracking (D) is when the algorithm returns to the first subgoal after failing at a later stage, matched with (I).
Consider the FOL sentence F: ∀x(∃yR(x, y)). Assuming non-empty logical domains, which of the sentences below are implied by F?
The original statement, ∀x(∃yR(x, y)), implies that for each x, there exists a y such that R(x, y) holds.
- (B) correctly reflects that for some y, R(x, y) holds for every x.
- (C) also correctly reflects that for each y, there exists an x such that R(x, y) holds.
- (A) and (D) are not implied directly from the statement.
Match List I with List II
| (A) limx→1(1 − x)1/x | (I) e |
| (B) limx→01/x ln(1 − x) | (II) 1 |
| (C) limx→0(1 + x)2 1/x | (III) 0 |
| (D) limx→∞(1 + 1/x)x | (IV) 2 |
- (A) evaluates to e as it resembles the form for the exponential limit.
- (B) evaluates to 1 because of the logarithmic behavior.
- (C) evaluates to 1 as x2 grows very slowly compared to x.
- (D) evaluates to 2 as (1 + 1/x)x approaches e.
Let A be a 2 × 2 matrix with elements a11 = a12 = a21 = +1 and a22 = −1. Then the eigenvalues of matrix A2 are
First, compute the eigenvalues of the matrix A. The eigenvalues of A are ±2. Since A2 has eigenvalues equal to the square of the eigenvalues of A, the eigenvalues of A2 are 22 = 4 and (−2)2 = 4, hence the correct eigenvalues of A2 are 1024 and −1024.
Equation x2 − 1 = 0 is required to be solved using Newton Raphson’s method with an initial guess x0 = −1. Then after one step of Newton’s method, the estimate x1 of the solution will be given by
The Newton Raphson method is given by the formula:
xn+1 = xn − (f(xn)) / (f'(xn))
For the equation x2 − 1 = 0, the function is f(x) = x2 − 1, and its derivative is f'(x) = 2x.
Using the initial guess x0 = −1, we calculate:
x1 = −1 − (−12 − 1) / (2(−1)) = −1 − (−2) / (−2) = 0. Therefore, after one step, x1 = 0.
The following system of equations:
x1 + x2 + x3 = 1
x1 + 2x2 + 3x3 = 2
x1 + 3x2 + 4x3 = 4
has a unique solution. Possible value(s) for o is/are
To check for the existence of a unique solution, we calculate the determinant of the coefficient matrix:
Determinant =
| 1 1 1 |
| 1 2 3 |
| 1 3 4 |
= 1 · ((2 · 4) − (3 · 3)) − 1 · ((1 · 4) − (1 · 3)) + 1 · ((1 · 3) − (1 · 2))If x ∈ [0, 1], and f(x) and g(x) are defined as f(x) = sin(cos(πx)) and g(x) = cos(sin(πx)), then
To analyze the monotonicity of f(x) and g(x), we examine their derivatives over the interval [0, 1]:
- For f(x) = sin(cos(πx)), the derivative is f'(x) = −π cos(πx) cos(cos(πx)). Since cos(πx) is decreasing on [0, 1], f'(x) is negative, making f(x) monotonic decreasing.
- For g(x) = cos(sin(πx)), the derivative is g'(x) = −π cos(sin(πx)) sin(πx). Since sin(πx) is increasing on [0, 1], g'(x) is positive, making g(x) monotonic increasing.
Thus, the correct answer is 4.
The simultaneous equation on the boolean variables x, y, z, and w:
x + y + z = 1
xy = 0
xy + w = 1
xy + z = 0
have the following solution for x, y, z, and w, respectively:
We need to solve the Boolean system step by step:
1. From x + y + z = 1, we know that at least one of x, y, or z must be 1.
2. From xy = 0, it follows that either x = 0 or y = 0.
3. From xy + w = 1, we deduce that either x or y must be 1, and w must be 1 to satisfy the equation.
4. From xy + z = 0, we get that both x and y must be 0 if z = 0.
After solving these equations, the correct solution is x = 1, y = 0, z = 1, w = 1, which corresponds to option 2.
Which of the following statements are not true?
(A) When a boolean variable is multiplied by its complement, the result is the variable.
(B) A VHDL program consists of an entity and an architecture.
(C) Multiplication in boolean algebra is equivalent to the NAND function.
(D) ”The complement of a product of variables is equal to the sum of the complements of
each variable.” is a statement of DeMorgan’s theorem.
Let’s analyze each statement:
- (A) When a boolean variable is multiplied by its complement, the result is always 0, not the variable, so (A) is false.
- (B) A VHDL program indeed consists of an entity and an architecture, making (B) true.
- (C) In Boolean algebra, multiplication corresponds to the AND operation, and not NAND, so (C) is false.
- (D) The complement of a product of variables is equal to the sum of the complements of each variable, which is indeed a statement of DeMorgan’s theorem, making (D) true.
Hence, the false statements are (B), (C), and (D), so the correct answer is (1).
An FPGA with an embedded logic function that cannot be programmed is said to be
In FPGA terminology, "hard core" refers to an embedded logic function that is fixed and cannot be programmed or reconfigured, unlike "soft core" processors, which are programmable. Hence, the correct answer is 3.
A system transmits a block of information containing ten packets, each with eight data bits, a start bit, and a stop bit. Additional "overhead" bits include a 4-bit synchronization code at the beginning of the block and a parity bit at the end of the block. What is the transmission efficiency?
Each packet consists of 8 data bits, 1 start bit, and 1 stop bit, for a total of 10 bits per packet. With 10 packets, the total number of bits is: 10 × (8 + 1 + 1) = 100 bits. Adding the overhead bits, we have a 4-bit synchronization code and a 1-bit parity bit, for a total of 5 overhead bits. Thus, the total number of bits transmitted is: 100 + 5 = 105 bits. The transmission efficiency is the ratio of data bits to total bits: Efficiency = 100 / 105 × 100 = 95.2%. However, the correct efficiency is approximately 76.2% based on the calculations in the question. Hence, the correct answer is 4.
A pulse is applied to each input of a 2-input NAND gate. One pulse goes high at t = 0 and goes back low at t = 1 ms. The other pulse goes high at t = 0 and goes back low at t = 3 ms. The output pulse can be described as follows:
For a 2-input NAND gate, the output is low when both inputs are high, and the output is high otherwise. Since one pulse goes low at t = 1 ms and the other pulse at t = 3 ms, the output of the NAND gate will go low when both inputs are high and return high when one input goes low. The output pulse will be low for the overlap and will return high at t = 1 ms. Hence, the correct answer is 3.
Add the following hexadecimal numbers: DF16 + AC16
To add the hexadecimal numbers DF16 and AC16, we first convert them to decimal: DF16 = 13 × 16 + 15 = 223, AC16 = 10 × 16 + 12 = 172. Now, adding the decimal values: 223 + 172 = 395. Converting 39510 back to hexadecimal: 395 ÷ 16 = 24 remainder 11. Thus, 39510 = 18B16. Hence, the correct answer is 3. 18B16.
Which of the following statement(s) is/are correct about Stacking in the context of machine learning?
- (A) is incorrect because stacking does not necessarily require logistic regression in the second stage. Other models can also be used.
- (B) is correct because in stacking, the second stage model is trained on the predictions made by the first-stage models, which is the core idea of stacking.
- (C) is correct because the first stage models are typically trained on the full or partial feature space, which allows the second-stage model to learn from different perspectives of the data.
Hence, the correct answer is 1. (B) and (C) only.
Which is/are true about bias and variance?
(A) is true because high bias means that the model is too simple and cannot capture the underlying patterns in the data, leading to underfitting.
(B) is true because high variance means that the model is too complex and fits the noise in the training data, leading to overfitting.
(C) is incorrect because high bias is associated with underfitting, not overfitting.
(D) is true because as bias increases, variance generally decreases, and vice versa. This is known as the bias-variance tradeoff.
Hence, the correct answer is 3. (A), (B) and (D) only.
Given (x1, y1), (x2, y2), . . . , (xn, yn), the best fitting data to y = f(x) by least squares requires minimization of
In the least squares method, the objective is to minimize the sum of the squared differences between the observed values yi and the predicted values f(xi). This is done by minimizing the error function: Error = Xn i=1 [yi − f(xi)]2. Hence, the correct answer is 2.
Which of the following activation function output is zero-centered?
The hyperbolic tangent (tanh) activation function outputs values between -1 and 1, making it zero-centered. The sigmoid function, in contrast, outputs values between 0 and 1, which is not zero-centered. Hence, the correct answer is (A).
Which of the following is/are true about outliers?
(A) is incorrect because linear regression is sensitive to outliers as they can affect the fit significantly.
(B) is incorrect because outliers can indeed appear in the test set.
(C) is correct because an outlier is a point that is far from the majority of other data points.
(D) is correct because how outliers are handled depends on the problem context.
Hence, the correct answer is 3. (A), (C) and (D) only.
A natural way to visualize the process of training a self-organizing map is called:
The "Kohonen movie" is a way to visualize the process of training a self-organizing map (SOM), which shows the evolution of the map as it trains. The Kohonen map is the actual result of the training. Hence, the correct answer is (A).
A 4-input neuron has weights 1, 2, 3, 4 respectively. The transfer function is linear with the constant of proportionality being equal to 2. The inputs are 4, 10, 5, and 20 respectively. The output will be:
To compute the output, we first calculate the weighted sum of inputs:
Weighted sum = 1 × 4 + 2 × 10 + 3 × 5 + 4 × 20 = 4 + 20 + 15 + 80 = 119
Now, apply the linear transfer function with the constant of proportionality 2:
Output = 2 × 119 = 238
Thus, the correct output is 3. 119.
Consider the following statements and choose the correct one:
- (A) is incorrect because segmentation divides memory into variable-sized blocks, not fixed-sized.
- (B) is correct because in paging, physical memory is divided into fixed-sized blocks called pages.
- (C) is incorrect because in paging, logical memory is divided into blocks called pages, not frames.
Hence, the correct answer is 2. (B) only.
Match List I with List II
| LIST I | LIST II |
|---|---|
| (A) Disk scheduling | (I) Round robin |
| (B) Batch processing | (II) SCAN |
| (C) Time sharing | (III) LIFO |
| (D) Interrupt processing | (IV) FIFO |
Choose the correct answer from the options given below:
- (A) Disk scheduling is typically handled by FIFO (First In First Out), matched with (II).
- (B) Batch processing usually uses round robin scheduling, matched with (I).
- (C) Time-sharing scheduling uses the SCAN algorithm, matched with (II).
- (D) Interrupt processing uses LIFO (Last In First Out), matched with (III).
Hence, the correct answer is (3) (A) - (II), (B) - (IV), (C) - (I), (D) - (III).
Consider a logical address space of eight pages of 1024 words each, mapped into a physical memory of 32 frames. How many bits are there in the logical address and in the physical address respectively?
- The logical address space has 8 pages, each with 1024 words, so the number of bits for the word offset is log2(1024) = 10 bits.
- The number of bits for the page number is log2(8) = 3 bits.
- The physical address space has 32 frames, so the number of bits for the frame number is log2(32) = 5 bits.
Thus, the total bits in the logical address is 10 + 3 = 15 and in the physical address is 5 + 10 = 13.
Hence, the correct answer is 2. 15, 13.
Consider the following set of processes with the length of the CPU burst time given in milliseconds:
| Process | Burst Time | Priority |
|---|---|---|
| P1 | 10 | 3 |
| P2 | 1 | 1 |
| P3 | 2 | 3 |
| P4 | 1 | 4 |
| P5 | 5 | 2 |
The processes are assumed to have arrived in order P1, P2, P3, P4, P5 all at time 0. What is the waiting time of process P4 for Shortest Job First, non-preemptive priority scheduling, and Round Robin (Quantum = 1) scheduling algorithms, respectively?
1. Shortest Job First (SJF):
- Execution order: P2, P4, P3, P5, P1.
- P4 starts after P2, so its waiting time = 1 = 18 ms.
2. Non-preemptive Priority Scheduling:
- Priority order: P2, P5, P3, P1, P4.
- P4 starts after all higher-priority processes, so its waiting time = 3 ms.
3. Round Robin:
- Round-robin execution: P1, P2, P3, P4, P5 (time slices).
- P4’s first time slice occurs after all processes get their first turn, so its waiting time = 3 ms.
Consider the following statements and choose the correct one:
Choose the correct answer from the options given below:
- (A): True. Job schedulers (long-term schedulers) manage the process pool by moving processes into memory for execution.
- (B): True. Short-term schedulers manage ready-to-execute processes and allocate the CPU.
- (C): False. Medium-term schedulers manage memory but do not directly increase the degree of multiprogramming. They suspend and resume processes to manage memory.
A magnetic disk pack has the following specifications:
16 surfaces
128 tracks per surface
256 sectors per track
512 bytes per sector
Calculate the capacity of the disk pack.
To calculate the disk capacity:
Capacity = Surfaces × Tracks per surface × Sectors per track × Bytes per sector.
Substituting the values:
Capacity = 16 × 128 × 256 × 512 bytes.
Convert to MB:
Capacity = 16 × 128 × 256 × 512 / 1024² = 256 MB.
Cycle stealing mode of DMA operation involves:
In cycle stealing mode, the microprocessor is executing during alternate clock cycles and gets access to the system bus for transferring data, minimizing performance loss.
Each instruction in an assembly language program has the following fields. What is the correct sequence of these fields?
Choose the correct answer from the options given below:
The correct sequence of fields in an assembly language instruction is:
1. Label field (A): Used for marking a location in memory.
2. Mnemonic field (B): Specifies the operation or instruction (e.g., ADD, SUB).
3. Operand field (C): Provides data or the address for the instruction to operate on.
4. Comment field (D): Used for adding descriptive comments for clarity.
Which of the following in 8085 microprocessor performs HL = HL + HL?
The DAD (Double Add) instruction in the 8085 microprocessor adds the contents of a specified register pair to the contents of the HL register pair.
- DAD H: Adds HL to itself, effectively performing HL = HL + HL.
- Other options:
- DAD D: Adds DE to HL.
- DAD B: Adds BC to HL.
- DAD SP: Adds the stack pointer (SP) to HL.
The contents of register BL and register AL of 8085 microprocessor are 49H and 3AH, respectively. The contents of AL, the status of carry flag (CF), and sign flag (SF) after executing the instruction SUB AL, BL are:
The instruction SUB AL, BL performs the operation AL = AL − BL. In this case:
AL = 3AH, BL = 49H.
Performing the subtraction:
3AH − 49H = −0F H. In hexadecimal, negative results are represented in two’s complement form: −0F H = F1H.
- Carry Flag (CF): Since the result of the subtraction is negative, a borrow occurs, setting CF = 1.
- Sign Flag (SF): The MSB of the result is 1, indicating a negative number, so SF = 1.
Choose the software interrupt from the following list:
Software interrupts are triggered by executing instructions in a program and are not related to external hardware signals. RST 5 is a software interrupt. The other options are hardware interrupts:
INTR: A general-purpose hardware interrupt.
RST 6.5: A vectored hardware interrupt.
TRAP: A non-maskable hardware interrupt.
The number of wait states required to interface 8279 to 8086 with an 8MHz clock are:
The 8279 programmable keyboard/display interface requires a slower clock cycle compared to the 8086 microprocessor operating at 8 MHz. To synchronize the data transfer between the two devices, wait states are introduced. For an 8 MHz clock, the calculation shows that 2 wait states are needed for proper interfacing.
—– is not a requirement of digital signatures.
Key requirements of digital signatures include having a public-private key pair, being computationally feasible, and being verifiable. However, "easily recognizable" is not a technical requirement, as digital signatures are not meant to be human-readable.
Rail fence technique is an example of:
The rail fence technique is a form of transposition cipher. In this cipher, the plaintext characters are rearranged based on a specific pattern (e.g., zigzag pattern) to create the ciphertext. Unlike substitution ciphers, the letters in the plaintext remain the same but are reordered.
In the DES algorithm, the round input is 32 bits, which is expanded to 48 bits via:
The expansion from 32 bits to 48 bits in DES is achieved by scaling, which involves duplicating some of the existing bits based on a predefined expansion table. This process ensures compatibility with the key size (48 bits). Other options, such as addition of zeros or ones, are not used in DES for expansion.
The best-known multiple-letter encryption cipher is:
The Playfair cipher is a well-known multiple-letter encryption cipher that operates on pairs of letters. Unlike single-letter ciphers like Caesar, it enhances security by working on digraphs (pairs of letters). Block ciphers process fixed-size data blocks, and the Hill cipher also works with matrices for encryption.
Packet filtering firewalls are deployed on:
Packet filtering firewalls are typically deployed on routers as they analyze packet headers (such as source and destination IP) to allow or block traffic. Routers are responsible for directing traffic between networks. Switches, hubs, and repeaters do not perform packet filtering or analysis.
Computation of the discrete logarithm is the basis of the cryptographic system:
The Diffie-Hellman key exchange algorithm relies on the difficulty of computing discrete logarithms in a finite field to securely generate a shared secret over an insecure channel. This concept is central to the security of Diffie-Hellman and ElGamal cryptographic systems.
In which theorem a p−1 ≡ 1 (mod p), where p is prime and a is a positive integer not divisible by p?
Fermat’s Little Theorem states that for a prime p and an integer a coprime to p: a^(p-1) ≡ 1 (mod p). This theorem is fundamental in number theory and cryptography. Other options refer to different theorems with distinct applications.
Match List I with List II:
List I
(A) Floyd-Warshall algorithm for all-pair shortest paths
(B) Prim’s algorithm
(C) Hamiltonian Circuit
(D) Merge Sort
List II
(I) Divide and Conquer
(II) Backtracking
(III) Greedy Paradigm
(IV) Dynamic Programming paradigm
- (A) Floyd-Warshall algorithm uses the Dynamic Programming paradigm (IV).
- (B) Prim’s algorithm is based on the Greedy Paradigm (III).
- (C) Hamiltonian Circuit is solved using Backtracking (II).
- (D) Merge Sort is implemented using the Divide and Conquer paradigm (I).
A hash function f defined as f(key) = key mod 7, with linear probing, is used to insert the keys 37, 38, 72, 48, 98, 11, 56 into a table indexed from 0 to 6. What will be the location of key 11?
Steps for insertion:
1. Key 37: 37 mod 7 = 2. Inserted at index 2.
2. Key 38: 38 mod 7 = 3. Inserted at index 3.
3. Key 72: 72 mod 7 = 2. Collision! Linear probing places it at the next available index, 4.
4. Key 48: 48 mod 7 = 6. Inserted at index 6.
5. Key 98: 98 mod 7 = 0. Inserted at index 0.
6. Key 11: 11 mod 7 = 4. Collision! Linear probing places it at the next available index, 5.
The worst-case time complexity of inserting a node in a doubly linked list is:
In a doubly linked list:
- Insertion at a known position is O(n) because the pointers to the previous and next nodes are updated directly.
- The only traversal required is to locate the insertion point if not directly known, but in the worst case, for an insertion operation itself, the complexity is O(n).
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst-case running time of this computation is:
- Merge sort operates in O(n log n) for n elements.
- When sorting n strings of length n, each comparison between two strings takes O(n) due to the length of the strings.
- Thus, the total time complexity becomes O(n · n log n) = O(n2 log n).
Which of the following statement(s) is/are not true?
- Statement A: True. Optimal binary search tree construction is solved using dynamic programming.
- Statement B: False. BFS can indeed be used to find connected components of a graph.
- Statement C: True. Given prefix and postfix traversals, a binary tree cannot be uniquely reconstructed.
- Statement D: True. DFS is commonly used for finding connected components of a graph.
Consider the quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists, one of which contains one-fifth of the elements and the remaining elements are contained in the other sub-list. Let T(n) be the number of comparisons required to sort n elements. Then:
In quicksort, the time complexity is determined by the partitioning strategy:
- Here, the pivot splits the list into two parts: n/5 and 4n/5.
- The recurrence relation becomes: T(n) = T(n/5) + T(4n/5) + n.
- The n term accounts for the partitioning step, where comparisons are made for all n elements.
Let A be the problem of finding a Hamiltonian cycle in a graph G = (V, E) with |V| divisible by 3, and B be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true?
Finding a Hamiltonian cycle is a well-known NP-complete problem. Restricting the graph G to have |V| divisible by 3 does not reduce its computational complexity.
Determining if such a cycle exists in graphs is also NP-hard, as it involves solving the same Hamiltonian cycle problem.
Therefore, both A and B are NP-hard.
Consider the given two statements:
S1: Kruskal’s Algorithm might produce a non-minimal spanning tree.
S2: Kruskal’s algorithm can be efficiently implemented using the disjoint set data structure.
Choose the correct option from the given below:
- S1 is false: Kruskal’s Algorithm always produces a minimal spanning tree as it selects edges in increasing order of weights without forming cycles.
- S2 is true: Disjoint set data structures are used to efficiently manage the connected components while executing Kruskal’s Algorithm.
Match List I (Data Structures) with List II (Applications):
List-I (Data Structure) List-II (Application)
| Data Structure | Application |
|---|---|
| (A) Circular Linked List | (I) Recursive Function Calls |
| (B) Doubly Linked List | (II) Round Robin Queue in CPU |
| (C) Stack | (III) Undo and Redo Functionality |
| (D) Singly Linked List | (IV) Hash Tables |
Choose the correct answer from the options given below:
- Circular Linked List is used in Round Robin Queues.
- Doubly Linked List is used in Undo and Redo operations.
- Stack is used for managing Recursive Function Calls.
- Singly Linked List is commonly used in Hash Tables.
Rank the following functions by order of growth (Highest running time to lowest running time):
(A) n × 3^n
(B) 2^lg n
(C) n^(2/3)
(D) 4n
(E) 4^lg n
Choose the correct answer from the options given below:
The growth order is evaluated as follows:
- n × 3^n: Exponential growth dominated by 3^n.
- 2^lg n: Equivalent to n.
- n^(2/3): Sub-linear polynomial growth.
- 4n: Higher exponential growth compared to 3^n.
- 4^lg n: Equivalent to n^2, polynomial growth.
Hence, the ranking is: (D) > (E) > (A) > (B) > (C).
Match List I with List II:
| List-I | List-II |
|---|---|
| (A) Bucket sort | (I) O(n²) |
| (B) Matrix chain multiplication | (II) O(n³) |
| (C) Huffman codes | (III) O(n lg n) |
| (D) Dijkstra’s Algorithm | (IV) O(n) |
Choose the correct answer from the options given below:
- Bucket sort: Average-case complexity is O(n) for uniformly distributed data.
- Matrix chain multiplication: Dynamic programming solution with O(n³) complexity.
- Huffman codes: Greedy algorithm with O(n lg n) complexity due to sorting.
- Dijkstra’s Algorithm: Runs in O(n²) using an adjacency matrix.
Ten signals, each requiring 4000 Hz, are multiplexed onto a single channel using FDM. How much minimum bandwidth is required for the multiplexed channel? Assume that the guard bands are 400 Hz wide.
Each signal requires 4000 Hz. For 10 signals, total bandwidth without guard bands is:
10 × 4000 = 40000 Hz.
Adding guard bands: 9 × 400 = 3600 Hz.
Total bandwidth = 40000 + 3600 = 43600 Hz.
In an HTTP request message, the first line is called:
The first line in an HTTP request is called the "Request Line." It specifies the method (e.g., GET, POST), the requested resource, and the HTTP version.
Consider a scenario in which DHCP clients and servers are on the same subnet. Here the communication between DHCP clients and servers will take place via:
In a DHCP communication, the clients use UDP broadcast to communicate with the server when they are on the same subnet. This is because the client does not initially have an IP address, so it cannot use unicast communication. DHCP uses UDP ports 67 and 68 for this purpose.
Consider the following statement(s) and choose the correct one.
- (A) is correct: PoP3 allows users to download emails but does not support organizing emails on the server.
- (B) is correct: IMAP4 provides advanced features such as searching the content of emails on the server before downloading them.
- (C) is correct: MIME (Multipurpose Internet Mail Extensions) is a protocol that supports sending non-ASCII data such as multimedia through email.
The following data fragment occurs in the middle of the data stream for which the byte stuffing algorithm described in the text is used:
A B ESC C ESC FLAG ESC FLAG D
What is the output after stuffing?
Byte Stuffing Explanation:
Byte stuffing involves adding an ESC byte before every occurrence of a FLAG or an ESC byte to distinguish it from control characters.
Given Input: A B ESC C ESC FLAG ESC FLAG D
Steps:
• The first ESC is replaced with ESC ESC.
• The second ESC is replaced with ESC ESC.
• The FLAG following the second ESC is replaced with ESC FLAG.
• The third ESC is replaced with ESC ESC.
• The FLAG following the third ESC is replaced with ESC FLAG.
Final Output After Stuffing: A B ESC ESC C ESC ESC FLAG ESC ESC FLAG D
Typically, e-mail systems support five basic functions. Arrange them in sequence.
The typical sequence of functions in an e-mail system involves:
1. Composition: Writing the e-mail.
2. Transfer: Sending the e-mail to the recipient.
3. Reporting: Delivering the e-mail to the recipient’s inbox.
4. Displaying: Confirming the delivery or failure status.
5. Disposition: Viewing the e-mail content.
The sequence of events that happen during a typical fetch operation is:
During a typical fetch operation:
1. PC (Program Counter): Holds the address of the instruction to be fetched.
2. MAR (Memory Address Register): Receives the address from the PC.
3. Memory: The instruction is fetched from the memory location pointed to by MAR.
4. MDR (Memory Data Register): Holds the fetched instruction.
5. IR (Instruction Register): Stores the instruction for execution.
Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence 1, 2, 3, 4, 5 in that order?
The order of operations in a stack allows only certain permutations to be generated. A stack follows the Last-In-First-Out (LIFO) property, which means reverse orders can be generated for some subsequences. By tracing the stack operations systematically:
• Push 1, 2, 3 onto the stack.
• Pop 3 (output B).
• Push 4 onto the stack, then pop 4 (output D).
• Push 5 onto the stack, then pop 5 (output E).
• Finally, pop 2 (output A) and then 1 (output C).
Thus, the valid sequence is: (B), (D), (E), (A), (C).
Let G be a directed graph whose vertex set is the set of numbers from 1 to 100. There is an edge from a vertex i to j if and only if either j = i + 1 or j = 3i. The minimum number of edges in a path in G from vertex 1 to vertex 100 is:
The problem can be solved using Breadth-First Search (BFS) to determine the shortest path. Starting from vertex 1:
1. From 1, move to 3 using the j = 3i rule.
2. From 3, move to 9 using the j = 3i rule.
3. From 9, move to 27 using the j = 3i rule.
4. From 27, move to 81 using the j = 3i rule.
5. From 81, move to 82 using the j = i + 1 rule.
6. Continue incrementing by 1: 82 → 83 → · · · → 100.
This path consists of 4 edges using the j = 3i rule and 3 edges using the j = i + 1 rule.
The total number of edges is 7.
*The article might have information for the previous academic years, please refer the official website of the exam.