Previous Year Paper

UGC NET Paper 2: Computer Science 8th Oct 2022 (Previous Year Paper)

Held in 2022

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

What is called Journaling in Linux operating system?

  1. AOption (a)

    Process scheduling

  2. BOption (b)

    File saving as transaction

  3. COption (c)

    A type of thread

  4. DOption (d)

    An editor

View answer & explanation

Correct answer

Answer: (b)B.

File saving as transaction

Why this answer is correct

Concept:

Using a transaction log, or journal, journaling improves the filesystem's dependability and enables rapid crash recovery. The journal is an on-disk log of metadata, or data about the filesystem, which is kept current as the filesystem is modified. Without journaling, filesystems save changes to updates in memory.

Explanation:

A journal means a record that is kept over time, like a diary. Instead of changing the structure of the file system, adding new directories, or making files bigger, the first thing the file system does is collect these changes into a series of transactions and add them to a log file. Then, these transactions can be sent to the actual file system by processes that run in the background. If there is a crash, the file system can recover immediately and start committing transactions already in the journal. However, the last entry will probably be corrupt and will be dropped. All of these things mean that the file system won't change. This kind of file system, like ZFS, will help protect both data and metadata, and it won't need programs like fsck that try to fix broken files.

Hence, File saving as transaction is called Journaling in Linux operating system.

Question 2

This transformation is called

[xˉrmyˉ zˉrmwˉ]=[a1b1c1d1 a2b2c2d2 a3b3c3d3 efgh][x y z 1]\left[\begin{array}{l}\rm\bar{x} \\rm \bar{y} \ \rm\bar{z} \\rm\bar{w}\end{array}\right]=\left[\begin{array}{llll}\rm a_1 & \rm b_1 & \rm c_1 & \rm d_1 \ \rm a_2 & \rm b_2 & \rm c_2 & \rm d_2 \ \rm a_3 & \rm b_3 & \rm c_3 & \rm d_3 \ \rm e & \rm f & \rm g & \rm h \end{array}\right]\left[\begin{array}{c} \rm x \ \rm y \ \rm z \ 1 \end{array}\right]

  1. AOption (a)

    Scaling

  2. BOption (b)

    Shear

  3. COption (c)

    Homography

  4. DOption (d)

    Steganography

View answer & explanation

Correct answer

Answer: (b)B.

Shear

Why this answer is correct

Concept:

Transformation refers to the mathematical operations or rules that are applied to a graphical image consisting of the number of lines, circles, and ellipses to change its size, shape, or orientation. It can also reposition the image on the screen. Transformations play a very crucial role in computer graphics.

Types of Transformations:

There are various types of transformations in computer graphics through which an image can be processed, edited ad altered. Some basic and most commonly used types of these transformations are

  • Translation
  • Rotation
  • Scaling
  • Reflection
  • Shearing

A transformation that slants the shape of an object is called the Shear Transformation. There are two shear transformations X-Shear and Y-Shear. One shifts the X coordinate values and the other shifts the Y coordinate values. However, in both cases, only one coordinate changes its coordinates and the other preserves its values. Shearing is also termed Skewing.

In a three-dimensional plane, the object size can be changed along the X direction, Y direction as well as Z direction.So, there are three versions of shearing.

They are

1)Shearing in x-axis

  1. shearing in y-axis

  2. shearing in z-axis

[xˉrmyˉ zˉrmwˉ]=[a1b1c1d1 a2b2c2d2 a3b3c3d3 efgh][x y z 1]\left[\begin{array}{l}\rm\bar{x} \\rm \bar{y} \ \rm\bar{z} \\rm\bar{w}\end{array}\right]=\left[\begin{array}{llll}\rm a_1 & \rm b_1 & \rm c_1 & \rm d_1 \ \rm a_2 & \rm b_2 & \rm c_2 & \rm d_2 \ \rm a_3 & \rm b_3 & \rm c_3 & \rm d_3 \ \rm e & \rm f & \rm g & \rm h \end{array}\right]\left[\begin{array}{c} \rm x \ \rm y \ \rm z \ 1 \end{array}\right] is called Shear Transformation.

The Correct Answer is option 2.

Question 3

The logic expression (P̅ ∧ Q) ∨ (P ∧ Q̅) ∨ (P ∧ Q) is equivalent to

  1. AOption (a)

    P̅ ∨ Q

  2. BOption (b)

    P ∨ Q̅

  3. COption (c)

    P ∨ Q

  4. DOption (d)

    P̅ ∨ Q̅

View answer & explanation

Correct answer

Answer: (c)C.

P ∨ Q

Why this answer is correct

Correct answer: P ∨ Q

  • In boolean logic, the negation of a variable P is denoted as P̅, and the logical operators "and" (∧) and "or" (∨) have specific meanings. The "and" operator is true only when both operands are true, and the "or" operator is true when at least one of the operands is true.
  • The expression (P̅ ∧ Q) ∨ (P ∧ Q̅) ∨ (P ∧ Q) can be thought of as a series of conditions separated by the "or" operator. The first condition (P̅ ∧ Q) states that P is false and Q is true. The second condition (P ∧ Q̅) states that P is true and Q is false. The third condition (P ∧ Q) states that both P and Q are true.
  • Since the "or" operator is true when at least one of its operands is true, the entire expression is true whenever any one of these conditions is true. That is, the expression is true when either P is false and Q is true, or when P is true and Q is false, or when both P and Q are true.
  • On the other hand, the equivalent expression P ∨ Q states that either P is true or Q is true, or both.
  • This is exactly the same as the original expression, since whenever either P is false and Q is true, or when P is true and Q is false, or when both P and Q are true, either P is true or Q is true (or both).
  • we can use the truth table method. A truth table lists all possible combinations of truth values (true or false) for the variables in the expression and the resulting value of the expression

Here's the truth table for the original expression:

P  Q  P̅     (P̅ ∧ Q)        Q̅              (P ∧ Q̅)        (P ∧ Q)              (P̅ ∧ Q) ∨ (P ∧ Q̅)                   (P̅ ∧ Q) ∨ (P ∧ Q̅) ∨ (P ∧ Q)

-----------------------------------------------------------------------------------------------------------------------------------------------------------

T  T    F         F               F                  F               T                                     F                                                 T

T  F    F         F               T                  T               T                                     T                                                 T

F  T    T         T               F                  F               F                                     T                                                 T

F  F    T         F               T                  F               F                                     F                                                 F

P  Q  (P̅ ∧ Q) ∨ (P ∧ Q̅) ∨ (P ∧ Q)

--------------------------------------

T  T    T

T  F    T

F  T    T

F  F    F

And here's the truth table for the equivalent expression P ∨ Q:

P  Q  P ∨ Q

--------------

T  T    T

T  F    T

F  T    T

F  F    F

As we can see, the two tables are identical, which means that the two expressions are equivalent.

Question 4

Consider α, β, γ as logical variables. Identify which of the following represents correct logical equivalence:

(A) (α ∧ (β ∨ γ)) ≡ ((α ∧ β) ∨ (α ∧ γ))

(B) (α ∨ β) ≡ ¬α ∨ β

(C) (α ⇒ β) ≡ (¬β ⇒ ¬α)

(D) (¬(α ∨ β)) ≡ (¬α ⇒ ¬β)

Choose the correct answer from the options given below:

  1. AOption (a)

    (A) and (D) only

  2. BOption (b)

    (B) and (C) only

  3. COption (c)

    (A) and (C) only

  4. DOption (d)

    (B) and (D) only

View answer & explanation

Correct answer

Answer: (c)C.

(A) and (C) only

Why this answer is correct

Correct answer: (A) and (C) only

(A) (α ∧ (β ∨ γ)) ≡ ((α ∧ β) ∨ (α ∧ γ))

This logical equivalence says that the expression (α ∧ (β ∨ γ)) is logically equivalent to the expression ((α ∧ β) ∨ (α ∧ γ)). This can be thought of as the associative law of conjunction, which states that the order of the variables in conjunction does not affect the truth value of the conjunction. In other words, grouping the variables in a different way does not change the truth value of the expression.

(B) (α ∨ β) ≡ −α ∨ β

This logical equivalence says that the expression (α ∨ β) is logically equivalent to the expression −α ∨ β. However, this is not a correct equivalence because the negation of a logical variable (in this case α) is not equivalent to the logical variable itself. For example, if α is true, then −α is false, and therefore the two expressions have different truth values.

(C) (α ⇒ β) ≡ (¬β ⇒ ¬α)

This logical equivalence says that the expression (α ⇒ β) is logically equivalent to the expression (¬β ⇒ ¬α). This can be thought of as the contrapositive law, which states that the contrapositive of a logical implication is logically equivalent to the original implication. In other words, if we change the antecedent and consequent of a logical implication and negate both, the resulting expression is logically equivalent to the original implication.

(D) (¬(α ∨ β)) ≡ (¬α ⇒ ¬β)

This logical equivalence says that the expression (¬(α ∨ β)) is logically equivalent to the expression (¬α ⇒ ¬β). However, this is not a correct equivalence because the negation of a disjunction (α ∨ β) is not equivalent to a material implication (¬α ⇒ ¬β). For example, if α is true and β is false, then the expression (α ∨ β) is true and its negation (¬(α ∨ β)) is false. On the other hand, the expression (¬α ⇒ ¬β) is false because ¬α is false and ¬β is true, and therefore the two expressions have different truth values

Question 5

Consider the following statements:

Statement I: Conservative 2 PL is a deadlock-free protocol.

Statement II: Thomas's write rule enforces conflict serializability.

Statement III: Timestamp ordering protocol ensures serializability based on the order of transaction timestamps.

Which of the following is correct?

  1. AOption (a)

    Statement I, Statement II true and Statement III false

  2. BOption (b)

    Statement I, Statement III true and Statement II false

  3. COption (c)

    Statement I, Statement II false and Statement III true

  4. DOption (d)

    Statement I, Statement II and Statement III true

View answer & explanation

Correct answer

Answer: (b)B.

Statement I, Statement III true and Statement II false

Why this answer is correct

Solution:

Statement I: True

Conservative Two-Phase Locking (2PL) protocol requests all required locks at once, and proceeds only if all are granted. This avoids circular wait, thereby ensuring a deadlock-free execution.

Statement II: False

Thomas's write rule is used to ignore obsolete writes in timestamp-based concurrency control. While it improves concurrency, it does not enforce conflict serializability. It can allow schedules that are not conflict-serializable.

Statement III: True

Timestamp ordering protocol ensures conflict serializability by ordering all operations based on their assigned timestamps. Transactions are executed in a way that maintains the logical timestamp order.

Final Answer:

Option 2: Statement I and III are true, Statement II is false.

Question 6

Let ∈ = 0.0005, and Let Re be the relation {(x, y) = R2 ∶ |x − y| < ∈}, Re could be interpreted as the relation approximately equal. Re is

(A) Reflexive

(B) Symmetric

(C) transitive

Choose the correct answer from the options given below:

  1. AOption (a)

    (A) and (B) only true

  2. BOption (b)

    (B) and (C) only true

  3. COption (c)

    (A) and (C) only true

  4. DOption (d)

    (A), (B) and (C) true

View answer & explanation

Correct answer

Answer: (a)A.

(A) and (B) only true

Why this answer is correct

The correct answer: (A) and (B) only true.

  • A relation is said to be reflexive if every element in the set is related to itself. In this case, for any element x in R2, |x - x| = 0, which is less than ∈, meaning that (x, x) is in the relation Re. So Re is reflexive.
  • A relation is said to be symmetric if, for any ordered pair (x, y) in the relation, the ordered pair (y, x) is also in the relation. In this case, if (x, y) is in Re, meaning |x - y| < ∈, then |y - x| = |x - y| < ∈, meaning (y, x) is also in Re. So Re is symmetric.
  • However, Re is not transitive. Consider the following counterexample: let x = 0, y = 0.0004, and z = 0.0009. Then |x - y| = |0 - 0.0004| = 0.0004 < ∈, |y - z| = |0.0004 - 0.0009| = 0.0005 < ∈, but |x - z| = |0 - 0.0009| = 0.0009 ≠ |x - y| + |y - z|, meaning (x, z) is not in Re.
  • Therefore, Re is reflexive and symmetric but not transitive.

Question 7

Consider the following statements about Context Free Language (CFL):

Statement I: CFL is closed under homomorphism.

Statement II: CFL is closed under complement.

Which of the following is correct?

  1. AOption (a)

    Statement I is true and Statement II is false

  2. BOption (b)

    Statement II is true and Statement I is false

  3. COption (c)

    Both Statement I and Statement II are true

  4. DOption (d)

    Neither Statement I nor Statement II is true

View answer & explanation

Correct answer

Answer: (a)A.

Statement I is true and Statement II is false

Why this answer is correct

CFL's are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms and inverse homomorphisms.

But Context-free languages are not closed under:

  • Intersection − If L1 and L2 are context free languages, then L1 ∩ L2 is not necessarily context free.
  • Complement − If L1 is a context free language, then L1' may not be context free.

Hence only Statement I is True.

Question 8

Given below are two statements:

Statement I: Consider 20 bit 'Branch' microinstruction code format given below:

F1, F2, F3: Micro-operation fields

CD: Condition for branching

BR: Branch field

AD: Address field

Statement II: Instruction represented in above format can perform branch in 4 conditions.

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

Correct answer is Option 3

Explanation:

The BR (branch) field includes 2 bits. It can be used by connecting with the AD (address) field.

The reason for connecting with the AD field is to select the address for the next microinstruction.

The table illustrates the various branch fields and their functions.

Branch Field Symbols and Descriptions

BRSymbolComments
00JMPCAR ←AD if condition = 1
CAR←CAR + 1 if condition = 0
01CALLCAR ←AD , SBR ← CAR +1, if condition = 1
CAR←CAR + 1 if condition = 0
10RETCAR ←SBR (Return from subroutine)
11MAPCAR(2-5) ←DR(11-14), CAR(0,1,6) ←0

Question 9

Consider L = {ab, aa, baa}

Which of the following string is NOT in L*?

  1. AOption (a)

    baaaaabaaaaa

  2. BOption (b)

    abaabaaabaa

  3. COption (c)

    aaaabaaaa

  4. DOption (d)

    baaaaabaa

View answer & explanation

Correct answer

Answer: (a)A.

baaaaabaaaaa

Why this answer is correct

Any combination of strings in set {ab, aa, baa} will be in L*. 

Consider each option one by one:

Option 1) baaaaabaaaab

It cannot be partitioned as a combination of strings in set {ab, aa, baa}. 

Option 2) abaabaaabaa

It can be partitioned as a combination of strings in set {ab, aa, baa}. The partitions are “ab aa baa ab aa”.

Option 3) aaaabaaaa

It can be partitioned as a combination of strings in set {ab, aa, baa}. The partitions are “aa ab aa aa”. 

<br>

Option 4) baaaaabaa

It can be partitioned as a combination of strings in set {ab, aa, baa}. The partitions are “baa aa ab aa”. 

Hence only baaaaabaaaab is NOT in L*.

Question 10

Which mechanism in XML allows organizations to specify globally unique names as element tags in documents?

  1. AOption (a)

    root

  2. BOption (b)

    header

  3. COption (c)

    schema

  4. DOption (d)

    namespace

View answer & explanation

Correct answer

Answer: (d)D.

namespace

Why this answer is correct

Correct answer: namespace

  • A namespace in XML provides a way to associate an element name with a specific namespace, which is identified by a URI (Uniform Resource Identifier).
  • This allows organizations to specify globally unique names as element tags in documents, as each element name can be associated with a different namespace.
  • The namespace declaration is usually done in the root element of an XML document, and the URI can be any string that identifies the namespace, such as a URL.
  • For example, the following XML document declares a namespace with the prefix "book" and associates it with the URI "http://book.example.com":

           <book:library xmlns:book="http://book.example.com">

              book:book

              book:titleThe Great Gatsby</book:title>

               book:authorF. Scott Fitzgerald</book:author>

               </book:book>

            </book:library>

  • the namespace "http://book.example.com", so all elements with the "book" prefix in the document belong to this namespace.

Question 11

Consider the following NPDA = ({q0, q1, qf}, {a, b}, {1, z}, δ, q0, z, {qf})

δ(q0, λ, z) = {(qf, z)}

δ(q0, a, z) = {(q1, 11z)}

δ(q1, a, 1) = {(q1, 111)}

δ(q1, b, 1) = {(q1, λ)}

