Professional Documents
Culture Documents
Friday 2/22
Spring 2019 10:55 am – 12:05 pm
Product of a Sequence
∞
∞
Let { sn } n=0 be a sequence. Then ∏ sn = s 1 * s2 * s3 * . . . is the product of the terms in the series.
n=0
Example: let α = 1001 and β = 1101 they are both strings of length 4
The length of a string is denoted | |, so |α| = 4 and |β|=4
The string accbbb is different from the string ccabbb. Like sequences, order matters.
.
Repetitions can be specified with superscripts. For example: ccabbb may be written c 2ab3
The null string: is the string with no elements. It has length zero. The null string is denoted λ
Example: For α = 1001 and β = 1101, the concatenation of α and β, denoted αβ is 10011101
The concatenation of β and α, denoted βα is 11011001
Do not confuse with a subsequence. A subsequence of a sequence s is when we choose certain terms in s in
the order that they appear.
Example: 2, 4, 8, 16 is a subsequence of 2, 4, 6, 8, 10, 12, 14, 16…2n…
Today:
A) Section 3-3 Relations
A relation is a set of ordered pairs
Note: A function f from X to Y is a special relation having properties:
#1 The domain of f is equal to X, the codomain is Y
#2 For each x∈ X there is exactly one y∈ Y, we write this as f(x) = y
Binary Relation: Let X and Y be two sets. A binary relation from X to Y is a subset of a Cartesian product X x Y.
• R X x Y means R is a set of ordered pairs of the form (x,y) where x X and y Y.
• We use the notation x R y to denote (x,y) R and x R y to denote (x,y) R. If x R y, we say x is related to y by
R.
Note that relations do not have to be binary. We can have a Cartesian product for sets A, B, C. Let A be a set
of names, B a set of addresses, and C a set of telephone numbers. Then a set of 3-tuples (name, address,
telephone number) is a 3-ary (ternary) relation over A, B and C.
Example: A = {2, 4, 7, 9}
Table below lists all ordered pairs in set A x A:
2 4 7 9
2 (2,2) (2,4) (2,7) (2,9)
4 (4,2) (4,4) (4,7) (4,9)
7 (7,2) (7,4) (7,7) (7,9)
9 (9,2) (9,4) (9,7) (9,9)
Choose a subset of these ordered pairs and create a relation: R = {(2,2) (2,4) (7,7) (7,2), (9,4)}
The relation R can be listed as a set or diagrammed using a digraph
The relation is built from the set A = {2,4,7,9}. We create nodes(vertices) at 2, 4, 7, 9
9 4
*can’t draw this here – see page 142 for another example*