Question: PART B Candidates should answer any TWO questions from Part B . Question 2 ( a ) Using the Master theorem write the time complexity
PART B
Candidates should answer any TWO questions from Part B
Question
a Using the Master theorem write the time complexity of the following, making every step clear:
marks
b
i Design a contextfree grammar that accepts the language of all binary strings in which the number of s is greater than the number of s For example, and should be accepted while and should not.
marks
ii Modify your contextfree grammar to accept the language of all binary strings in which the number of s is greater than the number of s AND all s appear before s For example, and should be accepted while and should not.
marks
c Design a Turing Machine for the following language:
means reverse of w For example, abb then bba. So strings such as "abba" and "bbaabb" should be accepted while strings such as "ababa" and "abab" should not.
marks
d Among quick sort, insertion sort, merge sort, and bubble sort, which one can sort a list which is almost sorted faster ie more than of elements are in the right place Explain your reasoning.
marks
e Design a finite state machine to accept all binary strings containing at least one occurrence of For example, and should be accepted while should not.
marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
