• Tidak ada hasil yang ditemukan

Topic: NFAName of the teacher: LisnaThomasAcademic year: 2020-2021

N/A
N/A
Protected

Academic year: 2024

Membagikan "Topic: NFAName of the teacher: LisnaThomasAcademic year: 2020-2021"

Copied!
15
0
0

Teks penuh

(1)

Subject: Theory of computation Topic: NFA

Name of the teacher: Lisna Thomas

Academic year: 2020-2021

(2)

Non-Deterministic Finite Automata-

In Non-Deterministic Finite Automata,

● For some current state and input symbol, there exists more than one next output states.

● A string is accepted only if there exists at least one transition path starting

at initial state and ending at final state.

(3)

Converting NFA to DFA-

The following steps are followed to convert a given NFA to a DFA-

Step-01:

· Let Q’ be a new set of states of the DFA. Q’ is null in the starting.

· Let T’ be a new transition table of the DFA.

(4)

Step-02:

·

Add start state of the NFA to Q’.

· Add transitions of the start state to the transition table T’.

· If start state makes transition to multiple states for some input alphabet, then treat those multiple states as a single state in the DFA.

In NFA, if the transition of start state over some input alphabet is null, then perform the transition of start state over that input alphabet to a

dead state in the DFA.

(5)

Step-03:

If any new state is present in the transition table T’,

· Add the new state in Q’.

· Add transitions of that state in the transition table T’.

(6)

Step-04:

Keep repeating Step-03 until no new state is present in the transition table T’.

Finally, the transition table T’ so obtained is the

complete transition table of the required DFA.

(7)

PRACTICE PROBLEMS BASED ON

CONVERTING NFA TO DFA-

Problem-01:

Convert the following

Non-Deterministic Finite Automata (NFA) to Deterministic Finite

Automata (DFA)-

(8)

Problem-01: Convert the following Non-Deterministic

Finite Automata (NFA) to Deterministic Finite

Automata (DFA)-

(9)

Solution- Transition table for the given Non-Deterministic Finite Automata (NFA) is-

State / Alphabet a b

q0 q0 q0, q1

q1 – *q2

*q2 – –

(10)

Step-01:

L

et Q’ be a new set of states of the Deterministic Finite Automata (DFA).

Let T’ be a new transition table of the DFA.

(11)

Step-02:

Add transitions of start state q0 to the transition tableT’.

State / Alphabet a b

q0 q0 {q0, q1}

(12)

Step-03:

State / Alphabet a b

q0 q0 {q0, q1}

{q0, q1} q0 {q0, q1, q2}

New state present in state Q’ is {q0, q1}.

Add transitions for set of states {q0, q1} to the transition tableT’.

(13)

Step-04:

New state present in state Q’ is {q0, q1, q2}.

Add transitions for set of states {q0, q1, q2} to the transition tableT’.

State / Alphabet a b

q0 q0 {q0, q1}

{q0, q1} q0 {q0, q1, q2}

{q0, q1, q2} q0 {q0, q1, q2}

(14)

Step-05:

Since no new states are left to be added in the transition table T’, so we stop.

States containing q2 as its component are treated as final states of the DFA.

Finally, Transition table for Deterministic Finite Automata (DFA) is-

State / Alphabet a b

q0 q0 {q0, q1}

{q0, q1} q0 *{q0, q1, q2}

*{q0, q1, q2} q0 *{q0, q1, q2}

(15)

Now, Deterministic Finite Automata (DFA) may be drawn as-

Referensi

Dokumen terkait

What strengths and weaknesses if inquiry – based teaching is applied in enhancing the writing competence of the eleventh graders of science program of SMA Kebakkramat

Hal tersebut dapat dilakukan dengan memberikan edukasi berupa informasi pengetahuan tentang amandemen peraturan futsal terbaru agar para guru Pendidikan Jasmani yang berada

Institute of Islamic State (IAIN) of Tulungagung. Keyword: Code Switching, Jenis , Alasan guru. Masyarakat yang mempunyai keragaman bahasa seperti indonesia, penggunaan dua

Conclusion From the results of research on the influence of leadership style, organizational culture, and motivation on teacher performance at State Vocational Schools in Depok City,

Depending on the specific course requirement essay, journal article, etc., each course lecturer shall develop a rubric, this shall be presented to the students at the first day of the

The budget for the reimbursement of tuition and miscellaneous fees in state universities and colleges SUCs and local universities and colleges LUCs, Tertiary Education Subsidy TES, and

Abstract This research aims to investigate the extent to which the system or leadership style is owned and implemented by Physical Health Education PJOK teachers when they teach the

A categorization was used to interpret the results of the calculation of the ‘Discrimination Power’, with values ranging from 0,00 to 0,19 falling into the category of 'Poor'; 0,20 to