0% found this document useful (0 votes)
66 views1 page

Ha 3 A

The document contains exercises from a textbook on formal languages and automata theory. The exercises involve describing languages with regular expressions, drawing transition diagrams for regular expressions, writing Lex programs, and constructing transition tables for non-deterministic finite automata (NFAs).

Uploaded by

rohtihr2611
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views1 page

Ha 3 A

The document contains exercises from a textbook on formal languages and automata theory. The exercises involve describing languages with regular expressions, drawing transition diagrams for regular expressions, writing Lex programs, and constructing transition tables for non-deterministic finite automata (NFAs).

Uploaded by

rohtihr2611
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

P125

Exercises for Section 3.3


Exercise 3.3.2: Describe the languages denoted by the following regular expressions:
a) a (a | b)* a
b) ( ( | a) b* )*
c) (a | b) * a (a l b) (a l b)
d) a* b a* b a* b a*

Exercise 3.3.4: Most languages are case sensitive, so keywords can be written only one way, and
the regular expressions describing their lexeme is very simple. However, some languages, like
SQL, are case insensitive, so a keyword can be written either in lowercase or in uppercase, or in
any mixture of cases. Thus, the SQL keyword SELECT can also be written select, Select, or
sElEcT, for instance. Show how to write a regular expression for a keyword in a case-insensitive
language. Illustrate the idea by writing the expression for "select" in SQL.

P136
Exercises for Section 3.4
Exercise 3.4.1: Provide transition diagrams to recognize the same languages as each of the
regular expressions in Exercise 3.3.2. a)-d)

P146
Exercises for Section 3.5
Exercise 3.5.2: Write a Lex program that copies a file, replacing each nonempty sequence of
white space by a single blank.

P151
Exercises for Section 3.6
Exercise 3.6.3: For the NFA of Fig. 3.29, indicate all the paths labeled aabb.
Does the NFA accept aabb?

Note: is one of the paths

Exercise 3.6.5: Give the transition tables for the NFA of:
a) Exercise 3.6.3.

You might also like