U.G.C. NET Exam. December 2022 Paper-II (COMPUTER SCIENCE) and Applications.

Total Questions: 100

51. Which of the following statements are true?

A. If the time quantum is extremely small, round robin can result in a large number of context switches.
B. The average turnaround time of a set of processes does not necessarily improve as the time-quantum size increases.
C. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.
Choose the correct answer from the options given below :

Correct Answer: (d) A, B, C
Solution:

A. If the time quantum is extremely small, round robin can result in a large number of context switches.
B. The average turnaround time of a set of processes does not necessarily improves the time - quantum size increases.
C. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.
So All statement is true.

52. Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.

Correct Answer: (a) 7.2
Solution:

53. Select the correct order of basic page replacement :

A. page replacement algorithm is used in case there is no free frame.
B. The process is continued by restarting the instruction caused by TRAP
C. Location of desired frame is found from disk.
D. Desired page is brought into newly freed frame and page & frame tables are updated

Correct Answer: (c) C, A, D, B
Solution:

C. Location of desired frame is found from disk
A. Page replacement algorithm is used in case there is no free frame.
D. Desired page is brought into newly freed frame and page & frame tables are updated.
B. The process is continued by restarting the instruction caused by TRAP
So correct order of basic page replacement is C, A, D, and B
So option (c) is correct Answer.

54. Given below are two statements :

Statement I : Software testing must be recognized as a significant effort, and its planning must begin at the earliest possible time.
Statement II : The cost of software testing is an important contribution in determining overall software development costs.
In the light of the above statements, choose the correct answer from the options given below.

Correct Answer: (a) Both Statement I and Statement II are true
Solution:

Both statement are true. Explanation :
1. The first statement emphasizes that software testing should be considered a significant effort and should be planed from the earliest stages of software development. This is a valid point as early planning for testing ensures that potential issues can be identified and resolved early on, which can save time and resources in the long run.
2. The second statement states that cost of software testing is a crucial factor in determining the overall software development costs. This is also true because testing involves various activities such as designing test cases executing tests, debugging, and fixing defects, all of which require resources and effort.
In conclusion, both statement are valid and emphasize the importance of software testing in the software development process.

55. Which of the following need not be assessed during unit testing?

A. Algorithmic performance
B. Number of lines of code.
C. Error handling.
D. Execution paths.
Choose the correct answer from the options given below :

Correct Answer: (d) B, C, D only
Solution:

The correct Answer is (d) B, C, D only Let's go through each option to understand why.
A. Algorithmic performance : This is typically not assessed during unit testing. Unit testing is concerned with verifying the correctness of the unit's functionality, not its performance characteristics
B. Number of line of code : The number of line of code is not relevant to unit testing. Unit tests are designed to check behavior of the unit's functionality, regardless of how many lines of code are used to implement it.
C. Error handling : Error handling is an essential aspect of unit testing. During unit testing, you want ot ensure that the unit handles errors and exceptions properly and produces the expected results in such scenarios.
D. Execution paths : Unit testing aims to test aims to test different execution path of the unit's code to ensure all possible scenarios are covered. It helps in identifying and fixing bugs related to different path through the unit code.

56. Which of the following rotations are correctly explained in the context of an AVL tree.

A. LL rotation : The new node is insterted in the left sub-tree of the left sub-tree of the critical node.
B. RR rotation : The new node is inserted in the right sub-tree of the right sub-tree of the critical node.
C. LR rotation : The new node is inserted in the right sub-tree of the left sub-tree of the critical node.
D. RL rotation : The new node is inserted in the left sub-tree of the right sub-tree of the critical node
Choose the correct answer from the options given below.

Correct Answer: (e) *
Solution:

57. In the context of a Hamiltonian problem which of the following are correct?

A. Hamiltonian cycle problem is NP-complete.
B. If G is an undirected Bipartite graph with an odd number of vertices, then G is Hamiltonian. C. Hamiltonian path problem cannot be solved in polynomial time on directed acylic graph.
D. If G is a connected undirected graph with at least three vertices and G³ is the graph obtained by connecting all pairs of vertices that are connected by a path in G of length at most 3.
E. If any NP complete problem is polynomial time solvable the P = NP.
Choose the most appropriate answer from the options given below.

Correct Answer: (d) A, C, E only
Solution:

Let's go through each option to explain why
A. Hamiltonian problem is NP=complete : The Hamiltonian path problem is known to be NPcomplete, which means that its is unlikely to have a polynomial-time algorithm to solve it and it is at least as hard as any problem in the complexity class NP.
B. This statement is false. A Hamiltonian cycle (or path) in a graph with an old number of vertices is not always guaranteed.
C. This statement is true. The Hamiltonian path problem is NP-Complete for both directed and undirected graphs. A directed a cyclic graph (DAG) is a spcial case where there cannot be any Hamiltonian path, as it would require visiting each vertex exactly once without forming any cylces which is not possible in a DAG.
D. This statement is false. The notation G3 typically refers to the cube of a graph and it does not relate to finding Hamiltonian path or cycles.
E. If any NP complete problem is polynomial time solvable the P = NP
This statement is true.
Therefore, the correct statements are A, C and E.

58. For matrix multiplication, if we use divide and conquer algorithm, then _____

Correct Answer: (a) A, C, E only
Solution:

59. Which of the following Finite Automata, recognizes the language L=(a, b)*?

Correct Answer: (d) A, B, C and D
Solution:

The given language L = {a, b}*

60. Which of the following statement(s) are correct?

A. Syntax Directed Translation can be applied in Type Checking.
B. Syntax Directed Translation can be used in 3-address code generation.
C. Syntax Directed Translation can be used in construction of syntax tree.
D. Syntax Directed Translation can be used to recognize valid tokens.
Choose the most appropriate answer from the options given below :

Correct Answer: (a) A, B and C
Solution:

Statement A, B and C is correct but D is false.
Syntax directed translation can be used to recognize valid token.
Correct - Syntax Directed Translation can be used to define the translation rules for recognizing and generating valid tokens during lexical analysis.