FA - Harvard CS 121 and CSCI E-207 Lecture 4: Languages and...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Harvard CS 121 and CSCI E-207 Lecture 4: Languages and Finite Automata Harry Lewis September 15, 2009 Reading: Sipser, 1.1 and 1.2. Harvard CS 121 & CSCI E-207 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 E-207 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 E-207 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 E-207 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 E-207 September 15, 2009 Deterministic Finite Automata (DFAs) Example: Home Stereo P = power button (ON/OFF)...
View Full Document

Page1 / 17

FA - Harvard CS 121 and CSCI E-207 Lecture 4: Languages and...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online