Presentation is loading. Please wait.

Presentation is loading. Please wait.

Principles of Computing – UFCFA3-30-1

Similar presentations


Presentation on theme: "Principles of Computing – UFCFA3-30-1"— Presentation transcript:

1 Principles of Computing – UFCFA3-30-1
Week 3 Instructor : Mazhar H Malik Global College of Engineering and Technology

2 Deterministic Finite Automata (DFA)

3 Automata –What is it? The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract computing device which follows a predetermined sequence of operations automatically. An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State Machine (FSM).

4 Finite Automation Finite automata are finite collections of states with transition rules that take you from one state to another.

5 Finite Automation

6 How many states – Traffic Lights

7 Finite Automation

8 Formal definition of a Finite Automaton
An automaton can be represented by a 5-tuple (Q, Σ, δ, q0, F) where: Q is a finite set of states. Σ (Sigma sign) is a finite set of symbols, called the alphabet of the automaton. δ (Delta sign) is the transition function. q0 (belongs/member to) is the initial state from where any input is processed (q0 ∈ Q). F is a subset of final state/states of Q (F ⊆ Q).

9 Principles of Computing – UFCFA3-30-1
Week 3 DFA Continue… Instructor : Mazhar H Malik Global College of Engineering and Technology

10 FA-Example

11 Symbols Used in FA

12 Symbols Used in FA…

13 Your Turn… Draw a FA on you note book which shows process of promoting from one grade/semester to other

14 Your Turn… Draw a FA on you note book which shows the process of change a number from odd to even and vice versa

15 Your Turn… Draw a FA on you note book which shows the searching of word in dictionary

16 Types of Finite Automata

17 Deterministic Finite Automata(DFA)

18 DFA…

19 DFA…

20 DFA…

21 Transition Function

22 Transition Function

23 DFA Definition

24 DFA Definition

25 DFA Definition

26 DFA Definition

27 Simple Notations for DFA’s

28 Transition Diagram

29 Transition Table

30 Transition Table

31 DFA Process String

32 DFA Process String

33 DFA Process String

34 Language Accepted by DFA…

35 Language Rejected by DFA…

36 DFA Examples

37 b a,b Transition Graph a,b q5 q3 q4 accepting state b q0 q1 initial

38 Alphabet   {a,b } a,b q5 a,b q4 b q0 q1 q2 b q3 b b For every state, there is a transition for every symbol in the alphabet

39 Initial Configuration
head Input Tape b Input String a,b q5 a,b q4 b q0 b q3 q1 b q2 b Initial state

40 Scanning the Input b a,b q5 a,b q4 b q0 b q3 q1 b q2 b

41 b a,b q5 a,b q4 b q0 b q3 q1 b q2 b

42 b a,b q5 a,b q4 b q0 b q3 q1 b q2 b

43 Input finished b a,b q5 a,b q4 b q0 b q3 q1 b q2 b accept

44 A Rejection Case b Input String a,b q5 a,b q4 b q0 b q3 q1 b q2 b

45 b a,b q5 a,b q4 b q0 b q3 q1 b q2 b

46 b a,b q5 a,b q4 b q0 b q3 q1 b q2 b 45

47 Input finished b a,b reject a,b q 5 b q0 b q3 q1 b q2 b q4

48 Another Rejection Case Tape is empty
() Input Finished a,b q5 a,b q4 b q0 b q3 q1 b q2 b reject

49 L  abba  Language Accepted: a,b q5 a,b q4 b q0 b q3 q1 b q2 b

50 To accept a string: all the input string is scanned and the last state is accepting To reject a string: all the input string is scanned and the last state is non-accepting

51 Jflap

52 Jflap

53 Jflap

54 Jflap

55 JFlap

56 JFlap

57 JFlap

58 Jflap

59 Jflop

60 Jflop

61 Jflop

62 Jflop

63 Jflop

64 Jflop

65 Example 2.1 Construct a DFA that accept set of strings where every
string end in 00 over alphabet ∑ = {0,1} Solution: Let FA be M = {Q, ∑ ,∂, q0, F} Q = {q0, q1, q2} F = {q2}

66 Example 2.1 Construct a DFA that accept set of strings where every
string end in 00 over alphabet ∑ = {0,1} Solution: Let FA be M = {Q, ∑ ,∂, q0, F} Q = {q0, q1, q2} F = {q2}

67 Example 2.2 Construct a DFA that accept set of strings where the number of O’s in every string is multiple of three over alphabet ∑ = {0,1} Solution: Multiple of three means number of O’s in the string may be 0,3,6,9… in the number at any position. Let FA be M = {Q, ∑ ,∂, q0, F}

68

69 Sources Finite Automata and Formal Languages: A Simple Approach By A. M. Padma Reddy, Pearson Education India


Download ppt "Principles of Computing – UFCFA3-30-1"

Similar presentations


Ads by Google