Introduction to Automata Theory. Reading: Chapter 1

Similar documents
Finite Automata. Reading: Chapter 2

Course 8 Properties of Regular Languages

Computability and computational complexity

Properties of Regular Languages. Reading: Chapter 4

Context-free grammars and. Basics of string generation methods

CSE 1400 Applied Discrete Mathematics Number Theory and Proofs

Homework 9. (n + 1)! = 1 1

Math F215: Induction April 7, 2013

1. By using truth tables prove that, for all statements P and Q, the statement

Lecture 9: Hierarchy Theorems

Infinite Sequences and Series

Lecture 2: Uncomputability and the Haling Problem

4.3 Growth Rates of Solutions to Recurrences

Section 5.1 The Basics of Counting

A Turing Machine. The Tape. Languages accepted by Turing Machines. Tape... Read-Write head. Context-Free n Languages. Control Unit.

PRACTICE FINAL SOLUTIONS

CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Counting Well-Formed Parenthesizations Easily

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

Series Review. a i converges if lim. i=1. a i. lim S n = lim i=1. 2 k(k + 2) converges. k=1. k=1

Davenport-Schinzel Sequences and their Geometric Applications

MATH 324 Summer 2006 Elementary Number Theory Solutions to Assignment 2 Due: Thursday July 27, 2006

Commutativity in Permutation Groups

Mathematical Induction

Seunghee Ye Ma 8: Week 5 Oct 28

Lecture Notes for CS 313H, Fall 2011

4 Mathematical Induction

Math 299 Supplement: Real Analysis Nov 2013

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

Lecture 10: Mathematical Preliminaries

Chapter 1 : Combinatorial Analysis

Induction: Solutions

Bertrand s Postulate

MA131 - Analysis 1. Workbook 7 Series I

Administrative Information. COS 341 Discrete Mathematics. Administrative Information. Discussion Sessions/Office Hours

Proof of Fermat s Last Theorem by Algebra Identities and Linear Algebra

CS151 Complexity Theory

2.1. The Algebraic and Order Properties of R Definition. A binary operation on a set F is a function B : F F! F.

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

} is said to be a Cauchy sequence provided the following condition is true.

Lecture 2. The Lovász Local Lemma

n k <. If an even palindrome subsequence consists 2

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

MA131 - Analysis 1. Workbook 2 Sequences I

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary

Oblivious Transfer using Elliptic Curves

Sets. Sets. Operations on Sets Laws of Algebra of Sets Cardinal Number of a Finite and Infinite Set. Representation of Sets Power Set Venn Diagram

Computability and computational complexity

Set Notation Review. N the set of positive integers (aka set of natural numbers) {1, 2, 3, }

1 Introduction. 1.1 Notation and Terminology

18.440, March 9, Stirling s formula

Introduction to Automata

CHAPTER I: Vector Spaces

The Local Harmonious Chromatic Problem

Wrap of Number Theory & Midterm Review. Recall: Fundamental Theorem of Arithmetic

Math 25 Solutions to practice problems

Probability and Information Theory for Language Modeling. Statistical Linguistics. Statistical Linguistics: Adult Monolingual Speaker

How many prime numbers are there?

MAT1026 Calculus II Basic Convergence Tests for Series

Read carefully the instructions on the answer book and make sure that the particulars required are entered on each answer book.

Arkansas Tech University MATH 2924: Calculus II Dr. Marcel B. Finan

SETS, LOGIC, PROOFS, AND RELATIONS

Resolution Proofs of Generalized Pigeonhole Principles

2017 PRACTICE MIDTERM SOLUTIONS

MA131 - Analysis 1. Workbook 3 Sequences II

Math 220A Fall 2007 Homework #2. Will Garner A

Square-Congruence Modulo n

Sums, products and sequences

The Borel hierarchy classifies subsets of the reals by their topological complexity. Another approach is to classify them by size.

On Some Properties of Digital Roots

Information Theory and Statistics Lecture 4: Lempel-Ziv code

Number Representation

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

ii. O = {x x = 2k + 1 for some integer k} (This set could have been listed O = { -3, -1, 1, 3, 5 }.)

