Processing math: 100%
Skip to content

1.1 finite automata

finite automata = finite state machine

computational model: idealized computer

e.x. 自动门

需要1bit来存储state - state: 开启/关闭 - condition: 前面有人后面没人、前面没人后面没人……

e.x. Markov chains

patterns of data

Formal Def of a Finite Automation

A finite automation is a 5-tuple(Q,Σ,δ,q0,F),where:

  • Q is a finite set called the states
  • Σ is a finite set called the alphabet
  • δ:Q×ΣQ is the transition function
  • q0Q is the start state
  • FQ is the set of accept states

language of machine M: L(M)=A

If A={w|Macceptsw}, then M recognizes A

Formal Def of Computation

Let M=(Q,Σ,δ,q0,F) be a finite automation and w=w1w2wn be a string over alphabet Σ. Then M accepts w if a sequence of states r0r1rn exists in Q with the following three conditions:

  • r0=q0
  • δ(ri,wi+1)=ri+1, for i=0,,n1
  • rnF

A language is called a regular language if some finite automation recognizes it.

Designing Finite Automata

收集作出决策(每读入一个字母时)所必要的最精简信息,然后决定用几个状态来储存这些信息,并寻找他们之间的逻辑,最后确定start state和set of accept states。

另外还可以分类讨论每一个input

The Regular Operations

i.e. the properties of finite automata & regular languages Let A and B be languages. Define regular operations as follows:

  • Union: AB={x|xA or xB}
  • Concatenation: AB={xy|xA and yB}
  • Star: A={x1x2xk|k0 and each xiA}

The class of regular languages is closed under these operation. (It will be easier for us to prove after learning nondeterminism.)