Professional Documents
Culture Documents
Ch3. Functions, Sequences, and Relations
Ch3. Functions, Sequences, and Relations
Functions,
Sequences, and Relations
3.3 Relations
Also written as 𝑓: 𝑋 → 𝑌
Example 3.1.4
The set 𝑓 = 1, 𝑎 , 2, 𝑏 , 3, 𝑐 is not a function from 𝑋 = {1, 2, 3, 4} to
𝑌 = 𝑎, 𝑏, 𝑐
𝑓= 𝑥, 𝑥 2 𝑥 is a real number}
Examples
✓ 𝑓 𝑥 = 𝑥 2 with domain 𝑹
✓ 𝑓 = { 0, 0 , 1, 1 , 2, 2 , 3, 0 , 1, 3 }
Examples
✓ 6 mod 2 = 0
✓ 5 mod 1 = 1
✓ 8 mod 12 = 8
✓ 199673 mod 2 = 1
Examples
✓ 8.3 = 8
✓ −0.6 = −1
✓ 9.2 = 10
✓ −11.3 = −11
Examples
✓𝑓 = 1, 𝑏 , 3, 𝑎 , 2, 𝑐 from 𝑋 = {1, 2, 3} and 𝑌 = {𝑎, 𝑏, 𝑐, 𝑑}
Examples
✓𝑓 = 1, 𝑏 , 2, 𝑐 , 3, 𝑏 from 𝑋 = {1, 2, 3} and 𝑌 = {𝑎, 𝑏, 𝑐}
Properties:
✓ If 𝑓: 𝑋 → 𝑌 is a bijection and 𝑋, 𝑌 are finite, then, 𝑋 = |𝑌|
𝑓 ∘ 𝑔 𝑥 = 𝑓(𝑔 𝑥 ) from 𝑋 to 𝑍
Examples
✓ 𝑔 = { 1, 𝑎 , 2, 𝑏 , 3, 𝑐 } from 𝑋 = 1, 2, 3 to 𝑌 = {𝑎, 𝑏, 𝑐}, and
𝑓 = { 𝑎, 𝑦 , 𝑏, 𝑥 , 𝑐, 𝑧 } from 𝑌 to 𝑍 = {𝑥, 𝑦, 𝑧}
✓ 𝑓 𝑥 = log 3 𝑥 and 𝑔 𝑥 = 𝑥 4
Unary operator
𝑓: 𝑋 → 𝑋
Examples: ∨, ∧, ¬, →, ⟷
Types of sequences
✓ Finite sequences
✓ Infinite sequences
Examples
✓ 𝑢𝑛 = 𝑛2 − 1 for all 𝑛 ≥ 0
∞
✓ 𝑢𝑛 𝑛=0
Example 3.2.6
1
𝑥 is the sequence defined by 𝑥𝑛 = , −1 ≤ 𝑛 ≤ 4
2𝑛
Examples
✓ b, c is a subsequence of a, a, b, c, q
✓ 2, 4, 8, 16, …, 2𝑘 , … is a subsequence of 2, 4, 6, 8, 10, …, 2𝑛, …
𝑎𝑖 = 𝑎𝑚 + 𝑎𝑚+1 + ⋯ + 𝑎𝑛
𝑖=𝑚
ෑ 𝑎𝑖 = 𝑎𝑚 ⋅ 𝑎𝑚+1 ⋅ … ⋅ 𝑎𝑛
𝑖=𝑚
Substring of 𝛼
✓ String obtained by selecting some or all consecutive elements of 𝛼
✓ 𝛽 is substring of 𝛼 if ∃𝛾, 𝛿 with 𝛼 = 𝛾𝛽𝛿
Example 3.3.5
The relation 𝑅 on 𝑋 = {𝑎, 𝑏, 𝑐, 𝑑} is 𝑅 = { 𝑎, 𝑎 , 𝑏, 𝑐 , 𝑐, 𝑏 , 𝑑, 𝑑 }
Examples
✓ Relation 𝑅 on 𝑋 = 1, 2, 3, 4 defined by 𝑥, 𝑦 ∈ 𝑅 if 𝑥 ≤ 𝑦
✓ Relation 𝑅 = a, a , b, c , c, b , d, d on 𝑋 = {𝑎, 𝑏, 𝑐, 𝑑}
Examples
✓ 𝑅 = { 𝑎, 𝑎 , 𝑏, 𝑐 , 𝑐, 𝑏 , 𝑑, 𝑑 } on 𝑋 = {𝑎, 𝑏, 𝑐, 𝑑}
✓ 𝑅 on 𝑋 = {1, 2, 3, 4} defined by 𝑥, 𝑦 ∈ 𝑅 if 𝑥 ≤ 𝑦
Example
✓ 𝑅 on 𝑋 = {1, 2, 3, 4} defined by 𝑥, 𝑦 ∈ 𝑅 if 𝑥 ≤ 𝑦
Example
✓ 𝑅 on 𝑋 = 1, 2, 3, 4 defined by 𝑥, 𝑦 ∈ 𝑅 if 𝑥 ≤ 𝑦
Examples
✓ 𝑅 on 𝐍, defined as 𝑥, 𝑦 ∈ 𝑅 if 𝑥 ≤ 𝑦
✓ 𝑅 on 𝐍, defined as 𝑥, 𝑦 ∈ 𝑅 if 𝑥 divides 𝑦
Example:
✓ 𝑋 = {2, 3, 4}, 𝑌 = {3, 4, 5, 6, 7}, and 𝑥, 𝑦 ∈ 𝑅 if 𝑥 divides 𝑦
Example
✓ 𝑅 = { 1, 1 , 1, 3 , 1, 5 , 2, 2 , 2, 4 , 3, 1 , 3, 3 , 3, 5 ,
4, 2 , 4, 4 , 5, 1 , 5, 3 , (5, 5)}
Example 3.4.7
𝑅= 𝑎, 𝑎 , 𝑏, 𝑐 , 𝑐, 𝑏 , 𝑑, 𝑑 on 𝑋 = {𝑎, 𝑏, 𝑐, 𝑑}
Example:
✓ 𝑅 = { 1, 1 , 1, 3 , 1, 5 , 3, 1 , 3, 3 , 3, 5 , 5, 1 , 5, 3 , 5, 5 ,
2, 2 , 2, 6 , 6, 2 , 6, 6 , (4, 4)}
Example: 𝑅 = { 1, 𝑏 , 1, 𝑑 , 2, 𝑐 , 3, 𝑐 , 3, 𝑏 , 4, 𝑎 }
𝑅1 = 1, 𝑎 , 2, 𝑏 , 3, 𝑎 , 3, 𝑏
𝑅2 = 𝑎, 𝑥 , 𝑎, 𝑦 , 𝑏, 𝑦 , 𝑏, 𝑧