Assignment One

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

THE CO-OPERATIVE UNIVERSITY OF KENYA

SCHOOL OF COMPUTING AND MATHEMATICS


UNIVERSITY EXAMINATIONS 2022 / 2023
UNIT CODE: BCSC 3155 UNIT NAME: AUTOMATA THEORY
BSC IN SOFTWARE ENGINEERING
ASSIGNMENT ONE (1)
INSTRUCTIONS:
 Attempt ALL the questions
 Use illustrations where appropriate
 Submit your answers in a single PDF file on eMasomo portal
 Deadline is 2nd March, 2023
Q.#1: Using definitions of properties of Set and using Venn diagram
i. (A∩B) ∩C = A ∩(B∩C)
ii. A∪(B∩C) = (A∪B) ∩ (A∪C)
iii. (A∩B)c = Ac ∪Bc
iv. (A∪B)c = Ac ∩Bc
Q.#2: Are the following languages regular? Justify your answers in each case

(6 marks)
Q.#3: Let L be the language accepted by the following non-deterministic finite automaton with ε-
transitions:

(6 marks)
Q.#4: Construct a non-deterministic finite automaton with ε-transitions whose language of
accepted strings is equal to the language over the alphabet {a, b, c} generated by the context-
free grammar with non-terminals q0 and q1, whose start symbol is q0 and whose productions are
q0 → abq1, q1 → ε, q1 → q0 and q1 → abc. (6 marks)

Page 1 of 2
Q.#5: Let L = {w ∈ {0, 1}* : the first, middle, and last characters of w are identical}. (6 marks)
i. Show a context-free grammar that generates L.
ii. Show a natural PushDown Automata (PDA) that accepts L.
iii. Prove that L is not regular
Q.#6: Consider the following grammar G: (6 marks)

i. What are the first four strings in the lexicographic enumeration of L(G)?
ii. Give an example of a string w ∈ {0, 1}+ such that |w| > 7 and w ∉ L(G).
iii. Show that G is ambiguous

Page 2 of 2

You might also like