Question 1 |

Which one of the following statements is TRUE for all positive functions f(n)?

f(n^2)=\theta (f(n)^2), where f(n) is a polynomial | |

f(n^2)=o (f(n)^2) | |

f(n^2)=O (f(n)^2), where f(n) is an exponential function | |

f(n^2)=\Omega (f(n)^2) |

Question 1 Explanation:

Question 2 |

Which one of the following regular expressions correctly represents the language of the finite automaton given below?

ab*bab* + ba*aba* | |

(ab*b)*ab* + (ba*a)*ba* | |

(ab*b + ba*a)*(a* + b*) | |

(ba*a + ab*b)*(ab* + ba*) |

Question 2 Explanation:

Question 3 |

Which one of the following statements is TRUE?

The LALR(1) parser for a grammar G cannot have reduce-reduce conflict if the
LR(1) parser for G does not have reduce-reduce conflict.
| |

Symbol table is accessed only during the lexical analysis phase. | |

Data flow analysis is necessary for run-time memory management. | |

LR(1) parsing is sufficient for deterministic context-free languages. |

Question 3 Explanation:

Question 4 |

In a relational data model, which one of the following statements is TRUE?

A relation with only two attributes is always in BCNF. | |

If all attributes of a relation are prime attributes, then the relation is in BCNF. | |

Every relation has at least one non-prime attribute. | |

BCNF decompositions preserve functional dependencies. |

Question 4 Explanation:

Question 5 |

Consider the problem of reversing a singly linked list. To take an example, given the linked list below,

the reversed linked list should look like

Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1) space?

the reversed linked list should look like

Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1) space?

The best algorithm for the problem takes \theta(n) time in the worst case. | |

The best algorithm for the problem takes \theta(n \log n) time in the worst case. | |

The best algorithm for the problem takes \theta(n^2) time in the worst case. | |

It is not possible to reverse a singly linked list in O(1) space. |

Question 5 Explanation:

There are 5 questions to complete.

Gate 2022 CSE question paper and solution.

Practice Previous year GATE CSE Topicwise questions with detail Solution.