### Course Syllabus

**Course URL:**http://soltys.cs.csuci.edu/blog/?page_id=3183**CI Catalogue URL****Instructor:**Michael Soltys <michael.soltys@csuci.edu>**Twitter:**@MichaelMSoltys**Course Outline:**This course presents the foundations of computation. We define the basic elements of computation: alphabets, words and languages. We then study languages through the lens of standard models of computation: Finite Automata (as DFAs, NFAs and Regular Expressions), Context Free Grammars (as grammars and as PDAs), and finally Turing machines. We will look at issues of decidability, and at impossibility results (e.g., Pumping Lemmas, undecidability, the Post Correspondence problem, etc.). At the end of the course the student will have a firm grasp of the foundations of computer science and the limits of computability, as well as deciding what model of computation is suitable for a given problem.**Lectures:**Tuesdays, 4-5pm, Location Bell Tower 2372.**Textbook:**Chapter 8 in*An Introduction to the Analysis of Algorithms*, by Michael Soltys.**Grading:**One long assignment, to be completed throughout the course, and handed in at the end.**How to avoid plagiarism:**The assignment will be worked on individually; verbal discussions of problems among individuals are allowed, but you should not show written notes, and you should not leave such discussions with written notes.**Attendance:**Attendance is required.**Students with disabilities:**Cal State Channel Islands is committed to equal educational opportunities for qualified students with disabilities in compliance with Section 504 of the Federal Rehabilitation Act of 1973 and the Americans with Disabilities Act (ADA) of 1990. The mission of Disability Accommodation Services is to assist students with disabilities to realize their academic and personal potential. Students with physical, learning, or other disabilities are encouraged to contact the Disability Accommodation Services office at (805) 437-8510 for personal assistance and accommodations. Please discuss your arrangements with the instructor as soon as possible.- Check this web page regularly for announcements.

### Announcements and class diary

**April 17, 2018:**We discussed problem 10 in the Assignment Problems section below.**April 10, 2018:**No class, instructor at the ABET accreditation workshop.**April 3, 2018:**We introduce Turing Machines.- Mar 27, 2018: Seminar by Adrian Domanico.
- Mar 20, 2018: Spring break
**Mar 13, 2018:**We introduced Push Down Automata, as the “hardware” corresponding to Context-Free Grammars, and gave a few examples.**Mar 6, 2018:**Introduced Context Free Grammar (CFG); gave a brief history, and applications to programming languages and compilers. We posed an interesting problem; given two finite lists of equal length of strings, such that and . Is there an algorithm for this problem; there is a algorithm in the case where we allow at most repetitions of each string; can we do better?**Feb 27, 2018:**We looked at the Dynamic Programming algorithm for translating DFAs to Regular Expressions ().**Feb 20, 2018:**How to show that a language is not regular? We introduce the Pumping Lemma, and show examples of applications.**Feb 13, 2018:**We discussed Regular Expressions, and the fact that DFAs, NFAs and REs recognize the same class of languages: regular languages. Also, the limitations of these models: if counting is necessary, they cannot do it.**Feb 6, 2018:**Definition of a regular language; all finite languages are regular. Extended transition function () and Non-deterministic finite automata (NFA).- Jan 31, 2018: This course has a Canvas page: https://csuci.instructure.com/courses/4098 but we will use it minimally.
**Jan 30, 2018**: We introduced finite automata and saw some examples of languages recognized by them. We posed the following exercise: find a DFA for: .- Jan 25, 2018: Please pick up your course materials (at cost of printing) from the Copy Center at the UGlen Town Center (email: copycenter@coast-repro.com) .
**Jan 23, 2018**: First lecture, alphabets, words and languages; Kleene’s star and concatenation*.*We discussed the philosophical underpinnings of representing information with strings.

### Assignment Problems

- Give a DFA for and prove that it is correct.
- Let , that is, is the language of unary encodings of the first Fibonacci numbers. Design with as small a number of states as possible.
- Consider the family of languages , that is, is the languages of binary strings where the number of 0s is , where is a prime. Give the Regular Expression for .
- Use the Pumping Lemma to show that the language is
*not*regular. - Give an example of a language that is
*not*regular, but nevertheless satisfies the property asserted in the Pumping Lemma. Is this consistent with the Pumping Lemma itself? - Suppose that we are given a DFA with three states , where state 1 is the starting state, and state 3 is the accepting state. Each state has a self-loop on zero (0) and an arrow to the next state on one (1). Using the method for constructing a regular expression from a DFA, provide the corresponding regular expression. Also, simplify as you go using the *algebraic laws* for regular expressions.
- Do Problem 8.18 in the notes.
- Show that the language in question 4 is Context-Free.
- Design a Turing Machine for the following language: .
- Consider the following type of Turing machine: states , that is, it has four states besides a single
*halting state*, and the initial state . It has the following tape an input alphabet: , and the assumption is that initially the tape consists only of 0s (zeros). The machine starts in state and and when it halts, the contents of the tape are the*output.*The*contents*are understood to be the string consisting of the string between the left-most and the right-most 1, inclusive. If there are no 1s on the tape, the contents are considered to be . If there is a single 1, it is both the left-most and the right-most, and so the output is 1. Please design such a machine which outputs the longest possible string of 1s.