CL - 13b - regex and FSM
From Haoran Peng
views
comments
From Haoran Peng
We introduce some simple finite state machines, and three key ideas of the theory.
The first idea is that of the language recognised by a machine. Given an alphabet of symbols, a language is a set (often an infinite set) of strings using these symbols as characters. Our machines accept some strings and do not accept others. The set of acccepted strings is the language recognised by the machine
The second idea is that we may describe some sets of strings using patterns known as regular expressions (regex). For the time being we introduce regular expresssions and some simple examples of machines whose language may be described in this way.
The third idea is that we may construct new machines composed of simpler machines. We give a first example, running two machines in parallel, and argue that the language recognised by this machine is the union of the languages recognised by the component machines.
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336, VAT Registration Number GB 592 9507 00, and is acknowledged by the UK authorities as a “Recognised body” which has been granted degree awarding powers.
Any views expressed within media held on this service are those of the contributors, should not be taken as approved or endorsed by the University, and do not necessarily reflect the views of the University in respect of any particular issue.
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh 2021 and may only be used in accordance with the terms of the licence.