GATE 2026 (Session 1)
65 questions
MCQ 28 · MSQ 24 · NAT 131-mark 30 · 2-mark 35
Questions 31–35 of 65
In the context of relational database normalization, which of the following statements is/are true?
One or more options are correct.
Answer: (A), (B), (C)
(A) 3NF: True. The synthesis algorithm, run on a minimal cover of the FDs, always gives a decomposition into 3NF that is lossless and dependency preserving.
(B) 1NF: True. 1NF only needs atomic values, so no decomposition is needed and no dependency is lost.
(C) BCNF: True, a dependency-preserving BCNF decomposition is not always possible. Example: with and . The keys are and . breaks BCNF because is not a superkey. Splitting on it gives and , and no relation holds both , and , so is lost.
(D) 2NF: False. A dependency-preserving 3NF decomposition always exists, and every 3NF relation is in 2NF. So a dependency-preserving 2NF decomposition is always possible, and "not always possible" is wrong.
Answer: (A), (B), (C)
(B) 1NF: True. 1NF only needs atomic values, so no decomposition is needed and no dependency is lost.
(C) BCNF: True, a dependency-preserving BCNF decomposition is not always possible. Example: with and . The keys are and . breaks BCNF because is not a superkey. Splitting on it gives and , and no relation holds both , and , so is lost.
(D) 2NF: False. A dependency-preserving 3NF decomposition always exists, and every 3NF relation is in 2NF. So a dependency-preserving 2NF decomposition is always possible, and "not always possible" is wrong.
Answer: (A), (B), (C)
Consider the function defined as follows:
where .
If is continuous at , then ________. (answer in integer)
where .
If is continuous at , then ________. (answer in integer)
Answer: 3
The function must be continuous at , so we need .
When , we have , but . The overall limit must be a finite number, so the coefficient of this growing term has to be zero:
.
Put and the limit becomes . Set this equal to and we get .
So .
Answer: 3
When , we have , but . The overall limit must be a finite number, so the coefficient of this growing term has to be zero:
.
Put and the limit becomes . Set this equal to and we get .
So .
Answer: 3
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with nodes is ________.(answer in integer)
Answer: 11
A full binary tree is one where each node has either or children. Let the number of internal nodes (with 2 children) be and the number of leaves be . Then , and the total number of nodes is .
Here, with , we get internal nodes and leaves.
To maximize the height, make the tree as skewed (chain-like) as possible, while every internal node still has 2 children. Each internal node except the last one in the chain has one leaf child and one internal child that continues the chain. The last internal node has two leaf children.
This chain uses exactly internal nodes on the main path. The deepest leaves come right after the th internal node. So the longest root-to-leaf path has edges.
Answer: 11
Here, with , we get internal nodes and leaves.
To maximize the height, make the tree as skewed (chain-like) as possible, while every internal node still has 2 children. Each internal node except the last one in the chain has one leaf child and one internal child that continues the chain. The last internal node has two leaf children.
This chain uses exactly internal nodes on the main path. The deepest leaves come right after the th internal node. So the longest root-to-leaf path has edges.
Answer: 11
Consider the following program in C:
Note: Assume that the program compiles and runs successfully.
#include <stdio.h>
void func(int i, int j) {
if(i < j) {
int i = 0;
while (i < 10) {
j += 2;
i++;
}
}
printf("%d", i);
}
int main() {
int i = 9, j = 10;
func(i, j);
return 0;
} The output of the program is ________. (answer in integer)Note: Assume that the program compiles and runs successfully.
Answer: 9
Follow the call . Inside func, the parameters are . They are separate copies of the variables in main.
1. The condition , that is , is true. So the program goes into the block.
2. In the block, a new variable is declared. It is local to this block. It hides the outer parameter only inside the block.
3. The while loop keeps running while the inner . It runs times. Each time it does , which changes the outer parameter . It also adds 1 to the inner , which goes from up to . Then the loop stops.
4. When the block ends, the inner is gone. Nothing in the block ever changed the outer parameter , whose value is .
5. uses the outer parameter , which is still .
Answer: 9
1. The condition , that is , is true. So the program goes into the block.
2. In the block, a new variable is declared. It is local to this block. It hides the outer parameter only inside the block.
3. The while loop keeps running while the inner . It runs times. Each time it does , which changes the outer parameter . It also adds 1 to the inner , which goes from up to . Then the loop stops.
4. When the block ends, the inner is gone. Nothing in the block ever changed the outer parameter , whose value is .
5. uses the outer parameter , which is still .
Answer: 9
Consider a system consisting of instances of a resource , being shared by processes. Assume that each process requires a maximum of two instances of resource and a process can request or release only one instance at a time. Further, a process can request the second instance of the resource only after acquiring the first instance.
The minimum value of for the system to be deadlock-free is ________. (answer in integer)
The minimum value of for the system to be deadlock-free is ________. (answer in integer)
Answer: 6
This question uses the standard resource-count rule for staying free of deadlock. Each of the processes needs at most instances of .
The system is deadlock-free if one process can always finish, even in the worst case. In the worst case, every process holds one instance and waits for its second. If at least one process can then get its second instance, it finishes and releases both. The other processes can then go on one after another.
Worst case: each of the processes already holds instance. This uses up instances. One more instance must be free, so that one waiting process can get its 2nd instance and complete.
So the minimum is .
Answer: 6
The system is deadlock-free if one process can always finish, even in the worst case. In the worst case, every process holds one instance and waits for its second. If at least one process can then get its second instance, it finishes and releases both. The other processes can then go on one after another.
Worst case: each of the processes already holds instance. This uses up instances. One more instance must be free, so that one waiting process can get its 2nd instance and complete.
So the minimum is .
Answer: 6