This course introduces automata, formal languages, and computability.
Automata are formal—
We will cover automata as specifications of formal languages and as restricted models of computation in their own right. We will primarily discuss three such automata, finite automata, pushdown automata, and turing machines, alongside their respective classes of formal languages, regular expressions, context-free languages, and recursively enumerable languages. We will use these models as touchstones for discussing issues of expressivity and computability more broadly. We will employ three programming projects to ground the theory covered in concrete implementations and to explore its applications (such as lexing and parsing algorithms).
The goal of CS 350 is to build on CS 250 in arming students with the ability to reason precisely and formally; to cover specific restricted models of computation and formal grammars that are standard and ubiquitous in the field; and to introduce undecidability and the fundamental limits of computation.
Jiaqing "Jordan" Yuan (TA)
3:00-5:00p Tues, Fri
Sept 27, in class
Nov 13, in class
Thursday, December 13, 10:45-1:15p
“Introduction to Automata Theory, Languages, and Computation” by Hopcroft, Motwani, Ullman (We’ll abbreviate as HMU). You may use either the x2nd or 3rd edition. See the resources section below for more useful books/links.
Below is a (tentative) list of topics we will be covering each week. As the term progresses, some of these topics will likely change or be moved around to adapt to our progress. Such changes will be reflected here as they occur.
Introduction, syllabus, pretest
Discrete math review
Diagonalization, Fixed-point iteration, regular languages
Regular languages, Regular expressions
REs, DFAs, NFAs
DFAs, NFAs and intersection, complement constructions
RE-NFA conversions, Subset algorithm
3.0-3.5, 4.2, 4.3
Review 2.*, 3.*, 4.2, 4.3
Speaker: Matt Might, Intro to pumping lemma
Nonregular languages, pumping lemma
Top-down Parsing, PDAs intro
Pushdown Automata (PDAs)
CNF, Pumping Lemma, Review
Review 5,6,7; 8.0-8.3
Fall Break (no class)
Thanksgiving (no class)
Incomputable problems, TMs
TMs, Incomputable problems
No more class
Final exam (at 10:45a)
Slides and any other materials on these topics may be posted below. I will use Keynote to export pdf and pptx versions of the slides, but sometimes these will not look quite right due to animations or fonts.
Assignment 0: Discrete Math Review (Due: Tuesday, Sept 4, 11:59p)
Assignment 1: Regular languages, DFA, NFA (Due: Friday, Sept 21, 11:59p)
Assignment 2: Regular languages, DFA, NFA, part 2 (Due: Friday, Oct 5, 11:59p)
Assignment 3: Pumping lemma for regular languages (Due: Monday, Oct 22, 11:59p)
Assignment 4: Context-free grammars (Due: Tuesday, Nov 13, 11:59p)
Assignment 5: PDAs, CFGs, CFLs (Due: Tuesday, Nov 20, 11:59p)
Fall Break Extra Credit (Due: Wednesday, Nov 28, 11:59p)
Assignment 6: Turing machines (Due: Thursday, Dec 6, 11:59p)
Project 0: Discrete structures and regexes (Due: Monday, Sept 24, 11:59p)
Project 1: Finite-automata library (Due: Sunday, Oct 28, 11:59p)
Project 2: Lexer and parser for WhileProc (Due: Saturday, Dec 8, 11:59p)
All announcements will be made here on this page or on Canvas. Please check that you’re signed-up at the start of the semester!
Emergency announcement such as last-minute class cancelations (which should not happen often), will also be announced via this page and canvas.
Assignment 0 is posted.
A latex example/template is posted. On many distros you can install package texlive-full (or try texlive-most) and then use $ pdflatex assignment-template.tex to render a pdf.
Assignment 1 is now posted above.
Project 0 is now posted!
Assignment 2 released. Although it is due after the midterm, it is highly recommended you at least attempt each problem and use it to help study.
A solution to project 0 is posted.
Project 1 is now posted.
Assignment 3 is now posted.
Example solution-set for midterm #1 is now posted.
Solutions for p1, and Tuesday’s in-class coding, are now posted.
Project 2 is now posted.
Example solution-set for midterm #2 is now posted.
a grade of C or better in CS 203 or 302, CS 250, and MA 125 or 225; or with permission of department; or as a CS graduate student.
3 credit hours
You must upload your assignments and projects by the due date—
Your written assignments should be compiled using LaTeX and printed or submitted electronically as a .pdf and .tex source, together in a .tar.gz. Handwritten assignments and those not produced with LaTeX will be assessed a 5-15% penalty. The one exception to this policy is in the case of drawing a graph or using other figures/illustrations to answer a homework problem. In such cases you’re encouraged to use tikz and/or graphviz, but are also allowed to print and legibly add your figures in afterward, by hand, using blue or black pen.
Programming projects will be graded using Python 3.7 on an Ubuntu 18 LTR machine and should be compatible with this setup, regardless of your development environment at home. If you run into issues with this, we highly recommend trying Lubuntu within a VirtualBox VM as a backup plan. We are also setting up an auto-grading server for the first time this term and will try to use this if possible, but if this should fail for you close to the deadline, you are still required to upload working code to Canvas by the deadline to be graded offline. All work on assignments and projects must be yours, done without help from other students, and in accordance with the university’s honor code (more below).
Office hours for the instructional staff will be posted on the course web page within a few days into the semester.
While we will provide assistance with assignments during office hours, you are responsible for developing and debugging your own programs. Do not rely on the instructional staff to make your project work. We can help you to understand the concepts of the class, not help you complete specific homework.
Important announcements will be made in class or on the class web page. Please make it a habit to check the class web page daily. You may also use the Canvas web forum to ask general questions of interest to the class as a whole, e.g., conceptual questions, administrative issues, or project clarification questions. Do not post any information that would violate the university academic integrity policy.
Assignments, projects, and exams will not be graded on a curve, however final letter grades may be. Canvas will provide you with the latest grades and statistics we’ve released so that you can gauge your own progress as we progress.
You are responsible for all material discussed in lecture and posted on the class web page, including announcements, deadlines, policies, readings, etc. During the semester we may provide ungraded practice homework exercises and solutions. While we will not collect these exercises, completing them is essential preparation for exams. You may work together on any ungraded problems given, and you may of course come to office hours for additional help.
Your final course grade will be determined according to the following percentages. Some extra-credit opportunities may be offered during the term on assignments, in projects, or on exams. Points earned as “extra credit” will be tallied for each of these three sections separately and no section can exceed full points. For example, extra credit offered on assignment 0 can help if points are lost on assignment 4, but will not restore points lost on exams.
Any request for reconsideration of any grading on coursework must be submitted within one week of when it is returned. Exam regrading requests must be made in writing. Any coursework submitted for reconsideration may be regraded in its entirety, which could result in a lower score if warranted.
Final course grades will be curved as necessary, based on each student’s total numeric score for all coursework at the end of the semester. The curve will be nondecreasing and monotonic. The goal is naturally to have little to no curve.
Projects must be submitted electronically following the instructions given in class. Projects may not be submitted by any other means (e.g., please do not email your projects to us). It is your responsibility to test your program and verify that it works properly before submitting. All projects are due at 11:59p on the day indicated on the project assignment, according to the submission server’s internal clock. Projects will be accepted up to 24h late at a 15% penalty, and no later unless by special permission given in advance.
Project extensions will not be granted due to system problems, network problems, power outages, etc., so do not wait to submit a project until the night it is due. You may submit multiple times up to the deadline, and only your last on-time submission is graded. Similarly, if you submit more than 24h late, only your last submission before the deadline will be graded. No consideration in grading will be made for errors made in transferring files or submitting the wrong version of your project. Having a working, unsubmitted version will not count; only submitted code will be be counted.
Unlike lower-level programming classes, we will not always provide you with test cases before projects are due. Instead, you will be responsible for developing your own techniques for testing your projects. To reiterate: your projects will be graded based on test cases not provided in advance. Because grading for projects is done automatically, you must follow the project specification exactly. Also, while projects will generally not be graded on style or documentation, we reserve the right to manually grade program source code for some projects. If you have any questions about how your programs should be setup in order to be graded properly, be sure to contact the TA or myself well in advance of the deadline.
Finally, any "hard coding" in a project assignment will result in a score of zero for that project, and is considered a bad-faith effort. Hard coding refers to attempting to make a program appear as if it works correctly, when in fact it does not. One example of hard coding would be printing the desired output instead of computing it. This is only one example, and if you have any questions as to what constitutes hard coding, be sure to ask ahead of time.
The class includes a midterm and a final exam. Dates for the exams are posted on the Schedule. The date of these exams is tentative and may change based on class the University Registrar. Confirmation of an exam date will be posted on the schedule at least two weeks in advance of any exam.
Besides the policies in this syllabus, the University’s policies apply during the semester. Various policies that may be relevant appear in the Undergraduate Catalog & Handbook.
If you experience difficulty during the semester keeping up with the academic demands of your courses, you may consider contacting UAB student services at (205) 934-4300 or your academic advisor. UAB’s educational counselors can help with time management issues, reading, note-taking, and exam preparation skills. If you encounter personal issues during the term and wish to speak to a counselor, UAB student counseling services is on the 3rd floor of the Learning Resource Center.
Any student who needs to be excused for an absence from a single lecture, recitation, or lab due to a medically necessitated absence shall: a) Make a reasonable attempt to inform the instructor of his/her illness prior to the class. b) Upon returning to the class, present their instructor with a self-signed note attesting to the date of their illness. Each note must contain an acknowledgment by the student that the information provided is true and correct. Providing false information to University officials is prohibited under the student code of conduct and may result in disciplinary action.
Self-documentation may not be used for the Major Scheduled Grading Events as defined below and it may only be used for only 1 class meeting during the semester. Any student who needs to be excused for a prolonged absence (2 or more consecutive class meetings), or for a Major Scheduled Grading Event, must provide written documentation of the illness from the Health Center or from an outside health care provider. This documentation must verify dates of treatment and indicate the time-frame that the student was unable to meet academic responsibilities. In addition, it must contain the name and phone number of the medical service provider to be used if verification is needed. No diagnostic information will ever be requested. The Major Scheduled Grading Events for this course include project deadlines and any midterm or final exam.
It is the University’s policy to provide accommodations for students with religious observances conflicting with exams, but it is your responsibility to inform the instructor well in advance of intended religious observances. Written notice must be provided immediately upon an exam date being announced or confirmed in order for an absence to be excused. If you have a conflict with one of the planned exams, you must inform us prior to the end of the first two weeks of the class.
For missed exams due to excused absences, the instructor will arrange a makeup exam. However, unless immediate notice is given as early as possible of the reason for any missed coursework, an excused absence may not be granted. If you might miss an exam for any other reason other than those above, you must contact the instructor in advance to discuss the circumstances. We are not obligated to offer a substitute assignment or to provide a makeup exam unless the failure to perform was due to an excused absence.
The policies for excused absences do not apply to project assignments. Projects will be assigned with sufficient time to be completed by students who have a reasonable understanding of the necessary material and begin promptly. In cases of extremely serious documented illness of lengthy duration or other protracted, severe emergency situations, the instructor may consider extensions on project assignments, depending upon the specific circumstances.
Our goal is not to make lecture attendance an official part of the class’s final grade; it is your responsibility to make lectures and to makeup material where missed. However, in serious cases of absences, we reserve the right to remove up to one final letter grade for each multiple of 5 absences from class lectures. E.g., A student earning an A- who was absent 7 times from lecture may be assigned a B- instead. Likewise, class participation is encouraged but is not a standard part of the grade. If you are inclined to use your computer to take notes or check email during class, please do not sit where you could be a distraction to others; if you need to use your phone, step out of class; if you must arrive late, please enter quietly and sit in the back. Students who are disrespectful of the environment or are disruptive to the learning process of others will be asked to leave and counted as absent.
UAB is committed to providing an accessible learning environment for everyone. Students with disabilities who have been certified by Disability Support Services as needing any type of special accommodations should see the instructor as soon as possible within the first two weeks of class. All arrangements for exam accommodations as a result of disability must be made and arranged with the instructor at least three business days prior to the exam date, or accommodations will not be made. If you have a disability but have not yet contacted DSS, they may be reached at (205) 934-4205.
Don’t cheat. Just don’t do it.
You may not share code/homework, view one another’s code/homework, share or discuss solutions. We have tools to check for duplicate code modulo variable renaming, comments, clause ordering, etc. It’s not worth it.
Programming projects are to be written individually, therefore cooperation or use of unauthorized materials on projects is a violation of the University’s Code of Academic Integrity. Any evidence of this, or of unacceptable use of computer accounts, use of unauthorized materials or cooperation on exams or quizzes, or other possible violations of the Honor Code, will be submitted to the Department and Honor Councils, which could result in an F for the course, suspension, or expulsion.
For learning the course concepts (including the programming languages), students are welcome to study together or to receive help from anyone else. You may discuss with others the project requirements, the features of the programming languages used, what was discussed in class and in the class web forum, and general syntax errors. Examples of questions that would be allowed are "Does a Java class definition end in a semicolon?" or "What does a ’class not found’ error indicate?", because they convey no information about the contents of a project.
The CS department follows a 3-strikes policy for undergrads, a 2-strikes policy for grad students (the last two), and a 1-strike policy for researchers. The first strike results in a zero on the homework or exam, or a dropped letter grade in the course. A second strike results in an F in the course. A third strike elevates the situation to the College level and will likely result in expulsion. All honor code violations become part of your permanent academic record.
When it comes to actually writing a project assignment, other than help from the instructional staff a project must solely and entirely be your own work. Working with another student or individual, or using anyone else’s work in any way except as noted in this paragraph, is a violation of the code of academic integrity and will be reported to the Honor Council. You may not discuss design of any part of a project with anyone except the instructor or teaching assistants. Examples of questions you may not ask others might be "How did you implement this part of the project?" or "Please look at my code and help me find my stupid syntax error!". You may not use any disallowed source of information in creating either their project design or code. When writing projects you are free to use ideas or short fragments of code from published textbooks or publicly available information, but the specific source must be cited in a comment in the relevant section of the program.
Violations of the Code of Academic Integrity may include, but are not limited to:
Failing to do all or any of the work on a project by yourself, other than assistance from the instructional staff.
Using any ideas or any part of another person’s project, or copying any other individual’s work in any way.
Giving any parts or ideas from your project, including test data, to another student.
Allowing any other students access to your program on any computer system.
Looking over someone’s shoulder as they work on an assignment/project. Allowing someone to look over your shoulder as you work.
Transferring any part of a project to or from another student or individual by any means, electronic or otherwise.
If you have any question about a particular situation or source then consult with the instructors in advance. Should you have difficulty with a programming assignment you should see the instructional staff in office hours, and not solicit help from anyone else in violation of these rules.
It is the responsibility, under the honor policy, of anyone who suspects an incident of academic dishonesty has occurred to report it to their instructor, or directly to the Honor Council.
Every semester the department has discovered a number of students attempting to cheat on project assignments, in violation of academic integrity requirements. Students’ academic careers have been significantly affected by a decision to cheat. Think about whether you want to join them before contemplating cheating, or before helping a friend to cheat.
You are certainly encouraged to form study groups and to discuss the ideas and concepts of the course, independent of exam/homework solutions. You are also welcome and encouraged to study and compare or discuss their implementations of the programming projects with any others after they are graded, provided that all of the students in question have received nonzero scores for that project assignment, and if that project will not be extended upon in a later project assignment.
If you have a suggestion for improving this class, don’t hesitate to tell the instructor or TA(s) during the semester. At the end of the semester, please don’t forget to provide your feedback using the campus-wide IDEA Course Evals system. Your comments will help make this class better for future students!
Although every effort has been made to be complete and accurate, unforeseen circumstances arising during the semester could require the adjustment of any material given here. Consequently, given due notice to students, the instructors reserve the right to change any information on this syllabus or in other course materials.
Some lectures include materials developed by John Johnstone.
Here are books you may be interested in if you want to go into much more depth on class material, or would like an alternative to HMU.
Michael Sipser, “Introduction to the Theory of Computation”
Elaine Rich, “Automata, Computability, and Complexity”
Dexter Kozen, “Automata and Computability”
Lewis and Papadimitriou, “Elements of the Theory of Computation”
Aho, Lam, Sethi, Ullman, Compilers: Principles, Techniques, and Tools (ALSU)
Mitchell, Foundations for Programming Languages
And here are some additional links that may be of interest.
“Godel, Escher, Bach” by Douglas Hofstadter (A pulitzer-prize winning book with very relevant themes.)
“Godel’s Proof” by Ernest Nagel and James Newman (Excellent semi-technical walkthrough of Godel’s incomplteness result.)
JFLAP: automata software