δ(q1, λ, z) = {(qf, z}

Which of the following Language L is accepted by NPDA?

  1. AOption (a)

    L = {a2nbn ∶ n ≥ 0}

  2. BOption (b)

    L = {anb2n ∶ n ≥ 0}

  3. COption (c)

    L = {a2nbn ∶ n > 0}

  4. DOption (d)

    L = {anb2n ∶ n > 0}

View answer & explanation

Correct answer

Answer: (a)A.

L = {a2nbn ∶ n ≥ 0}

Why this answer is correct

The language accepted by the NPDA is L = {a2nbn ∶ n ≥ 0}.

Explanation:

  • The NPDA starts in the initial state q0 with the stack symbol z. When it reads the first symbol a, it pushes two 1's on the stack (δ(q0, a, z) = {(q1, 11z)}). Then, every time it reads another a, it pushes another 1 on the stack (δ(q1, a, 1) = {(q1, 111)}). This way, the stack stores the number of a's that have been read so far.
  • When the NPDA reads a b, it pops one 1 from the stack (δ(q1, b, 1) = {(q1, λ)}). When the stack becomes empty (i.e., when all the a's have been paired with b's), the NPDA transitions to the final state qf (δ(q1, λ, z) = {(qf, z)}).
  • Therefore, the NPDA accepts the language L = {a2nbn ∶ n ≥ 0}, which consists of strings of a's followed by an equal number of b's. The other options are not accepted by the NPDA.

Question 12

Consider the following graph:

For the graph; the following sequences of depth first search (DFS) are given

(A) abcghf

(B) abfchg

(C) abfhgc

(D) afghbc

Which of the following is correct?

  1. AOption (a)

    (A), (B) and (D) only

  2. BOption (b)

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

  3. COption (c)

    (B), (C) 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 4) (A), (C) and (D) only.

Explanation:

The depth-first search (DFS) algorithm visits all the vertices of a graph by exploring as far as possible along each branch before backtracking.

In a graph with multiple connected components, the DFS will be performed for each component separately.

In the given graph, the DFS order can be different depending on the starting vertex and the order in which the edges are traversed.

(A) abcghf is a valid DFS order, starting at vertex "a".

(C) abfhgc is also a valid DFS order, starting at vertex "a".

(D) afghbc is a valid DFS order, starting at vertex "a".

However, (B) abfchg is not a valid DFS order, as the edge from "g" to "f" is not visited.

Therefore, the correct answer is (A), (C) and (D) only.

Question 13

In a database, a rule is defined as (P1 and P2) or P3? R1 (0.8) and R2 (0.3), where P1, P2, P3 are premises and R1. R2 are conclusions of rules with certainty factors (CF) 0.8 and 0.3 respectively. If any running program has produced P1, P2, P3 with CF as 0.5, 0.8. 0.2 respectively, find the CF of results on the basis of premises.

  1. AOption (a)

    CF (R1 = 0.8), CF (R2 = 0.3)

  2. BOption (b)

    CF (R1 = 0.40), CF (R2 = 0.15)

  3. COption (c)

    CF (R1 = 0.15), CF (R2 = 0.35)

  4. DOption (d)

    CF (R1 = 0.8), CF (R2 = 0.35)

View answer & explanation

Correct answer

Answer: (b)B.

CF (R1 = 0.40), CF (R2 = 0.15)

Why this answer is correct

The correct answer is option 2.

Important Points

Certainty Factor (CF) is a numeric value that tells us how likely an event or a statement is supposed to be true.

This value is similar to probability, but with only probability value of any event agent cannot decide what to do. This certainty factor is decided through which the agent can decide whether to declare the statement true or false based on the probability and other knowledge that the agent has.

Dynamic Certainty for a Conclusion :

CF(C) = CF(H) x CF(R) , C is the conclusion

CF(H) = calculated Certainty Factor for Hypothesis.

R = given rule , "if H then C with certainty CF(R)"

Conjunction and Disjunction of Hypotheses:

CF (P1 and P2) = MIN { CF(P1) , CF(P2) }

CF (P1 or P2) = MAX { CF(P1) , CF(P2) }

Here, P1 , P2 are premises.

Given Rule is (P1 and P2) or P3

R1 and R2 are conclusions of rules.

CF(R1)= 0.8 

CF(R2)=0.3

CF(P1)=0.5  , CF(P2)=0.8 , CF(P3)=0.2

Where P1,P2,P3 are premises.

Now the CF of given rule ((P1 and P2) or P3)=   MAX  { MIN{CF(P1),CF(P2)} , CF(P3) } 

= MAX { MIN { 0.5,0.8} ,0.2}

=MAX { 0.5 , 0.2 }

= 0.5

Now, CF of R1 based on premises = 0.5 × CF(R1) =0.5 × 0.8 =0.40

Now, CF of R2 based on premises = 0.5 ×  CF(R2) =0.5 × 0.3 =0.15

Question 14

Alpha and Beta testing are forms of

  1. AOption (a)

    White-Box Testing

  2. BOption (b)

    Black-Box Testing

  3. COption (c)

    Acceptance Testing

  4. DOption (d)

    System Testing

View answer & explanation

Correct answer

Answer: (c)C.

Acceptance Testing

Why this answer is correct

The correct answer: Acceptance Testing

Alpha and Beta testing are forms of:

Acceptance Testing

Important Points

Alpha Testing is usually done by internal staff before the product is released to external testers. It is a type of acceptance testing that's done in a lab environment and not by the end users. It helps identify all possible issues and problems in the system before it goes for Beta testing. 

Beta Testing is performed by actual users or potential customers in their own environment. It is the second phase of testing in which a sampling of the intended audience tries the product out before it is officially released to the general public. This is the final test before shipping the product. Problems that were not discovered during Alpha testing may be identified here.

These types of tests are done to make sure that the system is working as expected and will be accepted by the end users. They are types of User Acceptance Testing (UAT) and are very important in software development processes.

Question 15

Which of the following is correct for the destination address 4A ∶ 30 ∶ 10 ∶ 21 ∶ 10 ∶ 1A?

  1. AOption (a)

    unicast address

  2. BOption (b)

    multicast address

  3. COption (c)

    broadcast address

  4. DOption (d)

    unicast and broadcast address

View answer & explanation

Correct answer

Answer: (a)A.

unicast address

Why this answer is correct

Correct Answer: unicast address

  • In computer networking, there are three types of addresses used to identify devices: unicast, multicast, and broadcast. Each type of address has a specific purpose and is used for different types of communication.
  • A unicast address is a unique address assigned to a single device on a network. When a device wants to send a packet of data to another device, it uses the unicast address of the target device as the destination address. The packet is then sent over the network and is only delivered to the device with the matching unicast address.
  • A multicast address is used to send a single data frame to multiple devices simultaneously. This is useful when a device wants to send a message to a group of devices, such as a video stream to a group of viewers. In this case, the sender uses a multicast address as the destination address, and the message is delivered to all devices that have joined the multicast group.
  • A broadcast address is used to send a data frame to all devices on a network. This is useful for communication that should be received by every device on the network, such as a request for all devices to respond with their IP addresses. In a broadcast transmission, the destination address is set to the broadcast address of the network, and all devices on the network receive the message.
  • In IPv6, the first 3 bits of an address determine the type of address. If the first 3 bits are 001, the address is a unicast address. If the first 3 bits are 111, the address is a multicast address. Broadcast addresses do not exist in IPv6.

So, to summarize, the destination address 4A ∶ 30 ∶ 10 ∶ 21 ∶ 10 ∶ 1A is a unicast address because its first 3 bits are 010, indicating that it is a unique address assigned to a single device on a network. This address is used for communication between two specific devices, and the data frame is only delivered to the device with this exact address.

Question 16

Match List I with List II:

List IList II
(A)Firmware(I)Number of logical records into physical blocks
(B)Batch file(II)ASCII format
(C)Packing(III)Resource allocation
(D)Banker's Algorithm(IV)ROM
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (d)D.

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

Why this answer is correct

The correct option is 4) (A) - (IV), (B) - (I), (C) - (II), (D) - (III).

(A) Firmware - (IV) ROM: Firmware is software that is stored in a Read-Only Memory (ROM) chip, which is a non-volatile memory used to store permanent data.

(B) Batch file - (I) Number of logical records into physical blocks: A batch file is a text file containing a series of commands that are executed in sequence. It is used to automate repetitive tasks, such as dividing the number of logical records into physical blocks.

(C) Packing - (II) ASCII format: Packing refers to the process of converting data into a compact format for storage or transmission. ASCII is a format for representing characters as numerical values, which can be used for packing data.

(D) Banker's Algorithm - (III) Resource allocation: The Banker's Algorithm is a resource allocation and deadlock avoidance algorithm used in operating systems. It is used to ensure that the allocation of resources is done in a safe and efficient manner, which is essentially resource allocation.

Question 17

Consider the following:

List IList II
(A)Activation record(I)Linking Loader
(B)Location counter(II)Garbage Collection
(C)Reference count(III)Subroutine Call
(D)Address relocation(IV)Assembler
<br>

Which of the following is correct matching?

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (d)D.

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

Why this answer is correct

The correct answer is 4) (A) - (III), (B) - (IV), (C) - (II), (D) - (I).

Activation record - Subroutine call

Location counter- Assembler

Reference counts- Garbage collection

Address relocation- Linking loader

Key Points

  • When a sub-routine is called, its activation record is created.
  • An assembler uses location counter value to give address to each instruction which is needed for relative addressing as well as for jump labels.
  • Reference count is used by garbage collector to clear the memory whose reference count becomes
  • Linker Loader is a loader which can load several compiled codes and link them together into a single executable. Thus it needs to do relocation of the object codes.

Question 18

Consider an error free 64 kbps satellite channel used to send 512 byte data frames in one direction with very short acknowledgements coming back the other way. What is the maximum throughput for window size of 15?

  1. AOption (a)

    32 kbps

  2. BOption (b)

    48 kbps

  3. COption (c)

    64 kbps

  4. DOption (d)

    70 kbps

View answer & explanation

Correct answer

Answer: (c)C.

64 kbps

Why this answer is correct

The correct answer is 64 kbps

To determine the maximum throughput for the given satellite channel, we need to consider the protocol window size and the round-trip time (RTT) of the satellite communication. However, the problem statement only provides the error-free channel capacity (64 kbps), the data frame size (512 bytes), and the window size (15).

Given:

  • Channel capacity = 64 kbps
  • Data frame size = 512 bytes
  • Window size = 15

First, convert data frame size to bits: 512 bytes×8 bits/byte=4096 bits512 \text{ bytes} \times 8 \text{ bits/byte} = 4096 \text{ bits}

Since the window size is 15, we can have at most 15 frames in transit before an acknowledgment is required. Therefore, the maximum amount of data that can be in transit is: 15 frames×4096 bits/frame=61440 bits15 \text{ frames} \times 4096 \text{ bits/frame} = 61440 \text{ bits}

If the channel capacity is 64 kbps (which is 64000 bps), the maximum throughput is constrained by the channel capacity because the theoretical maximum throughput cannot exceed the channel capacity.

Therefore, regardless of other factors, the maximum throughput achievable on this channel, even with a window size of 15, is the same as the channel capacity because frames can be sent continuously without waiting for acknowledgments (assuming very short acknowledgment packets do not significantly impact the bandwidth).

Thus, the maximum throughput is: 64 kbps64 \text{ kbps}

So, the correct answer is: 3) 64 kbps

Question 19

Consider the following statements:

Statement I: LALR parser is more powerful than canonical LR Parser.

Statement II: SLR parser is more powerful than LALR

Which of the following is correct?

  1. AOption (a)

    Statement I true and Statement II false

  2. BOption (b)

    Statement I false and Statement II true

  3. COption (c)

    Both Statement I and Statement II false

  4. DOption (d)

    Both Statement I and Statement II true

View answer & explanation

Correct answer

Answer: (c)C.

Both Statement I and Statement II false

Why this answer is correct

LR parsing is one sort of bottom up parsing. It is used to parse a broad category of grammars. "L" denotes left-to-right scanning of the input in LR parsing, "R" signifies the reverse construction of a right-most derivation and "K" is the number of input symbols used to determine the number of parsing decisions.

LR parsing consists of four different parts: LR (0) parsing, SLR parsing, CLR parsing, and LALR parsing.

LR parsers in term of power:

CLR > LALR > SLR > LR(0)

Therefore, Option 3) is correct option.

Question 20

Match List I with List II:

List IList II
(A)BIND(I)Block the caller until a connection attempt arrives
(B)LISTEN(II)Give a local address to a socket
(C)ACCEPT(III)Show willingness to accept connections
(D)SOCKET(IV)Create a new point
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

Concept:

If we are establishing a connection between client and server using TCP, it offers a number of features, including the fact that TCP is well-suited for applications that demand high dependability and transmission time is less important. It is utilized by protocols such as HTTP, HTTPs, FTP, SMTP, and Telnet. TCP rearranges data packets according to the requested order. There is an absolute guarantee that the transferred data will arrive undamaged and in the same order as it was sent. TCP utilizes Flow Control and requires three packets to establish a socket connection prior to sending any user data. TCP controls both dependability and congestion. It also does error detection and recovery. From the source to the destination, incorrect packets are retransmitted.

Explanation:

TCP Server – 

  • using socket(), Create a TCP socket.
  • using bind(), Bind the socket to the server address.
  • using listen(), put the server socket in a passive mode, where it waits for the client to approach the server to make a connection
  • using accept(), At this point, the connection is established between the client and server, and they are ready to transfer data.

Hence, option 2) is correct.

Question 21

A magnetic tape drive has transport speed of 200 inches per second and a recording density of 1600 bytes per inch. The time required to write 600000 bytes of data grouped in 100 characters record with a blocking factor 10 is

  1. AOption (a)

    2.0625 sec

  2. BOption (b)

    1.8750 sec

  3. COption (c)

    2.0062 sec

  4. DOption (d)

    2.6150 sec

View answer & explanation

Correct answer

Answer: (b)B.

1.8750 sec

Why this answer is correct

Concept:

To calculate the time required to write 600000 bytes of data with a blocking factor of 10 and a record size of 100 characters (or 100 bytes assuming one byte per character) using a magnetic tape drive with a transport speed of 200 inches per second and a recording density of 1600 bytes per inch, we can use the following formula:

Time = Amount of data / (Transport speed x Recording density)

Explanation:

Blocking factor = 10

Number of records per block = 10

Number of bytes per block = 1000 (100 characters x 10 records per block)

Number of blocks required = 600 (600000 bytes / 1000 bytes per block)

<br>

The length of tape required for one block can be calculated as follows:

Length of tape required for one block = (Number of bytes per block) / (Recording density)

= 1000 / 1600

= 0.625 inches

<br>

Therefore, the total length of tape required for 600 blocks is:

Total length of tape required = (Length of tape required for one block) x (Number of blocks)

= 0.625 x 600

= 375 inches

<br>

Now, we can calculate the time required to write this length of tape:

Time required = (Length of tape) / (Transport speed)

= 375 / 200

= 1.875 seconds

Therefore, the time required to write 600000 bytes of data grouped in 100 characters record with a blocking factor of 10 is 1.875 seconds.

Question 22

Consider two lists A and B of three strings on {0, 1}

X:

List AList B
1111
1011110
100
<br>

Y:

List AList B
10101
01111
101011
<br>

Which of the following is true?

  1. AOption (a)

    Only PCP in X has solution.

  2. BOption (b)

    Only PCP in Y has solution.

  3. COption (c)

    PCP in both X and Y has solution.

  4. DOption (d)

    PCP neither in X nor in Y has solution.

View answer & explanation

Correct answer

Answer: (a)A.

Only PCP in X has solution.

Why this answer is correct

The correct option is 1) Only PCP in X has a solution.

Post correspondence Problem

  • The Post Correspondence Problem (PCP) is a mathematical problem that asks whether it is possible to form a string by concatenating elements of two given lists A and B, such that the resulting string is equal to another string in the other list.
  • In more detail, given two lists A = {n1, n2, . . . , nk} and B = {x1, x2, . . . , xk} of strings over the alphabet Σ, the task is to find a sequence of integers i1, i2, . . . , im (where m ≥ 1 and repetition of indices is allowed) such that ni1 ni2 . . . nim = xi1 xi2 . . . xim.
    1. For example, if Σ = {0, 1}, A = {1, 10111, 10}, and B = {111, 10, 0}, there exists a solution, m = 4, i1 = 2, i2 = 1, i3 = 1, i4 = 3, such that ni1 ni2 ni3 ni4 = 1011110.
  • However, not all instances of PCP have solutions.
    1. For example, if Σ = {0, 1}, A = {10, 011, 101}, and B = {101, 11, 011}, there is no solution because it's not possible to form the strings from the elements of the lists.
  • In general, PCP is a well-known problem in computational theory and is known to be undecidable, meaning that there is no algorithm that can determine whether a solution exists for all instances of the problem in a finite amount of time.

Question 23

The condition num! = 65 cannot be replaced by

  1. AOption (a)

    num > 65 || num < 65

  2. BOption (b)

    !(num = = 65)

  3. COption (c)

    num − 65

  4. DOption (d)

    !(num − 65)

View answer & explanation

Correct answer

Answer: (d)D.

!(num − 65)

Why this answer is correct

