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 10
Discrete-math 10
Prove:
(
n
k
)
⋅
(
k
m
)
=
(
n
m
)
⋅
(
n
−
m
k
−
m
)
Proof (algebraic):
(
n
k
)
⋅
(
k
m
)
=
n
!
(
n
−
k
)
!
k
!
⋅
k
!
(
k
−
m
)
!
m
!
=
n
!
(
n
−
k
)
!
(
k
−
m
)
!
m
!
(
n
m
)
⋅
(
n
−
m
k
−
m
)
=
n
!
(
n
−
m
)
!
m
!
⋅
(
n
−
m
)
!
(
n
−
k
)
!
(
k
−
m
)
!
=
n
!
(
n
−
k
)
!
(
k
−
m
)
!
m
!
Proof (combinatorial):
How many ways we can choose
k
workers out of
n
people such that
m
of them are managers?
Let us first choose
m
managers out of
n
people
and then choose
k
−
m
people out of
n
−
k
people left, which is:
(
n
m
)
⋅
(
n
−
m
k
−
m
)
Now let us first choose
k
people out of
n
people
and then choose
m
out of these
k
people to be managers, which is:
(
n
k
)
⋅
(
k
m
)
Fermat's identity
Let
n
,
k
∈
N
,
k
<
n
∑
i
=
k
n
(
i
k
)
=
(
n
+
1
k
+
1
)
Proof:
How many ways there are to choose
k
+
1
people from the group of
n
+
1
people?
(
n
+
1
k
+
1
)
Now let’s pick the
i
’th tallest person
Let’s then pick
k
people who are shorter than this person
Number of ways to pick them is:
∑
i
=
k
+
1
n
+
1
(
i
−
1
k
)
=
⏟
j
=
k
=
i
−
1
∑
j
=
k
n
(
j
k
)
This way, we have chosen some
k
+
1
people
⟹
∑
i
=
k
n
(
i
k
)
=
(
n
+
1
k
+
1
)
∑
i
=
0
n
−
1
(
n
+
i
i
)
=
(
2
n
n
−
1
)
Proof:
∑
i
=
0
n
−
1
(
n
+
i
n
)
=
(
2
n
n
+
1
)
Let
k
=
i
+
n
∑
k
=
n
2
n
−
1
(
k
n
)
=
(
2
n
−
1
+
1
n
+
1
)
=
(
2
n
n
+
1
)
Let
n
∈
N
∪
{
0
}
S
r
=
{
(
x
1
,
x
2
,
…
,
x
r
)
|
∑
i
=
1
r
x
i
=
n
}
∑
r
=
1
n
|
S
r
|
=
∑
r
=
1
n
(
r
+
n
−
1
r
−
1
)
=
∑
k
=
0
n
−
1
(
k
+
n
k
)
=
(
2
n
k
−
1
)
=
(
2
n
n
−
1
)
Multinomials
How many strings can we write down with letters of word "mississippi"?
Solution:
4 positions for "i", 4 positions for "s", 2 positions for "p", 1 position for "m"
(
11
4
)
⋅
(
7
4
)
⋅
(
3
2
)
⋅
(
1
1
)
Multinomial is a "multiple choice" binomial:
(
11
4
,
4
,
2
,
1
)
=
(
11
4
)
⋅
(
7
4
)
⋅
(
3
2
)
⋅
(
1
1
)
=
11
!
7
!
4
!
⋅
7
!
3
!
4
!
⋅
3
!
2
!
1
!
=
11
!
4
!
4
!
2
!
1
!
(
n
n
1
,
…
,
n
k
)
=
n
!
n
1
!
n
2
!
…
n
k
!
=
n
!
∏
i
=
1
k
n
i
!
2 pizzas in size S, M, L or XL
8 toppings
Solution:
Number of different pizzas:
4
⋅
2
8
=
2
10
Number of ways to choose 2 pizzas out of all possible pizzas is:
(
2
10
+
2
−
1
2
)
=
(
2
10
+
1
2
)
How many polinomials of degree 6 there are such that:
All coefficients are non-negative integers,
p
(
1
)
=
30
,
p
(
−
1
)
=
12
p
(
x
)
=
a
0
+
a
1
x
+
a
2
x
2
+
a
3
x
3
+
a
4
x
4
+
a
5
x
5
+
a
6
x
6
p
(
1
)
=
a
0
+
a
1
+
a
2
+
a
3
+
a
4
+
a
5
+
a
6
=
30
p
(
−
1
)
=
a
0
−
a
1
+
a
2
−
a
3
+
a
4
−
a
5
+
a
6
=
12
⟹
{
a
0
+
a
1
+
a
2
+
a
3
+
a
4
+
a
5
+
a
6
=
30
a
1
+
a
3
+
a
5
=
9
⟹
{
a
0
+
a
2
+
a
4
+
a
6
=
21
a
1
+
a
3
+
a
5
=
9
(
4
+
21
−
1
21
)
⋅
(
3
+
9
−
1
9
)
=
(
24
21
)
⋅
(
11
9
)
Let
n
≥
2
S
=
{
1
,
…
,
n
+
1
}
T
=
{
(
x
,
y
,
z
)
|
{
x
<
z
y
<
z
x
,
y
,
z
∈
S
}
|
T
|
=
∑
k
=
1
n
k
2
=
(
n
+
1
2
)
+
2
⋅
(
n
+
1
3
)
Proof:
Let
z
∈
S
Number of ways to choose
x
,
y
<
z
is:
(
z
−
1
)
(
z
−
1
)
⟹
∑
z
=
1
n
+
1
(
z
−
1
)
2
=
∑
k
=
1
n
k
2
Let
x
=
y
We need to choose two numbers
−
x
,
z
⟹
(
n
+
1
2
)
Let
x
≠
y
We need to choose three numbers
−
x
,
y
,
z
x
<
y
and
y
<
x
are symmetrical and different
⟹
2
⋅
(
n
+
1
3
)
⟹
(
n
+
1
2
)
+
2
⋅
(
n
+
1
3
)
Let
n
,
m
,
r
∈
N
r
≤
m
≤
n
∑
i
=
0
r
(
m
i
)
⋅
(
n
r
−
i
)
=
(
m
+
n
r
)
Proof:
Let us choose
r
people from
m
boys and
n
girls:
(
m
+
n
r
)
Let us now choose
i
boys first and then choose the girls left
A
i
=
{
ways to choose
i
from
m
boys and
r
−
i
from
n
girls
}
|
A
i
|
=
(
m
i
)
⋅
(
n
r
−
i
)
i
≠
j
⟹
A
i
∩
A
j
=
∅
|
⋃
i
=
0
r
A
i
|
=
∑
i
=
0
r
|
A
i
|
=
∑
i
=
0
r
(
m
i
)
⋅
(
n
r
−
i
)