Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cs466(Prasad)L3RE1 Representation of Languages. cs466(Prasad)L3RE2 Need finite descriptions of infinite sets of strings (=> specify languages). Discover.

Similar presentations


Presentation on theme: "Cs466(Prasad)L3RE1 Representation of Languages. cs466(Prasad)L3RE2 Need finite descriptions of infinite sets of strings (=> specify languages). Discover."— Presentation transcript:

1 cs466(Prasad)L3RE1 Representation of Languages

2 cs466(Prasad)L3RE2 Need finite descriptions of infinite sets of strings (=> specify languages). Discover and specify “regularity”. at all possibleWhat is at all possible by the cardinality arguments? admissibleWhat is admissible by the machines? Fundamental Problems

3 cs466(Prasad)L3RE3 The set of languages over a finite alphabet is uncountable, while the set of descriptions is countable (equi-numerous with N). So, all languages cannot be described finitely. Given that there are uncountable subsets of languages, which countably many subsets of these languages can be specified in any given formalism? Fundamental Problems

4 Visualizing Languages : Cardinality vs Representation cs466(Prasad)L3RE4 Uncountable Languages Representable Countable Languages Un-Representable Countable Languages Spaces enclose Collections of Languages CFLs; RLs

5 cs466(Prasad)L3RE5 Language = set of strings Languages inherit operation on sets. E.g., union, intersection, complement, etc. Operations on strings can be lifted to operations on languages. E.g., language concatenation, etc.

6 cs466(Prasad)L3RE6 Integer Power of a Language

7 cs466(Prasad)L3RE7 Kleene Star and Kleene Plus

8 cs466(Prasad)L3RE8 Regular Sets Family of languages Seed elements: Empty language Language containing the empty string Singleton language for each letter in the alphabet Closure Operations: Union: collects strings from languages Concatenation: generates longer strings Kleene Star: generates infinite languages

9 cs466(Prasad)L3RE9 Regular Sets over Basis: are regular sets over. Inductive Step: Let X and Y be regular sets over. Then so are: Closure:…

10 cs466(Prasad)L3RE10 Examples Bit strings containing at least a “1” Bit strings containing exactly one “1” Bit strings beginning or ending with a “1”

11 cs466(Prasad)L3RE11 Naming Languages Regular sets can be named using the derivation in terms of the seed elements and the closure operations. Regular expressions formalize this approach. Regular sets :: Regular Expressions :::: Numbers :: Numerals Semantics Syntax :::: Semantics :: Syntax

12 cs466(Prasad)L3RE12 Basis: are regular expressions over. Inductive Step: Let x and y be regular expressions over. Then so are: Closure:… Regular Expressions over

13 cs466(Prasad)L3RE13 Syntax Semantics Examples: Syntax vs Semantics Regular ExpressionsRegular sets

14 cs466(Prasad)L3RE14 Regular expressions for strings over {a,b} containing at least one “a”. Focus on the one “a” (a u b)*a(a u b)* Focus on the leftmost “a” b*a(a u b)* Focus on the “a”s b*ab*(ab*)* Further optimization b*(ab*)+ (Motivates equivalence problem)

15 cs466(Prasad)L3RE15 Equivalence of regular expressions Two regular expressions are equivalent if they represent the same regular set. “Irregularity” (to be taken on faith now ) There are non-regular languages such as Informally, a finite amount of extra storage is sufficient for recognizing regular languages (or the patterns that characterize it). Regular languages cannot capture “counting”.

16 cs466(Prasad)L3RE16 Complement of bit strings with at least one “1” = bit strings containing no “1”s = 0* Complement of bit strings with exactly one “1” = bit strings containing no “1”s U bit strings with at least two “1”s = 0* U (0* 1 0* 1 0*)(0 U 1)*


Download ppt "Cs466(Prasad)L3RE1 Representation of Languages. cs466(Prasad)L3RE2 Need finite descriptions of infinite sets of strings (=> specify languages). Discover."

Similar presentations


Ads by Google