0% found this document useful (0 votes)
155 views6 pages

X X, X X, If F (X: at We Need

The median score on the recent test was 79%. A quiz will be given on Friday over Section 3.1 on functions. Section 3.1 covers the definition of a function, domain and codomain, one-to-one functions, onto functions, and bijections. It also discusses sequences, including increasing, decreasing, and constant sequences. Recurrence relations are used to define some sequences nonrecursively in terms of the index n.

Uploaded by

goflux pwns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views6 pages

X X, X X, If F (X: at We Need

The median score on the recent test was 79%. A quiz will be given on Friday over Section 3.1 on functions. Section 3.1 covers the definition of a function, domain and codomain, one-to-one functions, onto functions, and bijections. It also discusses sequences, including increasing, decreasing, and constant sequences. Recurrence relations are used to define some sequences nonrecursively in terms of the index n.

Uploaded by

goflux pwns
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

MAT214A

Wednesday 2/20
Spring 2019 10:55 am – 12:05 pm

Tests Graded: Median Score is 79%


Quiz on Section 3.1 on Friday

Recall - Section 3.1 Functions


Function Definition: A function f maps A to B and is denoted f: A  B.
For each element a ∈ A, there is exactly one element b ∈ B. We write this as f(a) = b
 The set A is the domain and the set B is the codomain.
 The codomain is the target set of the function. All output is constrained to this set.
 Range is the possible output of the function

One to One Functions


A function f: X Y is said to be 1-1, or injective, if f (x 1 ) = f (x2) then x1 = x2 for all x 1 , x 2 ∈X
[ ∀ x1 , x 2 ∈ X , if f (x1 ) = f (x2) then x1 = x2]

To prove that f is one to one, use a direct proof to show that if f (x1 ) = f (x2) then x1 = x2

Onto (Surjective) Functions


A function f: X  Y is said to be “onto Y” if for every y ∈Y, there exists x ∈X such that f(x) = y
∀y ∈ Y, ∃x ∈ X, f(x) = y
at We Need
To prove that f is onto, show that a map from y to x exists. The inverse function should map every y from the
codomain to an x in the domain, that is: f-1 (y) = x for f (x) = y.

Bijection: a function that is one to one and onto


Miscellaneous: Credit Cards – Check Digit
Luhn algorithm:
Excluding the check digit
#1 Double every other digit starting from the right. if doubling results in two digit number, add the digits
otherwise use original digit.
#2 Sum resulting digits
#3 If last digit is 0, the check digit is 0. Otherwise subtract last digit from 10 to get the check digit. 10 – 3 = 7

A) Section 3-1 Sequences and Stringsefin


 Sequences
A sequence is an ordered collection of objects in which repetitions are allowed. A sequence is a function
whose domain is either the set of positive integers (Z+ = {1,2,3,…}) or the set of nonnegative integers
(Znonneg = {0,1,2,3,…}),  depending on whether starting with 0 or 1 is more convenient. 

 Like a set, a sequence contains elements (or terms). Unlike a set, the same elements can appear
multiple times at different positions in a sequence, and order matters.i
 A sequence has output that is ordered by the input (this is not an unordered set).
 The position of an element in a sequence is its rank or index
 Sequences may be finite or infinite.

The name of the function is often "s", and, instead of writing the outputs as s(0), s(1), s(2), etc., they are often
written using subscripts: s0, s1, s2, …, sn, sn+1, …

Example:
0, 1, 4, 9, 16, 25, …
n
0 s0 = 0
1 s1 = 1
2 s2 = 4
3 s3 = 9
4 s4 = 16
. .
. .
n sn = n2
The domain is the set of nonnegative integers n∈Znonneg
This is an infinite sequence.
This sequence can also be written in general terms: {s n=n2 }∞n=0
Example:
n
1 s1 = a
2 s2 = a
3 s3 = b
4 s4 = a
5 s5 = b
The domain of n is the set {1, 2, 3, 4, 5}
This is a finite sequence.

Example: {3, 8, 13, 18, . . .} is an infinite sequence. The domain is n∈Znonneg


Write this sequence in general terms:
{s n=5 n+3 }∞n=0 n 0 1 2
sn 3 8 13

Example: {1, 8, 27, 64, 125} is a finite sequence. The domain is n∈Z+
Write this sequence in general terms:
{s n=n3 }5n=1 n 1 2 3
sn 1 8 27

Example: Consider {s n=(−2)n }∞n=0


What is
s0? 1
s1? -2
s2? 4
s3? -8

Increasing Sequences
A sequence is said to be increasing if sn < sn+1 for all n.
{1, 3, 5, 7, 9} is an increasing sequence. It is also a nondecreasing sequence.

A sequence is said to be nondecreasing if sn ≤ sn+1 for all n.


{1, 1, 2, 3, 5, 8, ….} is a nondecreasing sequence

Decreasing Sequences
A sequence is said to be decreasing if sn > sn+1 for all n.
{25, 20, 15, 10, 5} is a decreasing sequence. It is also a nonincreasing sequence.

A sequence is said to be nonincreasing if sn ≥ sn+1 for all n.


{100, 90, 90, 74, 74, 74, 30, 30} is a nonincreasing sequence.
1 ∞
Example: How do we describe {s n= ( ) } ? Increasing? Decreasing? Nonincreasing? Nondecreasing?
2k n=0

Example: How do we describe {s n=5 n+3 }∞n=0? Increasing? Decreasing? Nonincreasing?


Nondecreasing?

Subsequence
A subsequence is formed from a sequence {sn} by including some of the terms of the original sequence in the
same order and perhaps not including other terms.
Note: Technically, a sequence is a subsequence of itself unless we require it be a proper subsequence.

Example: For the sequence {1, 1, 2, 3, 5, 8, 13, 21, . . .}, we have {1, 2, 5, 13, . . .} is a possible subsequence.

Sequence Defined by a Recurrence Equation


Each term in the sequence is a function of previous terms.

Example:
0, 1, 1, 2, 3, 5, 8, 13, …
This is a sequence where the first term of the sequence is 0, the next is 1, and each one afterwards is the
sum of the two preceding terms.

s0 = 0 initial condition


s1 = 1 initial condition
s2 = 1 sn = sn–1 + sn–2, for all n > 1
s3 = 2
s4 = 3
s5 = 5
s6 = 8
.
.
The domain is the set of nonnegative integers Znonneg
This is an infinite sequence.
Example:
Given the recurrence relation sn = 2sn-1 – sn-2 for n = n = 2, 3, 4, … and initial terms s0 = 0, s1 = 3

(a) Write the first 4 terms of the sequence


{6, 9, 12, 15 …}

(b) Can we write sn nonrecursively – without using previous elements - using n? (this is called the solution to
the sequence)
By inspection: sn = 3n

(c) Prove that this nonrecursive formula for sn is true for all n.
Recursive formula for sn = 2sn-1 – sn-2
We will show that the nonrecursive formula for sn = 3n

Assume it is true that {3n} is the solution for all terms – we have listed just a few. We are showing that
each sn = 3n

What is sn-1? 3(n - 1)


What is sn-2? 3(n - 2)

Now,
2sn-1 - sn-2 = 2[3(n - 1)] - 3(n - 2)
= 2(3n - 3) – (3n - 6)
= 6n - 6 - 3n + 6
= 3n
= sn

Therefore{s n=( 3 n ) }n =2 is a solution of the recurrence relation sn = 2sn-1 – sn-2.

Done.

[Another example here]


Summation of Sequence (or Series)
When we have a list of elements, we have called them sequences.
When we add those elements, we have a series.
Definition


Let { sn } n=0 be a sequence. Then ∑ sn = s 1 + s2 + s3 + . . . is the sum of the terms in the series.
n=0

Product of a Sequence


Let { s }
n n=0 be a sequence. Then ∏ sn = s 1 * s2 * s3 * . . . is the product of the terms in the series.
n=0

Example:
Let a be the sequence defined by an = 2n – 1, n ≥ 1. Find the sum or product as indicated.
4

∑ ai =
i=1
4

∑ ai=a 1+ a2 +a3 +a 4=1+3+ 5+7=16


i=1

i is the index or rank, 1 is the lower limit and 4 is the upper limit

∏ ai=
i=1
4

∏ ai=¿ a1∗a2∗a3∗a4 =1∗3∗5∗7=105


i=1

i is the index or rank, 1 is the lower limit and 3 is the upper limit

-------------------------------ended here ----------------------------------------------

You might also like