final dfa

20
“Welcome to our presentation” Course No: CSC 397 ….Sec:D…... 08/17/2022 1 DFA

Upload: sumi-haque

Post on 13-Apr-2017

283 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Final dfa

05/03/2023 DFA 1

“Welcome to our presentation”Course No: CSC 397

….Sec:D…...

Page 2: Final dfa

05/03/2023 DFA 2

Group :Authentic Name ID

Jannatul Ara 13103030

Mahabuba Siddiqua jyoti 13103093

Page 3: Final dfa

05/03/2023 DFA 3

Topic

Give a DFA for Σ = {0, 1} -- that accepts any string which contains an Even Number of 0’s, or exactly two 1’s.

Page 4: Final dfa

05/03/2023 DFA 4

DFA

In theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)—also known as deterministic finite state machine—is a finite state machine that accepts/rejects finite strings of symbols and only produces a unique computation (or run) of the automaton for each input string. 'Deterministic' refers to the uniqueness of the computation.

Page 5: Final dfa

05/03/2023 DFA 5

Page 6: Final dfa

05/03/2023 DFA 6

Construction of DFAAccept string00,11,100001,0100000010,010001,00011000

Reject string-000,111,0001

Page 7: Final dfa

05/03/2023 DFA 7

Transition Function Tableδ 0 1

q0 q5 q1

q1 q2 q4

q2 q1 q3

q3 q4 q9

q4 q3 q9

q5 q0 q6

q6 q7 q8

q7 q6 q4

q8 q4 q9

q9 q9 q9

Page 8: Final dfa

05/03/2023 DFA 8

Construction of DFA• Initial Configuration :-

Input tape

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 0 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 9: Final dfa

05/03/2023 DFA 9

Construction of DFA• Scanning Input string:-

Input tape

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 0 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 10: Final dfa

05/03/2023 DFA 10

Construction of DFA• Scanning Input string :-

Input tape

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 0 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 11: Final dfa

05/03/2023 DFA 11

Construction of DFAConfiguration :-

Scanning the Input

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 0 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 12: Final dfa

05/03/2023 DFA 12

Construction of DFAFinish Input

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 0 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 13: Final dfa

05/03/2023 DFA 13

Example of more accept string

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

0 0 1 1

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 14: Final dfa

05/03/2023 DFA 14

Construction of DFAExample String

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

0 1 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 15: Final dfa

05/03/2023 DFA 15

Construction of DFAExample String

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 0 0 0 1 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 16: Final dfa

05/03/2023 DFA 16

Example of reject stringExample string

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

0 0 0

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 17: Final dfa

05/03/2023 DFA 17

Example of reject stringExample string

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

1 1 1

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 18: Final dfa

05/03/2023 DFA 18

Example of reject stringExample string

1 1 0 1 0

0 0

0 0 0 1 1 1 1 1 0 1 0,1 0

0 1 1 1

q0 q1 q2 q3 q4

q8

q5 q6 q7q9

Page 19: Final dfa

05/03/2023 DFA 19

Page 20: Final dfa

05/03/2023 DFA 20