Automata

An automata is a 5 component object where:

  • T is the alphabet
  • Q is a set o states
  • S is the initial state
  • Z is the final state
  • Ξ΄ is the state transition function

Non-deterministic Automata (AND)

A non-deterministic automata, its an automata in which the state transition function is given a certain state and a symbol of the alphabet. As a result it shall give us a set of states.

GSR to AND

Let’s consider the following GSR:

S β†’ I | E
I β†’ A | ’+’ A | ’-’ A
A β†’ d Z | d A
E β†’ ’+’ F | ’-’ F | F
F β†’ d F | d X1
X1 β†’ ’.’ A
Z β†’ Ξ΅

Analysing it we can determine the following AND:

AND

Deterministic Automata (AD)

A deterministic automata is an automata in which the state transition function is given a certain state and a symbol of the alphabet. As a result it gives back a state.

AND to AD

Let take into account the following grammar and automata:

S β†’ A | a S | b A
A β†’ a X1| a Y1| b R1
X1 β†’ b Z
Y1 β†’ b A
R1 β†’ a S
Z β†’ Ξ΅

Automata

A viable method to transform an AND to an AD is using a table:

Stateab
S,AS,A,X1,Y1A,R1
S,A,X1,Y1S,A,X1,Y1A,R1,Z
A,R1X1,Y1,S,AR1
A,R1,ZX1,Y1,S,AR1
R1S,A

Having this table we can reproduce the following AD automata: Automata AD

Regex to AND

A thing about regular expressions is that we can also convert them into AND automata.

Here are the following

  1. e = Ο†

phi-auto

  1. e = Ξ΅

empty-auto

  1. e = a

a-auto

  1. e = p + q (p and q are regular expressions)

plus-auto

  1. e = p . q

pro-auto

  1. e = p+

alot-auto

  1. e = p*

many-auto


Next Chapter: Recognition Top-Down