Download presentation
Presentation is loading. Please wait.
Published byRoss Lambert Ford Modified over 8 years ago
1
Introduction to Automata Theory Theory of Computation Lecture 6 Tasneem Ghnaimat
2
Regular Expressions Operations used to build expressions to describe languages. In applications involving texts, users may want to search for strings that satisfy certain conditions. Example: (0 U 1)* describes a language consisting of strings of 0’s and 1’s. Tasneem Ghnaimat
3
Regular Expression Operations Precedence Order: ( * ) then (. ) then (+) * means zero or more of character + means OR. Means concatenation ( (0 U 1).1 similar to (0 U 1)1 ) Example of Regular Expression: 0*10* : Regular Expression that has single 1. Tasneem Ghnaimat
4
Regular Expression examples Assume that ∑={0,1}: s1={w|w has length >=3 and its 3 rd symbol is 0}? (0+1)(0+1)0(0+1)* Tasneem Ghnaimat
5
Regular Expressions If the language can be represented using regular expressions, it is regular. Tasneem Ghnaimat
6
Build FSA for RE R= a a R = Tasneem Ghnaimat q0 q1
7
Build FSA for RE Build FSA for RE R= (ab U a ) Tasneem Ghnaimat
8
Transform FSA to RE By removing states and re-labeling the arcs with regular expressions cb a*b This recognizes the language (a*b(cb)*) Tasneem Ghnaimat q0 q1 q2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.