0% found this document useful (0 votes)
21 views2 pages

Assignment1

This document outlines the first assignment for a Theory of Computation course, requiring students to answer questions related to regular languages, representations using various computational models, and a context-free grammar. Students must submit their work as a single PDF file by the specified due date and are warned against plagiarism. The assignment includes specific questions on determining the regularity of languages and representing expressions using NFA, DFA, CFG, and PDA.

Uploaded by

shubhodeepk2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Assignment1

This document outlines the first assignment for a Theory of Computation course, requiring students to answer questions related to regular languages, representations using various computational models, and a context-free grammar. Students must submit their work as a single PDF file by the specified due date and are warned against plagiarism. The assignment includes specific questions on determining the regularity of languages and representing expressions using NFA, DFA, CFG, and PDA.

Uploaded by

shubhodeepk2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

INFO47546 Theory of Computation

Assignment1
• Answer the questions below, showing all relevant work and the meth-
ods used to obtain your results. Answers may only be submitted as a
single PDF (.pdf ) file.

• Submit your answers on SLATE by the due date specified on SLATE.

• This is an individual assignment. Assignments copied in whole or in


part will receive a grade of ZERO.

Question1: (10 marks) Determine if each of the following languages are regular.
Prove your answers by representing the language using a regular ex-
pression or NFA, or by using the pumping lemma.

a) La = {w ∈ {0, 1}∗ | w has more 1s than 0s}


b) Lb = {w ∈ {0, 1}∗ | w contains the answer to life the universe
and everything}
c) Lc = {w ∈ {0, I, F, 1, T, H, A, N, 2, 3, 4, 5, 6, 7, 8, 9, O, M, G}∗ | w
is a valid course code for a math course in the Sheridan Bachelor
of Computer Science Degree }
d) Ld = {w ∈ {t, r, i, c, k, y}∗ | w contains exactly two t’s, three y’s,
and no r’s }
e) Le = L(M ) where M is described by the following python code:

[email protected] Page 1
INFO47546 Theory of Computation

Question2: (4 marks) Represent 1∗ ◦ 0 ◦ 0 ◦ (1 ◦ 0)∗ using a:

a) NFA
b) DFA
c) CFG
d) PDA

Question3: Let EV IL = ({S, A, B, C, D, E}, {e, v, i, l, s, , ε}, R, S) be a CFG


where R is described by:

S→B |C
A→e|v |i|l|s|
B → ABA | ε
C → DCE | v
D → le
E → el

a) (4 marks) Determine if wi ∈ L(EV IL) for 1 ≤ i ≤ 4.


Explain each of your answers.
• w1 = evil lie
• w2 = level
• w3 = lelevelels
• w4 = live evil
b) (2 marks) Is L(EV IL) a regular language?
Explain/prove your answer (very carefully!).

[email protected] Page 2

You might also like