Chapter 5: Sequences, Mathematical Induction, and Recursion 5.9 General Recursive Definitions and Structural Induction 1 Erickson.

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

Specifying Languages Our aim is to be able to specify languages for use in the computer. The sketch of the FSA is easy for us to understand, but difficult.
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.
Sets and its element A set is a collection of well-defined and well-distinguished objects. The objects that make up a set are called the members or elements.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Recursive Definitions and Structural Induction
Copyright © Cengage Learning. All rights reserved.
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.
Regular Languages Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 3 Comments, additions and modifications.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
Sets 1.
Sets 1.
CSE115/ENGR160 Discrete Mathematics 03/31/11
1 Regular Expressions/Languages Regular languages –Inductive definitions –Regular expressions syntax semantics Not covered in lecture.
Induction and recursion
Relations Chapter 9.
L ECTURE 2 Chapter 3 Recursive Definitions. R ECURSIVE D EFINITION It is method of defining sets.
Chapter 2 Languages.
Induction and recursion
Section 5.3. Section Summary Recursively Defined Functions Recursively Defined Sets and Structures Structural Induction.
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Two examples English-Words English-Sentences alphabet S ={a,b,c,d,…}
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Lecture#16 Discrete Mathematics. Recursion Now, 1 is an odd positive integer by the definition base. With k = 1, = 3, so 3 is an odd positive integer.
1 Chapter 1 Introduction to the Theory of Computation.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
Sequences and Summations
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
Introduction to Theory of Automata By: Wasim Ahmad Khan.
1 Module 14 Regular languages –Inductive definitions –Regular expressions syntax semantics.
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.
Chapter Mathematical Induction 4.2 Strong Induction and Well-Ordering 4.3 Recursive Definitions and Structural Induction 4.4 Recursive Algorithms.
Regular Expressions and Languages A regular expression is a notation to represent languages, i.e. a set of strings, where the set is either finite or contains.
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
1 Lecture 3.3: Recursion CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph Grunschlag.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
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)
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.
Recursive Definations Regular Expressions Ch # 4 by Cohen
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.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
Welcome to Form 4 Mathematics Topic for the day SETS.
Discrete Mathematics Lecture # 22 Recursion.  First of all instead of giving the definition of Recursion we give you an example, you already know the.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
Lecture 03: Theory of Automata:2014 Asif Nawaz Theory of Automata.
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.
CS336 F07 Counting 2. Example Consider integers in the set {1, 2, 3, …, 1000}. How many are divisible by either 4 or 10?
Fall 2002CMSC Discrete Structures1 Chapter 3 Sequences Mathematical Induction Recursion Recursion.
3.3 Mathematical Induction 1 Follow me for a walk through...
(Proof By) Induction Recursion
Dr. Ameria Eldosoky Discrete mathematics
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Mathematical Induction Recursion
Specifying Languages Our aim is to be able to specify languages for use in the computer. The sketch of the FSA is easy for us to understand, but difficult.
CHAPTER 1 - Sets and Intervals
CHAPTER 1 - Sets and Intervals
Sets. EXAMPLE 1 The set O of odd positive integers less than 10 can be expressed by O = { l, 3, 5, 7, 9}. * This way of describing a set is known as.
Copyright © Cengage Learning. All rights reserved.
CS 250, Discrete Structures, Fall 2015 Nitesh Saxena
Copyright © Cengage Learning. All rights reserved.
Chapter 7 Logic, Sets, and Counting
Chapter 1 Introduction to the Theory of Computation
Terminology and Symbols
Presentation transcript:

Chapter 5: Sequences, Mathematical Induction, and Recursion 5.9 General Recursive Definitions and Structural Induction 1 Erickson

A recursive definition for a set consists of the following three components: I.BASE: A statement that certain objects belong to a set. II.RECURSION: A collection of rules indicating how to form new set objects from those already known to be in a set. III.RESTRICTION: A statement that no objects belong to the set other than those coming from I and II. 5.9 General Recursive Definitions and Structural Induction 2Erickson

Consider the set of Boolean expressions defined below. Give derivations showing that ((p  q)  ~((p  ~s)  r)) is a Boolean expression over the English alphabet {a, b, c, …, x, y, z}. I. BASE: Each symbol of the alphabet is a Boolean expression. II. RECURSION: If P and Q are Boolean expressions, then so are (a) (P  Q) and (b) (P  Q) and (c) ~P. III. RESTRICTION: There are no Boolean expression over the alphabet other than those obtained from Iand II. 5.9 General Recursive Definitions and Structural Induction 3Erickson

Let S be a finite set with at least one element. String over S A string over S is a finite sequence of elements from S. Characters The elements of S are called characters of the string. Length The length of a string is the number of characters it contains. Null String over S The null strong over S is defined to be the string with no characters. It is usually denoted by e and is said to have length General Recursive Definitions and Structural Induction 4Erickson

Structural Induction When a set has been defined recursively, a version of mathematical induction, called structural induction, can be used to prove that every object in the set satisfies a given property. 5.9 General Recursive Definitions and Structural Induction 5Erickson

Let S be a set that has been defined recursively, and consider a property that objects in S may or may not satisfy. To prove that every object in S satisfies the property: 1. Show that each object in the BASE for S satisfies the property; 2. Show that for each rule in the RECURSION, if the rule is applied to the objects in S that satisfy the property, then the objects defined by the rule also satisfy the property. Because no objects other than those obtained through the BASE and RECURSION conditions are contained in S, it must be the case that every object in S satisfies the property. 5.9 General Recursive Definitions and Structural Induction 6Erickson

Define a set S recursively as follows: I.BASE: 1  S, 2  S, 3  S, 4  S, 5  S, 6  S, 7  S, 8  S, 9  S, II.RECURSION: If s  S and t  S, a. s0  Sb. st  S III.RESTRICTION: Nothing is in S other than objects defined in I and II above. Use structural induction to prove that no string in S represents an integer with a leading zero. 5.9 General Recursive Definitions and Structural Induction 7Erickson

16.Give a recursive definition for the set of all strings of 0’s and 1’s for which all the 0’s precede all the 1’s. 17.Give a recursive definition for the set of all strings of a’s and b’s that contain an odd number of a’s. 5.9 General Recursive Definitions and Structural Induction 8Erickson