GATE 2026 (Session 2)
65 questions
MCQ 35 · MSQ 11 · NAT 191-mark 30 · 2-mark 35
Questions 26–30 of 65
Let be a binary relation on the set , where if the product of and is square of an integer. Which of the following properties is/are satisfied by ?
One or more options are correct.
Answer: (A), (B), (C)
A pair is in R only when is a perfect square.
- Reflexive: is always a perfect square. So for every . Holds.
- Symmetric: We have . So if is a perfect square, then is one too, as it is the same number. Holds.
- Transitive: Write each number as , where is its square-free part. Then is a perfect square exactly when and have the same square-free part. This "same square-free part" relation is a true equivalence relation, so it is transitive. If share a square-free part, and share the same square-free part, then share it too. So is a perfect square. Holds.
- Antisymmetric: Take a counterexample: gives . So , and by symmetry also, but still . Fails.
Answer: Reflexive, Symmetric and Transitive all hold (R is an equivalence relation). Antisymmetric does not hold.
- Reflexive: is always a perfect square. So for every . Holds.
- Symmetric: We have . So if is a perfect square, then is one too, as it is the same number. Holds.
- Transitive: Write each number as , where is its square-free part. Then is a perfect square exactly when and have the same square-free part. This "same square-free part" relation is a true equivalence relation, so it is transitive. If share a square-free part, and share the same square-free part, then share it too. So is a perfect square. Holds.
- Antisymmetric: Take a counterexample: gives . So , and by symmetry also, but still . Fails.
Answer: Reflexive, Symmetric and Transitive all hold (R is an equivalence relation). Antisymmetric does not hold.
For a real number , let . Which of the following statements is/are true?
One or more options are correct.
Answer: (A), (C)
The middle term is an odd function of . So its integral over the symmetric interval is exactly , whatever the value of . Only the even part is left:
So for every real , and the value does not depend on at all. Since it is always , there is a value of (in fact, every value) for which is a positive real number. But no makes it negative, and the value does not "vary."
Answer: I(a) is independent of a; and there exists a for which I(a) is positive (true for every a, since I(a)=4 always).
In a system, numbers are represented using -bit two's complement form. Consider four numbers and in the system. Which of the following operations will result in arithmetic overflow?
One or more options are correct.
Answer: (B), (D)
First, change each 4-bit two's complement number into its signed decimal value. To do this, invert the bits and add when the leading bit is . The values are: . With bits in two's complement, the range is . If a result is outside this range, overflow occurs.
- → inside the range. No overflow.
- → less than . Overflow.
- → inside the range. No overflow.
- → less than . Overflow.
Answer: N2+N3 and N1+N4 give arithmetic overflow.
- → inside the range. No overflow.
- → less than . Overflow.
- → inside the range. No overflow.
- → less than . Overflow.
Answer: N2+N3 and N1+N4 give arithmetic overflow.
Which of the following grammars is/are ambiguous?
One or more options are correct.
Answer: (B), (C)
A grammar is ambiguous if some string has two different parse trees.
- : it makes only . Each use of adds one a and one b around the middle, and ends it, so every string has one parse tree. Unambiguous.
- : the string has two parse trees. In one, the root is and the right is , which gives . In the other, the root is and the left is , which gives . Ambiguous.
- : the string has two parse trees. One uses (the root has children and ), and the other uses (the root has children and ), with the inner going to in both. Ambiguous.
- : it is only right recursive, and has exactly one derivation (use times, then ). Unambiguous.
Answer: (B), (C)
- : it makes only . Each use of adds one a and one b around the middle, and ends it, so every string has one parse tree. Unambiguous.
- : the string has two parse trees. In one, the root is and the right is , which gives . In the other, the root is and the left is , which gives . Ambiguous.
- : the string has two parse trees. One uses (the root has children and ), and the other uses (the root has children and ), with the inner going to in both. Ambiguous.
- : it is only right recursive, and has exactly one derivation (use times, then ). Unambiguous.
Answer: (B), (C)
The keys are inserted into a hash table using the hash function . The collisions are resolved by chaining. After all the keys are inserted, the length of the longest chain is ________. (answer in integer)
Answer: 3
First find for every key. Then put the keys with the same value into one chain:
The chains are: bucket has (length ); bucket has (length ); bucket has (length ); bucket has (length ); bucket has (length ).
The longest chain is of length . It is in bucket and holds .
Answer: 3
The chains are: bucket has (length ); bucket has (length ); bucket has (length ); bucket has (length ); bucket has (length ).
The longest chain is of length . It is in bucket and holds .
Answer: 3