Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Syntax and Semantics
[go: Go Back, main page]


DAT2/F6S: Syntax and Semantics 2002

Lecture 3


Syntax and Semantics

Topics

Regular expressions are a notation for describing regular languages which appear over and over again in Computer Science. Variants on regular expressions are, for instance, used in text editors like Emacs and in UNIX.

In our previous lecture, we have seen how adding nondeterminism to the model of finite automata did not yield a more powerful model of computation. In particular, we saw that there is an algorithm that allows us to convert any nondeterministic automaton into an equivalent deterministic one.

In this lecture we shall see that regular expressions are also equivalent to finite automata, and that there are algorithmic conversions between these two formalisms. To this end, we shall first show how to convert a regular expression R into an NFA that recognizes the language denoted by R. Next, we shall show how, given a DFA M, we can build a regular expression describing the language L(M). As a tool in this conversion, we shall employ Generalized NFAs, which are just NFAs whose transitions may be labelled by arbitrary regular expressions. Both these conversions are achieved by means of algorithms, which you may find implemented in the DAT2 project developed last year by some of your colleagues.

Time and Location

Friday, 15 February 2002 at 10:15 in B2-104.

Reading Material

Exercises

In general, I shall give you more exercises than you might conceivably be able to solve during one exercise class. The exercises marked with a star are those that I consider more important for your understanding. All the exercises will be "doable", and working them out will greatly increase your understanding of the topics covered in the course. The best advice I can give you is to work them all out by yourselves, and to make sure you understand the solutions if the other members of your group (or me) gave you the solutions on a golden plate. Above all, don't give up if you cannot find the key to the solutions right away. Problem solving is often a matter of mental stamina as much as creativity.

Whenever you construct an automaton, try to argue that it does the job that it was meant to do. You may not need (some of) the material covered in this course in your future careers, but having an analytical and critical attitude will always help you.


Luca Aceto, Institute of Computer Science, Aalborg University.
Last modified: Wednesday, 13-Feb-2002 08:24:46 CET.