Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.

Slides:



Advertisements
Similar presentations
1 Lecture 32 Closure Properties for CFL’s –Kleene Closure construction examples proof of correctness –Others covered less thoroughly in lecture union,
Advertisements

Recursive Definitions and Structural Induction
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
CS466 (Prasad)L1Sets1 Introduction Language: Set of Strings.
Transparency No. 2-1 Formal Language and Automata Theory Chapter 2 Deterministic Finite Automata (DFA) (include Lecture 3 and 4)
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
1 Languages and Finite Automata or how to talk to machines...
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
1 Regular Grammars Generate Regular Languages. 2 Theorem Regular grammars generate exactly the class of regular languages: If is a regular grammar then.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
CSE115/ENGR160 Discrete Mathematics 03/31/11
Courtesy Costas Busch - RPI1 Non-regular languages.
Costas Busch - RPI1 Mathematical Preliminaries. Costas Busch - RPI2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Courtesy Costas Busch - RPI1 Mathematical Preliminaries.
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
Prof. Busch - LSU1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Induction and recursion
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 7 Mälardalen University 2010.
Chapter 2 Languages.
Induction and recursion
Chapter 4: Induction and Recursion
Section 5.3. Section Summary Recursively Defined Functions Recursively Defined Sets and Structures Structural Induction.
1 Chapter 1 Automata: the Methods & the Madness Angkor Wat, Cambodia.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
1 Chapter 1 Introduction to the Theory of Computation.
Grammars CPSC 5135.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
Chapter 5: Sequences, Mathematical Induction, and Recursion 5.9 General Recursive Definitions and Structural Induction 1 Erickson.
4.3 Recursive Definitions and Structural Induction Sometimes it is difficult to define an object explicitly. However, it may be easy to define this object.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
Language: Set of Strings
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
1 Theory of Computation 計算理論 2 Instructor: 顏嗣鈞 Web: Time: 2:20-5:10 PM, Tuesday Place: BL 112.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
Specifying Languages Our aim is to be able to specify languages for use in the computer. The sketch of an FSA is easy for us to understand, but difficult.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Lecture 1 Overview Topics 1. Proof techniques: induction, contradiction Proof techniques June 1, 2015 CSCE 355 Foundations of Computation.
Grammars A grammar is a 4-tuple G = (V, T, P, S) where 1)V is a set of nonterminal symbols (also called variables or syntactic categories) 2)T is a finite.
Mathematical Induction Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If.
Types of Proof Lecture 4 Sections 0.4 Wed, Aug 29, 2007.
1 Mathematical Preliminaries. 2 Sets Functions Relations Graphs Proof Techniques.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Discrete Structures Li Tak Sing( 李德成 ) mt263f ppt 1.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Costas Busch - LSU1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Introduction to Automata Theory
Chapter 4: Induction and Recursion
CSCE 355 Foundations of Computation
Introduction to the Theory of Computation
Chapter 3 The Real Numbers.
Induction and Recursion
Computer Science Department
CSCE 355 Foundations of Computation
Single Final State for NFA
Introduction to Automata Theory
Introduction to Finite Automata
Chapter 1 Introduction to the Theory of Computation
CSCE 355 Foundations of Computation
Presentation transcript:

Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively enumerable UnrestrictedTM Regular expressions

Basic assumptions: 1.Sets and operations on sets 2.Power set, product, relation, function 3.Countable and uncountable sets 4.Equivalence relation 5.Directed graphs, trees

Proof Methods

If-and-only-if Proofs “X if and only if Y” 1)Prove the if part: Assume Y and prove X 2)Prove the only-if part: Assume X and prove Y. An equivalent form to “if X then Y” is “if not Y then not X”

Proof by Contradiction To prove “if H then C” prove “H and NOT C implies falsehood” Counter Examples To prove a statement is not a theorem Provide an example

Inductive Proofs Prove a statement S(X) about a family of objects X (e.g., integers, trees) in two parts: 1. Basis: Prove for one or several small values of X directly. 2. Inductive step: Assume S(Y ) for Y “smaller than" X; prove S(X) using that assumption.

Example A binary tree with n leaves has 2n-1 nodes. S(T) : if T is a binary tree with n leaves, then T has 2n – 1 nodes. Basis: T has 1 leaf Induction: Assume S(U) for trees with fewer nodes than T. T is (r, U, V) #nodes of T = 1 + #nodes of U + # nodes of V

Recursive definition of a set specifies a method to construct elements of a set. Recursive definition consists of two required parts: 1.Basis step 2.Recursive step Also, a closure property is included in the definition. Example: Basis: 0  Recursive step: If n  N, then n + 1   Closure property: n  N only if it can be obtained from 0 by a finite applications of recursive step.

Principle of mathematical induction and recursive definition Let X be a set defined by recursion from the basis X 0 and let X 0, X 1,  X i  be the sequence of sets generated by the recursive process. Also, let P be a property defined on the elements of X. If i.P holds for each element in X 0 ii.whenever P holds for every element in the sets X 0, X 1, , X i, P also holds for every element in X i+1. Then, P holds for every element in X. Example: n! > 2 n for n  4 Proof: Let P be the property n! > 2 n. Basis: n=4 (24 =) 4! > 2 4 (= 16) Induction step: Assume that i! > 2 i for i = 4, 5, , n. by assumption n! > 2 n also, if n  4, then n+1 > 2 so, (n+1)n! > 2 n 2 i.e. (n+1)! > 2 n+1 So, P is true for all n  4.

Proof Method How to show two sets A and B are equal? Need to show A is a subset of B (A  B) and B is a subset of A How to show A is a subset of B? Need to show that if x is a member of A, then it is member of B

Formal languages A formal language is a subset of the set of all strings that can be formed using zero or more symbols of an alphabet. The topic of this course is formal languages.

Definitions A string over a set X is a finite sequence of elements from X X is an alphabet The length of a string x denoted by |x| is the number of symbols in the string A language is a set of strings over an alphabet Null string denoted by  is basis for recursive definition of a string; length of null string is 0.

Recursive definition of a string Let  be an alphabet. The set of strings over  (denoted by  * ) is defined as follows: 1.Basis:    * 2.Recursive step: If w   * and a  , then wa   *. 3.Closure: w   * only if it can be obtained from  by a finite number of applications of the recursive step. The length of a string is the number of applications of the recursive step A language over an alphabet  is a subset of  *.