GATE 2023
65 questions
MCQ 34 · MSQ 15 · NAT 161-mark 30 · 2-mark 35
Questions 16–20 of 65
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
Answer: (A)
Degree (arity) means how many attributes (columns) the relation schema has.
The count of tuples (rows) is named the cardinality.
Answer: Number of attributes of its relation schema
The count of tuples (rows) is named the cardinality.
Answer: Number of attributes of its relation schema
Suppose two hosts are connected by a point-to-point link and they are configured to use Stop-and-Wait protocol for reliable data transfer. Identify in which one of the following scenarios, the utilization of the link is the lowest.
Answer: (B)
In Stop-and-Wait, the link utilization , where .
Utilization is at its lowest when has the biggest value:
- A longer link gives a larger
- A higher transmission rate gives a smaller
Answer: Longer link length and higher transmission rate
Utilization is at its lowest when has the biggest value:
- A longer link gives a larger
- A higher transmission rate gives a smaller
Answer: Longer link length and higher transmission rate
Let and
Let det(A) and det(B) denote the determinants of the matrices A and B, respectively.
Which one of the options given below is TRUE?
Let det(A) and det(B) denote the determinants of the matrices A and B, respectively.
Which one of the options given below is TRUE?
Answer: (B)
The rows of are the rows of taken in this order: . So is with row 1 and row 3 swapped.
Swapping two rows changes the sign of the determinant: .
Expanding the determinant gives , which is not zero. So:
(A) is false, because .
(C) is false, because .
(D) is false, because , while .
Answer: (B)
Swapping two rows changes the sign of the determinant: .
Expanding the determinant gives , which is not zero. So:
(A) is false, because .
(C) is false, because .
(D) is false, because , while .
Answer: (B)
Consider the following definition of a lexical token for an identifier in a programming language, using extended regular expressions:
Which one of the following Non-deterministic Finite-state Automata with - transitions accepts the set of valid identifiers? (A double-circle denotes a final state)
Which one of the following Non-deterministic Finite-state Automata with - transitions accepts the set of valid identifiers? (A double-circle denotes a final state)
Answer: (C)
A valid identifier starts with one letter. After that it can have any mix of letters and digits.
- (A): The edge lets a string skip the first letter. So "1" or the empty string is accepted so this is wrong.
- (B): Once a branch is chosen, only letters or only digits can follow. So "a1b" is rejected so this is wrong.
- (C): One letter comes first. Then, from the final state, the loop takes any number of letter-or-digit steps so this is correct.
- (D): It forces "letter digit" pairs. So "ab" is rejected so this is wrong.
Answer: C
- (A): The edge lets a string skip the first letter. So "1" or the empty string is accepted so this is wrong.
- (B): Once a branch is chosen, only letters or only digits can follow. So "a1b" is rejected so this is wrong.
- (C): One letter comes first. Then, from the final state, the loop takes any number of letter-or-digit steps so this is correct.
- (D): It forces "letter digit" pairs. So "ab" is rejected so this is wrong.
Answer: C
An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let be the number of keys, be the number of slots in the hash table, and .
Which one of the following is the best hashing strategy to counteract the adversary?
Which one of the following is the best hashing strategy to counteract the adversary?
Answer: (C)
The adversary knows any fixed hash function, whether it is the division method or the multiplication method. So the adversary can choose keys that all collide.
Universal hashing chooses the hash function at random from a family of functions while the program runs. The adversary cannot predict which function will be used, so the expected number of collisions stays small.
Answer: Universal hashing method
Universal hashing chooses the hash function at random from a family of functions while the program runs. The adversary cannot predict which function will be used, so the expected number of collisions stays small.
Answer: Universal hashing method