1 / 16

Representation of Languages

Representation of Languages. Fundamental Problems. Need finite descriptions of infinite sets of strings (=> specify languages ). Discover and specify “regularity”. What is at all possible by the cardinality arguments ? What is admissible by the machines ?. Fundamental Problems.

Download Presentation

Representation of Languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Representation of Languages L3RE

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

  3. Fundamental Problems • 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? L3RE

  4. Visualizing Languages : Cardinality vs Representation Representable Countable Languages Uncountable Languages CFLs; RLs Un-Representable Countable Languages Spaces enclose Collections of Languages L3RE

  5. 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. L3RE

  6. Integer Power of a Language L3RE

  7. Kleene Star and Kleene Plus L3RE

  8. 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 L3RE

  9. Regular Sets over • Basis: are regular sets over . • Inductive Step: Let X and Y be regular sets over . Then so are: • Closure:… L3RE

  10. Examples • Bit strings containing at least a “1” • Bit strings containing exactly one “1” • Bit strings beginning or ending with a “1” L3RE

  11. 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 L3RE

  12. Regular Expressions over • Basis: are regular expressions over . • Inductive Step: Let x and y be regular expressions over . Then so are: • Closure:… L3RE

  13. Regular Expressions Regular sets Examples: Syntax vs Semantics L3RE

  14. 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) L3RE

  15. 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”. L3RE

  16. 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)* L3RE

More Related