Download presentation
Presentation is loading. Please wait.
Published byClementine Richardson Modified over 9 years ago
1
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011
2
Dr. Nick COURSE STAFF Nick Hopper Sean Kim Saloni Srivastava
3
This class uses mathematical models to think about the limitations of computers
4
WHY SHOULD I CARE? THIS STUFF IS USEFUL PART 1 Automata and Languages PART 2 Computability Theory PART 3 Complexity Theory
5
cs4011.org
6
GRADING HOMEWORKS – 20% GROUP WORK – 5% QUIZZES – 25% MIDTERM I – 15% MIDTERM II – 15% FINAL – 20%
7
HOMEWORK Every Tuesday: Homework will be due at the start of lecture. New Homework will be posted on the web. You must list all references used in every homework assignment Each Homework is 3 questions. Extra Credit only counts if score ≥ 7/10 Lowest HW score dropped.
8
GROUP WORK Each group will complete a problem set in recitation. All group members should contribute to the solution.
9
QUIZZES 6 QUIZZES: In Friday Sections Graded out of 10, lowest score dropped. MUST SCORE 30/50 TO PASS!
10
This class will emphasize PROOFS A good proof should be: Easy to understand Correct
11
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
12
DETERMINISTIC FINITE AUTOMATA
13
0 0,1 0 0 1 1 1 0111111 11 1 The program accepts a string if the process ends in a double circle
14
0 0,1 0 0 1 1 1 The program accepts a string if the process ends in a double circle ANATOMY OF A DETERMINISTIC FINITE AUTOMATON states q0q0 q1q1 q2q2 q3q3 start state (q 0 ) accept states (F)
15
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| isthe length of x The unique string of length 0 will be denoted by ε and will be called the empty or null string NOTATION A language over Σ is a set of strings over Σ
16
COMPUTING OUTPUT FROM INPUT CALCULATING A FUNCTION OF A STRING DECIDING IF A STRING IS IN A SET ⇔ ⇔
17
Q is the set of states Σ is the alphabet : Q Σ → Q is the transition function q 0 Q is the start state F Q is the set of accept states A finite automaton is a 5-tuple M = (Q, Σ, , q 0, F) L(M)= the language of machine M = set of all strings machine M accepts We say M recognizes the language L(M).
18
0,1 q0q0 L(M) = {w | w is a string} q0q0 L(M) ={ε}{ε} 0,1 q1q1
19
q0q0 q1q1 0 0 1 1 L(M) = { w | w has an even number of 1s}
20
qq 00 1 0 1 q0q0 q 001 0 0 1 0,1 Build an automaton that accepts all and only those strings that contain 001
21
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
22
Many interesting programs accept regular languages NETWORK PROTOCOLS COMPILERS GENETIC TESTING ARITHMETIC
23
INTERNET TRANSMISSION CONTROL PROTOCOL Let TCPS = { w | w is a complete TCP Session} Theorem. TCPS is regular
24
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.
25
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.
26
ARITHMETIC Let 3 = A string over 3 has three ROWS Each ROW b 0 b 1 b 2 …b N represents the integer b 0 + 2b 1 + … + 2 N b N. Let ADD = {S | ROW 3 = ROW 1 + ROW 2 } Theorem. ADD is regular. { [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ]} 000000 001001 010010 011011 100100 101101 110110 111111
27
cs4011.org
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.