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 24
Discrete-math 24
Cardinality
#definition
Sets
A
,
B
are said to have the same cardinality (size, to some extent) iff there exists
a bijective function
f
:
A
→
B
Denoted as
A
∼
B
or
|
A
|
=
|
B
|
Finite sets
#definition
For each
n
∈
N
Define
I
n
=
{
1
,
2
,
…
,
n
}
I
0
=
{
}
=
∅
Set
A
is called finite iff there exists
n
∈
N
∪
{
0
}
such that
A
∼
I
n
In this case, we denote it as
|
A
|
=
n
If there is no such
n
,
then
A
is called an infinite set
Relation "have the same cardinality"
#definition
Let
∼
be a relation on some set of sets
∼
is reflexive,
∀
A
∈
X
:
A
∼
A
,
we use
I
A
:
A
→
A
to show it
∼
is symmetric,
A
∼
B
⟹
B
∼
A
,
we use
f
−
1
:
B
→
A
to show this
∼
is transitive,
A
∼
B
∧
B
∼
C
⟹
A
∼
C
,
we use
(
g
∘
f
)
:
A
→
C
to show this
⟹
∼
is an equivalence relation
Naturals and Integers
#lemma
Z
∼
N
Proof:
Let
f
:
Z
→
N
,
f
(
z
)
=
{
2
z
+
1
z
≥
0
−
2
z
z
<
0
Let
g
:
N
→
Z
,
g
(
n
)
=
{
−
k
n
=
2
k
,
k
∈
N
k
n
=
2
k
+
1
,
k
∈
N
∪
{
0
}
(
g
∘
f
)
(
z
)
=
g
(
f
(
z
)
)
=
z
⟹
(
g
∘
f
)
=
I
Z
(
f
∘
g
)
(
n
)
=
f
(
g
(
n
)
)
=
n
⟹
(
f
∘
g
)
=
I
N
Naturals and Natural pairs
#lemma
N
×
N
∼
N
Proof:
Let
N
×
N
be an infinite chess-board:
(
1
2
3
4
…
1
(
1
,
1
)
(
1
,
2
)
(
1
,
3
)
(
1
,
4
)
…
2
(
2
,
1
)
(
2
,
2
)
(
2
,
3
)
…
…
3
(
3
,
1
)
(
3
,
2
)
…
…
…
4
(
4
,
1
)
…
…
…
…
)
Let us count pairs by diagonals:
(
1
,
1
)
=
1
(
2
,
1
)
=
2
,
(
1
,
2
)
=
3
(
1
,
3
)
=
4
,
(
2
,
2
)
=
5
,
(
3
,
1
)
=
6
(
4
,
1
)
=
7
,
(
3
,
2
)
=
8
,
(
2
,
3
)
=
9
,
(
1
,
4
)
=
10
…
We can get to each pair in a finite number of steps
⟹
N
×
N
∼
N
Formal function:
f
(
(
n
,
m
)
)
=
1
2
(
n
+
m
−
1
)
(
n
+
m
)
Countable set
#definition
Set
A
is called countable if it is finite or
A
∼
N
Otherwise
A
is not countable
Cardinality of
N
is denoted as
|
N
|
=
ℵ
0
Dominant set
#definition
Let
A
,
B
be sets
|
A
|
≤
|
B
|
iff exists
f
:
A
→
B
which is injective
This is equivalent (without proof) to:
|
A
|
≤
|
B
|
iff exists
g
:
B
→
A
which is surjective
|
N
|
<
|
R
|
And is denoted as:
|
R
|
=
ℵ
1
|
R
|
<
|
P
(
R
)
|
=
ℵ
2
|
P
(
R
)
|
<
|
P
(
P
(
R
)
)
|
=
ℵ
3
And so on
Cantor's theorem
#theorem
Let
A
be a set
Then
|
A
|
<
|
P
(
A
)
|
Proof:
Let
g
:
A
→
P
(
A
)
,
g
(
a
)
=
{
a
}
g
is injective
⟹
|
A
|
≤
|
P
(
A
)
|
Now, let
f
:
A
→
P
(
A
)
be a bijection
Let
B
=
{
a
∈
A
|
a
∉
f
(
a
)
}
B
⊆
A
⟹
B
∈
P
(
A
)
⟹
∃
x
∈
A
:
f
(
x
)
=
B
Case 1.
x
∈
B
x
∈
B
⟹
x
∉
f
(
x
)
=
B
⟹
x
∉
B
−
Contradiction!
Case 2.
x
∉
B
x
∉
B
⟹
x
∉
f
(
x
)
⟹
x
∈
B
−
Contradiction!
⟹
∄
x
∈
A
:
f
(
x
)
=
B
⟹
f
is not surjective
⟹
∄
f
:
A
→
P
(
A
)
that is a bijection
⟹
|
A
|
≠
|
P
(
A
)
|
⟹
|
A
|
<
|
P
(
A
)
|