Discrete Structures
Lecture Notes, 8 Nov 2010
Last Update: 8 November 2010
Note:
or
material is highlighted
|
Note: A username and password may be required to access certain
documents.
Please
contact
Bill Rapaport.
Index to all lecture notes
…Previous lecture
§2.3: Functions (cont'd)
§2.4: Sequences
§4.1: Mathematical Induction
- Function Composition:
- Reminder:
Def:
Let A,B,C be sets.
Let g : A → B.
Let f : B → C.
Then the composition of f with g
—denoted "(f o g) : A → C"
& read "f of g"—
=def {(a, c) |
(∃b ∈ B)[(g(a) = b)
∧ (f(b) = c)]
- i.e., (f o g)(a) =
f(g(a))
- E.g.:
Let f(x) = x+1.
Let g(y) = 3y.
Then:
(f o g)(z) = f(g(z))
= f(3z) = 3z+1
but: (g o f)(z) =
g(f(z)) = g(z+1) = 3(z+1) =
3z+3.
- ∴ Thm: Function composition is not commutative
- Thm:
- Sequences:
- Def:
Let (S = N) ∨ (S = W (= Z+)).
Let T be any non-∅ set.
Then a is a sequence =def a : S → T.
- i.e., a sequence is a function from {(0,) 1, 2, …}
to any set T
- Notation:
- an for: a(n)
- "an" is a term of the sequence
- {an} for: the sequence a : N →
T (or the sequence a : W → T)
- A sequence is a function.
A function is a relation.
A relation is a set.
∴ A sequence is a set: {(0, a0),
(1, a1), …}, where each ai
∈ T
- A sequence can be thought of as an ∞-tuple
- Examples:
- Example 1:
0, 1, 4, 9, 16, 25, …
a0, a1, a2,
a3, a4, a5,
…
i.e., (∀n ∈ N)[an =
n²]
- Example 2 (the
Fibonacci
sequence — read both links!):
0, 1, 1, 2, 3, 5, 8, 13, …
a0, a1, a2,
a3, a4, a5,
a6, a7,
…
i.e.:
a0 = 0
a1 = 1
(∀n > 1)[an = an–1 + an–2]
- General problem:
- Given a sequence, to determine its formula
- i.e., given I/P & O/P of an algorithm, to determine (the?)
an(!) algorithm for it.
- Notes:
- language learning is a real-life e.g.
- in general, ∃ >1 algorithm!
- given only a finite, initial sequence of O/P,
∃ no way to find the intended algorithm
- i.e., ∃ no way to predict the future!
- See
"Computational Learning Theory"
- Summations:
- A series or summation =def the sum of (some or
all) terms in a sequence.
- i.e.) a0 + a1 +
a2 + …
- Notation:
i = n
Σai for: a0 +
a1 + … + an
i = 0
- For more information on sequences & series ("summations"), link to:
"Sequences and Summations: Further
Information"
- Mathematical Induction:
- Watch the falling-domino movies at
"Recursion & Induction"
- Let Falls(x) mean: x falls down.
Then:
Falls(domino1); |
|
|
|
Falls(domino1) | → | Falls(domino2) |
| | ∴ Falls(domino2), | by Modus Ponens! |
Falls(domino2) | → | Falls(domino3) |
| | ∴ Falls(domino3), | by MP |
… |
| | ∴ Falls(dominok) | |
Falls(dominok) | → | Falls(dominok+1); | |
| | ∴ Falls(dominok+1) |
… |
Falls(dominolast–1) | → | Falls(dominolast) |
| | ∴ Falls(dominolast) |
|
∴ ∀n[Falls(dominon)] | | | |
Next lecture…
Text copyright © 2010 by William J. Rapaport
(rapaport@buffalo.edu)
Cartoon links and screen-captures appear here for your enjoyment.
They are not meant to infringe on any copyrights held by the creators.
For more information on any cartoon, click on it, or contact me.
http://www.cse.buffalo.edu/~rapaport/191/F10/lecturenotes-20101108.html-20101108