270 likes | 394 Views
CSci 4011. INHERENT LIMITATIONS OF COMPUTER PROGRAMS. COURSE STAFF. Nick Hopper. Dr. Nick. Sean Kim. Saloni Srivastava. This class uses mathematical models to think about the limitations of computers. WHY SHOULD I CARE?. THIS STUFF IS USEFUL. PART 1. Automata and Languages.
E N D
CSci 4011 INHERENT LIMITATIONS OF COMPUTER PROGRAMS
COURSE STAFF Nick Hopper Dr. Nick Sean Kim SaloniSrivastava
This class uses mathematical models to think about the limitations of computers
WHY SHOULD I CARE? THIS STUFF IS USEFUL PART 1 Automata and Languages PART 2 Computability Theory PART 3 Complexity Theory
GRADING HOMEWORKS – 20% GROUP WORK – 5% QUIZZES – 25% MIDTERM I – 15% MIDTERM II – 15% FINAL – 20%
HOMEWORK Every Tuesday: Homework will be due at the start of lecture. New Homework will be posted on the web. Each Homework is 3 questions. Extra Credit only counts if score ≥ 7/10 You must list all references used in every homework assignment Lowest HW score dropped.
GROUP WORK Each group will complete a problem set in recitation. All group members should contribute to the solution.
QUIZZES 6 QUIZZES: In Friday Sections Graded out of 10, lowest score dropped. MUST SCORE 30/50 TO PASS!
This class will emphasize PROOFS A good proof should be: Easy to understand Correct
We expect your proofs to have three levels: The first level should be a one-word or one-phrase “hint” of the proof (e.g. “Proof by contradiction,” “Follows from the pigeonhole principle”) The second level should be a short one-paragraph description or “longer hint” The third level should be the full proof
11 1 0 0,1 1 0111 111 1 0 0 1 The program accepts a string if the process ends in a double circle
1 0 0,1 accept states (F) states 1 0 0 1 states ANATOMY OF A DETERMINISTIC FINITE AUTOMATON q1 q0 q2 The program accepts a string if the process ends in a double circle start state (q0) q3
NOTATION An alphabetΣ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x a string, |x| is the length of x The unique string of length 0 will be denoted by ε and will be called the empty or null string A language over Σ is a set of strings over Σ
COMPUTING OUTPUT FROM INPUT ⇔ CALCULATING A FUNCTION OF A STRING ⇔ DECIDING IF A STRING IS IN A SET
A finite automaton is a 5-tuple M = (Q, Σ, , q0, F) Q is the set of states Σ is the alphabet : Q Σ→ Q is the transition function q0 Q is the start state F Q is the set of accept states L(M) = the language of machine M = set of all strings machine M accepts We say M recognizes the language L(M).
0,1 0,1 q0 {w | w is a string} L(M) = 0,1 q0 q1 L(M) = {ε}
0 0 1 q0 q1 1 { w | w has an even number of 1s} L(M) =
0,1 1 0 0 0 1 q q0 q00 q001 1 Build an automaton that accepts all and only those strings that contain 001
A language is regular if it is recognized by a deterministic finite automaton L = { w | w contains 001} is regular L = { w | w has an even number of 1s} is regular
Many interesting programs accept regular languages NETWORK PROTOCOLS COMPILERS GENETIC TESTING ARITHMETIC
INTERNET TRANSMISSION CONTROL PROTOCOL Let TCPS = { w | w is a complete TCP Session} Theorem.TCPSis regular
COMPILERS COMMENTS : Are delimited by /* */ Cannot have NESTED /* */ Must be CLOSED by */ */ is ILLEGAL outside a comment COMMENTS = {strings with legal comments} Theorem.COMMENTS is regular.
GENETIC TESTING DNA SEQUENCES are strings over the alphabet {A,C,G,T} GENES are special substrings A GENETIC TEST searches a DNA SEQUENCE for a GENE Theorem. Every GENETIC TEST is regular.
ARITHMETIC { [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ]} 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Let 3 = A string over 3 has three ROWS Each ROW b0b1b2…bN represents the integer b0 + 2b1 + … + 2NbN. Let ADD = {S | ROW3 = ROW1 + ROW2 } Theorem. ADD is regular.