This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Lecture 3 Inf1A: Non-deterministic Finite State Machines 3.1 Introduction In this lecture we deal with non-deterministic Finite State Machines, a class of machines which are a generalization of deterministic Finite State Machines As in Lecture 2, we will mostly be concerned with Finite State Machines which are acceptors (ie, have no output alphabet). Therefore we will also be concerned with the type of languages that can be accepted by some Finite State Machine. It can be shown that when we consider acceptors , the class of non-deterministic FSMs is the same as the class of deterministic FSMs. This result, which is known as the Conversion Theorem , is difficult to prove, so we will only hint at the reasons it is true (full proof next year!). The result means that when we are considering acceptors, we can always use non-deterministic FSMs rather than deterministic FSMs if we want to (because there is always some deterministic FSM which will accept the same language as our non-deterministic machine). 3.2 Formal Definitions The main difference between non-deterministic Finite State Machines and the machines we have encountered so far in our lectures is that in an non-deterministic FSM, there may be input strings which have more than one trace . The concept of non-determinism gives us more flexibility when we are modelling reactive systems: we can use it to help us describe systems whose behaviour we cannot com- pletely predict. There is a price to pay for this flexibility - we will no longer have the nice property that for every input string there is exactly one computation path (trace) that can be predicted from the description of the FSM. This means (for example) that the implementation of a non-deterministic FSM in a programming language will not be a straightforward task. However, our main interest in non-deterministic FSMs is in the study of formal lan- guages, for which they are very valuable. Here is the definition of an ( acceptor-type ) non-deterministic FSM: 15 Computation & Logic: Lecture 3 on Computation Informatics 1A (2004) Definition 3.1 (Non-deterministic FSM) A Non-deterministic Finite State Machine (N-FSM) of the acceptor type is a machine defined as a 5-tuple consisting of 1. a finite set of states 2. a finite alphabet 3. a distinguished start state 4. a set of accepting states , and 5. a description of all the possible transitions of the FSM. The description is no longer required to be a function from to , as it was for D-FSMs. It is a more general description, that associates some subset of with every state from , for every “symbol” from . Formally is a function of the form , where is the power set of . The symbol is pronounced “del-ta”, just like- but the symbol is Capital “del-ta”....
View Full Document
This note was uploaded on 04/03/2008 for the course INF Inf1a taught by Professor Philipwadler during the Fall '08 term at University of Edinburgh.
- Fall '08