GATE 2014 (Session 2)
65 questions
MCQ 42 · NAT 231-mark 30 · 2-mark 35
Questions 26–30 of 65
Let denotes that language A is mapping reducible (also known as many-to-one reducible) to language B. Which one of the following is FALSE?
Answer: (D)
When holds, A is "no harder" than B. So if B is decidable or RE, A is too. If A is undecidable, B is undecidable too. Options 1, 2 and 3 are true.
Option 4 is false: B not being RE tells us nothing about A. For example, a decidable (non-trivial) language A reduces to the complement of the halting problem, which is not RE, yet A is RE.
Answer: If and B is not RE then A is not RE
Option 4 is false: B not being RE tells us nothing about A. For example, a decidable (non-trivial) language A reduces to the complement of the halting problem, which is not RE, yet A is RE.
Answer: If and B is not RE then A is not RE
Consider the grammar defined by the following production rules, with two operators * and +
S T *P
T U| T*U
P Q +P |Q
Q Id
U Id
Which one of the following is TRUE?
S T *P
T U| T*U
P Q +P |Q
Q Id
U Id
Which one of the following is TRUE?
Answer: (B)
Look at each operator in turn:
- The rule recurses on the left side, so is left associative.
- The rule recurses on the right side, so is right associative.
Answer: (B)
- The rule recurses on the left side, so is left associative.
- The rule recurses on the right side, so is right associative.
Answer: (B)
Which one of the following is NOT performed during compilation?
Answer: (A)
The compiler carries out type checking, symbol table management and inline expansion.
Dynamic memory allocation (malloc/new) takes place only at run time, when the program is running.
Answer: Dynamic memory allocation
Dynamic memory allocation (malloc/new) takes place only at run time, when the program is running.
Answer: Dynamic memory allocation
Which one of the following is TRUE?
Answer: (C)
Requirements validation checks that the written requirements are what the customer really wants. A prototype lets users try the system early and spot missing or wrong requirements, so prototyping is a validation method.
(A) is wrong: a requirements document says what the system must do, not how it is implemented.
(B) is wrong: complete and consistent requirements are very hard to reach in practice.
(D) is wrong: a requirements review looks for errors in the requirements, not in the system design.
Answer: (C)
(A) is wrong: a requirements document says what the system must do, not how it is implemented.
(B) is wrong: complete and consistent requirements are very hard to reach in practice.
(D) is wrong: a requirements review looks for errors in the requirements, not in the system design.
Answer: (C)
A FAT (file allocation table) based file system is being used and the total overhead of each entry in the FAT is 4 bytes in size. Given a 100x bytes disk on which the file system is stored and data block size is bytes, the maximum size of a file that can be stored on this disk in units of bytes is _______.
Answer: 99.55 to 99.65
Count of blocks on the disk = . Each block gets one FAT entry.
Space taken by the FAT = bytes.
Largest file that can be stored = bytes.
Answer: 99.6
Space taken by the FAT = bytes.
Largest file that can be stored = bytes.
Answer: 99.6