Presentation is loading. Please wait.

Presentation is loading. Please wait.

MA/CSSE 474 Theory of Computation Course Intro. Today's Agenda Student questions Overview of yesterday's proof –I placed online a "straight-line" writeup.

Similar presentations


Presentation on theme: "MA/CSSE 474 Theory of Computation Course Intro. Today's Agenda Student questions Overview of yesterday's proof –I placed online a "straight-line" writeup."— Presentation transcript:

1 MA/CSSE 474 Theory of Computation Course Intro

2 Today's Agenda Student questions Overview of yesterday's proof –I placed online a "straight-line" writeup of the proof in detail, without the "here is how a proof works" commentary that was in the slides. See Session 1 resources on sched. page Introductions and Course overview Languages and Strings (if time) Operations on Languages

3 Overview of yesterday's proof S = L(M), language accepted by M T = {w ∊ {0,1}* : w does not have 11 as substring} Show that S = T. i.e., S ⊆ T and T ⊆ F S ⊆ T: i.e. if wS, then wT –By induction on |w|, showed If δ(q0, w) = q0, w has no 11 and does not end in 1. If δ(q0, w) = q1, w has no 11 and ends in 1. T ⊆ S: i.e. if wT, then wS. –We show the contrapositive: if w ∉ S, then w ∉ T. If w ∉ S then δ(q0, w) = q2 (the only non-accepting state). Show by induction that if δ(q0, w) = q2, then w contains 11. In the definition of M, I replaced A, B, C by q0, q1, q2. See Day 1 slides

4 Introductions Roll Call –If I mispronounce your name, or you want to be called by a nickname or different name than the Registrar lists for you, let me know. –I have had most of you in class, but for some of you it has been a long time. Graders: Maisey Tucker, Devon Timaeus, Jonathan Taylor Instructor: Claude Anderson: F-210, x8331 Random Note: I often put more on my PowerPoint slides for a day than I expect we can actually cover that day, "just in case".

5 Instructor Professional Background Formal Education: –BS Caltech, Mathematics 1975 –Ph.D. Illinois, Mathematics 1981 –MS Indiana, Computer Science 1987 Teaching: –TA at Illinois, Indiana 1975-1981, 1986-87 –Wilkes College (now Wilkes University) 1981-88 –RHIT 1988 – 2022? Major Consulting Gigs: –Pennsylvania Funeral Directors Assn 1983-88 –Navistar International 1994-95 –Beckman Coulter 1996-98 –ANGEL Learning 2005-2008 Theory of Computation history

6 Textbook Recent (as ToC books go) Thorough Literate Large (and larger!) Theory and Applications We’ll focus more on theory; applications there for you to see

7 Online Materials Locations –On the Schedule page – public stuff Reading, HW, topics, resources, Suggestion: bookmark schedule page –On Moodle – personal stuff surveys, solutions, grades –On piazza.com: Discussion forums and announcements –Many things are under construction and subject to change, especially the course schedule.

8 My most time-consuming courses (for students) This is my perception, not a scientific study! 220 (object-oriented) 473 (design and analysis of algorithms) 120 (intro to software development) 290 (web programming) 304 (PLC) 404 (Compilers) 474 (Theory of Computation) 230 (Data Structures & Algorithms)

9 What we will focus on in 474 Definitions Theorems Examples Proofs A few applications, but mostly theory

10 Questions about course policies and procedures? From Syllabus? Schedule page? Said in class? Anything else? Why is attendance not mentioned in the syllabus? When do I plan to be in my office and available for you?

11 Why you should go to faculty candidate talks! Learn things you might not hear form current faculty Help us evaluate candidate Help candidate evaluate Rose-Hulman The new faculty members are your future (even if you are a senior) –And we are desperate! Greg Wilkin, O159, Wednesday 4:20 DISTRIBUTED SYSTEMS COMMUNICATION AND OVERCOMING THE IMPOSSIBLE IN COMPLEX EVENT PROCESSING

12 Grateful Acknowledgement Many of the PowerPoint slides that I will use were produced by Elaine Rich, in conjunction with her textbook. I will modify some of them. I will create some new ones.

13 Why Study the Theory of Computation? Why not just write programs? Implementations come and go. We want to address larger issues, such as –What is computable? –What is tractable?

14 IBM 7090 Programming in the 1950’s ENTRY SXA 4,RETURN LDQ X FMP A FAD B XCA FMP X FAD C STO RESULT RETURN TRA 0 A BSS 1 B BSS 1 C BSS 1 X BSS 1 TEMP BSS 1 STORE BSS 1 END