Math 61CM - Solutions to homework 3

Sequences I. Chapter Introduction

Topics. Homework Problems. MATH 301 Introduction to Analysis Chapter Four Sequences. 1. Definition of convergence of sequences.

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

What is Probability?

These Two Weeks. Mathematical Induction Chapter 4 Lecture 10 & Lecture 13. CPRE 310 Discrete Mathematics. Mathematical Induction Problems

Properties of Fuzzy Length on Fuzzy Set

Advanced Stochastic Processes.

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

Some Explicit Formulae of NAF and its Left-to-Right. Analogue Based on Booth Encoding

MATH301 Real Analysis (2008 Fall) Tutorial Note #7. k=1 f k (x) converges pointwise to S(x) on E if and

Langford s Problem. Moti Ben-Ari. Department of Science Teaching. Weizmann Institute of Science.

SEQUENCES AND SERIES

In number theory we will generally be working with integers, though occasionally fractions and irrationals will come into play.

Assignment 5: Solutions

Let us consider the following problem to warm up towards a more general statement.

SEQUENCES AND SERIES

Hardness Results for Intersection Non-Emptiness

Chain conditions. 1. Artinian and noetherian modules. ALGBOOK CHAINS 1.1

2.4 - Sequences and Series

FIR Filter Design: Part II

Notes on the Combinatorial Nullstellensatz

Hoggatt and King [lo] defined a complete sequence of natural numbers

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 15

Transcription:

Itroductio to Automata Theory Readig: Chapter 1 1

What is Automata Theory? Study of abstract computig devices, or machies Automato = a abstract computig device Note: A device eed ot eve be a physical hardware! A fudametal questio i computer sciece: Fid out what differet models of machies ca do ad caot do The theory of computatio Computability vs. Complexity 2

(A pioeer of automata theory) Ala Turig (1912-1954) Father of Moder Computer Sciece Eglish mathematicia Studied abstract machies called Turig machies eve before computers existed Heard of the Turig test? 3

Theory of Computatio: A Historical Perspective 1930s Ala Turig studies Turig machies Decidability Haltig problem 1940-1950s Fiite automata machies studied Noam Chomsky proposes the Chomsky Hierarchy for formal laguages 1969 Cook itroduces itractable problems or NP-Hard problems 1970- Moder computer sciece: compilers, computatioal & complexity theory evolve 4

Laguages & Grammars Or words Laguages: A laguage is a collectio of seteces of fiite legth all costructed from a fiite alphabet of symbols Grammars: A grammar ca be regarded as a device that eumerates the seteces of a laguage - othig more, othig less N. Chomsky, Iformatio ad Cotrol, Vol 2, 1959 Image source: Nowak et al. Nature, vol 417, 2002 5

The Chomsky Hierachy A cotaimet hierarchy of classes of formal laguages Regular (DFA) Cotextfree (PDA) Cotextsesitive (LBA) Recursivelyeumerable (TM) 6

The Cetral Cocepts of Automata Theory 7

Alphabet A alphabet is a fiite, o-empty set of symbols We use the symbol (sigma) to deote a alphabet Examples: Biary: = {0,1} All lower case letters: = {a,b,c,..z} Alphaumeric: = {a-z, A-Z, 0-9} DNA molecule letters: = {a,c,g,t} 8

Strigs A strig or word is a fiite sequece of symbols chose from Empty strig is e (or epsilo ) Legth of a strig w, deoted by w, is equal to the umber of (o- e) characters i the strig E.g., x = 010100 x = 6 x = 01 e 0 e 1 e 00 e x =? xy = cocatetatio of two strigs x ad y 9

Powers of a alphabet Let be a alphabet. k = the set of all strigs of legth k * = 0 U 1 U 2 U + = 1 U 2 U 3 U 10

