Homework. Staff. Happy and fruitful New Year. Welcome to CS105. (Happy New Year) שנה טובה. Meeting Times.

Similar documents
Homework. Staff. Happy and fruitful New Year. Welcome to CSE105. (Happy New Year) שנה טובה. and. Meeting Times

Computational Models - Lecture 1 1

Critical CS Questions

CPS 220 Theory of Computation REGULAR LANGUAGES

Computational Models #1

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CS 154 Introduction to Automata and Complexity Theory

Computational Models: Class 1

CHAPTER 1 Regular Languages. Contents

COM364 Automata Theory Lecture Note 2 - Nondeterminism

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

Time Magazine (1984)

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CS:4330 Theory of Computation Spring Regular Languages. Finite Automata and Regular Expressions. Haniel Barbosa

Non-Deterministic Finite Automata

Announcements. Problem Set 6 due next Monday, February 25, at 12:50PM. Midterm graded, will be returned at end of lecture.

UNIT-III REGULAR LANGUAGES

Computability Theory

Theory of Computation Lecture 1. Dr. Nahla Belal

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

Theory of Computation (I) Yijia Chen Fudan University

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 208: Automata Theory and Logic

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

Proofs, Strings, and Finite Automata. CS154 Chris Pollett Feb 5, 2007.

CS 154. Finite Automata, Nondeterminism, Regular Expressions

A Note on Turing Machine Design

Automata Theory, Computability and Complexity

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

CSE 2001: Introduction to Theory of Computation Fall Suprakash Datta

CSE 105 THEORY OF COMPUTATION

Computational Models

THEORY OF COMPUTATION

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

acs-04: Regular Languages Regular Languages Andreas Karwath & Malte Helmert Informatik Theorie II (A) WS2009/10

Computability and Complexity

CSE 105 THEORY OF COMPUTATION

I have read and understand all of the instructions below, and I will obey the University Code on Academic Integrity.

CS21 Decidability and Tractability

CSE 105 THEORY OF COMPUTATION

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

CSE 105 THEORY OF COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Introduction to Languages and Computation

Announcements. Problem Set Four due Thursday at 7:00PM (right before the midterm).

Automata: a short introduction

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

CS 581: Introduction to the Theory of Computation! Lecture 1!

Part I: Definitions and Properties

CS 121, Section 2. Week of September 16, 2013

Pumping Lemma for CFLs

CSC173 Workshop: 13 Sept. Notes

INF Introduction and Regular Languages. Daniel Lupp. 18th January University of Oslo. Department of Informatics. Universitetet i Oslo

CS 530: Theory of Computation Based on Sipser (second edition): Notes on regular languages(version 1.1)

Turing Machines Part III

CSCI 2670 Introduction to Theory of Computing

CSE 105 Theory of Computation

CISC4090: Theory of Computation

Context-Free Languages

Homework Assignment 6 Answers

CSE 105 THEORY OF COMPUTATION

TAKE-HOME: OUT 02/21 NOON, DUE 02/25 NOON

CSE 105 THEORY OF COMPUTATION

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata and Languages

CS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF)

CSE 105 THEORY OF COMPUTATION

Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties

Proving languages to be nonregular

CISC 4090 Theory of Computation

Computer Sciences Department

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

2017/08/31 Chapter 1.2 & 1.3 in Sipser Ø Announcement:

CSE 105 THEORY OF COMPUTATION

Fooling Sets and. Lecture 5

The Pumping Lemma and Closure Properties

Finite Automata Part Two

Introduction to Automata

Introduction to Theoretical Computer Science. Motivation. Automata = abstract computing devices

Non-emptiness Testing for TMs

ME 025 Mechanics of Materials

Math/EECS 1028M: Discrete Mathematics for Engineers Winter Suprakash Datta

Formal Definition of a Finite Automaton. August 26, 2013

Computational Models - Lecture 4

The Church-Turing Thesis

CS5371 Theory of Computation. Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)

Regular Languages and Finite Automata

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

