Rosen 5th ed., §3.2 ~9 slides, ~½ lecture

Slides:



Advertisements
Similar presentations
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.,
Advertisements

22C:19 Discrete Math Sequence and Sums Fall 2011 Sukumar Ghosh.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
A sequence is a set of numbers arranged in a definite order
Fall 2006Costas Busch - RPI1 Languages. Fall 2006Costas Busch - RPI2 Language: a set of strings String: a sequence of symbols from some alphabet Example:
Sequences and Summations
2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수열과 합 (Sequences and Summations)
CSC312 Automata Theory Lecture # 2 Languages.
CSC312 Automata Theory Lecture # 2 Languages.
Costas Busch - LSU1 Languages. Costas Busch - LSU2 Language: a set of strings String: a sequence of symbols from some alphabet Example: Strings: cat,
Lecture Two: Formal Languages Formal Languages, Lecture 2, slide 1 Amjad Ali.
Introduction to sequences and series
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/18 Module.
강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수열과 합 (Sequences and Summations)
Lecture 5 Regular Expressions CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
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.
2014 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수열과 합 (Sequences and Summations)
Module #10: Proof Strategies Rosen 5 th ed., §3.1 (already covered)
Chapter 3 – Sequence and String CSNB 143 Discrete Mathematical Structures.
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.
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.
11.1 An Introduction to Sequences & Series By: L. Keali’i Alicea.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Basic Structure : Sets, Functions, Sequences, and Sums Sequences and Summations.
3/16/20161 … and now for… Sequences. 3/16/20162 Sequences Sequences represent ordered lists of elements. A sequence is defined as a function from a subset.
8.1 CompSci 102© Michael Frank Today’s topics Integers & Number TheoryIntegers & Number Theory – –Sequences – –Summations Reading: Sections 3.2Reading:
CMPD133 – DISCRETE STRUCTURE Chapter 1 - Topic 2 – Sequence & Strings.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
8.1 CompSci 102© Michael Frank Today’s topics Integers & Number TheoryIntegers & Number Theory – –More proof techniques – –Sequences – –Summations Reading:
Lecture #2 Advanced Theory of Computation. Languages & Grammar Before discussing languages & grammar let us deal with some related issues. Alphabet: is.
The sum of the infinite and finite geometric sequence
Languages Prof. Busch - LSU.
Languages Costas Busch - LSU.
Natural Language Processing - Formal Language -
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Cardinality of Sets Section 2.5.
VCU, Department of Computer Science CMSC 302 Sequences and Summations Vojislav Kecman 9/19/2018.
Rosen 5th ed., §3.2 ~19 slides, ~1 lecture
Rosen 5th ed., §3.2 ~19 slides, ~1 lecture
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
Discrete Mathematics and its Applications
Rosen 5th ed., §§ ~18 slides, ~1 lecture
Section 11.1 Sequences and Series
ICS 253: Discrete Structures I
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
Chapter Five: Nondeterministic Finite Automata
Advanced Algorithms Analysis and Design
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
CS 250, Discrete Structures, Fall 2015 Nitesh Saxena
9.1 Sequences Sequences are ordered lists generated by a
Module #13: Inductive Proofs
Discrete Mathematics and its Applications
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Rosen 5th ed., §§ ~18 slides, ~1 lecture
Sequences and Summation Notation
Chapter 1 Introduction to the Theory of Computation
Discrete Mathematics and its Applications
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Discrete Mathematics and its Applications
CSC312 Automata Theory Lecture # 2 Languages.
CSNB 143 Discrete Mathematical Structures
Languages Fall 2018.
Discrete Mathematics and its Applications
Terminology and Symbols
Presentation transcript:

Rosen 5th ed., §3.2 ~9 slides, ~½ lecture Module #11: Sequences Rosen 5th ed., §3.2 ~9 slides, ~½ lecture 2019-02-19 (c)2001-2003, Michael P. Frank

§3.2: Sequences & Strings 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 summation is a compact notation for the sum of all terms in a (possibly infinite) series. 2019-02-19 (c)2001-2003, Michael P. Frank

Sequences Formally: A sequence or series {an} is identified with a generating function f:SA for some subset SN (often S=N or S=N{0}) and for some set A. If f is a generating function for a series {an}, then for nS, the symbol an denotes f(n), also called term n of the sequence. The index of an is n. (Or, often i is used.) 2019-02-19 (c)2001-2003, Michael P. Frank

Sequence Examples Many sources just write “the sequence a1, a2, …” instead of {an}, to ensure that the set of indices is clear. Our book leaves it ambiguous. An example of an infinite series: Consider the series {an} = a1, a2, …, where (n1) an= f(n) = 1/n. Then {an} = 1, 1/2, 1/3, … 2019-02-19 (c)2001-2003, Michael P. Frank

Example with Repetitions Consider the sequence {bn} = b0, b1, … (note 0 is an index) where bn = (1)n. {bn} = 1, 1, 1, 1, … Note repetitions! {bn} denotes an infinite sequence of 1’s and 1’s, not the 2-element set {1, 1}. 2019-02-19 (c)2001-2003, Michael P. Frank

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) 2019-02-19 (c)2001-2003, Michael P. Frank

The Trouble with Recognition The problem of finding “the” generating function given just an initial subsequence is not well defined. 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 should we define the simplicity of a function? We might define simplicity as the reciprocal of complexity, but… There are many plausible, competing definitions of complexity, and this is an active research area. So, these questions really have no objective right answer! 2019-02-19 (c)2001-2003, Michael P. Frank

What are Strings, Really? This book says “finite sequences of the form a1, a2, …, an are called strings”, but infinite strings are also used sometimes. Strings are often restricted to sequences composed of symbols drawn from a finite alphabet, and may be indexed from 0 or 1. Either way, the length of a (finite) string is its number of terms (or of distinct indexes). 2019-02-19 (c)2001-2003, Michael P. Frank

Strings, more formally Let  be a finite set of symbols, i.e. an alphabet. A string s over alphabet  is any sequence {si} of symbols, si, indexed by N or N{0}. If a, b, c, … are symbols, the string s = a, b, c, … can also be written abc …(i.e., without commas). If s is a finite string and t is a string, the concatenation of s with t, written st, is the string consisting of the symbols in s, in sequence, followed by the symbols in t, in sequence. 2019-02-19 (c)2001-2003, Michael P. Frank

More String Notation The length |s| of a finite string s is its number of positions (i.e., its number of index values i). If s is a finite string and nN, sn denotes the concatenation of n copies of s.  denotes the empty string, the string of length 0. If  is an alphabet and nN, n  {s | s is a string over  of length n}, and *  {s | s is a finite string over }. 2019-02-19 (c)2001-2003, Michael P. Frank