Laguages L is a said to be a laguage over alphabet, oly if L Í * è this is because * is the set of all strigs (of all possible legth icludig 0) over the give alphabet Examples: 1. Let L be the laguage of all strigs cosistig of 0 s followed by 1 s: L = {e, 01, 0011, 000111, } 2. Let L be the laguage of all strigs of with equal umber of 0 s ad 1 s: L = {e, 01, 10, 0011, 1100, 0101, 1010, 1001, } Caoical orderig of strigs i the laguage Defiitio: Let L = {e}; Is L=Ø? NO Ø deotes the Empty laguage 11

The Membership Problem Give a strig w Î *ad a laguage L over, decide whether or ot w ÎL. Example: Let w = 100011 Q) Is w Î the laguage of strigs with equal umber of 0s ad 1s? 12

Fiite Automata Some Applicatios Software for desigig ad checkig the behavior of digital circuits Lexical aalyzer of a typical compiler Software for scaig large bodies of text (e.g., web pages) for patter fidig Software for verifyig systems of all types that have a fiite umber of states (e.g., stock market trasactio, commuicatio/etwork protocol) 13

Fiite Automata : Examples O/Off switch actio state Modelig recogitio of the word the Start state Trasitio Itermediate state Fial state 14

Structural expressios Grammars Regular expressios E.g., uix style to capture city ames such as Palo Alto CA : [A-Z][a-z]*([ ][A-Z][a-z]*)*[ ][A-Z][A-Z] Start with a letter A strig of other letters (possibly empty) Should ed w/ 2-letter state code Other space delimited words (part of city ame) 15

Formal Proofs 16

Deductive Proofs From the give statemet(s) to a coclusio statemet (what we wat to prove) Logical progressio by direct implicatios Example for parsig a statemet: If y 4, the 2 y y 2. give coclusio (there are other ways of writig this). 17

Example: Deductive proof Let Claim 1: If y 4, the 2 y y 2. Let x be ay umber which is obtaied by addig the squares of 4 positive itegers. Claim 2: Give x ad assumig that Claim 1 is true, prove that 2 x x 2 Proof: 1) Give: x = a 2 + b 2 + c 2 + d 2 implies or follows 2) Give: a 1, b 1, c 1, d 1 3) è a 2 1, b 2 1, c 2 1, d 2 1 (by 2) 4) è x 4 (by 1 & 3) 5) è 2 x x 2 (by 4 ad Claim 1) 18

O Theorems, Lemmas ad Corollaries We typically refer to: A major result as a theorem A itermediate result that we show to prove a larger result as a lemma A result that follows from a already prove result as a corollary A example: Theorem: The height of a -ode biary tree is at least floor(lg ) Lemma: Level i of a perfect biary tree has 2 i odes. Corollary: A perfect biary tree of height h has 2 h+1-1 odes. 19

Quatifiers For all or For every Uiversal proofs Notatio= There exists Used i existetial proofs Notatio= Implicatio is deoted by => E.g., IF A THEN B ca also be writte as A=>B 20

Provig techiques By cotradictio Start with the statemet cotradictory to the give statemet E.g., To prove (A => B), we start with: (A ad ~B) ad the show that could ever happe What if you wat to prove that (A ad B => C or D)? By iductio (3 steps) Basis, iductive hypothesis, iductive step By cotrapositive statemet If A the B If ~B the ~A 21

Provig techiques By couter-example Show a example that disproves the claim Note: There is o such thig called a proof by example! So whe asked to prove a claim, a example that satisfied that claim is ot a proof 22

Differet ways of sayig the same thig If H the C : i. H implies C ii. iii. iv. H => C C if H H oly if C v. Wheever H holds, C follows 23

If-ad-Oly-If statemets A if ad oly if B (A <==> B) (if part) if B the A ( <= ) (oly if part) A oly if B ( => ) (same as if A the B ) If ad oly if is abbreviated as iff i.e., A iff B Example: Theorem: Let x be a real umber. The floor of x = ceilig of x if ad oly if x is a iteger. Proofs for iff have two parts Oe for the if part & aother for the oly if part 24

Summary Automata theory & a historical perspective Chomsky hierarchy Fiite automata Alphabets, strigs/words/seteces, laguages Membership problem Proofs: Deductive, iductio, cotrapositive, cotradictio, couterexample If ad oly if Read chapter 1 for more examples ad exercises 25