CP50004E Theory of Computation Assignment – UK

Module Code :-  CP50004E
Weighting :-  100%
Element :- 1
Type :-  Written submission
Learning outcomes:
1. Understand the concepts and applications of finite auto mata
2. Understand and reason about the concepts of language grammars and regular expressions in computer programming
3. Use computational complexity theories such as P NP and NP-Complete to analyse the efficiency of algorithms
CP50004E Theory of Computation Assignment – UK

CP50004E Theory of Computation Assignment

Task details :-
Answer the following questions:
1. Consider the language L of all strings made of the symbols 0 1 that every
appearance of 0 is followed immediately by a 1.
a.Construct an FA whose language in L.
b. Give an RE for the language in L.
c. From the RE build a Context-Free Grammar (CFG) for L and covert it to CNF.
d. From the FA build a regular grammar for L.

2.Consider the following NFA with Σ = {0, 1}

CP50004E Theory of Computation Assignment

a.Covert the NFA to DFA.
b. Find the regular expression for the FA.
c.Explain in English the language accepted by the FA.

CP50004E Theory of Computation Assignment – UK

3.Consider the following CFG with starting variable S and Σ = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}:
S → M U V
U → N | ε
V → V V | N
N → M | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
M → 1 | 2

a.Create a derivation tree for your student number.
b. Is this grammar ambiguous or unambiguous? Briefly explain why.
c. Convert the CFG into Chomsky Normal Form.

4.Consider the language           for x, y ≥ 1 and the Σ = {0, 1}:
CP50004E Theory of Computation Assignment a. Construct a Pushdown Automaton (PDA) that recognise the language.
b. Explain in your own words how this PDA recognises the language.

CP50004E Theory of Computation Assignment – UK

5.Draw and describe the following Touring Machines (TMs) as required:
a. Draw and describe a TM that copies the input string in reverse order separating the first copy from the second copy by a special symbol. For example if the input string on the tape is 1000 the TM should end with 1000$0001 on the tape.

b. Draw and describe a TM that computes the addition of two binary numbers. For example if the input string on tape is 101$111 the TM should end with 1100 on the tape.

ORDER This CP50004E Theory of Computation Assignment NOW And Get Instant Discount

Order Your Assignment