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 3
Let
A
,
B
,
C
be sets. Prove or disprove the following statements:
1a
A
△
(
B
∩
C
)
=
(
A
△
B
)
∩
(
A
△
C
)
Disproof:
Let
A
=
C
≠
∅
,
B
∩
C
≠
C
Then:
A
△
(
B
∩
C
)
≠
∅
(
A
△
B
)
∩
(
A
△
C
)
=
(
A
△
B
)
∩
∅
=
∅
⟹
A
△
(
B
∩
C
)
≠
(
A
△
B
)
∩
(
A
△
C
)
An example of such sets:
A
=
{
1
,
2
}
,
B
=
{
1
}
,
C
=
{
1
,
2
}
1b
A
△
B
=
A
c
△
B
c
Proof:
A
c
△
B
c
=
{
x
∣
x
∈
(
A
c
∖
B
c
)
∨
x
∈
(
B
c
∖
A
c
)
}
=
=
{
x
∣
(
x
∈
A
c
∧
x
∉
B
c
)
∨
(
x
∈
B
c
∧
x
∉
A
c
)
}
=
=
{
x
∈
U
∣
(
x
∉
A
∧
x
∈
B
)
∨
(
x
∉
B
∧
x
∈
A
)
}
=
=
{
x
∈
U
∣
x
∈
(
B
∖
A
)
∨
x
∈
(
A
∖
B
)
}
=
{
x
∣
x
∈
(
B
∖
A
)
∨
x
∈
(
A
∖
B
)
}
=
A
△
B
⟹
A
△
B
=
A
c
△
B
c
1c
A
∩
(
(
B
∪
A
c
)
∩
B
c
)
=
∅
Proof:
A
∩
(
(
B
∪
A
c
)
∩
B
c
)
=
A
∩
(
(
B
∩
B
c
)
∪
(
A
c
∩
B
c
)
)
=
A
∩
(
∅
∪
(
A
c
∩
B
c
)
)
=
=
A
∩
(
A
c
∩
B
c
)
=
(
A
∩
A
c
)
∩
B
c
=
∅
∩
B
c
=
∅
⟹
A
∩
(
(
B
∪
A
c
)
∩
B
c
)
=
∅
1d
B
⊆
A
⟹
A
△
B
=
A
∖
B
Proof:
B
⊆
A
⟹
∀
x
:
x
∈
B
→
x
∈
A
B
∖
A
=
{
x
|
x
∈
B
∧
x
∉
A
}
⊆
B
⊆
A
{
x
|
x
∈
A
∧
x
∉
A
⏟
F
}
=
∅
B
∖
A
⊆
∅
⟹
B
∖
A
=
∅
⟹
A
△
B
=
(
A
∖
B
)
∪
(
B
∖
A
)
=
(
A
∖
B
)
∪
∅
=
A
∖
B
⟹
A
△
B
=
A
∖
B
1e
A
∖
(
B
∖
C
)
=
(
A
∖
B
)
∖
C
Disproof:
Let
A
≠
∅
,
A
≠
B
,
B
=
C
≠
∅
For example:
A
=
{
1
,
2
}
,
B
=
{
1
}
,
C
=
{
1
}
A
∖
(
B
∖
C
)
=
A
∖
∅
=
A
(
A
∖
B
)
∖
C
=
{
2
}
∖
{
1
}
=
{
2
}
⟹
A
∖
(
B
∖
C
)
≠
(
A
∖
B
)
∖
C
2a
Prove: For any sets
X
,
Y
:
if
X
∩
Y
=
∅
,
then
X
△
Y
=
X
∪
Y
Proof:
X
△
Y
=
(
X
∪
Y
)
∖
(
X
∩
Y
)
=
(
X
∪
Y
)
∖
∅
=
X
∪
Y
⟹
X
△
Y
=
X
∪
Y
2b
Prove: For any sets
X
,
Y
:
if
X
⊆
Y
,
then
X
∪
(
Y
∖
X
)
=
Y
Proof:
X
∪
(
Y
∖
X
)
=
{
a
∣
a
∈
X
∨
(
a
∈
Y
∧
a
∉
X
)
}
=
=
{
a
∣
(
a
∈
X
∨
a
∈
Y
)
∧
(
a
∈
X
∨
a
∉
X
)
⏟
T
}
=
{
a
∣
a
∈
X
∨
a
∈
Y
}
X
⊆
Y
⟺
∀
a
:
(
a
∈
X
⟹
a
∈
Y
)
⟹
{
a
∣
(
a
∈
X
∨
a
∈
Y
)
}
=
{
a
∣
a
∈
Y
∪
a
∈
Y
}
=
Y
∪
Y
=
Y
⟹
X
∪
(
Y
∖
X
)
=
Y
2c
Prove: For any sets
A
,
B
:
(
A
△
B
)
∩
(
A
∩
B
)
=
∅
Proof:
(
A
△
B
)
∩
(
A
∩
B
)
=
(
(
A
∪
B
)
∖
(
A
∩
B
)
)
∩
(
A
∩
B
)
=
=
{
x
∣
(
x
∈
(
A
∪
B
)
∧
x
∉
(
A
∩
B
)
)
∧
x
∈
(
A
∩
B
)
}
=
=
{
x
∣
x
∈
(
A
∪
B
)
∧
(
x
∉
(
A
∩
B
)
∧
x
∈
(
A
∩
B
)
)
}
=
=
{
x
∣
x
∈
(
A
∪
B
)
∧
F
}
=
{
x
∣
F
}
=
∅
⟹
(
A
△
B
)
∩
(
A
∩
B
)
=
∅
2d
Prove: For any sets
A
,
B
:
(
A
△
B
)
△
(
A
∩
B
)
=
A
∪
B
Proof:
(
A
△
B
)
△
(
A
∩
B
)
=
(
(
A
△
B
)
∪
(
A
∩
B
)
)
∖
(
(
A
△
B
)
∩
(
A
∩
B
)
)
⏟
∅
,
proved in 2c
=
=
(
A
△
B
)
∪
(
A
∩
B
)
=
(
(
A
∪
B
)
∖
(
A
∩
B
)
)
∪
(
A
∩
B
)
Let
X
=
A
∩
B
,
Y
=
A
∪
B
(
(
A
∪
B
)
∖
(
A
∩
B
)
)
∪
(
A
∩
B
)
=
(
Y
∖
X
)
∪
X
By properties of inclusion:
X
=
A
∩
B
⊆
A
∪
B
=
Y
⟹
X
⊆
Y
⟹
(
Y
∖
X
)
∪
X
=
Proved in 2b
Y
⟹
(
(
A
∪
B
)
∖
(
A
∩
B
)
)
∪
(
A
∩
B
)
=
A
∪
B
⟹
(
A
△
B
)
△
(
A
∩
B
)
=
A
∪
B
3a
Prove:
(
⋂
i
∈
I
A
i
)
c
=
⋃
i
∈
I
A
i
c
Proof:
(
⋂
i
∈
I
A
i
)
c
=
{
x
∈
U
∣
x
∉
⋂
i
∈
I
A
i
}
=
{
x
∈
U
∣
¬
(
∀
i
∈
I
:
x
∈
A
i
)
}
=
=
{
x
∈
U
∣
∃
i
∈
I
:
x
∉
A
i
}
=
{
x
∣
∃
i
∈
I
:
x
∈
A
i
c
}
=
⋃
i
∈
I
A
i
c
⟹
(
⋂
i
∈
I
A
i
)
c
=
⋃
i
∈
I
A
i
c
3b
Prove:
(
⋃
i
∈
I
A
i
)
c
=
⋂
i
∈
I
A
i
c
Proof:
(
⋃
i
∈
I
A
i
)
c
=
{
x
∈
U
∣
x
∉
⋃
i
∈
I
A
i
}
=
{
x
∈
U
∣
¬
(
∃
i
∈
I
:
x
∈
A
i
)
}
=
=
{
x
∈
U
∣
∀
i
∈
I
:
x
∉
A
i
}
=
{
x
∣
∀
i
∈
I
:
x
∈
A
i
c
}
=
⋂
i
∈
I
A
i
c
⟹
(
⋃
i
∈
I
A
i
)
c
=
⋂
i
∈
I
A
i
c
For all
n
∈
N
, define:
A
n
=
{
n
−
1
,
n
,
n
+
1
}
4a
N
0
- according to Wikipedia, this denotion is a set of natural numbers and 0
⋃
n
∈
N
A
n
=
N
0
Proof:
1.
⋃
n
∈
N
A
n
⊆
N
0
Let
x
∈
⋃
n
∈
N
A
n
Then,
∃
n
∈
N
:
x
∈
A
n
⟺
∃
n
∈
N
:
(
x
=
n
−
1
)
∨
(
x
=
n
)
∨
(
x
=
n
+
1
)
1.1
x
=
n
−
1
,
x
is a difference between a natural number and 1,
therefore it is either a natural number, or 0
1.2
x
=
n
,
x
is a natural number
1.3
x
=
n
+
1
,
x
is a sum of two natural numbers,
therefore it is a natural number
1.1
,
1.2
and
1.3
⟹
x
∈
N
0
⟹
⋃
n
∈
N
A
n
⊆
N
0
2.
N
0
⊆
⋃
n
∈
N
A
n
Let
x
∈
N
0
2.1
x
=
0
,
then
∃
n
=
1
:
x
∈
A
1
⟹
x
∈
⋃
n
∈
N
A
n
2.2
x
∈
N
,
then
∃
n
=
x
:
x
∈
A
n
⟹
x
∈
⋃
n
∈
N
A
n
2.1
and
2.2
⟹
x
∈
⋃
n
∈
N
A
n
⟹
N
0
⊆
⋃
n
∈
N
A
n
1.
and
2.
⟹
⋃
n
∈
N
A
n
=
N
0
4b
⋂
n
∈
N
A
n
=
∅
Proof:
∅
is a subset of any set
⟹
∅
⊆
⋂
n
∈
N
A
n
⋂
n
∈
N
A
n
⊆
∅
Let
x
∈
⋂
n
∈
N
A
n
Then
∀
n
∈
N
:
x
∈
A
n
Let
n
=
1
,
then
x
∈
A
1
=
{
0
,
1
,
2
}
Now let
n
=
4
,
then
x
∈
A
4
=
{
3
,
4
,
5
}
⟹
x
∈
A
1
∧
x
∈
A
4
⟹
x
∈
(
A
1
∩
A
4
)
⟹
x
∈
∅
⟹
⋂
n
∈
N
A
n
⊆
∅
(
∅
⊆
⋂
n
∈
N
A
n
)
∧
(
⋂
n
∈
N
A
n
⊆
∅
)
⟺
⋂
n
∈
N
A
n
=
∅
5a
Prove or disprove:
P
(
A
)
∖
P
(
B
)
≠
P
(
A
∖
B
)
Proof:
∀
C
:
∅
∈
P
(
C
)
⟹
∅
∉
(
P
(
A
)
∖
P
(
B
)
)
∀
C
:
∅
∈
P
(
C
)
⟹
∅
∈
P
(
A
∖
B
)
⟹
P
(
A
)
∖
P
(
B
)
≠
P
(
A
∖
B
)
5b
Prove or disprove:
P
(
A
)
△
P
(
B
)
=
P
(
A
△
B
)
Disproof:
∅
∉
(
P
(
A
)
△
P
(
B
)
)
∅
∈
P
(
A
△
B
)
Example:
A
=
∅
,
B
=
∅
P
(
A
)
=
P
(
B
)
=
{
∅
}
P
(
A
)
△
P
(
B
)
=
∅
P
(
A
△
B
)
=
P
(
△
)
=
{
∅
}
⟹
P
(
A
)
△
P
(
B
)
≠
P
(
A
△
B
)
5c
Prove or disprove:
A
∩
P
(
A
)
=
∅
Disproof:
Example:
A
=
{
∅
}
P
(
A
)
=
{
∅
,
{
∅
}
}
A
∩
P
(
A
)
=
{
∅
}
≠
∅
⟹
A
∩
P
(
A
)
≠
∅
5d
Prove or disprove:
P
(
A
)
∩
P
(
P
(
A
)
)
≠
∅
Proof:
∀
C
:
∅
∈
P
(
C
)
⟹
∅
∈
P
(
A
)
∧
∅
∈
P
(
P
(
A
)
)
⟹
∅
∈
P
(
A
)
∩
P
(
P
(
A
)
)
⟹
P
(
A
)
∩
P
(
P
(
A
)
)
≠
∅
5e
Prove or disprove:
A
⊆
B
⟺
P
(
A
)
⊆
P
(
B
)
Proof:
1.
Let
A
⊆
B
:
D
∈
P
(
A
)
⟺
D
⊆
A
⟹
D
⊆
B
⟺
D
∈
P
(
B
)
(
D
∈
P
(
A
)
⟹
D
∈
P
(
B
)
)
⟹
P
(
A
)
⊆
P
(
B
)
2.
Let
P
(
A
)
⊆
P
(
B
)
:
x
∈
A
⟺
{
x
}
⊆
A
⟺
{
x
}
∈
P
(
A
)
⟹
{
x
}
∈
P
(
B
)
⟺
{
x
}
⊆
B
⟺
x
∈
B
(
x
∈
A
⟹
x
∈
B
)
⟹
A
⊆
B
1.
and
2.
⟹
A
⊆
B
⟺
P
(
A
)
⊆
P
(
B
)
5f
Prove or disprove:
P
(
A
)
∩
P
(
B
)
=
{
∅
}
⟺
A
△
B
=
A
∪
B
Proof:
1.
Let
A
△
B
=
A
∪
B
P
(
A
)
∩
P
(
B
)
=
{
X
∣
X
⊆
A
∧
X
⊆
B
}
A
△
B
=
(
A
∪
B
)
∖
(
A
∩
B
)
=
A
∪
B
⟹
A
∩
B
=
∅
Let
X
⊆
A
,
X
⊆
B
∀
x
∈
X
:
(
x
∈
A
∧
x
∈
B
)
∀
x
∈
X
:
x
∈
A
∩
B
∀
x
∈
X
:
x
∈
∅
⟹
X
=
∅
⟹
P
(
A
)
∩
P
(
B
)
=
{
∅
}
2.
Let
P
(
A
)
∩
P
(
B
)
=
{
∅
}
Let
X
=
A
∩
B
X
⊆
A
∧
X
⊆
B
⟹
X
∈
P
(
A
)
∧
X
∈
P
(
B
)
⟹
X
∈
(
P
(
A
)
∩
P
(
B
)
)
⟹
X
=
∅
A
△
B
=
(
A
∪
B
)
∖
(
A
∩
B
)
=
(
A
∪
B
)
∖
X
=
(
A
∪
B
)
∖
∅
=
A
∪
B
⟹
A
△
B
=
A
∪
B
1.
and
2.
⟹
P
(
A
)
∩
P
(
B
)
=
{
∅
}
⟺
A
△
B
=
A
∪
B
{
A
n
}
n
∈
N
A
n
=
{
k
∈
N
∣
2
≤
k
≤
3
n
−
2
}
B
n
=
A
n
+
1
∖
A
n
6a
A
n
+
1
=
{
k
∈
N
∣
2
≤
k
≤
3
n
+
1
}
=
A
n
∪
{
3
n
−
1
,
3
n
,
3
n
+
1
∣
n
∈
N
}
⟹
B
n
=
{
3
n
−
1
,
3
n
,
3
n
+
1
∣
n
∈
N
}
⋃
n
∈
N
B
n
=
N
∖
{
1
}
Proof:
1.
⋃
n
∈
N
B
n
⊆
(
N
∖
{
1
}
)
Let
x
∈
⋃
n
∈
N
B
n
Then,
∃
n
∈
N
:
x
∈
B
n
⟺
∃
n
∈
N
:
(
x
=
3
n
−
1
)
∨
(
x
=
3
n
)
∨
(
x
=
3
n
+
1
)
1.1
x
=
3
n
−
1
,
x
is a difference between a natural number
bigger than 2, and 1, therefore it is a natural number bigger than 1
1.2
x
=
3
n
,
x
is a natural number bigger than 1
1.3
x
=
3
n
+
1
,
x
is a sum of two natural numbers,
therefore it is a natural number bigger than 1
1.1
,
1.2
and
1.3
⟹
x
∈
(
N
∖
{
1
}
)
⟹
⋃
n
∈
N
B
n
⊆
(
N
∖
{
1
}
)
2.
(
N
∖
{
1
}
)
⊆
⋃
n
∈
N
B
n
Let
x
∈
N
∖
{
1
}
2.1
If
x
≡
0
mod
3
,
then
∃
n
∈
N
:
x
=
3
n
⟹
x
∈
B
n
⟹
x
∈
⋃
n
∈
N
B
n
2.2
If
x
≡
1
mod
3
,
then
∃
n
∈
N
:
x
=
3
n
+
1
⟹
x
∈
B
n
⟹
x
∈
⋃
n
∈
N
B
n
2.3
If
x
≡
2
mod
3
,
then
∃
n
∈
N
:
x
=
3
n
+
2
=
3
(
n
+
1
)
−
1
⟹
x
∈
B
n
+
1
⟹
x
∈
⋃
n
∈
N
B
n
2.1
,
2.2
and
2.3
⟹
x
∈
⋃
n
∈
N
B
n
⟹
(
N
∖
{
1
}
)
⊆
⋃
n
∈
N
B
n
1.
and
2.
⟹
⋃
n
∈
N
B
n
=
N
∖
{
1
}
6b
Let
D
n
=
N
∖
B
n
⋂
n
∈
N
D
n
=
{
1
}
Proof:
Let domain of the complement be
N
Then
D
n
c
=
(
N
∖
B
n
)
c
=
B
n
Given that
⋃
n
∈
N
B
n
=
N
∖
{
1
}
As proved in 3a:
⋃
n
∈
N
B
n
=
⋃
n
∈
N
D
n
c
=
(
⋂
n
∈
N
D
n
)
c
⟹
(
⋂
n
∈
N
D
n
)
c
=
N
∖
{
1
}
⟹
(
(
⋂
n
∈
N
D
n
)
c
)
c
=
(
N
∖
{
1
}
)
c
=
{
1
}
⟹
⋂
n
∈
N
D
n
=
{
1
}