You are on page 1of 10

The Ministry of Education, Culture and Research of the Republic of Moldova

Technical University of Moldova

Software Engineering and Automatics Department

REPORT

on practice No.2 on LFPC


on the topic: Finite Automata

Made by:
st. gr. FAF-171 Poleacov Tatiana

Checked by:
lect. univ. I. Cojuhari

Chişinău 2019
Variant 4
AF = (Q, Σ, δ, q0, F), δ(q0, a) = q1,
Q = {q0, q1, q2, q3}, δ(q0, a) = q2,
Σ = {a, b}, δ(q1, b) = q1,
F = {q3}, δ(q1, a) = q2,
δ(q2, a) = q1,
δ(q2, b) = q3.

1.Present the automaton in form of graph. Is this deterministic or no? Why?

This is a Non-Deterministic Finite Automaton, because the initial stare q 0 has


transition with a both to stare q1 and stare q2.

The output in JFLAP:


2. Convert NFA to the Regular Grammar

G = (VN, VT, P, S),


VN = Q = { q0, q1, q2, q3},
VT = Σ = {a, b},
S = { q0}

P = { q0 → aq1 | aq2
q1 → bq1 | aq2
q2 → aq1 | bq3
q3 → Ɛ }

3. Transform NFA to DFA


NAF DFA
δ a b δ a b
→ q0 [q1 q2] ø → q1 [q1 q2] ø
q1 q2 q1 [q1 q2] [q1 q2] [q1 q3]
q2 q1 q3 * [q1 q3] q2 q1
* q3 ø ø q2 q1 q3
q1 q2 q1
* q3 ø ø
DFA
4. The string that is not accepted by the automaton using JFLAP via Multiple
Run.

5.Strings that are accepted by the automaton.


6. The configuration sequence for the string x using the option Step with
Closure and Fast Run from JFLAP.
Step with Closure
1 Step

2 Step
3 Step

4 Step

Step 5
Step 6

Step 7
Step 8

Fast Run
7. For each string build the decomposition x = uvw, using pumping lemma.
x1= aabbaaab x2= abbaabab x3= aaabbbab x4= abbbbbab x5= abaaaaab
u=a u = abbaa u=a u = abb u = ab
v1 = a v1 = b v2 = aa v3 = bbb v0 = Ɛ
w = bbaaab w = ab w = bbbab w = ab w = aaaaab

8. Obtain the DFA minimized.

You might also like