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 9
1
How many even numbers with 6 different digits exist?
Solution:
1.
Number of numbers without digit 0:
4
options for the last digit and 5 places with 8 digits left:
4
⋅
8
!
3
!
2.
0 is the last digit:
Five places for 9 digits:
9
!
4
!
3.
0 is the second, third, fourth or fifth digit, for each case:
Last digit has 4 options
Four digits left have 8 options and 4 places
⟹
4
⋅
4
⋅
8
!
4
!
The final answer:
4
⋅
8
!
3
!
+
9
!
4
!
+
4
⋅
4
⋅
8
!
4
!
=
68880
2
How many 7 letter words can you construct using "a, b, c, d" such that
letters "a" and "b" appear exactly once
Solution:
Number of ways to place one "a" and one "b" in a 7 letter word is:
7
⋅
6
5 places left will be filled with "c" and "d", so it’s a "without order, with repetition"
2
5
So the final answer is:
7
⋅
6
⋅
2
5
=
42
⋅
32
=
1344
3
What is the sum of all 3 digit numbers that are constructed from digits "7, 5, 3, 1"
Each digit can appear more than once
Solution:
Number of all such numbers is (without order, with repetition):
4
3
=
64
If we fix any given digit, then the number of options is
4
2
=
16
⟹
Sum of hundreds is
(
7
+
5
+
3
+
1
)
⋅
16
⋅
100
=
25600
Sum of tens is
(
7
+
5
+
3
+
1
)
⋅
16
⋅
10
=
2560
Sum of ones is
(
7
+
5
+
3
+
1
)
⋅
16
⋅
1
=
256
⟹
Sum of all such numbers is:
25600
+
2560
+
256
=
28416
4
Let
A
=
{
1
,
2
,
…
,
10
}
,
B
=
{
a
,
b
,
c
,
d
,
e
,
f
}
4a
What is the size of
C
=
{
g
|
g
:
A
→
B
}
Solution:
C
=
B
A
⟹
|
C
|
=
|
B
A
|
=
6
10
4b
What is the size of
D
=
{
h
|
h
:
B
→
A
}
Solution:
D
=
A
B
⟹
|
D
|
=
|
A
B
|
=
10
6
4c
What is the size of
E
=
{
g
|
g
:
A
→
B
,
g
is injective
}
Solution:
|
A
|
>
|
B
|
⟹
Number of injective functions from
A
to
B
is zero
4d
What is the size of
F
=
{
h
|
h
:
B
→
A
,
h
is injective
}
Solution:
We have 6 sources and 10 images
We need to choose exactly 6 different images in order for the function to be injective
This is "with order, without repetition" formula which is
n
!
(
n
−
k
)
!
⟹
The final answer is
10
!
(
10
−
6
)
!
=
10
!
4
!
5
Let
A
be a set of
n
elements
5a
How many relations there are on A?
Solution:
|
A
×
A
|
=
n
2
Relation is a subset of
A
×
A
Number of relations is a number of ways to choose a subset of
A
×
A
⟹
Number of relations is equal to
|
P
(
A
×
A
)
|
=
2
n
2
5b
How many reflexive relations there are on A?
Solution:
Reflexive relations are supersets of
I
d
A
Number of pairs in
I
d
A
is
n
⟹
Number of reflexive relations is a number of ways to choose a subset of
A
×
A
∖
I
d
A
Which is
|
P
(
A
×
A
∖
I
d
A
)
|
=
2
|
A
×
A
∖
I
d
A
|
=
2
n
2
−
n
5c
How many symmetric relations there are on A?
Solution:
Number of pairs with equal elements is
n
Number of pairs with different elements is
n
(
n
−
1
)
For each pair with different elements we will automatically choose it’s symmetric one
⟹
Number of symmetric pair choices is
n
(
n
−
1
)
2
⟹
Number of pairs to choose from is
n
(
n
−
1
)
2
+
n
=
n
(
n
+
1
)
2
⟹
Number of symmetric relations on
A
is
2
n
(
n
+
1
)
/
2
5d
How many total order relations there are on A?
Solution:
Let
R
be a total order relation on
A
Let us construct a "sorted" chain of elements of A
For each
i
∈
[
1
,
n
]
:
a
i
∈
A
:
1.
If chain is empty, place
a
i
anywhere
2.
If
a
i
R
"the leftmost element of the chain"
,
then place
a
i
to the left e.g.
a
i
<
a
j
<
…
3.
∀
j
∈
[
1
,
n
]
:
If
a
i
R
a
j
−
continue, otherwise place
a
i
to the right of
a
j
e.g.
⋯
<
a
j
<
a
i
<
…
This will result in a unique "sorted" chain of length
n
:
a
i
<
a
j
<
a
k
⋯
<
a
l
Number of such ordered chains is a "with order, without repetition", which is
n
!
⟹
Number of total order relations on
A
is
n
!
6
2 classes went to a school trip. With them went 6 mothers and 8 fathers.
6a
How many ways there are to choose 5 parents responsible for food,
such that they are 3 mothers and 2 fathers?
Solution:
We need to choose 3 out of 6 mothers and 2 out of 8 fathers
which is
(
6
3
)
⋅
(
8
2
)
6b
How many ways there are to choose 3 parents to be medics?
Solution:
Choosing 3 different parents from the total of 14 parents is:
14
!
(
14
−
3
)
!
=
14
!
11
!
6c
How many ways there are to choose two groups of 7 parents,
such that there is at least one mother in each group?
Solution:
Number of ways to choose two groups is:
(
14
7
)
Number of ways to choose a group that has no mothers is
the number of ways to choose 7 out of 8 fathers:
(
8
7
)
Groups of parents are different, so we will count this number twice
Number of ways to choose two groups such that there is at least one mother is:
(
14
7
)
−
2
⋅
(
8
7
)
=
(
14
7
)
−
2
⋅
8
7a
How many ways there are to sit 2 women and 4 men on a bench,
such that 2 women sit next to each other?
Solution:
Let us count 2 women as one "option"
Then we have to choose a sit for each of 5 options:
5
!
Number of ways to sit 2 women is:
2
!
So the final answer is:
5
!
⋅
2
!
=
120
⋅
2
=
240
7b
How many ways there are to sit 2 women and 4 men on a bench,
such that 4 men sit next to each other?
Solution:
Let us count 4 men as one "option:
Then we have to choose a sit for each of 3 options:
3
!
Number of ways to sit 4 men is:
4
!
So the final answer is:
3
!
⋅
4
!
=
6
⋅
24
=
144