option 4 is the correct answer.

  • The expression !(num - 65) evaluates to true if num is not equal to 65, and false if num is equal to 65.
  • However, this expression is not equivalent to num! = 65, since the factorial of other numbers besides 65 can also produce the same result as 65.
  • Options 1 and 3 are also not valid replacements for num! = 65, since they do not check if the factorial of num is equal to 65.
  • Option 2 is the only option that is equivalent to num! != 65, but it is not the correct answer since the question asks for a replacement that is NOT equivalent to num! = 65.

Question 24

Modules X and Y operate on the same input and output, then the cohesion is

  1. AOption (a)

    Logical cohesion

  2. BOption (b)

    Sequential cohesion

  3. COption (c)

    Procedural cohesion

  4. DOption (d)

    Communicational cohesion

View answer & explanation

Correct answer

Answer: (d)D.

Communicational cohesion

Why this answer is correct

Concept:

Cohesion quantifies the degree to which the module's elements are functionally related. It is the extent to which an element contains all elements necessary for performing a single task. Cohesion is essentially the internal adhesive that holds the module together. The cohesion of a quality software design will be high.

Explanation:

Logical Cohesion: The relationship between the elements is logical, not functional. Ex- An element receives inputs from tape, disc, and the network. Each function's code resides in the same component. The operations and functions are related, but significantly distinct.

Sequential Cohesion: An element's output becomes the input for another element, i.e. data flow between the parts. It is a characteristic of functional programming languages.

Procedural Cohesion: Elements of procedural cohesion guarantee the proper order of execution. Actions continue to be loosely coupled and unlikely to be re-usable. Ex- calculate student GPA, print student record, calculate cumulative GPA, print cumulative GPA.

Communicational Cohesion: Two elements interact with the same input data or contribute to the same output. For example, update the database record and send it to the printer.

Hence the correct answer is option 4.

Question 25

The solution of the recurrence relation 7(n) = 3T(n/4) + n lg n is

  1. AOption (a)

    θ(n2 lg n)

  2. BOption (b)

    θ(n lg n)

  3. COption (c)

    θ(n lg n)2

  4. DOption (d)

    θ(n lg lg n)

View answer & explanation

Correct answer

Answer: (b)B.

θ(n lg n)

Why this answer is correct

The correct answer is θ(n lg n).

This can be determined using the Master Theorem.

The Master Theorem is a general formula used to solve recurrence relations of the form T(n) = aT(n/b) + f(n), where a, b > 0 are constants, and f(n) is an asymptotically positive function.

In the given recurrence relation, a = 3, b = 4, and f(n) = n lg n.

Using the Master Theorem, we can see that the solution to the recurrence is T(n) = θ(n lg n), since log4 3 = 1 and f(n) = n lg n = Θ(n lg n).

Therefore, the correct answer is θ(n lg n).

Question 26

Consider the following two lists:

List IList II
(A)Stack overflow(I)Software interrupt
(B)Timer(II)Internal interrupt
(C)Invalid opcode(III)External interrupt
(D)Superior call(IV)Machine check interrupt
<br>

Which of the following is correct match

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

Interrupts

  • It is of two types: Hardware interrupts, and Software interrupts.
  • The hardware interrupt occurs by the interrupt request signal from peripheral circuits. On the other hand, the software interrupt occurs by executing a dedicated instruction.
  • The hardware interrupt has an external interrupt and an internal interrupt. The external interrupt occurs when a specified signal is input to the dedicated external interrupt terminal. The internal interrupt occurs by an interrupt request signal from a peripheral circuit built into the microcontroller.
  • Machine check interrupts are caused by machine malfunctions. When an interrupt occurs, the hardware saves pertinent information about the program that was interrupted and, if possible, disables the processor for further interrupts of the same type. The hardware then routes control to the appropriate interrupt handler routine.

Stack overflow is an Internal interrupt.

Timer is an External interrupt.

Invalid opcode is a Software interrupt.

Superior call is a Machine check interrupt.

Hence, option 2) is correct.

Question 27

The reduced grammar equivalent to the grammar, whose production rules are given below, is

S → AB | CA

B → BC | AB

A → a

C → a B | b

  1. AOption (a)

    S → CA, A → a, C → b

  2. BOption (b)

    S → CA | B, B → BC | B, A → a, C → aB | b

  3. COption (c)

    S → CA | B, B → BC, A → a, C → aB | b

  4. DOption (d)

    S → AB | AC, B → BC | BA, A → a, C → aB | b

View answer & explanation

Correct answer

Answer: (a)A.

S → CA, A → a, C → b

Why this answer is correct

S→AB |CA

B→BC |AB

A→a

C→aB | b

Here B is not derive any terminal string so remove productions contains B

S→CA

A→a

C→b 

Hence above grammar is Reduced grammar.

Question 28

In reference to Big data, consider the following database:

(A) Memcached

(B) Couch DB

(C) Infinite graph

Choose the most appropriate answer from the options given below:

  1. AOption (a)

    (A) and (B) only

  2. BOption (b)

    (B) and (C) only

  3. COption (c)

    (C) and (A) only

  4. DOption (d)

    (A), (B) and (C)

View answer & explanation

Correct answer

Answer: (b)B.

(B) and (C) only

Why this answer is correct

Memcached

It is a high-performance, user-friendly in-memory data store. It provides a mature, scalable, open-source solution for sub-millisecond response speeds, which makes it suitable as a cache or session store. Memcached is widely used to power real-time Web, Mobile Apps, Gaming, AdTech, and E-Commerce systems.

Couch DB

The prominent big data analytics tools that use non-relational databases are MongoDB, Cassandra, Oracle No-SQL, and Apache CouchDB.

CouchDB is a NoSQL database for document storage. It provides the ability to store documents with unique names, as well as an API is known as RESTful HTTP API for reading and modifying (adding, editing, and deleting) database documents. Documents are the fundamental unit of data in CouchDB, and they also contain metadata.

Infinite graph

InfiniteGraph is a distributed graph database developed in Java and C++. It belongs to a class of "Not Only SQL" (NOSQL) database systems that emphasize graph data structures. InfiniteGraph is used by developers to discover useful and frequently hidden relationships in highly connected, complex big data sets.

Hence, option 2) is the most appropriate answer.

Question 29

Consider the following:

List IList II
(A)Stack algorithm(I)Deadlock
(B)Elevator algorithm(II)Disk scheduling
(C)Priority scheduling algorithm(III)Page replacement
(D)Havender's algorithm(IV)CPU scheduling
<br>

Which of the following is correct matching?

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (a)A.

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

Why this answer is correct

Concept:

Elevator algorithm (also SCAN) is a disk-scheduling algorithm to determine the motion of the disk's arm and head in servicing read and write requests.This algorithm is named after the behavior of a building elevator, where the elevator continues to travel in its current direction (up or down) until empty, stopping only to let individuals off or to pick up new individuals heading in the same direction.

A Process Scheduler schedules different processes to be assigned to the CPU based on particular scheduling algorithms. These algorithms are either non-preemptive or preemptive. Non-preemptive algorithms are designed so that once a process enters the running state, it cannot be preempted until it completes its allotted time, whereas preemptive scheduling is based on priority where a scheduler may preempt a low-priority running process anytime when a high-priority process enters into a ready state.

 

A stack-based algorithm is one for which it can be shown that the set of pages in memory for N frames is always a subset of the set of pages that would be in memory with N+1 frames. For LRU replacement, the set of pages in memory would be the n most recently referenced pages. If the number of frames increases then these n pages will still be the most recently referenced and so, will still be in the memory. While in FIFO, if a page named b came into physical memory before a page a then priority of replacement of b is greater than that of a, but this is not independent of the number of page frames and hence, FIFO does not follow a stack page replacement policy and therefore suffers Belady’s Anomaly. 

 

Havender’s Algorithm is the Elimination of “Mutual Exclusion” Condition The mutual exclusion condition must hold for non-shareable resources. That is, several processes cannot simultaneously share a single resource. This condition is difficult to eliminate because some resources, such as the tap drive and printer, are inherently non-shareable. Note that shareable resources like read-only-file do not require mutually exclusive access and thus cannot be involved in deadlock. Elimination of “Hold and Wait” Condition There are two possibilities for the elimination of the second condition. The first alternative is that a process request be granted all the resources it needs at once, prior to execution. The second alternative is to disallow a process from requesting resources whenever it has previously allocated resources. This strategy requires that all the resources a process will need must be requested at once. The system must grant resources on “all or none” basis. If the complete set of resources needed by a process is not currently available, then the process must wait until the complete set is available. While the process waits, however, it may not hold any resources. Thus the “wait for” condition is denied and deadlocks simply cannot occur.

The Correct Answer is option 1.

Question 30

Match List I with List II:

List IList II
(A)DES(I)Key size - 256
(B)AES(II)Key size - 1024
(C)3 DES(III)Key size - 56
(D)RSA(IV)Key size - 168
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

DES

DES is a block cipher that encrypts data in 64-bit blocks. This implies that 64 bits of plaintext are supplied to DES, which generates 64 bits of ciphertext. Encryption and decryption employ the same algorithm and key, with slight variations. The key is 56 bits long.

AES

AES is extensively used because it is significantly more secure than DES and triple DES, although being more difficult to implement.  The AES (Advanced Encryption Standard) is a block cipher.  Key size can be 128/192 or 256 bits. Encrypts data using 128-bit blocks.

3 DES

Triple DES is a method of encryption that employs three instances of DES on the same plaintext. It employs three distinct key selection strategies: in the first, all utilised keys are unique; in the second, two keys are identical and one is unique; and in the third, all used keys are identical. Triple DES is also vulnerable to meet-in-the middle attack because of which it give total security level of 2^112 instead of using 168 bit of key.

RSA

RSA is an asymmetrical cryptographic algorithm. Asymmetric implies that it operates on two distinct keys, namely the Public Key and the Private Key. As its name implies, the Public Key is made available to everyone, while the Private Key is kept secret. The public key is composed of two numbers, one of which is a product of two huge prime numbers. In addition, the private key is derived from the same pair of prime numbers. Consequently, the private key is compromised if someone can factorise the huge integer. Therefore, the encryption strength is entirely dependent on the size of the key, and if we double or triple the key size, the encryption strength increases exponentially. RSA keys typically consist of 1024 or 2048 bits.

Hence, option 2) is correct.

Question 31

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

Assertion (A): ¬p is true.

Reason (R): p → q is true and q is false.

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: (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 : Option 1) Both (A) and (R) are true and (R) is the correct explanation of (A)

Key Points

Given:

  • p → q is true
  • q is false

Apply logical inference:

The implication p → q is logically equivalent to ¬p ∨ q. For p → q to be true when q is false, ¬p must be true. That means p is false.

Therefore:

  • Assertion (A): ¬p is true ✅
  • Reason (R): p → q is true and q is false ⇒ ¬p is true ✅
  • Hence, (R) is the correct explanation of (A)

Correct Answer: Option 1) Both (A) and (R) are true and (R) is the correct explanation of (A)

Question 32

Consider the traversal of a tree

Preorder → ABCEIFJDGHKL

Inorder → EICFJBGDKHLA

Which of the following is correct post order traversal?

  1. AOption (a)

    EIFJCKGLHDBA

  2. BOption (b)

    FCGKLHDBUAE

  3. COption (c)

    FCGKLHDBAEIJ

  4. DOption (d)

    IEJFCGKLHDBA

View answer & explanation

Correct answer

Answer: (d)D.

IEJFCGKLHDBA

Why this answer is correct

The correct answer is IEJFCGKLHDBA

Given: 

Preorder - ABCEIFJDGHKL

Inorder - EICFJBGDKHLA

Concept:

Since in preorder traversal root is visited first, then left child, later right child.

Explanation:

Given preorder and Inorder we can construct the complete tree as follows:-

we find the root using preorder and we find left and right child using Inorder

New root = B since preorder contains B next.

Now from this tree we find post order traversal, which is IEJFCGKLHDBA

Question 33

Consider a B-tree of height h, minimum degree t ≥ 2 that contains any n-key, where n ≥ 1. Which of the following is correct?

  1. AOption (a)

    h ≥ logtn+12\rm\frac{n+1}{2}

  2. BOption (b)

    h ≤ logtn+12\rm\frac{n+1}{2}

  3. COption (c)

    h ≥ logtn−12\rm\frac{n−1}{2}

  4. DOption (d)

    h ≤ logtn−12\rm\frac{n−1}{2}

View answer & explanation

Correct answer

Answer: (b)B.

h ≤ logtn+12\rm\frac{n+1}{2}

Why this answer is correct

n the case of a B-tree with a minimum number of keys, there is one key in the root, 2 nodes at depth 1 , 2ti -1 nodes at depth i .   

Let h be the height of the tree and n be the number of nodes. Then

n>=1+(t-1) submission up h down i=1     2ti-1

which works out to th<= (n+1) / 2. So we take the logt of both sides.

 h <= logt(n+1)/2 

Hence only h ≤ logtn+12\rm\frac{n+1}{2} is correct.

Question 34

A good software requirement specification does NOT have the characteristic

  1. AOption (a)

    Completeness

  2. BOption (b)

    Consistency

  3. COption (c)

    Clarity

  4. DOption (d)

    Reliability

View answer & explanation

Correct answer

Answer: (d)D.

Reliability

Why this answer is correct

Concept:

The production of requirements stage of the software development process is Software Requirements Specifications (SRS) (also called a requirements document).

Characteristics of Software Requirement Specification:

Correctness: The SRS document is deemed to be correct if the requirements stated in it are expected from the system itself.

Clarity: SRS documentation should be easy to understand for all members of the development process, from stakeholders to developers and other specialists.

Viability: An SRS document should be created will all the current conditions and limitations in mind. They include budget, technical capabilities, team size, and deadline.

Compleness: Your SRS should be complete with details and cover most user scenarios so that your development team can use this document as their guide and avoid any confusion during the development.

Flexibility: A rare product stays unchanged throughout the whole development process, so your documentation should be flexible enough to accept changes. Try to keep all the information well-structured, so that you can make changes quickly in one section of the document.

Consistency: The requirements in your SRS document shouldn’t contradict each other, and you should use the same terminology across the documentation. The structure of your document should be clear and predictable.

Accuracy: The document should have clear requirements and instructions so that any team member can use it without having to ask any additional questions. Avoid ambiguity, loopholes, subjective suggestions, and so on.

The Correct Answer is option 4.

Question 35

Consider a logic gate circuit. with 8 input lines (D0, D1 ..... D7) and 3 output lines (A0, A1, A2) specified by following operations

A2 = D4 + D5 + D6 + D7

A1 = D2 + D3 + D6 + D7

A0 = D1 + D3 + D5 + D0

Where + indicates logical OR operation. This circuit is

  1. AOption (a)

    3 × 8 multiplexer

  2. BOption (b)

    Decimal to BCD converter

  3. COption (c)

    Octal to Binary encoder

  4. DOption (d)

    Priority encoder

View answer & explanation

Correct answer

Answer: (a)A.

3 × 8 multiplexer

Why this answer is correct

The Correct Answer is option 1.

Concept:

Multiplexers:

  • Multiplexers are combinational circuits designed to select one of multiple data inputs and produce a single output
  • They're commonly used in communication transmissions
  • A multiplexer is Many to one data selector
  • A multiplexer selects one of the many data available at its input depending on the bits on the select line
  • For 2n inputs, there are n select lines that determine, which input is to be connected to the output.

Question 36

The process to gather the software requirements from client, analyze and document is known as -

  1. AOption (a)

    Software Engineering Process

  2. BOption (b)

    User Engineering Process

  3. COption (c)

    Requirement Elicitation Process

  4. DOption (d)

    Requirement Engineering Process

View answer & explanation

Correct answer

Answer: (d)D.

Requirement Engineering Process

Why this answer is correct

Concept:

Requirement Engineering Process:

The process to gather software requirements from clients, analyzing and document them is known as requirement engineering.

The goal of requirement engineering is to develop and maintain a sophisticated and descriptive ‘System Requirements Specification’ document.

Requirement Engineering Process:

It is a four-step process, which includes 

  • Feasibility Study
  • Requirement Gathering
  • Software Requirement Specification
  • Software Requirement Validation

The Correct Answer is Requirement Engineering Process.

Question 37

Match List I with List II:

List IList II
(A)Type 0(I)Finite automata
(B)Type 1(II)Tuning machine
(C)Type 2(III)Linear bound automata
(D)Type 3(IV)Pushdown automata
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

    (A) - (II), (B) - (III), (C) - (II), (D) - (IV)

View answer & explanation

Correct answer

Answer: (b)B.

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

Why this answer is correct

Concept:

Grammar:

It is a finite set of formal rules for generating syntactically correct sentences or meaningful correct sentences.

According to Noam Chomosky, there are four types of grammar.

They are Type0, Type1, Type2, Type3.