15 Programming in the 1970’s (IBM 360) //MYJOB JOB (COMPRESS), 'VOLKER BANDKE',CLASS=P,COND=(0,NE) //BACKUP EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=MY.IMPORTNT.PDS //SYSUT2 DD DISP=(,CATLG), DSN=MY.IMPORTNT.PDS.BACKUP, // UNIT=3350,VOL=SER=DISK01, // DCB=MY.IMPORTNT.PDS, SPACE=(CYL,(10,10,20)) //COMPRESS EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //MYPDS DD DISP=OLD,DSN=*.BACKUP.SYSUT1 //SYSIN DD * COPY INDD=MYPDS,OUTDD=MYPDS //DELETE2 EXEC PGM=IEFBR14 //BACKPDS DD DISP=(OLD,DELETE,DELETE), DSN=MY.IMPORTNT.PDS.BACKUP

16 Programming in the New Millennium public static TreeMap create() throws IOException { Integer freq; String word; TreeMap result = new TreeMap (); JFileChooser c = new JFileChooser(); int retval = c.showOpenDialog(null); if (retval == JFileChooser.APPROVE_ OPTION) { Scanner s = new Scanner(c.getSelectedFile()); while(s.hasNext()) { word = s.next().toLowerCase(); freq = result.get(word); result.put(word, (freq == null ? 1 : freq + 1)); } return result; } Find the frequency of each word in a text file chosen by the user.

17 Timeless Abstractions Mathematical properties of problems and algorithms Do not depend on technology or programming style The basic principles remain the same: –What can be computed, and what cannot? –What are reasonable mathematical models of computation?

18 More Detailed Questions Does a computational solution to the problem exist? –Without regard to limitations of processor speed or memory size. –If not, is there a restricted but useful variation of the problem for which a solution does exist? If a solution exists, can it be implemented using some fixed amount of memory? If a solution exists, how efficient is it? –More specifically, how do its time and space requirements grow as the size of the problem grows? Are there groups of problems that are equivalent in the sense that if there is an efficient solution to one member of the group there is an efficient solution to all the others?

19 Applications of the Theory Finite State Machines (FSMs) for parity checkers, vending machines, communication protocols, and building security devices. Interactive games as nondeterministic FSMs. Programming languages, compilers, and context-free grammars. Natural languages are mostly context-free. Speech understanding systems use probabilistic FSMs. Computational biology: DNA and proteins are strings. The undecidability of a simple security model. Artificial intelligence: the undecidability of first-order logic.

20 Languages and Strings

21 (1) Lexical analysis: Scan the program and break it up into variable names, numbers, operators, punctuation, etc. (2) Parsing: Create a tree that corresponds to the sequence of operations that should be executed, e.g., / + 10 2 5 (3) Optimization: Realize that we can skip the first assignment since the value is never used, and that we can pre-compute the arithmetic expression, since it contains only constants. (4) Termination: Decide whether the program is guaranteed to halt. (5) Interpretation: Figure out what (if anything) useful it does. Some Language-related Problems int alpha, beta; alpha = 3; beta = (2 + 5) / 10;

22 A Framework for Analyzing Problems We need a single framework in which we can analyze a very diverse set of problems. The framework we will use is Language Recognition Most interesting problems can be restated as language recognition problems.

23 A string is a finite sequence (possibly empty) of symbols from some finite alphabet .  is the empty string (some books/papers use instead)  * is the set of all possible strings over an alphabet  Counting: |s| is the number of symbols in s. |  | = 0| 1001101 | = 7 # c (s) is the number of times that c occurs in s. # a ( abbaaa ) = 4. Recap - Strings

24 More Functions on Strings Concatenation: st is the concatenation of s and t. If x = good and y = bye, then xy = goodbye. Note that |xy| = |x| + |y|.  is the identity for concatenation of strings. So:  x (x  =  x = x). Concatenation is associative. So:  s, t, w ((st)w = s(tw)).

25 More Functions on Strings Replication: For each string w and each natural number i, the string w i is: w 0 = , w i+1 = w i w Examples: a 3 = aaa ( bye ) 2 = byebye a 0 b 3 = bbb Reverse: For each string w, w R is defined as: if |w| = 0 then w R = w =  if |w|  1 then:  a   (  u   * (w = ua)). So define w R = a u R.

26 Concatenation and Reverse of Strings Theorem: If w and x are strings, then (w x) R = x R w R. Example: ( nametag ) R = ( tag ) R ( name ) R = gateman Do the proof on the board


Download ppt "MA/CSSE 474 Theory of Computation Course Intro. Today's Agenda Student questions Overview of yesterday's proof –I placed online a "straight-line" writeup."

Similar presentations


Ads by Google