V Honors Theory of Computation

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

CSCE 551: Chin-Tser Huang. University of South Carolina

Decidability and Undecidability

Transcription:

Welcome to CS5 and Happy and fruitful ew Year שנה טובה (Happy ew Year) Meeting Times Lectures: Tue Thu 3:3p -4:5p WLH ote: Thu Oct 9 Lecture is canceled there may be a make-up lecture by quarter s end. Sections: Mon :p -:5p WLH 9 Scott Tue 3:p -3:5p WLH 9 Amos ote: Students should come to both sections. Mid-term: Thu Oct 3 3:3p WLH Final: Tue Dec 9 :3a -:p TBA 3 Staff Instructor: Amos Israeli room -6. Office Hours: Fri - or by arrangement Tel#: 534-886 e-mail: aisraeli at cs.ucsd.edu TA: Scott Yilek room B-4a Office Hours: Mon 4-5:3 e-mail: syilek at cs.ucsd.edu Web Page: http://www.cse.ucsd.edu/classes/fa8/cse5 Homework There will be 5-6 assignments. Assignments will be given on Monday s section and must be returned by the Thu lecture one week later. First assignment will be given next Monday and must be returned on Wed Oct 8 or in Scott s mailbox on Thu Oct 9 th. 4

Academic Integrity You are encouraged to discuss the assignments problems among yourselves. Each student must hand in her/his own solution. You must Adhere to all rules of Academic Integrity of CS Dept. UCSD and others. (Meaning: no cheating or copying from any source) 5 Grading A: (85-) B: (7-84) C: (55-69) D: (4-54) F: (-39) 7 Grading Assignments: % Midterm: 3% -% (students are allowed to drop it) open book open notes. Final: 5% -8% open book open notes. 6 Bibliography Required: Michael Sipser: Introduction to the Theory of Computation Second Edition Thomson. 8