Grammar TypeGrammar AcceptedLanguage AcceptedAutomata
Type 0Unrestricted grammarRecursively enumerable languageTurning Machine
Type 1Context-sensitive grammarContext-sensitive languageLinear-bounded automata
Type 2Context-free grammarContext-free languagePushdown automata
Type 3Regular grammarRegular languageFinite state automata

 

The Correct Answer is option 2.

Question 38

Pointers cannot be used to

  1. AOption (a)

    find the address of a variable in memory

  2. BOption (b)

    reference value directly

  3. COption (c)

    simulate call by reference

  4. DOption (d)

    manipulate dynamic data structure

View answer & explanation

Correct answer

Answer: (b)B.

reference value directly

Why this answer is correct

The correct answer is option 2) reference value directly.

Key Points

  • Option 1 – Find the address of a variable in memory: ✅ Pointers are designed to store the address of a variable using the & (address-of) operator.
  • Option 2 – Reference value directly: ❌ Pointers do not reference values directly. To access the value at the memory address, you must use the * (dereference) operator. Hence, this is not a direct operation.
  • Option 3 – Simulate call by reference: ✅ In languages like C and C++, pointers are used to pass variables by address to functions, effectively simulating call by reference.
  • Option 4 – Manipulate dynamic data structure: ✅ Pointers are crucial for managing dynamic data structures such as linked lists, trees, and graphs.

Additional Information

  • Pointers are a powerful tool in programming for indirect access to variables.
  • However, they require explicit dereferencing to access the value stored at the memory location they point to.

Hence, the correct answer is: option 2) reference value directly

Question 39

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

Assertion (A): A load-and-go assembler avoids the overhead of writing the object program out and reading it back in.

Reason (R): This can be done with either one-pass or two pass assembler.

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: option 3) (A) is true but (R) is false

Key Points

Assertion (A): A load-and-go assembler avoids the overhead of writing the object program out and reading it back in.

  • This is true.
  • A load-and-go assembler directly loads the object code into memory for execution, eliminating the need to save the code to disk and reload it later.

Reason (R): This can be done with either one-pass or two-pass assembler.

  • This is false.
  • Load-and-go assemblers are generally implemented as one-pass assemblers to allow immediate code generation and execution.
  • A two-pass assembler reads the source code twice (once to build the symbol table, once to generate code), which is not suitable for load-and-go scenarios.

Therefore:

  • Assertion (A) is true ✅
  • Reason (R) is false ❌

Hence, the correct answer is: option 3) (A) is true but (R) is false

Question 40

Consider the hash table of size 11 that uses open addressing with linear probing. Let h(k) = k mod 11 be the hash function. A sequence of records with keys 43, 36, 92, 87, 11, 47, 11, 13, 14 is inserted into an initially empty hash table, the bins of which are indexed from 0 to 10. What is the index of the bin into which the last record is inserted?

  1. AOption (a)

    8

  2. BOption (b)

    7

  3. COption (c)

    10

  4. DOption (d)

    4

View answer & explanation

Correct answer

Answer: (b)B.

7

Why this answer is correct

Given:

Let h(k) = k mod 11

Keys are 43,36,92,87,11,47,11,13,14.

h(1) = 43 % 11 = 10

h(2) = 36 % 11 = 3

h(3) = 92 % 11 = 4

h(4) = 87 % 11 = 10

Now, collision occurs due to index places is same.

The element is allotted next nearest place that is 0 index.

h(4) = 87 % 11 = 0

h(5) = 11 % 11 = 0

Now, collision occurs due to index places is same.

The element is allotted next nearest place that is 1 index.

h(5) = 11 % 11 = 1

h(6) = 47 % 11 = 3

Now, collision occurs due to index places is same.

The element is allotted next nearest place that is 4 index.

index 4 is already allotted to h(3).

The element is allotted next nearest place that is 5 index.

h(6) = 47 % 11 = 5

h(7) = 11 % 11 = 0

Now, collision occurs due to index places is same.

The element is allotted next nearest place that is 1 index.

index 1 is already allotted to h(5).

The element is allotted next nearest place that is 2 index.

h(7) = 11 % 11 = 2

h(8) = 13 % 11 = 2

Now, collision occurs due to index places is same.

The element is allotted next nearest place that is 3 index.

index 3 is already allotted to h(2).

The element is allotted next nearest place that is 4 index.

index 4 is already allotted to h(3).

The element is allotted next nearest place that is 5 index.

index 5 is already allotted to h(6).

The element is allotted next nearest place that is 6 index.

h(8) = 13 % 11 = 6

h(9) = 14 % 11 = 3

Now, collision occurs due to index places is same.

The element is allotted next nearest place that is 4 index.

index 4 is already allotted to h(3).

The element is allotted next nearest place that is 5 index.

index 5 is already allotted to h(3).

The element is allotted next nearest place that is 6 index.

index 6 is already allotted to h(8).

The element is allotted next nearest place that is 7 index.

h(9) = 14 % 11 = 7.

The Correct Answer is 7.

Question 41

Match List I with List II:

List IList II
(A)Localization(I)Encapsulation
(B)Packaging or binding of a collection of items(II)Abstraction
(C)Mechanism that enables designer to focus on essential details of a program component.(III)Characteristic of software that indicates the manner in which information is concentrated in program
(D)Information hiding(IV)Suppressing the operational details of a program component
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

Concept:

  • Localization is a characteristic of software that indicates the manner in which information is concentrated within a program. For example, conventional methods for functional decomposition localize information around functions, which are typically implemented as procedural modules.
  • Abstraction is a mechanism that enables the designer to focus on the essential details of a program component with little concern for lower-level details.
  • Encapsulation is to make sure that "sensitive" data is hidden from users and wrapping code and data together into a single unit.
  • Information hiding is the ability to prevent certain aspects of a class or software component from being accessible to its clients and Suppressing the operational details of a program component.

The Correct Answer is option 3.

Question 42

Assume that f(n) and g(n) are asymptotically positive. Which of the following is correct?

  1. AOption (a)

    f(n) = O(g(n)) and g(n) = O(h(n)) ⇒ f(n) = ω(h(n))

  2. BOption (b)

    f(n) = Ω(g(n)) and g(n) = Ω(h(n)) ⇒ f(n) = O(h(n))

  3. COption (c)

    f(n) = o(g(n)) and g(n) = o(h(n)) ⇒ f(n) = o(h(n))

  4. DOption (d)

    f(n) = ω(g(n)) and g(n) = ω(h(n)) ⇒ f(n) = Ω(h(n))

View answer & explanation

Correct answer

Answer: (c)C.

f(n) = o(g(n)) and g(n) = o(h(n)) ⇒ f(n) = o(h(n))

Why this answer is correct

Correct answer is Option 3Explanation:

Omega Notation, Ω

The notation Ω(n) is the formal way to express the lower bound of an algorithm's running time.

It measures the best case time complexity or the best amount of time an algorithm can possibly take to complete.

For example, for a function f(n)

Ω(f(n)) ≥ { g(n) : there exists c > 0 and n0 such that g(n) ≤ c.f(n) for all n > n0. }

According to Transitive Property

 f(n) = o(g(n)) and g(n) = o(h(n)) ⇒ f(n) = o(h(n)) is Correct

Question 43

Let R (ABCDEFGH) be a relation schema and F be the set of dependencies F = {A → B, ABCD → E, EF → G, EF → H and ACDF →EG}. The minimal cover of a set of functional dependencies is

  1. AOption (a)

    A → B, ACD → E, EF → G, and EF → H

  2. BOption (b)

    A → B, ACD → E, EF → G, EF → H and ACDF → G

  3. COption (c)

    A → B, ACD → E, EF → G, EF → H and ACDF → E

  4. DOption (d)

    A → B, ABCD → E, EF → H and EF → G

View answer & explanation

Correct answer

Answer: (a)A.

A → B, ACD → E, EF → G, and EF → H

Why this answer is correct

Correct answer is Option1

Explanation:Use the union rule to replace

EF → G and EF → H 

EF → GH

F = { A → B  ABCD → E  EF → GH  ACDF → EG }

B is extraneous in ABCD → E because B ∈ ABCD and {A → B, ABCD → E, EF → GH, ACDF → EG}

logically implies {A → B, ACD → E, EF → GH, ACDF → EG}.

This is because every  ACD → E.

This FD can be derived using Armstrong’s Axioms from A → B and ABCD → E via transitivity rule

So remove B from ABCD → E.

F = { A → B ACD → E  EF → GH ACDF → EG }

E is extraneous in ACDF → EG because E ∈ EG and {A → B, ACD → E, EF → GH, ACDF → G}

logically implies {A → B, ACD → E, EF → GH, ACDF → EG}

remove E from ACDF → EG

F = { A → B ACD → E EF → GH ACDF → G}

G is extraneous in ACDF → G. Note that ACDF → G is already implied by ACD → E and EF → GH in F

remove ACDF → G from F.

None of the remaining FD's in F have extraneous attributes so the minimal cover is

A → B, ACD → E, EF → G, EF → H.

Hence the correct answer is option 1.

Question 44

A 4-stage pipeline has the stage delay as 150, 120, 160 and 140 ns respectively. Registers that are used between the stages have delay of 5 ns. Assuming constant locking rate, the total time required to process 1000 data items on this pipeline is

  1. AOption (a)

    160.5 ms

  2. BOption (b)

    165.5 ms

  3. COption (c)

    120.5 ms

  4. DOption (d)

    590.5 ms

View answer & explanation

Correct answer

Answer: (b)B.

165.5 ms

Why this answer is correct

Given:

Four stage pipeline is used

Delay of stages = 150, 120, 160 and 140 ns

Delay due to each register = 5 ns

1000 data items or instructions are processed

Cycle Time:

Cycle Time =  Maximum delay due to any stage + Delay due to its register

⇒  Max { 150, 120, 160, 140 } + 5 ns

⇒  160 ns + 5 ns

⇒  165 ns

Process:

Pipeline time to process 1000 data items

⇒ Time taken for 1st data item + Time taken for remaining 999 data items

⇒  1 x 4 clock cycles + 999 x 1 clock cycle

⇒  4 x cycle time + 999 x cycle time

⇒  4 x 165 ns + 999 x 165 ns

⇒  660 ns + 164835 ns

⇒  165495 ns

⇒  165.5 μs

The Correct Answer is 165.5 μs

Question 45

Consider the properties of recursively enumerable sets:

(A) Finiteness

(B) Context Freedom

(C) Emptiness

Which of the following is true?

  1. AOption (a)

    Only (A) and (B) are not decidable

  2. BOption (b)

    Only (B) and (C) are not decidable

  3. COption (c)

    Only (C) and (A) are not decidable

  4. DOption (d)

    All (A), (B) and (C) are not decidable

View answer & explanation

Correct answer

Answer: (d)D.

All (A), (B) and (C) are not decidable

Why this answer is correct

Correct answer is Option 4.

Explanation:

  • RE languages or type-0 languages are generated by type-0 grammars.
  • An RE language can be accepted or recognized by Turing machine.
  • TM can loop forever for the strings which are not a part of the language.
  • RE languages are also called as Turing recognizable languages.

Question 46

Given below are two statements:

Statement I: "Grandparent is a parent of one's parent".

Statement II: First Order Predicate Logic (FOPL) representation of above statement is

∀ g, c grandparent (g, c) ⇔ ∃ p parent (g, p) ∧ parent (p, c)

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

Correct answer is Option 1

Explanation:Statement I: "Grandparent is a parent of one's parent".

Statement II: First Order Predicate Logic (FOPL) representation of above statement is

  • ∀ g, c grandparent (g, c) ⇔ ∃ p parent (g, p) ∧ parent (p, c)
  • Here: Statement 2 is First Order Predicate Logic (FOPL) representation of statement1
  • ∃ p parent (g, p) means for at least one grandparent of parent
  • parent (p, c) means parent of child
  • conclusion: "Grandparent is a parent of one's parent".

FOPL is a mathematical language used to represent logical statements and relationships between entities.

  • In FOPL, we use quantifiers to denote the scope of variables in a logical statement.
  • The two main quantifiers are universal (∀) and existential (∃).
  • In Statement II, the universal quantifier (∀) is used to represent all grandparent relationships.
  • The variables g and c represent a grandparent and a grandchild, respectively.
  • The FOPL representation asserts that for all grandparent (g, c) relationships, there exists a parent (p) such that p is a parent of c, and g is a parent of p.
  • This representation accurately represents the grandparent relationship defined in Statement I.
  • In summary, both Statement I and Statement II are true.
  • Statement I provides an intuitive definition of the grandparent relationship, while Statement II provides a formal representation of the same relationship using FOPL.

Question 47

Size and complexity are a part of

  1. AOption (a)

    People Metrics

  2. BOption (b)

    Project Metrics

  3. COption (c)

    Process Metrics

  4. DOption (d)

    Product Metrics

View answer & explanation

Correct answer

Answer: (d)D.

Product Metrics

Why this answer is correct

Correct answer is Option 4

Explanation:

Software quality metrics are a subset of software metrics that focus on the quality aspects of the product, process, and project. 

These are more closely associated with process and product metrics than with project metrics.

Software metrics can be classified into three categories 

  • Product metrics − Describes the characteristics of the product such as size, complexity, design features, performance, and quality level.
  • Process metrics − These characteristics can be used to improve the development and maintenance activities of the software.
  • Project metrics − This metrics describe the project characteristics and execution.

                                       Examples include the number of software developers, productivity.

Question 48

Which of the following algorithm design approach is used in Quick sort algorithm?

  1. AOption (a)

    Dynamic programming

  2. BOption (b)

    Back Tracking

  3. COption (c)

    Divide and conquer

  4. DOption (d)

    Greedy approach

View answer & explanation

Correct answer

Answer: (c)C.

Divide and conquer

Why this answer is correct

Correct answer is Option 3

Explanation:Quick sort is a Divide and Conquer algorithm.

It picks an element as a pivot and partitions the given array around the picked pivot.

In Quick sort algorithm, partitioning of the list is performed using following steps...

  • Step 1 - Consider the first element of the list as pivot (i.e., Element at first position in the list).
  • Step 2 - Define two variables i and j. Set i and j to first and last elements of the list respectively.
  • Step 3 - Increment i until list[i] > pivot then stop.
  • Step 4 - Decrement j until list[j] < pivot then stop.
  • Step 5 - If i < j then exchange list[i] and list[j].
  • Step 6 - Repeat steps 3,4 & 5 until i > j.
  • Step 7 - Exchange the pivot element with list[j] element

Worst Case : O(n2)

Best Case : O (n log n)

Average Case : O (n log n)

Question 49

Consider the production rules of grammer G:

S → AbB

A → aAb ∣ λ

B → bB ∣ λ

Which of the following language L is generated by grammer G?

  1. AOption (a)

    L = {anbm ∶ n ≥ 0, m > n}

  2. BOption (b)

    L = {anbm ∶ n ≥ 0, m ≥ 0}

  3. COption (c)

    L = {anbm ∶ n ≥ m}

  4. DOption (d)

    L = {anbm ∶ n ≥ m, m > 0}

View answer & explanation

Correct answer

Answer: (a)A.

L = {anbm ∶ n ≥ 0, m > n}

Why this answer is correct

Correct answer is Option1**Concept:**G = (V,T,P,S)

  1. G is a grammar, which consists of a set of production rules. It is used to generate the strings of a language.
  2. T is the final set of terminal symbols. It is denoted by lower case letters.
  3. V is the final set of non-terminal symbols. It is denoted by capital letters.
  4. P is a set of production rules, which is used for replacing non-terminal symbols
  5. S is the start symbol used to derive the string.

Explanation: Grammer G:

S → AbB

A → aAb ∣ λ

B → bB ∣ λ

language L is generated by grammer G is:

L = {anbm ∶ n ≥ 0, m > n}

String can be generated by grammer G is:

{b, bb, abb, abbb....} here an ∶ n ≥ 0 and bm ∶ m > n

Option 2: False

L = {anbm ∶ n ≥ 0, m ≥ 0}

Option 3: False

L = {anbm ∶ n ≥ m}

Option 4: False

L = {anbm ∶ n ≥ m, m > 0}

Question 50

Consider the following related to Fourth Generation Technique (4GT):

(A) It controls efforts.

(B) It controls resources.

(C) It controls cost of development.

Choose the correct answer from the options given below:

  1. AOption (a)

    (A) and (B) only

  2. BOption (b)

    (B) and (C) only

  3. COption (c)

    (C) and (A) only

  4. DOption (d)

    All (A), (B) and (C)

View answer & explanation

Correct answer

Answer: (d)D.

All (A), (B) and (C)

Why this answer is correct

Correct answer is Option 4

