COSC 312 — Algorithm Analysis and Automata
Spring 2012
Directory
Contact Information
Instructor:
Bruce MacLennan, PhD
Phone: 974-0994
Office: Min Kao 550
Hours: WF 3:30–5:00 or make an
appointment
Email: maclennan@eecs.utk.edu
Teaching Assistants:
Zahra Mahoor
Office: Min Kao 204
Hours: MW 10:00–12:00 or make an
appointment
Email:
zmahoor at utk.edu
Cale Nelson
Office: Min Kao 207
Email: cnelso23
at utk.edu
Classes: MWF 12:20–1:10, Min Kao 406
This page: http://web.eecs.utk.edu/~mclennan/Classes/312
Catalog Description
Counting and combinatorics, with applications to the analysis of
algorithms. Introduction to finite automata and regular languages,
and to pushdown automata and context free grammars.
Note: As of Fall 2011, the
old course sequence Math 300 – COSC 311 has been replaced by a new
course sequence COSC 311 – COSC 312. Therefore COSC 312 covers some
material that used to be covered in COSC 311, but most of it is new;
if you took COSC 311 before Fall 2011, please be aware of this.
Prerequisites
COSC 311.
Texts
There are two required textbooks for COSC 312:
- Michael Sipser: Introduction to
the Theory of Computation, Course Technology. $146 from
Amazon.com,
but used copies are available from $90. [S]
Make sure to see the Errata
[pdf]; it would be a good idea to write in your copy of
the book the significant corrections for the chapters we will
use (chs. 0–4, 7).
- Clifford A. Shaffer, Data Structures
and Algorithm Analysis Edition 3.2 (C++ Version). Free online.
[Sh]
Schedule
Since this is the first time COSC 312 has been taught, the schedule
is of necessity tentative.
- Finite Automata (S[ipser] 1.1–2)
- Regular Expressions and Languages (S 1.3–4)
- Context-free Grammars and Languages (S 2.1)
- Pushdown Automata (S 2.2–3)
- Turing Machines and Other Models of Computation (S 3.1–3)
- Uncomputable Problems (S 4.1–2; see also Shaffer
§17.3.2)
- Complexity (S 7.1–4; see also Shaffer
ch. 17)
- Algorithm Analysis (Shaffer
§2.4, chs. 3, 14)
Topics
Basics Of Counting
Topics: Most of the “basics of counting” are covered in COSC 311, and so COSC 312 will cover the
following:
- Solving recurrence relations [Sh 2.4,
14.2]
- The Master theorem [Sh 14.2.3]
Learning Outcomes
- Analyze a problem to create relevant recurrence
equations or to identify important counting questions.
Topics
- Asymptotic analysis of upper and
average complexity bounds [S 7.1; Sh 3.4]
- Identifying differences among best,
average, and worst case behaviors [Sh 3.2; S 7.1]
- Big Oh, little oh, omega, and theta
notation [Sh 3.4]
- Standard complexity classes [Sh 3.1]
- Empirical measurements of
performance[Sh 3.11]
- Time and space tradeoffs in
algorithms [Sh 3.9]
- Using recurrence relations to analyze
recursive algorithms [Sh 2.4, 14.2]
Learning Outcomes
- Explain the use of Big Oh, omega, and
theta notation to describe the amount of work done by an
algorithm.
- Use Big Oh, omega, and theta notation
to give asymptotic upper, lower, and tight bounds on time and
space complexity of algorithms.
- Determine the time and space
complexity of simple algorithms.
- Deduce recurrence relations that describe the time
complexity of recursively defined algorithms.
Basic Automata Theory
Topics: Because there may be some uncertainty about how
deeply topics in automata and computabilty theory should be
covered, we have included the relevant sections from the Sipser
text. Also some of the topics, denoted in italics, are optional
and may be covered at the instructor’s discretion:
- Finite-state machines (Sipser 1.1–2)
- Regular expressions and real-world
applications (lexical analysis, scripting languages) (Sipser
1.3)
- Relationship between finite-state
machines and regular expressions (Sipser 1.3)
- The pumping lemma for regular
languages (Sipser 1.4)
- Context free grammars and real-world
applications (parsing) (Sipser 2.1)
- Greibach and Chomsky Normal Forms
(Sipser 2.1)
- Pushdown automata (Sipser 2.2)
- Relationship between PDAs and context
free grammars (Sipser 2.2)
- The pumping lemma for context free
languages (Sipser 2.3)
Learning Outcomes
- Design a finite state machine to
accept a specified language
- Design a regular expression to
formally specify a language
- Describe how finite state machines
and regular expressions are related
- Design a pushdown automata to accept
a specified language
- Design a context free grammar to
formally specify a language
- Describe how pushdown automata and
context free grammars are related
- Describe the difference between a finite state machine
and a pushdown automata and describe why a pushdown automata can
accept more languages than a finite state machine.
Computability
Topics: Because there may be some uncertainty about how
deeply topics in automata and computabilty theory should be
covered, we have included the relevant sections from the Sipser
text.
- Turing machines (Sipser 3.1)
- Church-Turing Thesis (Sipser 3.3)
- Uncomputable functions (informal
definition: Sipser 4.2; Sh 17.3.2)
- The halting problem (Sipser 4.1–2)
- Implications of uncomputability
Learning Outcomes
- Describe a Turing machine and explain
the significance of a Turing machine.
- Explain why a Turing machine is more
powerful than a pushdown automata.
- Create simple programs using a Turing
machine.
- Explain what it means for a function
to be uncomputable.
- Describe the Church-Turing Thesis and
explain its significance.
- Describe the halting problem and
explain its significance.
- Provide a proof that the halting
problem is undecidable.
Homework and Tests
- We will assign weekly homework, which will count a total of
15% of your Homework
+ Test average. In order to allow me to discuss
homework in class and to be fair to all students, this is the
late homework policy: First, the presumption is that you will
normally turn in homework on time. The individual homeworks are
designed to be easily doable in the (approximate) week allocated
to each. Also, if you get behind in the homework it will be
difficult to catch up, since the material is cumulative. Turning
homework in on time means at the beginning of class on the day it is due.
Homework turned in after class is considered late. (Of course I
will consider extenuating circumstances.) I will take off a half letter grade for
each day late, including weekends. The date will be determined
by when the TA or I receives the work, not by when you deposit
it. Of course, I will consider extenuating circumstances.
- In addition, there will be three
tests (each covering two chapters), each of which will
count 25% of your Homework
+ Test average.
- Finally, there will be a quiz
over algorithm analysis, counting 10% of your Homework + Test average.
Homework Assignments
- Due Jan 27: S (p. 83) Ex. 1.4 (c, f), 1.5 (c, f), 1.6 (e, i),
1.32.
- Due Feb 3: S Ex. 1.7 (c), 1.8 (a), 1.9 (a), 1.10 (a), 1.14
(b)*, 1.16 (b); extra credit: 1.15.
*Hint for
1.14b: Swap the accept and non-accept states of the NFA in 1.16a
and show it doesn’t work (i.e., accept the complement of the
original machine).
- Due Feb 10: S Ex. 1.18 (do for 1.6 e, i), 1.19 (b), 1.20 (b,
h), 1.21 (b), 1.29 (b).
- Due Feb 20: S Ex. 2.1 (c, d), 2.4 (b, e), 2.9, 2.14, 2.16;
extra credit: 2.6 (b).
- Due Feb. 27: S Ex. 2.5 (for 2.4e), 2.7 (for 2.6d), 2.10, 2.11,
2.26.
- Due Mar. 5: S Ex. 3.1 (c, d), 3.2 (c, e), 3.6, 3.8 (c), 3.15b
(Hint: Use a
NTM).
- Due Mar. 16: S Ex. 4.2, 4.4, 4.12*, 4.15**.
*Hint for 4.12:
Re-express the subset condition as an empty language.
**Hint for
4.15: Re-express the condition as the intersection of two
regular languages.
- Due Apr 4: S Ex. 7.1 (a, b, e, f), 7.6, 7.8.
- Due Apr 11: S Ex. 7.4, 7.9, 7.10*.
*Hint: See Ex.
4.3 for ALLDFA.
- Due Apr 18: S Ex. 7.5, 7.7, 7.11; extra credit: 7.21.
Tentative Test Schedule
- Feb 17: Test 1 (S1)
- Mar 16: Test 2 (S2–3)
- Apr 23: Test 3 (S4, 7)
- Apr 27: Quiz (Sh 3, 14)
Final Exam and Grading
SUBJECT TO CHANGE! It is anticipated that your grade will be
50% Homework + Tests
and 50% Final Exam. However, if you are satisfied with your Homework + Test average,
you will not have to take the final exam.
The Final Exam is 10:15 a.m. – 12:15 p.m. on Thursday, May 3.
The cumulative Final Exam will be two hours worth
of questions similar in difficulty to those on the Tests.
For Students with Disabilities
The Office of Disability Services and the Campus Disability Monitors
have asked us to pass this statement along in our syllabi:
Students who have a disability that require
accommodation(s) should make an appointment with the Office of
Disability Services (974-6087) to discuss their specific needs as
well as schedule an appointment with me during my office hours.
Handouts
Return to MacLennan’s
home page
Send mail
to Bruce MacLennan / MacLennan@eecs.utk.edu
This page is web.eecs.utk.edu/~mclennan/Classes/312
Last updated: 2012-04-20.