Cub11k's BIU Notes
Cub11k's BIU Notes
Assignments
Discrete-math
Discrete-math 1
Discrete-math 10
Discrete-math 11
Discrete-math 12
Discrete-math 2
Discrete-math 3
Discrete-math 4
Discrete-math 5
Discrete-math 6
Discrete-math 7
Discrete-math 8
Discrete-math 9
Infi-1
Infi-1 10
Infi-1 11
Infi-1 2
Infi-1 3
Infi-1 4
Infi-1 5
Infi-1 6
Infi-1 7
Infi-1 8
Infi-1 9
Linear-1
Linear-1 1
Linear-1 10
Linear-1 11
Linear-1 12
Linear-1 2
Linear-1 3
Linear-1 4
Linear-1 5
Linear-1 6
Linear-1 7
Linear-1 8
Linear-1 9
Linear-2
Linear-2 1
Lectures
Data-structures
Data-structures 1
Data-structures 2
Data-structures 3
Discrete-math
Discrete-math 10
Discrete-math 11
Discrete-math 12
Discrete-math 13
Discrete-math 14
Discrete-math 15
Discrete-math 16
Discrete-math 18
Discrete-math 19
Discrete-math 20
Discrete-math 21
Discrete-math 22
Discrete-math 23
Discrete-math 24
Discrete-math 25
Discrete-math 26
Discrete-math 3
Discrete-math 4
Discrete-math 5
Discrete-math 6
Discrete-math 7
Discrete-math 8
Discrete-math 9
Exam 2023 (2A)
Exam 2023 (2B)
Exam 2023 (A)
Exam 2023 (B)
Exam 2023 (C)
Exam 2024 (A)
Exam 2024 (B)
Exam 2024 (C)
Midterm
Infi-1
Exam 2022B (A)
Exam 2022B (B)
Exam 2023B (A)
Exam 2023B (B)
Exam 2024 (A)
Exam 2024 (B)
Exam 2025 (A)
Infi-1 10
Infi-1 12
Infi-1 13
Infi-1 14
Infi-1 15
Infi-1 16
Infi-1 17
Infi-1 19
Infi-1 20
Infi-1 21
Infi-1 22
Infi-1 23
Infi-1 24
Infi-1 25
Infi-1 26
Infi-1 5
Infi-1 6
Infi-1 7
Infi-1 9
Midterm
Theorems and proofs
Infi-2
Infi-2 1
Infi-2 10
Infi-2 11
Infi-2 12
Infi-2 13
Infi-2 14
Infi-2 15
Infi-2 16
Infi-2 17
Infi-2 2-3
Infi-2 3-4
Infi-2 5
Infi-2 6
Infi-2 7
Infi-2 8
Infi-2 9
Linear-1
Exam 2023 (B)
Exam 2023 (C)
Exam 2024 (A)
Exam 2024 (B)
Exam 2024 (C)
Exam 2025 (A)
Linear-1 11
Linear-1 12
Linear-1 13
Linear-1 4
Linear-1 5
Linear-1 6
Linear-1 7
Linear-1 8
Linear-1 9
Midterm
Random exams
Theorems and proofs
Linear-2
Linear-2 1
Linear-2 2
Linear-2 3
Linear-2 4
Linear-2 5
Linear-2 6
Linear-2 7
Linear-2 8
Seminars
CSI
CSI 2
Data-structures
Data-structures 1
Data-structures 2
Data-structures 3
Discrete-math
Discrete-math 1
Discrete-math 10
Discrete-math 11
Discrete-math 12
Discrete-math 2
Discrete-math 3
Discrete-math 4
Discrete-math 5
Discrete-math 6
Discrete-math 7
Discrete-math 8
Discrete-math 9
Infi-1
Infi-1 10
Infi-1 11
Infi-1 12
Infi-1 13
Infi-1 3
Infi-1 4
Infi-1 5
Infi-1 6
Infi-1 8
Infi-2
Infi-2 1
Infi-2 2
Infi-2 3
Infi-2 4
Infi-2 6
Infi-2 7
Infi-2 8
Linear-1
Linear-1 10
Linear-1 11
Linear-1 12
Linear-1 3
Linear-1 5
Linear-1 6
Linear-1 7
Linear-1 8
Linear-1 9
Linear-2
Linear-2 1
Linear-2 2
Linear-2 3
Linear-2 4
Linear-2 5
Linear-2 6
Linear-2 7
Templates
Lecture Template
Seminar Template
Home
Discrete-math 12
Discrete-math 12
Associativity of the function composition
#theorem
Let
f
:
A
→
B
g
:
B
→
C
h
:
C
→
D
h
∘
(
g
∘
f
)
=
(
h
∘
g
)
∘
f
Proof:
For function
h
∘
(
g
∘
f
)
―
f
:
A
→
B
,
g
:
B
→
C
By definition of composition:
(
g
∘
f
)
:
A
→
C
h
:
C
→
D
By definition of composition:
(
h
∘
(
g
∘
f
)
)
:
A
→
D
For function
(
h
∘
g
)
∘
f
―
g
:
B
→
C
,
h
:
C
→
D
By definition of composition:
(
h
∘
g
)
:
B
→
D
f
:
A
→
B
By definition of composition:
(
(
h
∘
g
)
∘
f
)
:
A
→
D
⟹
{
D
o
m
(
h
∘
(
g
∘
f
)
)
=
D
o
m
(
(
h
∘
g
)
∘
f
)
R
a
n
g
e
(
h
∘
(
g
∘
f
)
)
=
R
a
n
g
e
(
(
h
∘
g
)
∘
f
)
(
1
)
Let
a
∈
A
(
h
∘
(
g
∘
f
)
)
(
a
)
=
h
(
(
g
∘
f
)
(
a
)
)
=
h
(
g
(
f
(
a
)
)
)
(
(
h
∘
g
)
∘
f
)
(
a
)
=
(
h
∘
g
)
(
f
(
a
)
)
=
h
(
g
(
f
(
a
)
)
)
⟹
∀
a
∈
A
:
(
h
∘
(
g
∘
f
)
)
(
a
)
=
(
(
h
∘
g
)
∘
f
)
(
a
)
(
2
)
(
1
)
and
(
2
)
⟹
h
∘
(
g
∘
f
)
=
(
h
∘
g
)
∘
f
Properties of function composition
#theorem
Let
f
:
A
→
B
,
g
:
B
→
C
1.
If
(
g
∘
f
)
is one-to-one, then
f
is one-to-one
2.
If
(
g
∘
f
)
is onto, then
g
is onto
Proof for 1.
Let
a
1
,
a
2
∈
A
:
f
(
a
1
)
=
f
(
a
2
)
g
is complete and to one
⟹
g
(
f
(
a
1
)
)
=
g
(
f
(
a
2
)
)
⟹
By definition of composition:
(
g
∘
f
)
(
a
1
)
=
(
g
∘
f
)
(
a
2
)
(
g
∘
f
)
is one-to-one
⟹
a
1
=
a
2
⟹
∀
a
1
,
a
2
∈
A
:
f
(
a
1
)
=
f
(
a
2
)
→
a
1
=
a
2
Proof for 2.
Let
c
∈
C
(
g
∘
f
)
is onto
⟹
∀
c
∈
C
:
∃
a
∈
A
:
(
g
∘
f
)
(
a
)
=
c
⟺
g
(
f
(
a
)
)
=
c
Let
b
=
f
(
a
)
,
b
∈
B
⟹
∀
c
∈
C
:
∃
b
∈
B
:
g
(
b
)
=
c
Composition of two injective functions is injective
#lemma
Let
f
1
:
A
→
B
,
f
2
:
B
→
C
If
f
1
,
f
2
are one-to-one
Then
(
f
2
∘
f
1
)
is one-to-one
Proof:
Let
a
1
,
a
2
∈
A
:
(
f
2
∘
f
1
)
(
a
1
)
=
(
f
2
∘
f
1
)
(
a
2
)
By definition of composition:
(
f
2
∘
f
1
)
(
a
1
)
=
(
f
2
∘
f
1
)
(
a
2
)
⟺
f
2
(
f
1
(
a
1
)
)
=
f
2
(
f
1
(
a
2
)
)
f
2
is one-to-one
⟹
f
1
(
a
1
)
=
f
1
(
a
2
)
f
1
is one-to-one
⟹
a
1
=
a
2
⟹
∀
a
1
,
a
2
∈
A
:
(
f
2
∘
f
1
)
(
a
1
)
=
(
f
2
∘
f
1
)
(
a
2
)
→
a
1
=
a
2
Composition of injective functions is injective
#theorem
Let
f
1
,
f
2
,
…
,
f
n
be one-to-one functions, such that
the composition
(
(
(
f
n
∘
…
)
∘
f
2
)
∘
f
1
)
is defined
Then,
(
(
(
f
n
∘
…
)
∘
f
2
)
∘
f
1
)
is also one-to-one
Proof:
Base case. Let
n
=
1
(
(
(
f
n
∘
…
)
∘
f
2
)
∘
f
1
)
=
(
f
1
)
(
f
1
)
is one-to-one
Induction step. Let
(
(
(
f
n
∘
…
)
∘
f
2
)
∘
f
1
)
be one-to-one
Composition of functions is associative
⟹
(
(
(
f
n
+
1
∘
…
)
∘
f
2
)
∘
f
1
)
=
(
f
n
+
1
∘
(
(
(
f
n
∘
…
)
∘
f
2
)
∘
f
1
)
)
Let
g
=
(
(
(
f
n
∘
…
)
∘
f
2
)
∘
f
1
)
Then
(
(
(
f
n
+
1
∘
…
)
∘
f
2
)
∘
f
1
)
=
(
f
n
+
1
∘
g
)
g
is one-to-one and
f
n
+
1
is one-to-one
By the lemma above:
(
f
n
+
1
∘
g
)
is one-to-one
⟹
(
(
(
f
n
+
1
∘
…
)
∘
f
2
)
∘
f
1
)
is one-to-one
Base case + induction step
⟹
Proved by induction