This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Harvard CS 121 and CSCI E207 Lecture 8: NonRegular Languages Harry Lewis September 29, 2009 Reading: Sipser, 1.4. Harvard CS 121 & CSCI E207 September 29, 2009 Cardinality of Languages An alphabet is finite by definition Proposition: * is countably infinite So every language is either finite or countably infinite P ( * ) is uncountable, being the set of subsets of a countably infinite set. i.e. There are uncountably many languages over any alphabet Q: Even if   = 1 ? 1 Harvard CS 121 & CSCI E207 September 29, 2009 Existence of Nonregular Languages Theorem: For every alphabet , there exists a nonregular language over . Proof: There are only countably many regular expressions over . There are only countably many regular languages over . There are uncountably many languages over . Thus at least one language must be nonregular. In fact, almost all languages must be nonregular. Q: Could we do this proof using DFAs instead? Q: Can we get our hands on an explicit nonregular language? 2 Harvard CS 121 & CSCI E207 September 29, 2009 Goal: Explicit NonRegular Languages It appears that a language such as L = { x * :  x  = 2 n for some n } = { a, b, aa, ab, ba, bb, aaaa, . . . , bbbb, aaaaaaaa, . . . } cant be regular because the gaps in the set of possible lengths become arbitrarily large, and no DFA could keep track of them....
View
Full
Document
This document was uploaded on 12/24/2011.
 Fall '09

Click to edit the document details