Explanation:

  • The 4GT begins with “Requirement Gathering”
  • The customer could actually describe the requirements
  • These would be directly translated into an operational prototype.
  • If the product is a smaller product may be possible to move directly from
  • Requirements gathering step to implementation using a non-procedural Fourth generation language (4GL)
  • For larger products this procedure may little hard, therefore it’s necessary to use the design strategy in 4GT.
  • Fourth Generation Technique (4GT) is a software development methodology that emphasizes using high-level programming languages and automated tools to expedite the software development process.
  • 4GT techniques are designed to improve the productivity of developers and reduce the time and cost of software development.
  • To achieve these goals, 4GT emphasizes the use of reusable code, modular design, and rapid prototyping.
  • 4GT can help control the efforts, resources, and cost of software development by streamlining the development process and reducing the time and effort required to complete a project.

Benefits of the 4GT

  1. Flexible
  2. Scalable
  3. Total Data Access
  4. controls efforts
  5. controls resources
  6. controls cost of development

Question 51

Which layer divides each message into packets at the source and re-assembles them at the destination?

  1. AOption (a)

    Network layer

  2. BOption (b)

    Transport layer

  3. COption (c)

    Data link layer

  4. DOption (d)

    Physical layer

View answer & explanation

Correct answer

Answer: (b)B.

Transport layer

Why this answer is correct

Correct answer is Option 2

Explanation:The Transport Layer in the Open System Interconnection (OSI) model is responsible for end-to-end delivery over a network.

Transport Layer uses some standard protocols to enhance its functionalities are

  • TCP(Transmission Control Protocol),
  • UDP( User Datagram Protocol),
  • DCCP( Datagram Congestion Control Protocol), etc.

Functions of the transport layer

  1. Service-point addressing
  2. Segmentation and Reassembly
  3. Connection Control
  4. Multiplexing and Demultiplexing
  5. Flow control Error Control

Question 52

A top down approach to programming calls for:

Statement I: Working from the general to the specific.

Statement II: Postpone the minor decisions.

Statement III: A systematic approach.

Statement IV: Intermediate coding of the problem

Which of the following is true?

  1. AOption (a)

    Statement I only

  2. BOption (b)

    Statement I and Statement II only

  3. COption (c)

    Statement I, Statement II and Statement III only

  4. DOption (d)

    Statement I, Statement II and Statement IV only

View answer & explanation

Correct answer

Answer: (b)B.

Statement I and Statement II only

Why this answer is correct

Correct answer is Option 2

Explanation:

| Top-Down Approach | | --- |Top-Down ApproachBottom-Up Approach
Top-Down Approach
Divides a problem into smaller units and then solve it.Starts from solving small modules and adding them up together
This approach contains redundant information.Redundancy can easily be eliminated.
A well-established communication is not required.Communication among steps is mandatory.
The individual modules are thoroughly analysed.Works on the concept of data-hiding and encapsulation.
Relation among modules is not always required.The modules must be related for better communication and work flow
Working from the general to the specific.Working from the specific to the general.

Question 53

Which statement is false?

  1. AOption (a)

    All function calls in C pass arguments using call by value.

  2. BOption (b)

    Call by reference enables a called function to modify a variable in calling function.

  3. COption (c)

    Call by value is always more efficient than call by reference.

  4. DOption (d)

    Programmers use pointers and indirection operation to simulate call by reference.

View answer & explanation

Correct answer

Answer: (c)C.

Call by value is always more efficient than call by reference.

Why this answer is correct

Correct answer is Call by value is always more efficient than call by reference.

  • Statement 3 (False): "Call by value is always more efficient than call by reference."
  • Call by value is not always more efficient than call by reference.
  • For small data types, call by value might be more efficient because it avoids the indirection associated with pointers.
  • However, for large data types, call by reference can be more efficient because it avoids the overhead of copying large amounts of data, instead passing only the memory address, which saves memory and improves performance.

Additional Information

  • Statement 1 (True): "All function calls in C pass arguments using call by value."
  • In C, function arguments are passed by value by default. This means the called function receives a copy of each argument.
  • Statement 2 (True): "Call by reference enables a called function to modify a variable in the calling function."
  • Call by reference (or simulating it using pointers) allows the function to modify the original variable by accessing it through its memory address.
  • Statement 4 (True): "Programmers use pointers and indirection operation to simulate call by reference."
  • In C, programmers use pointers to pass the address of variables to functions. The function can then use these pointers to modify the original variables, effectively simulating call by reference.

Question 54

Match List I with List II:

List IList II
(A)Physical layer(I)Routing of the signals divide the outgoing message into packets. to act as network controller for routing data
(B)Data link layer(II)Make and break connections, define voltages and data rates, convert data bits into electrical signal
(C)Network layer(III)Synchronization, error detection and correction. To assemble outgoing message into frames.
(D)Presentation layer(IV)It works as a translating layer
<br>

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) - (III), (C) - (IV), (D) - (I)

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (d)D.

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

Why this answer is correct

Correct answer is Option 4

Explanation:

  • Physical Layer: This layer is responsible for the physical connection between devices, including the cables, connectors, and physical characteristics of the transmission medium. It defines the physical specifications of the network, such as voltage levels, data rates, and the type of cable used.
  • Data Link Layer: The data link layer provides reliable communication between two nodes on the same physical network. It is responsible for packetizing data, error detection and correction, flow control, and media access control. This layer ensures that data is transmitted without errors and is properly received by the destination device.
  • Network Layer: The network layer provides logical addressing and routing of data between different networks. It decides how data packets are routed from the source to the destination, based on the network topology and traffic conditions. It also provides services such as fragmentation and reassembly of packets.
  • Transport Layer: The transport layer ensures the reliable delivery of data between end systems. It provides end-to-end data transfer services such as flow control, error correction, and congestion control. It also ensures that data is transmitted in the correct order, and provides mechanisms for retransmission of lost packets.
  • Session Layer: The session layer establishes, manages, and terminates communication sessions between applications on different devices. It provides services such as authentication, authorization, and synchronization of data flow between applications.
  • Presentation Layer: The presentation layer ensures that data is presented in a format that is meaningful to the application layer. It handles data encryption, decryption, compression, and translation between different data formats.
  • Application Layer: The application layer provides services to end-user applications, such as email, file transfer, and web browsing. It interacts directly with software applications and provides protocols for high-level services such as data transfer, remote file access, and email management.

Question 55

The model in which the requirements are implemented by its category is

  1. AOption (a)

    Evolutionary Development Model

  2. BOption (b)

    Waterfall Model

  3. COption (c)

    Prototyping Model

  4. DOption (d)

    Iterative Enhancement Model

View answer & explanation

Correct answer

Answer: (a)A.

Evolutionary Development Model

Why this answer is correct

The correct answer is Option 1Explanation:

  • The evolutionary process model resembles the iterative enhancement model
  • The same phases as the waterfall model are defined here in a cynical fashion.
  • This model differs from the iterative enhancement model in the sense that this does not require a usable product at the end of each cycle.
  • In evolutionary development, requirements are implemented by category rather than by priority.
  • For example, in a simple database application, one cycle might implement the graphical user interface (GUI)
  • Evolutionary development and iterative enhancement are somewhat interchanged.
  • Evolutionary development should be used when it is not necessary to provide a minimal version of the system quickly.
  • This model is useful for projects using new technology that is not well understood.

Question 56

In a game playing search tree, upto which depth α − β pruning can be applied?

(A) Root (0) level

(B) 6 level

(C) 8 level

(D) Depends on utility value in a breadth first order

Choose the correct answer from the options given below:

  1. AOption (a)

    (B) and (C) only

  2. BOption (b)

    (A) and (B) only

  3. COption (c)

    (A), (B) and (C) only

  4. DOption (d)

    (A) and (D) only

View answer & explanation

Correct answer

Answer: (d)D.

(A) and (D) only

Why this answer is correct

The correct answer is Option 4

Explanation:

  • Value of Alpha and Beta will be passed to the nodes down below (Child nodes) in forward.
  • Alpha–beta pruning can be applied to trees of any depth and it is possible to prune entire subtree rather than leaves.
  • In backward movement in the tree, only node values will be passed on
  • to the upper node as against Alpha and Beta values in the top to down
  • Value of Alpha only will be updated in tree level assigned for
  • Value of Beta only will be updated in tree level assigned for
  • The best way to arrive at a good ordering is to start from the shallowest node and check the best nodes first
  • Alpha: At each point along the Maximizer path, Alpha is the best option or the highest value . –∞ is the initial value for alpha.
  • Beta: At every point along the Minimizer route beta is initially set to +∞.
  • The condition for Alpha-beta Pruning is α >= β

Question 57

How many rotations are required during the construction of an AVL tree if the following elements are to be added in the given sequence?

35, 50, 40, 25, 30, 60, 78, 20, 28

  1. AOption (a)

    2 left rotations, 2 right rotations

  2. BOption (b)

    2 left rotations, 3 right rotations

  3. COption (c)

    3 left rotations, 2 right rotations

  4. DOption (d)

    3 left rotations, 1 right rotation

View answer & explanation

Correct answer

Answer: (c)C.

3 left rotations, 2 right rotations

Why this answer is correct

The correct answer is Option 3

Explanation:

 Left Rotate = 1 ⇒   

Right Rotate = 1 ⇒

   

Left Rotate = 1 ⇒   

Left Rotate = 1 ⇒ 

Right Rotate = 1 ⇒

Question 58

For the following page reference string 4, 3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5. the number of page faults that occur in Least Recently Used (LRU) page replacement algorithm with frame size 3 is

  1. AOption (a)

    6

  2. BOption (b)

    8

  3. COption (c)

    10

  4. DOption (d)

    12

View answer & explanation

Correct answer

Answer: (c)C.

10

Why this answer is correct

Correct answer is Option 3

Explanation: Using Least Recently Used(LRU) page replacement algorithm:

Frame size 3

444111555222
33344444411
2223333335
missmissmissmissmissmissmisshithitmissmissmiss

total number of page fault=10

Question 59

In a cache memory, if address has 9 bits in Tag field and 12 bits in index field, the size of main memory and cache memory would be respectively

  1. AOption (a)

    2 K. 4 K

  2. BOption (b)

    1024 K. 2 K

  3. COption (c)

    4 K. 2048 K

  4. DOption (d)

    2048 K. 4 K

View answer & explanation

Correct answer

Answer: (d)D.

2048 K. 4 K

Why this answer is correct

The correct answer is option 4

Explanation:Data Given:Tag field =9 bits

index field=12 bits

Main Memory address

TAG 9 bitsINDEX 12 bits

total bits= 9+ 12 =21 bits

Calculation:

Size of Main memory

= 221=21 * 220

=2*1024K

=2048k

Size of cache memory

= 2index+offset

=212+0

=212

=4k

Question 60

Fault base testing technique is

  1. AOption (a)

    Unit testing

  2. BOption (b)

    Beta testing

  3. COption (c)

    Stress testing

  4. DOption (d)

    Mutation testing

View answer & explanation

Correct answer

Answer: (d)D.

Mutation testing

Why this answer is correct

Correct answer is Option 4

Explanation:

  • Fault-based testing aims to detect certain classes of known faults.
  • Example: security testing for buffer overflows
  • Mutation Testing Fault-based testing strategy
  • It is used to evaluate test suite adequacy
  • Measures the effectiveness of test cases
  • Leads to creation of more effective tests
  • Mutation Testing Faults are introduced into the program by creating versions of the program called mutants.

Question 61

Consider the following statements of approximation algorithm:

Statement I: Vertex-cover is a polynomial time 2-approximation algorithm.

Statement II: TSP-tour is a polynomial time 3-approximation algorithm for travelling salesman problem with the triangle inequality.

Which of the following is correct?

  1. AOption (a)

    Statement I true and Statement II false

  2. BOption (b)

    Statement I and Statement II true

  3. COption (c)

    Statement I false and Statement II true

  4. DOption (d)

    Statement I and Statement II false

View answer & explanation

Correct answer

Answer: (b)B.

Statement I and Statement II true

Why this answer is correct

The correct answer is Option 2

Explanation:

  • An approximation algorithm is a way of dealing with NP-completeness for an optimization problem. This technique does not guarantee the best solution.

The goal of the approximation algorithm is to come as close as possible to the optimal solution in polynomial time.

Such algorithms are called approximation algorithms or heuristic algorithms.

A vertex cover of an undirected graph is a subset of its vertices such that for every edge (u, v) of the graph, either ‘u’ or ‘v’ is in the vertex cover. Although the name is Vertex Cover, the set covers all edges of the given graph.

  • Vertex Cover Problem is a known NP Complete problem, there is no polynomial-time solution for this unless P = NP.

There are approximate polynomial-time algorithms to solve the problem 2-approximation for vertex cover via greedy matchings.

2 - approximation for vertex cover via LP rounding.

Greedy O(log n) approximation for set-cover.

Approximation algorithms for MAX-SAT. 

  • The traveling salesman problem is NP-complete.

The TSP problem is NP-complete even if we require the cost function to satisfy the triangle inequality.

Question 62

Match List I with List II:

List IList II
(A)Least frequently used(I)Memory is distributed among processors
(B)Critical Section(II)Page replacement policy in cache memory
(C)Loosely coupled multiprocessor system(III)Program section that once begin must complete execution before another processor access the same shared resource
(D)Distributed operating system organization(IV)O/S routines are distributed among available processors.
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

The correct answer is Option 3**.**

  • Explanation: Least Recently Used is Page replacement policy in cache memory.

It works on the concept that pages that have been highly used in the past are likely to be significantly used again in the future.

It removes the page that has not been utilized in the memory for the longest time.

  • The critical section is a code segment where the shared variables can be accessed.

An atomic action is required in a critical section

i.e. only one process can execute in its critical section at a time.

All the other processes have to wait to execute in their critical sections.

  • Loosely coupled multiprocessor system

A multiprocessor is that contains more than two processors in a system.

A system is known as a loosely connected multiprocessor if there is a very low degree of coupling between these CPUs.

  • A distributed operating system (DOS) is an essential type of operating system.

Distributed systems use many central processors to serve multiple real-time applications and users.

It connects multiple computers via a single communication channel.

O/S routines are distributed among available processors.

Question 63

Let ({a, b}, *) be a semigroup, where a * a = b.

(A) a * b = b * a

(B) b * b = b

Choose the most appropriate answer from the options given below:

  1. AOption (a)

    (A) only true

  2. BOption (b)

    (B) only true

  3. COption (c)

    Both (A) and (B) true

  4. DOption (d)

    Neither (A) nor (B) true

View answer & explanation

Correct answer

Answer: (d)D.

Neither (A) nor (B) true

Why this answer is correct

The most appropriate answer is:

Neither (A) nor (B) true.

Commutative Property which is a * b = b * a is not true for semigroups.

The equation b * b = b is not true for all semigroups.

A semigroup is a set S equipped with a binary operation * that is associative, which means (a * b) * c = a * (b * c) for all a, b, c in S.

For a given semigroup, the equation b * b = b may or may not hold true. In fact, there are many semigroups where this equation is not satisfied.

For example, consider the set of non-negative integers under addition modulo 2. That is, we define a binary operation * on this set by a * b = (a + b) mod 2. This forms a semigroup, as * is associative. However, the equation b * b = b is not generally true in this semigroup. For instance, if b = 1, then 1 * 1 = 0, which is not equal to 1.

Therefore, the equation b * b = b is not generally true for all semigroups.

Question 64

Using 'RSA' algorithm, if p = 13, q = 5 and e = 7, the value of d and cipher value of '6' with (e, n) key are

  1. AOption (a)

    7, 4

  2. BOption (b)

    7, 1

  3. COption (c)

    7, 46

  4. DOption (d)

    55, 1

View answer & explanation

Correct answer

Answer: (c)C.

7, 46

Why this answer is correct

Concept: 

RSA Algorithm:

Step 1: Calculate value of n = p × q, where p and q are prime no.’s

Step 2: calculate Ø(n) = (p-1) × (q-1)

Step 3: consider d as a private key such that Ø(n) and d have no common factors. i.e  greatest common divisor (Ø(n) , d ) = 1

Step 4: consider e as a public key such that (e × d) mod Ø(n) = 1.

Step 5: Ciphertext = message i.e. me mod n.

Step 6: message= cipher text i.e. cd mod n.

Calculation:

To find the value of 'd' in the RSA algorithm, we need to calculate the modular multiplicative inverse of 'e' modulo φ(n), where n is the product of the two prime numbers p and q, and φ(n) is the Euler's totient function.

Given:

p = 13

q = 5

e = 7

ciphertext = 6

First, calculate n:

n = p × q

n = 13 × 5

n = 65

Next, calculate φ(n):

Ø(n) = (p - 1) × (q - 1)

Ø(n) = (13 - 1) × (5 - 1)

Ø(n)= 12 × 4

Ø(n) = 48

Now, we need to find the modular multiplicative inverse of 'e' modulo Ø(n). In other words, we need to find 'd' such that (e * d) mod Ø(n) = 1.

Using the extended Euclidean algorithm, we can find 'd':

Step 1: 

48 = 7 × 6 + 6

7 = 6 × 1 + 1

Step 2:

6 = 1 * 6 + 0

