CS466 (Prasad)L1Sets1 Introduction Language: Set of Strings.

Slides:



Advertisements
Similar presentations
Mathematical Preliminaries
Advertisements

Chapter 2 Revision of Mathematical Notations and Techniques
Chapter Three: Closure Properties for Regular Languages
Properties of Regular Languages
Recursive Definitions and Structural Induction
1 Chapter Equivalence, Order, and Inductive Proof.
The Engineering Design of Systems: Models and Methods
Lecture 15UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 15.
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
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 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.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
CSE115/ENGR160 Discrete Mathematics 03/31/11
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.
Theoretical Computer Science COMP 335 Fall 2004
Cs466(Prasad)L3RE1 Representation of Languages. cs466(Prasad)L3RE2 Need finite descriptions of infinite sets of strings (=> specify languages). Discover.
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
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.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
1 CSCI 2400 section 3 Models of Computation Instructor: Costas Busch.
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
Induction and recursion
CSCI 4325 / 6339 Theory of Computation Chapter One Zhixiang Chen Department of Computer Science University of Texas-Pan American.
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.
Mathematical Preliminaries Strings and Languages Preliminaries 1.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
1 INFO 2950 Prof. Carla Gomes Module Modeling Computation: Language Recognition Rosen, Chapter 12.4.
1 Chapter 1 Introduction to the Theory of Computation.
Binary Trees. Binary Tree Finite (possibly empty) collection of elements A nonempty binary tree has a root element The remaining elements (if any) are.
1 Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 1 Adaptation to this.
Mathematical Preliminaries. Sets Functions Relations Graphs Proof Techniques.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Fall 2005Costas Busch - RPI1 Mathematical Preliminaries.
Prof. Busch - LSU1 Mathematical Preliminaries. Prof. Busch - LSU2 Mathematical Preliminaries Sets Functions Relations Graphs Proof Techniques.
1 Module 14 Regular languages –Inductive definitions –Regular expressions syntax semantics.
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Mathematical Induction
Language: Set of Strings
CHAPTER 3 FUZZY RELATION and COMPOSITION. 3.1 Crisp relation Product set Definition (Product set) Let A and B be two non-empty sets, the product.
Sets. Definitions (I) Collection of elements such that: There are no duplicates There is no order Special sets Universe (U or E): all elements under consideration.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
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.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Chapter 0 Discrete Mathematics 1. A collection of objects called elements; no repetition or order. A = {a 1, …, a n } or {a 1, a 2, …} N = {0, 1, 2, …}{1,
CS201: Data Structures and Discrete Mathematics I
CSCI-2400 Models of Computation.
Mathematical Preliminaries
Chapter 1 Introduction to the Theory of Computation
CSCE 355 Foundations of Computation
Presentation transcript:

CS466 (Prasad)L1Sets1 Introduction Language: Set of Strings

CS466 (Prasad)L1Sets2 Specification and recognition of languages Sets Operations Defining sets (inductively) Proving properties about sets (using induction) Defining functions on sets (using recursion) Proving properties about functions (using induction) Strings Operations Languages : set of strings Operations

CS466 (Prasad)L1Sets3 Representation of Sets Set: collection of objects –Finite : can use enumeration E.g., {a,b,c} –Infinite : requires describing characteristic property of members finitely E.g., { n  N | even(n) /\ square(n) } COURSE GOAL: Study techniques for finitely describing specific families of sets

CS466 (Prasad)L1Sets4 Semantics - Syntax Regular sets/languages –Generator Regular Expressions, Regular Grammars –Recognizer Finite State Automata Context-free languages –Generator Context-free Grammar –Recognizer Push-down Automata

CS466 (Prasad)L1Sets5 Member, Union, Intersection, Subset, Powerset, Cartesian product, … Set Difference DeMorgan’s Laws Operations on Sets

CS466 (Prasad)L1Sets6 Partition of a Set X The set partition of non-empty subsets of X is a partition of X iff (1) “covering” (2) “pair-wise disjoint” Collectively Exhaustive / Mutually Exclusive

CS466 (Prasad)L1Sets7 Examples Set of Natural numbers is partitioned by “mod 5” relation into five “equivalence classes”: { {0,5,10,…}, {1,6,11,…}, {2,7,12,…}, {3,8,13,…}, {4,9,14,…} } “String length” can be used to partition the set of all bit strings. { {},{0,1},{00,01,10,11},{000,…,111},… }

CS466 (Prasad)L1Sets8 (Total) Function A B f Domain Co-domain ( Range)

CS466 (Prasad)L1Sets9 One-One Function (injection) A B f Domain Co-domain ( Range)

CS466 (Prasad)L1Sets10 Onto Function (surjection) A B f Domain Co-domain ( Range)

CS466 (Prasad)L1Sets11 One to one correspondence Function (bijection) A B f Domain Co-domain ( Range)

CS466 (Prasad)L1Sets12 Inductive Definitions Constructive Example –Set of natural numbers N = {0,1,2,3,…} – Finite representation in terms of Seed element: zero Closure Operation: successor function {0,s(0),s(s(0)),s(s(s(0))),…} –Imposes additional structure on the domain.

CS466 (Prasad)L1Sets13 Basis case: Recursive step: Closure: only if it can be obtained from 0 by a finite number of applications of the operation s. (* Minimality condition to uniquely determine N *)

CS466 (Prasad)L1Sets14 URLs for Visualizing Recursion book.old/code/ch11/applets/HilbertApplet.html book.old/code/ch11/applets/SierpinskiApplet.html book.old/solutions/ch11/SierpinskiGasket.html

CS466 (Prasad)L1Sets15 Recursive Definitions of Functions Addition –Basis case: –Recursive step: –Closure: … Multiplication –Basis case: –Recursive step: –Closure: …

CS466 (Prasad)L1Sets16 Defining a Subset of Grid Points y x

CS466 (Prasad)L1Sets17 Explicit Definition Implicit Definition Recursive Definition

CS466 (Prasad)L1Sets18 Other Recursive Definitions

CS466 (Prasad)L1Sets19 Observations Recursive definition of a set typically contains a finite number of seed elements and a finite number of rules to generate successive sets of points, whose infinite union yields the set. Even though the various definitions “look” different, they capture the same set. Equivalence Problem.

CS466 (Prasad)L1Sets20 Another Example

CS466 (Prasad)L1Sets21 “Generation”

CS466 (Prasad)L1Sets22 Principle of Mathematical Induction PBasis: P holds for every element in PInduction Step: If, whenever P holds for every element in P P also holds for every element in then, by PMI, P P holds for every element in

CS466 (Prasad)L1Sets23 Let be the Fibonacci number. Then, prove that Basis: Hypothesis: Prove: Example

CS466 (Prasad)L1Sets24 Proof (Induction Hypothesis)

CS466 (Prasad)L1Sets25 Example Strictly Binary Tree Single node. Every node is a leaf or has precisely two children. Prove that for all SBTs: 2*leaves(T) - 2 = arcs(T) T1 T2

CS466 (Prasad)L1Sets26 (Induction on the number of nodes or height.) Basis: 2*1 - 2=0 Induction Hypothesis: For trees of height h <, the result holds. Induction Step: Show it holds for trees of height 2*leaves(T1) - 2=arcs(T1) (induction hypothesis) 2*leaves(T2) - 2=arcs(T2) 2*(leaves(T1)+leaves(T2)) =arcs(T1)+arcs(T2) 2*leaves(T) - 2=arcs(T)