Question 21
Question 22
Question 23
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following is TRUE?
I. Quicksort runs in Θ(n2) time
II. Bubblesort runs in Θ(n2) time
III. Mergesort runs in Θ(n) time
IV. Insertion sort runs in Θ(n) time
Question 24
Question 25
N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed. An algorithm performs the following operations on the list in this order: Θ(N) delete, O(log N) insert, O(log N) find, and Θ(N) decrease-key What is the time complexity of all these operations put together?
Question 26
The number of states in the minimum sized DFA that accepts the language defined by the regular expression (0+1)*(0+1)(0+1)* is __________________ [Note that this question was originally asked as Fill-in-the-Blanks type]
Question 27
Language L1 is defined by the grammar: S1 -> aS1b | ε Language L2 is defined by the grammar: S2 -> abS2 | εConsider the following statements:
P: L1 is regular Q: L2 is regularWhich one of the following is TRUE?
Question 28
L1 Regular, L2: Context-free, L3: Recursive, L4: Recursively enumerable.Which of the following is/are TRUE?
I. L3\' U L4 is recursively enumerable II. L2 U L3 is recursive III. L1* U L2 is context-free IV. L1 U L2\' is context-free
Question 29
Question 30
There are 65 questions to complete.