Introduction to Computability Theory Lecture: Finite Automata and Regular Languages Prof. Amos Israeli (פרופ' עמוס ישראלי) 9 Introduction Computability Theory deals with the profound mathematical basis for Computer Science yet it has some interesting practical ramifications that I will try to point out sometimes. The question we will try to answer in this course is: What can be computed? What Cannot be computed and where is the line between the two? Introduction Computer Science stems from two starting points: Mathematics: What can be computed? And what cannot be computed? Electrical Engineering:How can we build computers? ot in this course. Computational Models A Computational Model is a mathematical object (Defined on paper) that enables us to reason about computation and to study the properties and limitations of computing. We will deal with Three principal computational models in increasing order of Computational Power.

Computational Models We will deal with three principal models of computations:. Finite Automaton (in short FA). recognizes Regular Languages.. Stack Automaton. recognizes Context Free Languages. 3. Turing Machines (in short TM). recognizes Computable Languages. 3 Finite Automata - A Short Example The control of a washing machine is a very simple example of a finite automaton. The most simple washing machine accepts quarters and operation does not start until at least 3 quarters were inserted. Alan Turing -A Short Detour Dr. Alan Turing is one of the founders of Computer Science (he was an English Mathematician). Important facts:. Invented Turing machines.. Invented the Turing Test. 3. Broke the German submarine transmission coding machine Enigma. 4. Was arraigned for being gay and committed suicide soon after. 4 Thanks: Vadim Lyubasehvsky ow on PostDoc in Tel-Aviv

Finite Automata - A Short Example The control of a washing machine is a very simple example of a finite automaton. The most simple washing machine accepts quarters and operation does not start until at least 3 quarters were inserted. The second washing machine accepts 5 cents coins as well. Finite Automata - A Short Example The control of a washing machine is a very simple example of a finite automaton. The most simple washing machine accepts quarters and operation does not start until at least 3 quarters were inserted. The second washing machine accepts 5 cents coins as well. The most complex washing machine accepts $ coins too.

Finite Automaton -An Example q s q q States: Q = { q q q s Initial State: s Final State: q q } Finite Automaton Formal Definition ( F ) A finite automaton is a 5-tupple Q Σδ q where:. Q is a finite set called the states.. Σ is a finite set called the alphabet. 3. δ : Q Σ Q is the transition function. 4. q Q is the start state and 5. F Q is the set of accept states. 3 Finite Automaton An Example q s q q Transition Function: δ ( q s ) = q δ ( q s ) = q δ ( q ) =δ ( q ) = q δ ( q ) =δ ( q ) = q Alphabet: { }. ote: Each state has all transitions. Accepted words:... Observations. Each state has a single transition for each symbol in the alphabet.. Every FA has a computation for every finite string over the alphabet. 4

Examples. accepts all words (strings) ending with. M The language recognized by called L ( ) M M ( ) { } satisfies: L M ends with. = w w 5 The automaton Correctness Argument: The FA s states encode the last input bit and q is the only accepting state. The transition function preserves the states encoding. How to do it. Find some simple examples (short accepted and rejected words). Think what should each state remember (represent). 3. Draw the states with a proper name. 4. Draw transitions that preserve the states memory. 5. Validate or correct. 6. Write a correctness argument. Examples. accepts all words (strings) ending with. M ( ) { ends with } L M = w w. accepts all words ending with. M 3. accepts all words ending with and M 4 ε the empty word. This is the Complement Automaton of.. M 8

Examples M. accepts all words (strings) ending with. ( ) { ends with } L M = w w.. accepts all words ending with. M 3 M { ab } 3. accepts all strings over alphabet 4 that start and end with the samesymbol. 9 Languages Definition:A language is a set of strings over some alphabet. Examples: L = L L 3 { } m n { n are positive integers } = m = bit strings whose binary value is a multiple of 4 3 Examples (cont) n m M 5 4. accepts all words of the form mn m n > where are integers and. 5. accepts all words in. M 6 { } 3 Languages A language of an FA M L M is the set of M ( ) words (strings) that M accepts. ( M ) If we say that recognizes. La = L M La If La is recognized by some finite A La automaton is a Regular Language. 3

Some Questions Q: How do you prove that a language La is regular? M ( ) A: By presenting an FA satisfying La= L M. Q: How do you prove that a language La is not regular? A: Hard! to be answered on Week3 of the course. Q3: Why is it important? A3: Recognition of a regular language requires a controller with bounded Memory. 33 The Regular Operations given a language one can verify it is regular by presenting an FA that accept the language. Regular Operations give us a systematic way of constructing languages that are apriority regular. (That is: o verification is required). 35 The Regular Operations Let A and B be regular languages above the same alphabet. We define the 3 Regular Operations: Σ { } { } { x x x k and x A } Union: A B = x x A or x B. Concatenation: A o B = xy x A and y B. * Star: A =.... k k 34 The Regular Operations - Examples A = { good bad } A o B = goodgirl goodboy badgirl. B = { girl boy } { good bad girl boy } { badboy } A B = * ε good bad goodgood goodbad A =. goodgoodgoodbad badbadgood bad... 36

Theorem The class of Regular languages above the same alphabet is closedunder the union operation. Meaning: The union of two regular languages is Regular.. 37 Proof idea If A and A are regular each has its own recognizing automaton and respectively. In order to prove that the language A A is regular we have to construct an FA that accepts exactly the words in A A. ote:cannot apply followed by. 39 Example { } { } Consider L starts with and = w w L = w ends with. w The union set is the set of all bit strings that either start with or end with. Each of these sets can be recognized by an FA with 3 states. Can you construct an FA that recognizes the union set? Proof idea We construct an FA that simulates the computations of and simultaneously. Each state of the simulating FA represents a pair of states of and of respectively. Can you define the transition function and the final state(s) of the simulating FA? 4

Wrap up In this talk we:. Motivated the course.. Defined Finite Automata (Latin Pl. form of automaton). 3. Learned how to deal with construction of automata and how to come up with a correctness argument. A 4