This preview shows pages 1–7. 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 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 4: Languages and Finite Automata Harry Lewis September 15, 2009 Reading: Sipser, 1.1 and 1.2. Harvard CS 121 & CSCI E207 September 15, 2009 Languages A language L over alphabet is a set of strings over (i.e. L * ) Computational problem: given x * , is x L ? Any YES/NO problem can be cast as a language. 1 Harvard CS 121 & CSCI E207 September 15, 2009 Examples of languages All words in the American Heritage Dictionary * { x * :  x  = 3 } = { aaa,aab,aba,abb,baa,bab,bba,bbb } The set of strings x { a,b } * such that x has more a s than b s. The set of strings x { , 1 } * such that x is the binary representation of a prime number. All C programs that do not go into an infinite loop. 2 Harvard CS 121 & CSCI E207 September 15, 2009 The highly abstract and metaphorical term language A language can be either finite or infinite A language need not have any internal structure 3 Harvard CS 121 & CSCI E207 September 15, 2009 Be careful to distinguish The empty string (a string) The empty set (a set, possibly a language) { } The set containing one element, which is the empty string (a language) {} The set containing one element, which is the empty set (a set of sets, maybe a set of languages) 4 Harvard CS 121 & CSCI E207 September 15, 2009 Deterministic Finite Automata (DFAs) Example: Home Stereo P = power button (ON/OFF)...
View Full
Document
 Fall '09

Click to edit the document details