Since the remainder in the last step is 1, we can conclude that the greatest common divisor of 7 and 48 is 1. Therefore, 'd' exists, and it is the coefficient of 7 in the equation:

1 = 7 - 6 × 1

So, 'd' is equal to 7.

Now, to decrypt the ciphertext using the private key (d, n), we can use the formula:

plaintext = (ciphertextd) mod n

Substituting the values:

plaintext = (67) mod 65

Calculating this:

plaintext = 279936 % 65

plaintext = 46

Therefore, the value of 'd' is 7 and the plaintext (decrypted value) of the ciphertext '6' using the private key (d, n) is 46.

So, the correct answer is 7, 46.

Question 65

A classless address is given as 167.199.170.82/27. The number of addresses in the network is

  1. AOption (a)

    64 addresses

  2. BOption (b)

    32 addresses

  3. COption (c)

    28 addresses

  4. DOption (d)

    30 addresses

View answer & explanation

Correct answer

Answer: (b)B.

32 addresses

Why this answer is correct

Given:

IP address: 167.199.170.82/27.

Here, no. of mask bits = n = 27

In classless addressing, no. of address are given by 232 - n

No. of addresses = 232-27 = 25 = 2 × 2 × 2 × 2 × 2 = 32

The Correct Answer is option 2.

Question 66

Match List I with List II:

List IList II
(A)Ontological Engineering(I)Organizing subclass relations
(B)Taxonomy Hierarchy(II)Organizing knowledge into category and sub category
(C)Inheritance(III)Attaches a number with each possibility
(D)Probability mode(IV)Representing concepts, events, time, physical concepts of different domains
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  3. COption (c)

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

  4. DOption (d)

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

View answer & explanation

Correct answer

Answer: (c)C.

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

Why this answer is correct

Ontology engineering

It is a field which studies the methods and methodologies for building ontologies, which encompasses a representation, formal naming and definition of the categories, properties and relations between the concepts, data and entities.

Taxonomy hierarchy

A taxonomy in computer science is a method for organizing data. In such a taxonomy, different pieces of information are stored along with their relationships to other data in the taxonomy. This produces a hierarchy of data, which makes it easier for programmers and users to compute certain information.

Inheritance

Inheritance means one class can inherit properties and behavior of another class. This is one of principle of OOPs (Object Oriented Programming).

Probability model

A probability model is a mathematical representation of a random phenomenon. It is defined by its sample space, events within the sample space, and probabilities associated with each event.

Therefore,

(A) Ontological Engineering - (IV) Representing concepts, events, time, physical concepts of different domains

(B) Taxonomy Hierarchy - (II) Organizing knowledge into category and subcategory

(C) Inheritance - (I) Organizing subclass relations

(D) Probability model - (III) Attaches a number with each possibility

Hence, the correct answer is option 3.

Question 67

Match List I with List II:

List IList II
(A)BCNF(I)It removes multivalued dependency
(B)3 NF(II)It is not always dependency preserving
(C)2 NF(III)It removes transitive dependency
(D)4 NF(IV)It removes partial functional dependency
<br>

Choose the correct answer from the options given below:

  1. AOption (a)

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

  2. BOption (b)

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

  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: (c)C.

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

Why this answer is correct

Concept:

Normalization:- It is the process of organizing data in a database. There are two main objectives of the normalization process: eliminate redundant data and ensure data dependencies make sense.

1NF:- First normal form (1NF) is a relation in which the intersection of each row and column contains one and only one value.

2NF:- Second Normal Form (2NF) is based on the concept of fully functional dependency.

2 NF removes partial functional dependency.

3NF:- A relation is in the third normal form (3NF) if it is in the second normal form and no transitive dependencies exist.

3 NF removes Transitive dependencies.

4NF:- A group of tables that satisfies the first, second, and third normal forms are sufficiently well-designed.

4 NF removes multivalued dependency

BCNF (Boyce Codd Normal Form) is the advanced version of 3NF. A table is in BCNF if every functional dependency X→Y, X is the super key of the table. If R is found to be in BCNF, it can be safely deduced that the relation is also in 3NF, 2NF, and 1NF as the hierarchy shows.

  • BCNF is the normal form that actually removes all transitive dependencies.
  • It is a more restricted form of normalization so that the database does not end in anomalies.
  • The stage at which a table is organized is known as its normal form (or a stage of normalization
  • BCNF is not always dependency preserving.

The Correct Answer is option 3.

Question 68

For multiprocessor system, interconnection network - cross bar switch is an example of

  1. AOption (a)

    Non blocking network

  2. BOption (b)

    Blocking network

  3. COption (c)

    That varies from connection to connection

  4. DOption (d)

    Recurrent network

View answer & explanation

Correct answer

Answer: (a)A.

Non blocking network

Why this answer is correct

For a multiprocessor system, interconnection network - crossbar switch is an example of a non-blocking network.

A non-blocking network is a type of interconnection network in which concurrent communication can occur between multiple nodes without blocking. The crossbar switch is a non-blocking network because it can connect any input to any output without any blocking. This allows for efficient communication and data transfer between multiple processors, memory modules, and input/output devices in a multiprocessor system.

Henec, the correct answer is option 1.

Question 69

The number of nodes of height h in any n-element heap is atmost:

  1. AOption (a)

    ceil[n2h+1\rm\frac{n}{2^{h+1}}]

  2. BOption (b)

    n2h−1\rm\frac{n}{2^{h−1}}

  3. COption (c)

    n2h\rm\frac{n}{2^h}

  4. DOption (d)

    n−12h−1\rm\frac{n−1}{2^{h−1}}

View answer & explanation

Correct answer

Answer: (a)A.

ceil[n2h+1\rm\frac{n}{2^{h+1}}]

Why this answer is correct

Consider a binary heap of 7 nodes, i.e., n=7.

It would be a complete binary tree of height 2.

Number of nodes at height 0, i.e., at the lowest level = 4 = [720+1\rm\frac{7}{2^{0+1}}].

Number of nodes at height 1 = 2 = [721+1\rm\frac{7}{2^{1+1}}].

Number of nodes at height 2, i.e., at root level 1 = [722+1\rm\frac{7}{2^{2+1}}]

So, the correct option is option 1) ceil[n2h+1\rm\frac{n}{2^{h+1}}]

Question 70

Consider the grammer S → SbS | a.

Consider the following statements:

The string abababa has

(A) two parse trees

(B) two left most derivations

(C) two right most derivations

Which of the following is correct?

  1. AOption (a)

    All (A), (B) and (C) are true

  2. BOption (b)

    Only (B) is true

  3. COption (c)

    Only (C) is true

  4. DOption (d)

    Only (A) is true

View answer & explanation

Correct answer

Answer: (a)A.

All (A), (B) and (C) are true

Why this answer is correct

The given grammar is:

S → SbS | a

The string abababa can be derived using the:

(A) two parse trees 

(B) two left most derivative

First derivative

S → SbS

S → SbSbS

S → SbSbSbS

S → abSbSbS

S → ababSbS

S → abababS

S → abababa

Second derivative

S → SbS

S → abS

S → abSbS

S → ababS

S → ababSbS

S → abababS

S → abababa

(C) two right most derivative

First derivative

S → SbS

S → SbSbS

S → SbSbSbS

S → SbSbSba

S → SbSbaba

S → Sbababa

S → abababa

Second derivative

S → SbS

S → Sba

S → SbSba

S → Sbaba

S → SbSbaba

S → Sbababa

S → abababa

Hence, the correct answer is options 1.

Question 71

If an operating system does not allow a child process to exist when the parent process has been terminated, this phenomenon is called as-

  1. AOption (a)

    Threading

  2. BOption (b)

    Cascading termination

  3. COption (c)

    Zombie termination

  4. DOption (d)

    Process killing

View answer & explanation

Correct answer

Answer: (b)B.

Cascading termination

Why this answer is correct

Threading - It is a lightweight process that the operating system can schedule and run concurrently with other threads. The operating system creates and manages threads, and they share the same memory and resources as the program that created them. This enables multiple threads to collaborate and work efficiently within a single program.

Cascading Termination - It occurs in some systems, including VMS, which do not allow a child to exist if its parent has terminated. In such systems, if a process terminates either normally or abnormally, then all its children have to be terminated.

Zombie Termination - It is a process that has completed execution but still has an entry in the process table. This occurs for the child processes, where the entry is still needed to allow the parent process to read its child's exit status.

Process Killing - Terminating a process forcefully is called process killing.

Question 72

Which of the following is an indirect measure of product?

  1. AOption (a)

    Quality

  2. BOption (b)

    Complexity

  3. COption (c)

    Reliability

  4. DOption (d)

    All of these

View answer & explanation

Correct answer

Answer: (d)D.

All of these

Why this answer is correct

Software measurement is considered as a management tool which if conducted in an effective manner, helps the project manager and the entire software team to take decisions that lead to successful completion of the project.

Direct measures - It includes software processes like cost and effort applied and products like lines of code produced, execution speed, and other defects that have been reported.

Indirect measures - It include products like functionality, quality, complexity, reliability, maintainability, and many more. -

Question 73

Consider the following in Boolean Algebra

X: a ∨ (b ∧ (a ∨ c)) = (a ∨ b) ∧ (a ∨ c)

Y: a ∧ (b ∨ (a ∧ c)) = (a ∧ b) ∨ (a ∧ c)

a ∨ (b ∧ c) = (a ∨ b) ∧ c is satisfied if

  1. AOption (a)

    X is true

  2. BOption (b)

    Y is true

  3. COption (c)

    Both X and Y are true

  4. DOption (d)

    It does not depend on X and Y

View answer & explanation

Correct answer

Answer: (d)D.

It does not depend on X and Y

Why this answer is correct

It does depend on any of the cases i.e., X or Y as it is not satisfied any of the property of Boolean algebra.

We can solve the equation as shown below:

abcb ∧ ca ∨ (b ∧ c)a ∨ b(a ∨ b) ∧ c
0000000
0010000
0100010
0111111
1000110
1010111
1100110
1111111

Hence, the correct answer is option 4.

Question 74

