Computer Science Theory

Lecture 1: September 5, 2012

Introduction to Computer Science Theory

- Professor Alfred V. Aho
- http://www.cs.columbia.edu/~aho
- aho@cs.columbia.edu
- 513 Computer Science Building
- Office hours: Mondays and Wednesdays 3:00-4:00pm
- Course webpage: http://www.cs.columbia.edu/~aho/cs3261
- Courseworks bulletin board: https://courseworks.columbia.edu
- Afreen Azad
- aa3165@columbia.edu
- Office hours: Wednesdays 11:00am-1:00pm
- TA Room: 122 Mudd
- Karan Bathla
- kb2658@columbia.edu
- Office hours: Tuesdays 5:40-7:40pm
- TA Room: 122 Mudd
- Neeraja Ramanan
- nr2404@columbia.edu
- Office hours: Thursdays 4:00-6:00pm
- TA Room: 122 Mudd
- Zhang Yao
- yz2498@columbia.edu
- Office hours: Wednesdays 9:15-10:15am and Thursdays 8:45-9:45am
- TA Room: 122 Mudd

- Lectures: Mondays and Wednesdays, 1:10-2:25pm, Hamilton 602.

- Learning computational thinking
- Understanding the fundamental models of computation that underlie modern computer hardware, software, and programming languages.
- Discovering that there are problems no computer can solve.
- Discovering that there are limits on how fast a computer can solve a problem.
- Mastering the foundations of automata theory, computability theory, and complexity theory.
- Learning about applications of computer science theory to algorithms, programming languages, compilers, natural language translation, operating systems, and software verification.

- Languages and decision problems
- Finite automata
- Regular expressions
- Properties of regular languages
- Context-free grammars
- Pushdown automata
- Properties of context-free languages
- Algorithms and Turing machines
- Lambda calculus
- Undecidability
- Complexity theory

- The course text is
- John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman
*Introduction to Automata Theory, Languages, and Computation*, Third Edition- Pearson/Addison-Wesley, 2007, ISBN-10: 0321462254 | ISBN-13: 9780321462251
- Other good references are
- Michael Sipser
*Introduction to the Theory of Computation*, Third Edition- Cengage Learning, 2013
- Alfred V. Aho and Jeffrey D. Ullman
*Foundations of Computer Science*, C Edition- W. H. Freeman, 1995
- An online version of this book is available
here.

- Homeworks (best four out of five homeworks will constitute 20% of final grade)
- Midterm (40% of final grade)
- Final (40% of final grade)

- An
*alphabet*Σ is a finite, nonempty set of symbols. - Examples: {0,1}, ASCII, Unicode
- A
*string*is a finite sequence of symbols chosen from some alphabet. - Examples: ε (the empty string), 0, 01, 011
- Common operations on strings: concatenation, reversal
- Terms associated with strings: prefix, suffix, substring, subsequence
- A
*language*over Σ is a set of strings whose symbols are chosen from Σ. Examples: - the empty set, ∅
- {0,1}
*P*= {10, 11, 101, 111, 1011, 1101, ... } (the binary representations of the prime numbers)- The set of all syntactically valid Java programs.
- The set of all valid English sentences?
- Operations on languages: union, concatenation, Kleene closure
- Example of Kleene closure: {0,1}* = {ε, 0, 1, 00, 01, 10, 11, 000, ... } (all strings of 0s and 1s)
- Question: How many strings are there in {0,1}*?
- A
*problem*is the question of deciding whether a given string is a member of some particular language. - Example: Given a binary number
*x*, is*x*in*P*? - Question: How many languages over {0,1} are there?

- What is a theorem?
- A theorem is a statement that has been proven true by a convincing logical argument.
- What is a proof?
- A (deductive) proof is a sequence of statements each one of which is a given fact or follows by a logical rule from some previous statements in the proof.
- Types of proof
- By deduction
- By construction
- By induction
- By structural induction
- By contradiction
- Example: Use contradiction to show that the square root of two is not a rational number.
- Many others

- How many (a) prefixes, (b) suffixes, (c) substrings, (d) subsequences are there in a
string of length
*n*? - What does it mean for a string to have balanced parentheses?
- Prove that the following recursive definition generates all and only all strings of balanced parentheses.
- Rule 1 (basis): The empty string is a balanced string.
- Rule 2 (induction): If
*x*and*y*are balanced strings, then (*x*)*y*is a balanced string. - Research problem: If
*x*is a string of length*m*and*y*is a string of length*n*, then what is the maximum possible number of longest common subsequences between*x*and*y*as a function of*m*and*n*?

- HMU: Ch. 1

aho@cs.columbia.edu