Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c)2001-2004 Michael P. Frank Modified by (c) 2004-2005 Haluk Bingöl 1/18 Module.

Slides:



Advertisements
Similar presentations
Based on Rosen, Discrete Mathematics & Its Applications, 5e (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module #0 - Overview.
Advertisements

1 Sequences Rosen 6 th ed., §2.4 2 Sequences A sequence represents an ordered list of elements.A sequence represents an ordered list of elements. e.g.,
22C:19 Discrete Math Sequence and Sums Fall 2011 Sukumar Ghosh.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Section 1.6: Sets Sets are the most basic of discrete structures and also the most general. Several of the discrete structures we will study are built.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
CS5371 Theory of Computation
EE1J2 – Discrete Maths Lecture 7
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank. Modified By Mingwu Chen Induction.
Sequences and Summations
2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수열과 합 (Sequences and Summations)
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 2 Languages.
Lecture Two: Formal Languages Formal Languages, Lecture 2, slide 1 Amjad Ali.
Mathematical preliminaries Episode 2 0 Sets Sequences Functions Relations Strings.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
1 Sequences Rosen 6 th ed., §2.4 2 Sequences A sequence represents an ordered list of elements.A sequence represents an ordered list of elements. Formally:
Discrete math Bijections 2 A function f is a one-to-one correspondence, or a bijection or reversible, or invertible, iff it is both one-to-one and onto.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/37 Module.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl Module #4.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
Sequences & Series MATH Precalculus S. Rook.
강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수열과 합 (Sequences and Summations)
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/21 Module.
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
CompSci 102 Discrete Math for Computer Science
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Module Code MA1032N: Logic Lecture for Week Autumn.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
Discrete Structures By: Tony Thi By: Tony Thi Aaron Morales Aaron Morales CS 490 CS 490.
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction Episode 0 What is TOC (Theory of Computation) about? Giorgi Japaridze Theory of Computability Subject: The fundamental mathematical properties.
Lecture 2.5: Sequences CS 250, Discrete Structures, Fall 2014 Nitesh Saxena Adopted from previous lectures by Zeph Grunschlag.
2014 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수열과 합 (Sequences and Summations)
9/13/2011Lecture Sequences1 Lecture 2.5: Sequences* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Zeph.
Module #10: Proof Strategies Rosen 5 th ed., §3.1 (already covered)
Chapter 3 – Sequence and String CSNB 143 Discrete Mathematical Structures.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Theory of computation Introduction theory of computation: It comprises the fundamental mathematical properties of computer hardware, software,
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Notions & Notations (2) - 1ICOM 4075 (Spring 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Spring.
13.1 Sequences. Definition of a Sequence 2, 5, 8, 11, 14, …, 3n-1, … A sequence is a list. A sequence is a function whose domain is the set of natural.
CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014CSC-305 Design and Analysis of AlgorithmsBS(CS) -6 Fall-2014 Design and Analysis of Algorithms.
8.1 CompSci 102© Michael Frank Today’s topics Integers & Number TheoryIntegers & Number Theory – –Sequences – –Summations Reading: Sections 3.2Reading:
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
CMPD133 – DISCRETE STRUCTURE Chapter 1 - Topic 2 – Sequence & Strings.
8.1 CompSci 102© Michael Frank Today’s topics Integers & Number TheoryIntegers & Number Theory – –More proof techniques – –Sequences – –Summations Reading:
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
Sequences and Sums.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
VCU, Department of Computer Science CMSC 302 Sequences and Summations Vojislav Kecman 9/19/2018.
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
ICS 253: Discrete Structures I
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
CS 250, Discrete Structures, Fall 2015
Copyright © Zeph Grunschlag,
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
CS 250, Discrete Structures, Fall 2015 Nitesh Saxena
Discrete Mathematics and its Applications
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
CSC312 Automata Theory Lecture # 2 Languages.
CSNB 143 Discrete Mathematical Structures
Languages Fall 2018.
Presentation transcript:

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module #12 - Sequences Bogazici University Department of Computer Engineering CmpE 220 Discrete Mathematics 12. Sequence Haluk Bingöl

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 2/18 Module #12 - Sequences Module #12: Sequences Rosen 5 th ed., §3.2 ~9 slides, ~½ lecture

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 3/12 Module #12 - Sequences §3.2: Sequences, Strings, & Summations A sequence or series is just like an ordered n-tuple, except: Each element in the series has an associated index number. A sequence or series may be infinite. A string is a sequence of symbols from some finite alphabet. A summation is a compact notation for the sum of all terms in a (possibly infinite) series.

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 4/12 Module #12 - Sequences Sequences Def. A sequence or series {a n } is identified with a generating function f:S  A for some subset S  ℕ and for some set A. Often we have S= ℕ or S= ℤ + = ℕ  {0}. Sequences may also be generalized to indexed sets, in which the set S does not have to be a subset of ℕ. For general indexed sets, S may not even be a set of numbers at all. Def. If f is a generating function for a series {a n }, then for n  S, the symbol a n denotes f(n), also called term n of the sequence. The index of a n is n. (Or, often i is used.) A series is sometimes denoted by listing its first and/or last few elements, and using ellipsis (…) notation. E.g., “{a n } = 0, 1, 4, 9, 16, 25, …” is taken to mean  n  ℕ, a n = n 2.

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 5/12 Module #12 - Sequences Sequence Examples Some authors write “the sequence a 1, a 2, …” instead of {a n }, to ensure that the set of indices is clear. Be careful: Our book often leaves the indices ambiguous. Ex. An example of an infinite series: Consider the series {a n } = a 1, a 2, …, where (  n  1) a n = f(n) = 1/n. Then, we have {a n } = 1, 1/2, 1/3, …

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 6/12 Module #12 - Sequences Example with Repetitions Like tuples, but unlike sets, a sequence may contain repeated instances of an element. Consider the sequence {b n } = b 0, b 1, … (note that 0 is an index) where b n = (  1) n. Thus, {b n } = 1,  1, 1,  1, … Note repetitions! This {b n } denotes an infinite sequence of 1’s and  1’s, not the 2-element set {1,  1}.

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 7/12 Module #12 - Sequences Recognizing Sequences Sometimes, you’re given the first few terms of a sequence, and you are asked to find the sequence’s generating function, or a procedure to enumerate the sequence. Examples: What’s the next number? 1,2,3,4,…1,3,5,7,9,…2,3,5,7,11,... 5 (the 5th smallest number >0) 11 (the 6th smallest odd number >0) 13 (the 6th smallest prime number)

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 8/12 Module #12 - Sequences The Trouble with Sequence Recognition As you know, these problems are popular on IQ tests, but… The problem of finding “the” generating function given just an initial subsequence is not a mathematically well defined problem. This is because there are infinitely many computable functions that will generate any given initial subsequence. We implicitly are supposed to find the simplest such function (because this one is assumed to be most likely), but, how are we to objectively define the simplicity of a function? We might define simplicity as the reciprocal of complexity, but… There are many different plausible, competing definitions of complexity, and this is an active research area. So, these questions really have no objective right answer! Still, we will ask you to answer them anyway… (Because others will too.)

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 9/12 Module #12 - Sequences What are Strings, Really? This book says “finite sequences of the form a 1, a 2, …, a n are called strings”, but infinite strings are also discussed sometimes. Strings are normally restricted to sequences composed of symbols drawn from a finite alphabet, and are often indexed from 0 or 1. But these are really arbitrary restrictions also. Either way, the length of a (finite) string is just its number of terms (or of distinct indices).

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 10/12 Module #12 - Sequences Strings, more formally Def. Let  be a finite set of symbols, i.e. an alphabet. A string s over alphabet  is any sequence {s i } of symbols, s i , normally indexed by ℕ or ℕ  {0}. Notation. If a, b, c, … are symbols, the string s = a, b, c, … can also be written abc…(i.e., without commas).

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 11/12 Module #12 - Sequences Strings, more formally Def. If s is a finite string and t is any string, then the concatenation of s with t, written just st, is simply the string consisting of the symbols in s, in sequence, followed by the symbols in t, in sequence.

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 12/12 Module #12 - Sequences More Common String Notations Def. The length |s| of a finite string s is its number of positions (i.e., its number of index values i). Def. If s is a finite string and n  ℕ, then s n denotes the concatenation of n copies of s.  or “” denotes the empty string, the string of length 0. This is fairly common, but the book uses λ instead. Def. If  is an alphabet and n  ℕ,  n :  {s | s is a string over  of length n}, and  * :  {s | s is a finite string over  }.

Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 13/12 Module #12 - Sequences References Rosen Discrete Mathematics and its Applications, 5e Mc GrawHill, 2003Rosen Discrete Mathematics and its Applications, 5e Mc GrawHill, 2003