Consider a memory system having address spaced at a distance of m, T = Bank cycle time and n number of banks, then the average data access time per word access in synchronous organisation is

  1. AOption (a)

    t = \(\left{\begin{array}{l} \rm m \cdot \rm\frac{T}{n} \text { for } \rm m<<n \ \rm T \text { for } m >> n \end{array}\right.\)

  2. BOption (b)

    t = \(\left{\begin{array}{l} \rm T / n \text { for } m << n \ \rm T \text { for } m >> n \end{array}\right.\)

  3. COption (c)

    t = \(\left{\begin{array}{l} \rm m \cdot T \text { for } m << n \ \rm T \text { for } m >> n \end{array}\right.\)

  4. DOption (d)

    t = \(\left{\begin{array}{l}\rm m \cdot T \text { for } \rm m << n \ \rm m/T \text { for } m >> n\end{array}\right.\)

View answer & explanation

Correct answer

Answer: (a)A.

t = \(\left{\begin{array}{l} \rm m \cdot \rm\frac{T}{n} \text { for } \rm m<<n \ \rm T \text { for } m >> n \end{array}\right.\)

Why this answer is correct

Important Point - In Synchronous Access Organisation, the address lines are common at all the banks.

We know that -

  • Distance at which address is spaced - 'm'
  • Bank Cycle Time - 'T'
  • Number of Banks - 'n'

 

Explanation - 

  • When the distance at which address is spaced is very less than the number of banks, that is, m << n, then the average data access time per word access is - m⋅Tnm \rm \cdot \rm \frac{T}{n}
  • When the distance at which address is spaced is much more than the number of banks, that is, m >> n, then the average data access time per word access is - T
  • Combining above two points, we get the average data access time per word access in synchronous organisation as - t = \(\left{\begin{array}{l} \rm m \cdot \rm\frac{T}{n} \text { for } \rm m<<n \ \rm T \text { for } m >> n \end{array}\right.\)

Question 75

Consider the language L = {anbm ∶ n ≥ 4, m ≤ 3}

Which of the following regular expression represents language L?

  1. AOption (a)

    aaaa*(λ + b + bb + bbb)

  2. BOption (b)

    aaaaa*(b + bb + bbb)

  3. COption (c)

    aaaaa*(λ + b + bb + bbb)

  4. DOption (d)

    aaaa*(b + bb + bbb)

View answer & explanation

Correct answer

Answer: (c)C.

aaaaa*(λ + b + bb + bbb)

Why this answer is correct

From the language L = {anbm ∶ n ≥ 4, m ≤ 3}, we can observe that

  • In the regular expression, there should be at least 4 a(s).
  • In the regular expression, there should be at most 3 b(s).
  • In the regular expression, b(s) should come after a(s), not the other way around.
  • From the options given above, aaaaa*(λ + b + bb + bbb), there are compulsarily 4 a(s) and then we have a*. After that, we have all possible combinations of b(s), which can be 0 to 3 at max.

Question 76

Which Metrics are derived by normalizing quality and/or productivity measures by considering the size of the software that has been produced?

  1. AOption (a)

    Function-Oriented Metrics

  2. BOption (b)

    Function-Point Metrics

  3. COption (c)

    Line of Code Metrics

  4. DOption (d)

    Size Oriented Metrics

View answer & explanation

Correct answer

Answer: (d)D.

Size Oriented Metrics

Why this answer is correct

Size Oriented Metrics - It has been derived by normalising quality and productivity Point Metrics measures by considering size of the software that has been produced. The organization builds a simple record of size measure for the software projects.

Function-Oriented Metrics - They are also known as Function Point Model. This model generally focuses on the functionality of the software application being delivered. These methods are actually independent of the programming language that is being used in software applications and based on calculating the Function Point (FP). A function point is a unit of measurement that measures the business functionality provided by the business product.

Question 77

Hidden surface removal problem with minimal 3D pipeline can be solved with

  1. AOption (a)

    Painter's algorithm

  2. BOption (b)

    Window Clipping algorithm

  3. COption (c)

    Brute force rasterization algorithm

  4. DOption (d)

    Flood fill algorithm

View answer & explanation

Correct answer

Answer: (c)C.

Brute force rasterization algorithm

Why this answer is correct

The hidden surface removal problem in computer graphics refers to the process of identifying which surfaces are visible and which are hidden from the viewer's perspective. Hidden Surface Removal (HSR) problem can also be solved using a Brute Force Rasterization algorithm in a minimal 3D graphics pipeline.

Brute force rasterization algorithm: This algorithm works by dividing the viewing window into small cells (pixels) and calculating the visibility of objects in each cell. This approach can be effective for removing hidden surfaces but can be computationally expensive for complex scenes.

Additional InformationPainter's algorithm: This algorithm works by painting surfaces in order of their distance from the viewer's viewpoint. The closest surface is painted first, followed by the next closest surface, and so on. This algorithm is relatively simple to implement and can work well for simple scenes, but it can produce incorrect results for more complex scenes.

Window Clipping algorithm: This algorithm works by defining a viewing window that only displays objects within the window. Objects that fall outside the viewing window are clipped and not displayed. This algorithm is effective for removing hidden surfaces and can work well for scenes with a limited number of object.

Flood fill algorithm: This algorithm is not typically used for hidden surface removal in 3D graphics, as it is primarily designed for 2D image processing tasks such as filling shapes with color.

Question 78

Consider the primal problem:

Maximize z = 5x1 + 12x2 + 4x3

Subject to x1 + 2x2 + x3 = 10

2x1 − x2 + 3x3 = 8

x1 . x2 . x3 ≥ 0

its dual problem is Minimize w = 10y1 + 8y2

Subject to y1 + 2y2 ≥ 5

2y1 − y2 ≥ 12

y1 + 3y2 ≥ 4

Which of the following is correct?

  1. AOption (a)

    y1 ≥ 0, y2 unrestricted

  2. BOption (b)

    y1 ≥ 0, y2 ≥ 0

  3. COption (c)

    y1, is unrestricted, y2 ≥ 0

  4. DOption (d)

    y1, is unrestricted. y2, restricted

View answer & explanation

Correct answer

Answer: (b)B.

y1 ≥ 0, y2 ≥ 0

Why this answer is correct

The conversion of a primal linear programming problem to its dual problem is a standard technique in linear programming. Here's how it can be done:

  1. Write the primal problem in standard form: Maximize the objective function subject to a set of constraints.
  2. Create the dual problem by converting the primal constraints into dual variables and the primal objective function into the dual objective function. The constraints in the primal problem become the objective function in the dual problem, and the objective function in the primal problem becomes the constraints in the dual problem.
  3. Replace each inequality constraint in the primal problem with an equality constraint, and each equality constraint with an inequality constraint.
  4. Change the direction of the inequality constraints in the dual problem. If the primal constraint was a less-than-or-equal-to constraint, the dual constraint should be a greater-than-or-equal-to constraint, and vice versa.
  5. Replace the primal variables with the dual variables, and vice versa.
  6. Solve the dual problem to obtain the optimal dual variables, and then use these variables to obtain the optimal primal variables.

Therefore,  y1 ≥ 0, y2 ≥ 0

Question 79

Of the following, which is NOT a logical error?

  1. AOption (a)

    Using the '=', instead of '= =' to determine if two values are equal

  2. BOption (b)

    Divide by zero

  3. COption (c)

    Failing to initialize counter and total variables before the body of loop

  4. DOption (d)

    Using commas instead of two required semicolon in a for loop header

View answer & explanation

Correct answer

Answer: (b)B.

Divide by zero

Why this answer is correct

"Divide by zero" is NOT a logical error it is runtime error.

Runtime errors: These occur when the program is running and something goes wrong.

For example,

  • If the program tries to divide a number by zero,
  • If it tries to access a memory location that is not accessible

Question 80

RAD software process model stands for

  1. AOption (a)

    Rapid Application Development

  2. BOption (b)

    Relative Application Development

  3. COption (c)

    Rapid Application Design

  4. DOption (d)

    Recent Application Development

View answer & explanation

Correct answer

Answer: (a)A.

Rapid Application Development

Why this answer is correct

RAD - Rapid Application Development is an adaptive software development model based on prototyping and quick feedback with less emphasis on specific planning.

  • In general, the RAD approach prioritizes development and building a prototype, rather than planning.
  • With rapid application development, developers can quickly make multiple iterations and updates to the software without starting from scratch.
  • It also helps in ensuring that the final outcome is more quality-focused and aligns with the end users’ requirements.

Question 81

Which one is a connectionless transport - layer protocol that belongs to the Internet protocol family?

  1. AOption (a)

    Transmission Control Protocol (TCP)

  2. BOption (b)

    User Datagram Protocol (UDP)

  3. COption (c)

    Routing Protocol (RP)

  4. DOption (d)

    Datagram Control Protocol (DCP)

View answer & explanation

Correct answer

Answer: (b)B.

User Datagram Protocol (UDP)

Why this answer is correct

Transmission Control Protocol (TCP) - Transmission Control Protocol (TCP) is a standard that defines how to establish and maintain a network conversation by which applications can exchange data. TCP works with the Internet Protocol (IP), which defines how computers send packets of data to each other.

User Datagram Protocol (UDP) - User Datagram Protocol (UDP) is a communications protocol that is primarily used to establish low-latency and loss-tolerating connections between applications on the internet. UDP speeds up transmissions by enabling the transfer of data before an agreement is provided by the receiving party.

  • UDP is a connectionless transport - layer protocol that belongs to the internet protocol family.

Routing Protocol (RP) - A routing protocol specifies how routers communicate with each other to distribute information that enables them to select routes between nodes on a computer network.

Datagram Control Protocol (DCP) - is a message-oriented transport layer protocol. It implements reliable connection setup, teardown, explicit congestion notification, congestion control and feature negotiation.

Question 82

The representation of 4 bit code 1101 into 7 bit, even parity Hamming code is

  1. AOption (a)

    (1010101)

  2. BOption (b)

    (1111001)

  3. COption (c)

    (1011101)

  4. DOption (d)

    (1110000)

View answer & explanation

Correct answer

Answer: (a)A.

(1010101)

Why this answer is correct

To represent the 4-bit code 1101 into a 7-bit, even parity Hamming code, we first need to add 3 parity bits to the 4 data bits. The parity bits are chosen so that the total number of 1's in each group of bits (including the parity bit) is even.

Hamming Code:

Bits1234567
Transmitted bitsP1P2d1P3d2d3d4

 

Given data 1101

i.e. d1 = 1, d2 = 1, d3 = 0, d4 = 1

We can write:

P1 = d1 ⊕ d2 ⊕ d4 = 1 ⊕ 1 ⊕ 1 = 1

P2 = d1 ⊕ d4 ⊕ d3 = 1 ⊕ 1 ⊕ 0 = 0

P3 = d2 ⊕ d4 ⊕ d3 = 1 ⊕ 1 ⊕ 0 = 0

Then transmitted final code is P1 P2 d1 P4 d2 d3 d4 which is 1010101

Question 83

The total storage capacity of a floppy disk having 80 tracks and storing 128 bytes/sector is 163840 bytes. How many sectors does this disk have?

  1. AOption (a)

    27

  2. BOption (b)

    2048

  3. COption (c)

    4K

  4. DOption (d)

    16

View answer & explanation

Correct answer

Answer: (d)D.

16

Why this answer is correct

The total storage capacity of the floppy disk can be calculated by multiplying the number of tracks, the number of sectors per track, and the number of bytes per sector.

The number of tracks on the floppy disk is 80 and the number of bytes per sector is 128. Let's assume that the number of sectors per track is "S". Then, the total storage capacity of the floppy disk can be expressed as:

Total storage capacity = number of tracks x number of sectors per track x number of bytes per sector = 80 x S x 128

We know that the total storage capacity of the floppy disk is 163,840 bytes. Therefore, we can write:

80 x S x 128 = 163840

Solving for S, we get:

S = 163840 / (80 x 128) = 16

Therefore, the floppy disk has 16 sectors.

Hence, the correct answer is option 4.

Question 84

If every requirement can be checked by a cost-effective process, then SRS is called

  1. AOption (a)

    Verifiable

  2. BOption (b)

    Tracable

  3. COption (c)

    Modifiable

  4. DOption (d)

    Complete

View answer & explanation

Correct answer

Answer: (a)A.

Verifiable

Why this answer is correct

Verifiable - an SRS is verifiable only if every stated requirement can be verified cost effectively. A requirement is verifiable if there is some method to quantifiably measure whether the final software meets that requirement. 

Traceable - an SRS is traceable if the origin of each of its requirements is clear and if it makes it easy to reference each requirement in future development.

Modifiable - an SRS must clearly identify each and every requirement in a systematic manner. If there are any changes, the specific requirements and the dependent ones can be modified accordingly without impact the others.

Complete - an SRS should contain all the features requested by a client.

Question 85

The number of gate inputs, required to realize expression ABC + AB̅CD + EF̅ + AD is

  1. AOption (a)

    12

  2. BOption (b)

    13

  3. COption (c)

    14

  4. DOption (d)

    15

View answer & explanation

Correct answer

Answer: (d)D.

15

Why this answer is correct

Concept:

To determine the number of gate inputs required to realize an expression, you need to look at the number of terms and the number of literals (variables) in each term.

In the expression you've given: ABC + AB̅CD + EF̅ + AD

There are four terms and a total of nine literals:

  • ABC has three literals.
  • AB̅CD has four literals.
  • EF̅ has two literals.
  • AD has two literals.

Each literal requires input, and each term requires a separate AND gate (because the product implies AND operations), the inputs of which are the literals. The results of these AND gates then need to be ORed together, which requires one additional OR gate with four inputs.

So, in total, the number of gate inputs required would be:

  1. AND gate inputs: 3 (for ABC) + 4 (for AB̅CD) + 2 (for EF̅) + 2 (for AD) = 11
  2. OR gate inputs: 4 (because there are four terms)

So, the total number of gate inputs required is 11 (AND) + 4 (OR) = 15.

Note that the inputs A̅, B̅, etc., are usually achieved by passing the original inputs (A, B, etc.) through NOT gates. If you are considering these NOT gates also, then there will be an additional number of 2 inputs (for B̅, F̅) added to the total count making it 17.

Question 86

There are three boxes. First box has 2 white, 3 black and 4 red balls. Second box has 3 white, 2 black and 2 red balls. Third box has 4 white, 1 black and 3 red balls. A box is chosen at random and 2 balls are drawn out of which 1 is white, and 1 is red. What is the probability that the balls came from first box?

  1. AOption (a)

    0.237

  2. BOption (b)

    0.723

  3. COption (c)

    0.18

  4. DOption (d)

    0.452

View answer & explanation

Correct answer

Answer: (a)A.

0.237

Why this answer is correct

To solve this question we will use Bayes Theorem to get reverse probability. 

Let first ball drawn is red and second ball drawn is white. Probability of choosing a box at random = 131313131313

=> Probability of drawing a red ball (R) from Box-1 (B1) = p(R | B1) = 494949494949

=> Probability of drawing a red ball (R) from Box-2 (B2) = p(R | B2) = 272727272727

=> Probability of drawing a red ball (R) from Box-3 (B3) = p(R | B3) = 383838383838

=> Probability of getting the ball from Box-1 if red ball is selected is given by - P(B1∣R)=P(B1)×p(R∣B1)P(B1)×p(R∣B1)+P(B2)×p(R∣B2)+P(B3)×p(R∣B3)=13×4913×49+13×27+13×38=224557P(B1 | R) = \frac{P(B1) \times p(R | B1)}{P(B1) \times p(R | B1)+P(B2) \times p(R | B2)+P(B3) \times p(R | B3)} = \frac{\frac{1}{3} \times \frac{4}{9}}{\frac{1}{3} \times \frac{4}{9} + \frac{1}{3} \times \frac{2}{7} + \frac{1}{3} \times \frac{3}{8}} = \frac{224}{557} ................ (1)

Now let us consider white ball is drawn second time.

=> Probability of drawing a white ball (W) from Box-1 = p(W | B1) = 28=1428=1428=1428=1428=1428=14

Code
    (Note - one ball is taken out already from Box-1)

=> Probability of drawing a white ball (W) from Box-2 = p(W | B2) = 373737373737

=> Probability of drawing a white ball (W) from Box-3 = p(W | B3) = 48=1248=1248=1248=1248=1248=12

=> Probability of getting the ball from Box−1 if white ball is selected is given by - P(B1∣W)=P(B1)×p(W∣B1)P(B1)×p(W∣B1)+P(B2)×p(W∣B2)+P(B3)×p(W∣B3)=13×1413×14+13×37+13×12=733P(B1 | W) = \frac{P(B1) \times p(W | B1)}{P(B1) \times p(W | B1)+P(B2) \times p(W | B2)+P(B3) \times p(W | B3)} = \frac{\frac{1}{3} \times \frac{1}{4}}{\frac{1}{3} \times \frac{1}{4} + \frac{1}{3} \times \frac{3}{7} + \frac{1}{3} \times \frac{1}{2}} = \frac{7}{33} ..........(2)

  • Hence probability of getting the balls from Box-1 if red ball selected first time and white ball second time = 224557×733=156818381224557×733=156818381224557×733=156818381224557×733=156818381224557×733=156818381224557×733=156818381

    Code
       ​ ............................................(3)
    

 

 

Let us consider white ball is drawn the first time.

=> Probability of drawing a white ball (W) from Box-1 = p(W | B1) = 292929292929

=> Probability of drawing a white ball (W) from Box-2 = p(W | B2) = 373737373737

=> Probability of drawing a white ball (W) from Box-3 = p(W | B3) = 48=1248=1248=1248=1248=1248=12

=> Probability of getting the ball from Box−1 if white ball is selected is given by - P(B1∣W)=P(B1)×p(W∣B1)P(B1)×p(W∣B1)+P(B2)×p(W∣B2)+P(B3)×p(W∣B3)=13×2913×29+13×37+13×12=28145P(B1 | W) = \frac{P(B1) \times p(W | B1)}{P(B1) \times p(W | B1)+P(B2) \times p(W | B2)+P(B3) \times p(W | B3)} = \frac{\frac{1}{3} \times \frac{2}{9}}{\frac{1}{3} \times \frac{2}{9} + \frac{1}{3} \times \frac{3}{7} + \frac{1}{3} \times \frac{1}{2}} = \frac{28}{145} ..........(4)

Now let us consider red ball is drawn second time.

=> Probability of drawing a red ball (R) from Box-1 (B1) = p(R | B1) = 48=1248=1248=1248=1248=1248=12

Code
    (Note - one ball is taken out already from Box-1)

=> Probability of drawing a red ball (R) from Box-2 (B2) = p(R | B2) = 272727272727

=> Probability of drawing a red ball (R) from Box-3 (B3) = p(R | B3) = 383838383838

=> Probability of getting the ball from Box-1 if red ball is selected is given by - P(B1∣R)=P(B1)×p(R∣B1)P(B1)×p(R∣B1)+P(B2)×p(R∣B2)+P(B3)×p(R∣B3)=13×1213×12+13×27+13×38=2865P(B1 | R) = \frac{P(B1) \times p(R | B1)}{P(B1) \times p(R | B1)+P(B2) \times p(R | B2)+P(B3) \times p(R | B3)} = \frac{\frac{1}{3} \times \frac{1}{2}}{\frac{1}{3} \times \frac{1}{2} + \frac{1}{3} \times \frac{2}{7} + \frac{1}{3} \times \frac{3}{8}} = \frac{28}{65} ................ (5)

Hence probability of getting the balls from Box-1 if white ball selected first time and red ball second time = 28145×2865=784942528145×2865=784942528145×2865=784942528145×2865=784942528145×2865=784942528145×2865=7849425

Code
    ​ ...........................................................(6)

 

Using (3) and (6), probability of getting two balls from Box-2 if one of then red and other one is white = 156818381+7849425=0.0863+0.08418\frac{1568}{18381} + \frac{784}{9425} = 0.0863 + 0.08418 ~ 0.18

Question 87

Which mode is a block cipher implementation as a self synchronizing stream cipher?

  1. AOption (a)

    Cipher Block Chaining Mode

  2. BOption (b)

    Cipher Feedback Mode

  3. COption (c)

    Electronic Codebook Mode

  4. DOption (d)

    Output Feedback Mode

View answer & explanation

Correct answer

Answer: (b)B.

Cipher Feedback Mode

Why this answer is correct

Cipher Block Chaining Mode - Cipher block chaining or CBC is an advancement made on ECB since ECB compromises some security requirements. In CBC, the previous cipher block is given as input to the next encryption algorithm after XOR with the original plaintext block. In a nutshell, a cipher block is produced by encrypting an XOR output of the previous cipher block and present plaintext block.

Cipher Feedback Mode - In this mode the cipher is given as feedback to the next block of encryption with some new specifications: first, an initial vector IV is used for first encryption and output bits are divided as a set of s and b-s bits.The left-hand side s bits are selected along with plaintext bits to which an XOR operation is applied. The result is given as input to a shift register having b-s bits to lhs,s bits to rhs and the process continues.

Electronic Codebook Mode - Electronic code book is the easiest block cipher mode of functioning. It is easier because of direct encryption of each block of input plaintext and output is in form of blocks of encrypted ciphertext. Generally, if a message is larger than b bits in size, it can be broken down into a bunch of blocks and the procedure is repeated.

Output Feedback Mode - The output feedback mode follows nearly the same process as the Cipher Feedback mode except that it sends the encrypted output as feedback instead of the actual cipher which is XOR output. In this output feedback mode, all bits of the block are sent instead of sending selected s bits. The Output Feedback mode of block cipher holds great resistance towards bit transmission errors. It also decreases the dependency or relationship of the cipher on the plaintext.

Question 88

A trigger is

  1. AOption (a)

    A statement that enables to start DBMS.

  2. BOption (b)

    A statement that is executed by the user when debugging an application program.

  3. COption (c)

    A condition the system tests for the validity of the database user.

  4. DOption (d)

    A statement that is executed automatically by the system as a side effect of modification to the database.

View answer & explanation

Correct answer

Answer: (d)D.

A statement that is executed automatically by the system as a side effect of modification to the database.

Why this answer is correct

In database management, a trigger is a set of instructions that are automatically executed, or "triggered," by the database management system (DBMS) in response to a specific change made to the database, such as an insert, update, or delete operation. Triggers can be used to enforce constraints, perform data validation, maintain database consistency, and implement complex business logic, among other things. They provide a way to automatically respond to changes in the database and ensure that the data remains consistent and accurate.

Question 89

Consider the following algorithms and their running times:

AlgorithmsComplexities
(A)Breadth First Search(I)θ(v + E)
(B)Rabin-Karp Algorithm(II)O(v + E)
(C)Depth-First Search(III)θ((n − m − 1)m)
(D)Heap sort (worst case)(IV)O(n2)
(E)Quick sort (worst case)(V)O(n lg n)
<br>

Which one of the following is correct?

  1. AOption (a)

    ​(A) - (III), (B) - (II), (C) - (I), (D) - (IV), (E) - (V)

  2. BOption (b)

    (A) - (II), (B) - (III), (C) - (I), (D) - (IV), (E) - (V)

  3. COption (c)

    (A) - (II), (B) - (III), (C) - (I), (D) - (V), (E) - (IV)

  4. DOption (d)

    (A) - (III), (B) - (I), (C) - (II), (D) - (IV), (E) - (V)

View answer & explanation

Correct answer

Answer: (c)C.

(A) - (II), (B) - (III), (C) - (I), (D) - (V), (E) - (IV)

Why this answer is correct

  • The time complexity of Breadth First Search (BFS) is O(V + E), where V is the number of vertices and E is the number of edges in the graph. This means that the running time of BFS grows linearly with the number of vertices and edges in the graph.
  • The time complexity of the Rabin-Karp algorithm is often described as O((n - m + 1)m), where n is the length of the text being searched and m is the length of the pattern being searched for.
  • The time complexity of Depth-First Search (DFS) is θ(V + E), where V is the number of vertices and E is the number of edges in the graph. This means that the running time of DFS grows linearly with the number of vertices and edges in the graph.
  • The worst-case time complexity of Heap Sort is O(n log n), where n is the number of elements in the input array.
  • The worst-case time complexity of Quick Sort is O(n^2), where n is the number of elements in the input array.

Question 90

Consider the following statements:

Statement I: Composite attributes cannot be divided into smaller subparts.

Statement II: Complex attribute is formed by nesting composite attributes and multi- valued attributes in an arbitrary way.

Statement III: A derived attribute is an attribute whose values are computed from other attribute.

Which of the following is correct?

  1. AOption (a)

    Statement I, Statement II and Statement III are true

  2. BOption (b)

    Statement I true and Statement II, Statement III false

  3. COption (c)

    Statement I, Statement II true and Statement III false

  4. DOption (d)

    Statement I false and Statement II, Statement III true

View answer & explanation

Correct answer

Answer: (d)D.

Statement I false and Statement II, Statement III true

Why this answer is correct

Statement I: Composite attributes cannot be divided into smaller subparts.

Explanation - False. Composite attributes can be divided into smaller subparts which represent more basic attributes and have independent meaning.

Statement II: Complex attribute is formed by nesting composite attributes and multi- valued attributes in an arbitrary way.

Explanation - True. The multi-valued and composite attributes are called 'Components' of complex attributes.

Statement III: A derived attribute is an attribute whose values are computed from other attribute.

Explanation - True. Derived attributes comprises of basic attributes.

Read the following and Answer the questions:

Consider the relational schema of sailors S. Reserves R and Boats B.

Table 1: Sailors S

SidSnameRattingAge
22Dustin745.0
29Brutus133.0
31Lubber855.5
32Andy825.5
58Rusty1035.0
64Horatio735.0
71Zorba1016.0
74Horatio935.0
85Art325.5
95Bob363.5
<br>

Table 2: Reserves R

SidBidday
2210110/10/98
2210210/10/98
2210310/8/98
2210410/7/98
3110211/10/98
3110311/6/98
3110411/12/98
641019/5/98
641029/8/98
741039/8/98
<br>

Table 3: Boats B

BidBnameColor
101Interlakeblue
102Interlakered
103Clippergreen
104Marinered

Question 91

Which of the following relational algebra query/queries computes/compute the name of sailors who have reserved boat 103?

Q1: πsname ((δbid = 103 Boats) ⋈ Sailors)

Q2: πsname (δbid = 103 (Reserves ⋈ Sailors))

Q3: πsname ((δbid = 103 Reserves) ⋈ Sailors)

  1. AOption (a)

    Both Q1 and Q3

  2. BOption (b)

    Both Q2 and Q3

  3. COption (c)

    Only Q3

  4. DOption (d)

    Only Q2

View answer & explanation

Correct answer

Answer: (d)D.

Only Q2

Why this answer is correct

The correct answer is: 4) Only Q2

Explanation:

Q1: πsname ((δbid = 103 Boats) ⋈ Sailors)

This query first selects the rows from the Boats table where Bid is 103 (δbid = 103 Boats). Then, it performs a natural join (⋈) with the Sailors table. Finally, it projects (π) the attribute Sname. However, this query is incorrect because it selects the sailors based on the boat's Bid instead of the Reserve table.

Q2: πsname (δbid = 103 (Reserves ⋈ Sailors))

This query first performs a natural join (⋈) between the Reserves and Sailors tables. Then, it selects the rows where Bid is 103 (δbid = 103). Finally, it projects (π) the attribute Sname. This query correctly retrieves the names of sailors who have reserved boat 103.

Q3: πsname ((δbid = 103 Reserves) ⋈ Sailors)

This query first selects the rows from the Reserves table where Bid is 103 (δbid = 103 Reserves). Then, it performs a natural join (⋈) with the Sailors table. Finally, it projects (π) the attribute Sname. Although this query performs the join correctly, it mistakenly selects rows based on the Bid in the Reserves table instead of the Bid in the join result.

Therefore, the only correct query that computes the name of sailors who have reserved boat 103 is Q2.

Question 92

Which of the following relational algebra query computes the names of sailor who have reserved all boats?

  1. AOption (a)

    ρ (Tempsids, (πbid Reserves)/πbid Boats) πsname ((Tempsids) ⋈ Sailors)

  2. BOption (b)

    ρ (Tempsids, (πsid, bid Reserves)/πbid Boats) πsname ((Tempsids) ⋈ Sailors)

  3. COption (c)

    ρ (Tempsids, (πsid Sailors)/πbid Boats) πsname ((Tempsids) ⋈ Sailors)

  4. DOption (d)

    ρ (Tempsids, (πsid Reserves)/πbid Boats) πsname ((Tempsids) ⋈ Boats)

View answer & explanation

Correct answer

Answer: (b)B.

ρ (Tempsids, (πsid, bid Reserves)/πbid Boats) πsname ((Tempsids) ⋈ Sailors)

Why this answer is correct

Correct option is 2) wich is :

     ρ (Tempsids, (πsid, bid Reserves)/πbid Boats) πsname ((Tempsids) ⋈ Sailors)

It can be broken down as follows:

  • πsid, bid (Reserves) / πbid (Boats) - This query computes the number of reservation records for each boat and divides the count by the number of boats, producing a relation Tempsids that includes two attributes: sid (sailor ID) and bid (boat ID).
  • (Tempsids) ⋈ Sailors - The join operator ⋈ is used to join the result of the previous query with the Sailors relation, producing a relation that contains the sailor ID, boat ID, and sailor name for each sailor who has reserved a boat.
  • ρ (Tempsids, (...) πsname (...) - The final query projects only the sailor name from the result of the join, giving us the names of sailors who have reserved a boat.

 

This query computes the names of sailors who have reserved at least one boat, by first computing the number of reservation records for each boat and dividing the count by the number of boats. It then joins this result with the Sailors relation to obtain the sailor name, and finally projects only the sailor name from the result of the join.

Question 93

Which of the following relational algebra query/queries computes/compute the names of sailors who have reserved a red boat?

Q1: πsname ((δcolor = red Boats) ⋈ Reserves ⋈ Sailors)

Q2: πsname (πsid ((πbid δcolor = red Boats) ⋈ Reserves) ⋈ Sailors)

Q3: πsname ((δcolor = red Reserves) Boats ⋈ Sailors)

  1. AOption (a)

    Both Q1 and Q2

  2. BOption (b)

    Both Q2 and Q3

  3. COption (c)

    Only Q1

  4. DOption (d)

    Only Q2

View answer & explanation

Correct answer

Answer: (a)A.

Both Q1 and Q2

Why this answer is correct

The relational algebra query that computes the names of sailors who have reserved a red boat is:

Q1: πsname ((δcolor = red Boats) ⋈ Reserves ⋈ Sailors)

Q2: πsname (πsid ((πbid δcolor = red Boats) ⋈ Reserves) ⋈ Sailors)

Explanation:

  • The δ operator is used to select only those boat records in the Boats relation that have a color of "red", represented by the condition COLOR = "red".
  • The join operator ⋈ is used to join the result of the δ operation with the Reserves relation. This results in a relation that contains only reservation records for red boats.
  • The join operator is used again to join the result of the previous join with the Sailors relation. This results in a relation that contains only reservation records for red boats and the corresponding sailor information.
  • Finally, the π operator is used to project only the sname attribute from the result of the join in first case, where as in second case it will project the sid,bid and sname attribute, giving us the names of sailors who have reserved a red boat.

Question 94

Which of the following relational algebra query computes the Sid's of sailors with age over 20 who have not reserved a red boat?

  1. AOption (a)

    πsid (δage > 20 Sailors) − πsid ((δcolor =  red Boats) ⋈ Reserves ⋈ Sailors)

  2. BOption (b)

    πsid ((δcolor = red ∧ age > 20 (Boats ⋈ Sailors ⋈ Reserves)))

  3. COption (c)

    πsid (δage < 20 Sailor's) − πsid ((δcolor = red Boats) ⋈ Reserves ⋈ Sailors)

  4. DOption (d)

    πsid (δage > 20 Sailors) ∧ πsid ((δcolor = red Boats) ⋈ Reserves ⋈ Sailor's)

View answer & explanation

Correct answer

Answer: (a)A.

πsid (δage > 20 Sailors) − πsid ((δcolor =  red Boats) ⋈ Reserves ⋈ Sailors)

Why this answer is correct

πsid (δage > 20 Sailors) − πsid ((δcolor =  red Boats) ⋈ Reserves ⋈ Sailors)

  1. We are dividing the entire query into two parts separated by '−' sign.
  2. In the first part, we will fetch a list of all the sailors who are of age greater than 20, that is, age > 20 by using 'δage > 20 Sailors'.
  3. In the second part, we will fetch those boats which are of 'red' colour by using 'δcolor =  red Boats'.
  4. Then we will join the result with Reserves and Sailors by '(δcolor =  red Boats) ⋈ Reserves ⋈ Sailors'.
  5. Finally, we will select the Sid(s) from the 4th step.
  6. Now, we will subtract the list of sid(s) we got from step 5 from step 2.

Question 95

Which of the following relational algebra query computes the names of sailors who have reserved a red and a green boat?

  1. AOption (a)

    ρ (Tempred, πsid ((δcolor = red Boats) ⋈ Reserves)), ρ (Tempgreen, πsid ((δcolor = green Boats) ⋈ Reserves)), πsname (Tempred ∩ Tempgreen) ⋈ Sailors

  2. BOption (b)

    ρ (Tempboats 2, (δcolor =  red Boats) ∩ (δcolor = green Boats)) πsname (Tempboats 2 ⋈ Reserves)

  3. COption (c)

    πsname ((δcolor = red Boats) ∩ (δcolor =  green Boats) (Tempboats 2 ⋈ Sailors ⋈ Reserves))

  4. DOption (d)

    ρ (Tempboats 2, (δcolor =  red ∧ color = green Boats) πsname (Tempboats 2 M Sailors)

View answer & explanation

Correct answer

Answer: (a)A.

ρ (Tempred, πsid ((δcolor = red Boats) ⋈ Reserves)), ρ (Tempgreen, πsid ((δcolor = green Boats) ⋈ Reserves)), πsname (Tempred ∩ Tempgreen) ⋈ Sailors

Why this answer is correct

correct option is 1)

ρ (Tempred, πsid ((δcolor = red Boats) ⋈ Reserves)), ρ (Tempgreen, πsid ((δcolor = green Boats) ⋈ Reserves)), πsname (Tempred ∩ Tempgreen) ⋈ Sailors

It can be broken down as follows:

  • π sid ((δcolor = red Boats) ⋈ Reserves)) - This query selects the sailor IDs for all sailors who have reserved a red boat by selecting the reservation records for red boats and projecting only the sailor ID from the result. The result of this query is renamed to Tempred.
  • π sid ((δcolor = green Boats) ⋈ Reserves)) - This query does the same as the previous query, but for green boats instead of red boats. The result of this query is renamed to Tempgreen.
  • Tempred ∩ Tempgreen - The intersection operator ∩ is used to find the sailor IDs that appear in both Tempred and Tempgreen, i.e., the sailor IDs of sailors who have reserved both red and green boats.
  • π sname (Tempred ∩ Tempgreen) ⋈ Sailors - Finally, the result of the intersection is joined with the Sailors relation using the join operator ⋈, and the sailor name is projected from the result to give us the names of sailors who have reserved both red and green boats.

 

This query computes the names of sailors who have reserved both red and green boats. It does so by selecting the sailor IDs for sailors who have reserved red and green boats, intersecting the results to find the sailor IDs of sailors who have reserved both, and then joining this result with the Sailors relation to obtain the sailor names.

Based on the following passage, answer the Questions:

A 3000 km long trunk operates at 1.536 mbps and is used to transmit 64 bytes frames and uses sliding window protocol. The propagation speed is 6 μ sec/km.

Question 96

The sender window size to get the maximum efficiency is

  1. AOption (a)

    108

  2. BOption (b)

    109

  3. COption (c)

    54

  4. DOption (d)

    56

View answer & explanation

Correct answer

Answer: (c)C.

54

Why this answer is correct

The maximum efficiency of the sliding window protocol is achieved when the sender window size is equal to the product of the bandwidth-delay product and the packet size.

The bandwidth-delay product is calculated as the product of the bandwidth (in bits per second) and the propagation delay (in seconds). In this case, the bandwidth is 1.536 Mbps and the propagation delay is 6 μs/km * 3000 km = 18000 μs.

So the bandwidth-delay product is 1.536 * 106 * 18000 * 10-6 = 27648 bits.

The packet size is 64 bytes, which is 64 * 8 = 512 bits.

So the maximum efficiency is achieved when the sender window size is equal to the bandwidth-delay product divided by the packet size, or 27648 / 512 = 54.

Therefore, the sender window size to get the maximum efficiency is 54.

Question 97

The maximum achievable throughput is

  1. AOption (a)

    0.768

  2. BOption (b)

    0.672

  3. COption (c)

    0.901

  4. DOption (d)

    0.887

View answer & explanation

Correct answer

Answer: (b)B.

0.672

Why this answer is correct

Concept:

The maximum achievable throughput is determined by the number of packets that can be transmitted over the link in a given amount of time. This is limited by the size of the sender window, the round-trip time (RTT), and the packet size.

Explanation:

In this case, the maximum achievable throughput can be calculated as the product of the sender window size, the packet size, and the number of packets that can be transmitted in one RTT.

Since we have already determined the maximum sender window size to be 54, the packet size is 64 bytes or 512 bits, and the RTT is calculated as

2 × propagation delay = 2 × 6 μs/km × 3000 km = 36000 μs.

So, the maximum achievable throughput can be calculated as:

54 × 512 bits / (RTT in seconds) = 54 × 512 bits / (36000 × 10-6) = (54 × 512) / 36 = 672 Mbps = 0.672 Gbps

Question 98

The transmission and propagation delays are respectively

  1. AOption (a)

    Tr = 333.33 μ sec, Tp = 18000 μ sec

  2. BOption (b)

    Tr = 300 μ sec, Tp = 15360 μ sec

  3. COption (c)

    Tr = 33.33 μ sec, Tp = 1800 μ sec

  4. DOption (d)

    Tr = 1800 μ sec, Tp = 33.33 μ sec

View answer & explanation

Correct answer

Answer: (a)A.

Tr = 333.33 μ sec, Tp = 18000 μ sec

Why this answer is correct

Transmission Delay 

Tr = Packet size / Bandwidth

= 64 bytes / 1.536 Mbps

= (64 × 8 bits) / (1.536 × 106 bits per sec)

= 333.33 μsec

Propagation Delay 

For 1 km, propagation delay = 6 μsec

For 3000 km, propagation delay Tp = 3000 × 6 μsec = 18000 μsec

Hence the option 1) is correct.

Question 99

The minimum number of bits required in the sequence number field of the packet is

  1. AOption (a)

    6 bits

  2. BOption (b)

    7 bits

  3. COption (c)

    5 bits

  4. DOption (d)

    4 bits

View answer & explanation

Correct answer

Answer: (b)B.

7 bits

Why this answer is correct

First we find the Transmission Delay

= Packet size / Bandwidth

= 64 bytes / 1.536 Mbps

= (64 × 8 bits) / (1.536 × 106 bits per sec)

= 333.33 μsec

Then we find the Propagation Delay

For 1 km, propagation delay = 6 μsec

For 3000 km, propagation delay = 3000 x 6 μsec = 18000 μsec

Value of a is calculated by  :

= Tp / Tt

= 18000 μsec / 333.33 μsec

= 54

Bits required in sequence number field

= ⌈log2(1+2 x a)⌉

= ⌈log2(1 + 2 x 54)⌉

= ⌈log2(109)⌉

= ⌈6.76⌉

= 7 bits

Hence, option 2) is correct.

Question 100

If only 6 bits are reserved for sequence number field, then the efficiency of the system is

  1. AOption (a)

    0.587

  2. BOption (b)

    0.875

  3. COption (c)

    0.578

  4. DOption (d)

    0.50

View answer & explanation

Correct answer

Answer: (a)A.

0.587

Why this answer is correct

Concept:

If only 6 bits are reserved in the sequence number field, then

Maximum sequence numbers possible = 26 = 64

Efficiency = (Sender window size in the protocol / Optimal sender window size)

Calculation:

Optimal sender window size is calculated by  :

= 1 + 2 × (Tp / Tt )

= 1 + 2 × (18000 μsec / 333.33 μsec)

= 1 + 2 × (54) 

= 109

Efficiency = 64 / 109 = 0.587

100 questions in the full paper