You are on page 1of 8

Discrete Mathematics

1st Semester – 1st Quarter Reviewer


Disclaimer: I will be adding previous notes from Grade 10 about the same topic.
Thought, sir said to us that what we’ve answered / tackled during the discussion
will be the same thing in the exams, sooo…

Lesson 1: Fundamental Counting Principle (FCP)

It is also called as the fundamental counting rule, is a way to determine the


number of possible outcomes for a given scenario

1. Rule of Sum
• If there are n1 ways to do the first task and there are n2 ways to do
the second task and cannot do both at the same time, then there
are n1 + n2 ways to do the procedure.
• Keyword is OR
• A mutually exclusive event
i. Example: Rolling a die and getting a number divisible by 2 and
also a multiple of 5
ii. In a six-sided die, the numbers divisible by 2 are: 2, 4, and 6
iii. There is only one number that is a multiple of 5 in a die, which
is 5
iv. There are no numbers that are common in both conditions, so
this situation is a mutually exclusive event.
• Example: In an online quiz, each question has an equal chance of
being a multiple-choice question with 4 choices, a true or false
question, or matching type question with 5 different answers.
How many possible answers are there for any given question?
i. 4 choices + 2 (true or false) + 5 matching type = 11 possible
answers, since each question can only be of one type at one
time
2. Rule of Product
• If there are n1 ways to do the first task and for each way, there are n2
ways to do the second task, then there are n1 x n2 ways to do the
procedure.
• Keyword is AND
• A non-mutually exclusive event
i. Example: Drawing a black card or drawing an ace card
ii. In a standard deck of playing cards, an ace card is also
considered a black card.
iii. So, the situation is a non-mutually exclusive event because
these events can happen simultaneously.
• Example: How many different three-letter initials can a person have?
i. 263 or 26 x 26 x 26 = 17,576 different three-letter initials can
be made since each letter in the sequence can happen
simultaneously and it can be repeated.
Lesson 2: Permutation

The permutation of objects refers to the arrangements of its elements.


Thus, the order of the elements is critical in doing permutations, considering the
elements may or may not be identical to each other.

Dealing with large numbers in combinatorics, a notation was introduced by


Christian Kramp in 1808. This notation was later coined as factorial. It
represents a number, usually a large one, as a product of consecutive positive
integers.

𝒏! − 𝒏 × (𝒏 − 𝟏) × (𝒏 − 𝟐) …

In permutation, it states the number of ways of obtaining an ordered subset


of k (sometimes r) distinct elements from a set of n elements. That is,
𝒏! 𝒏!
nPk or nPr = (𝒏−𝒌)! 𝒐𝒓 (𝒏−𝒓)!

Keywords include: Arrangements, ordered ways, unique

Example: Ten runners join a race. In how many possible ways can they be
arranged as first, second, and third placers?

• n = 10, r = 3
10! 10! 10×9×8×7!
• 𝑃(𝑛, 𝑟) = (10−3)! = = = 10 × 9 × 8 = 𝟕𝟐𝟎 ways they can be
7! 7!
arranged.

How to find n and r in Permutation:

1. Finding n
• Example: P (n, 3) = 120
i. In other words, the equation would look like: __ x __ x __=120
ii. From here, think of three consecutive integers where the
product is 120. In this case, it’s 6, 5, and 4.
iii. The greatest integer among the set would be your n value. So,
n=6
6! 6! 6×5×4×3!
iv. To check: 𝑃(6,3) = (6−3)! = = = 6 × 5 × 4 = 𝟏𝟐𝟎
3! 3!
2. Finding r
• Example: P (6, r) = 360
6!
i. (6−𝑟)!
= 360
ii. 6! = 360(6 − 𝑟)!
760 360(6−𝑟)!
iii. =
360 360
iv. 2 = (6 − 𝑟)!
v. Now find a number for r that will make the equation true. In this
case, 4 would be the answer. (6 − 4)! = 2! = 2
6! 6! 6×5×4×3×2!
vi. To check: 𝑃(6,4) = (6−4)! = 2! = = 6 × 5 × 4 × 3 = 𝟑𝟔𝟎
2!

Permutation with Repetition:

• The number of distinguishable permutations, p, of n objects where p


𝒏!
objects are alike, q objects are alike, and so on, is: 𝑷 =
𝒑!𝒒!…
• Example: Find the number of distinguishable permutations for the word
“ALAPAAP”
o n = 7, p(A) = 4, q(P) = 2
o There are 7 total letters in the word, 4 is how many times the letter
“A” appeared and 2 is how many times the letter “P” appeared.
7! 7×6×5×4! 7×6×5 210
o = = = = 𝟏𝟎𝟓 distinguishable permutations
4!2! 4!2 2 2

Ring Permutation Principle:

• If the clockwise and the counterclockwise arrangements are not to be made


different as in the case of making a necklace, key ring, bracelet, and the like,
the total number of arrangements will be:
(𝒏−𝟏)!
o 𝑷=
𝟐
• Example:
o In how many ways can nine different colored beads be arranged in a
bracelet?
o n=9
(𝑛−1)! (9−1)! 8! 40,320
o 𝑃= = = = = 𝟐𝟎, 𝟏𝟔𝟎
2 2 2 2

Circular vs Ring Permutation:

Circular Permutation Ring Permutation


The clockwise and anticlockwise The clockwise and anticlockwise
orders are different from each other. orders are the same.

The colored arrangements here are


Each arrangement here is unique from the same, disregarding the order. So,
one another. So, 6 permutations 3 permutations.
https://www.tutorialspoint.com/statistics/circular_permutation.htm

Lesson 3: Combination

The combination of objects refers to the non-distinct arrangements of its


elements. Thus, the order of the elements is not critical (does not matter) in
doing combinations of the set, considering the elements may or may not be
identical to each other.

In combination, it states the number of ways of obtaining a subset of k


(sometimes r) distinct elements from a set of n elements. That is,
𝒏! 𝒏!
nCk or nCr = 𝒐𝒓
𝒌!(𝒏−𝒌)! 𝒓!(𝒏−𝒓)!
Any selection of k objects from A, where each object can be selected
more than once, needs a different treatment.

Keywords include: select, choose, pick, combination

Permutation vs. Combination:

Criteria Permutation Combination


It refers to the different It refers to several ways
ways of arranging a set of choosing items from
By definition… of objects in a sequential a large set of objects,
order (order matters). such that their order does
not matter.
The order is… Relevant or important Irrelevant or unimportant
It represents… Arrangement Selection
It is… In order Not in order
How many different How many different
arrangements can be groups can be chosen
It answers…
created from a given set from a larger group of
of objects? objects?
Multiple permutation from Single combination from
Derivation
a single combination. a single permutation

Combination Permutation
ABC ABC, ACB, BAC, BCA, CAB, CBA
ABC ABD, ADB, BAD, BDA, DAB, DBA
ACD ACD, ADC, CAD, CDA, DAC, DCA
BCD BCD, BDC, CBD, CDB, DBC, DCB

Example: In a soccer league consisting of twelve sides, each team plays every
other team once. How many matches are there?

• Since team A battling team B is the same as team B battling team A, we can
12! 12!
compute it by, 12𝐶2 = = = 66 matches
2!(12−2)! 2!10!

How to find n and r in Combination:

1. Finding n
• Example: C (n, 4) = 15
𝒏!
• We can use the combination formula: 𝒏𝑪𝒓 =
𝒓!(𝒏−𝒓)!
𝑛! 𝑛(𝑛−1)(𝑛−2)(𝑛−3)(𝑛−4)! 𝑛(𝑛−1)(𝑛−2)(𝑛−3)
i. 15 = = =
4!(𝑛−4)! 4!(𝑛−4)! 4!
ii. 15 ∙ 4! = 𝑛(𝑛 − 1)(𝑛 − 2)(𝑛 − 3)
iii. 15 ∙ 24 = 𝑛(𝑛 − 1)(𝑛 − 2)(𝑛 − 3)
iv. 360 = 𝑛(𝑛 − 1)(𝑛 − 2)(𝑛 − 3)
• From here, we’ll think of four consecutive integers that their product
will end up as 360.
i. One technique to find one of the integers is: 𝒓√𝒇𝒊𝒏𝒂𝒍 𝒑𝒓𝒐𝒅𝒖𝒄𝒕,
where r is given and your final product would be 360. In this
4
case, it would look like √360.
ii. Get its root (≈4), and that is one of the numbers in the
sequence.
iii. Using trial and error, we will get the sequence 6, 5, 4, and 3 to
make 360
iv. The highest number among the set would be your n value. So,
n=6
• To check:
6! 6∙5∙4! 6∙5 30
i. 𝐶 (6,4) = = = = = 𝟏𝟓
4!(6−4)! 4!2! 2 2
2. Finding r
• Example: C (12, r) = 792
• We’ll be using a lot trial and error for this one.
• Get the preceding number of n, which is 11
• From there, get the product of 12 and 11, and divide it by your nCr
which is 792
i. Make sure the quotient is a whole number and also has a
factorial form for it. If the quotient is not a whole number, get
the preceding number of 11 (which is 10) and get the product
of 12, 11, and 10, and divide that by 792. Repeat until you get
a whole number with a factorial form.
ii. It should look something like this:
1. 𝟏𝟐(𝟏𝟐 − 𝟏)(𝟏𝟐 − 𝟐)(𝟏𝟐 − 𝟑) … = 𝒙
𝒙
2. = 𝒂 𝒘𝒉𝒐𝒍𝒆 𝒏𝒖𝒎𝒃𝒆𝒓 𝒘𝒊𝒕𝒉 𝒂 𝒇𝒂𝒄𝒕𝒐𝒓𝒊𝒂𝒍 𝒇𝒐𝒓𝒎
𝟕𝟗𝟐
• After many trials…
i. 12 ∙ 11 ∙ 10 ∙ 9 ∙ 8 = 95,040
95,040
ii. = 120 = 5! Therefore r = 5
792
• To check:
12! 12∙11∙10∙9∙8∙7! 12∙11∙10∙9∙8 95,040
i. 𝐶 (12,5) = = = = = 𝟕𝟗𝟐
5!(12−5)! 5!7! 5! 120

Lesson 4: Pigeonhole Principle


Purely handwritten notes ito, so bear with me

It states that when the number of objects is greater than the number of
categories. Then there is at least one category with more than one item.

It is more of an argument, reasoning, or proving concept

It has two working equations:

1. Ceiling function
𝒏
• ⌈ ⌉=𝒓 Where:
𝒎
• Wherein the ceiling function • n is the number of items
of 3.01, 3.4, and • m is the number of categories
3.00000134 are all equal to • r is the number of items in the same
4 category
2. Floor function
𝒏 In the condition that n > m
• ⌊ ⌋+𝟏=𝒓
𝒎
• Floor function of 3.14159265 is just 3, Floor function of 6.359 is 6, and
the floor function of 7.7 is still 7
Example 1: You are tasked to get a group of people. At least how many of them
is needed so that there is at least 2 with the same birthday?

n = ___ people 𝒏
⌈ ⌉=𝟐
𝟑𝟔𝟓
m = 365 dates n should be greater than 365, so n = 366 people.

r = 2 people with the same birthday Check:


366
⌈ ⌉ = 2 → ⌈1.00273⌉ = 2 → 𝟐 = 𝟐
365

Example 2: What is the minimum number of students required in a discrete


mathematics class to be sure that at least six will receive the same grade, if there
are five possible grades: A, B, C, D, and F?
𝒏
n + 1 = ___ students ⌊ ⌋+𝟏=𝟔
𝟓
𝑛
m = 5 grades (⌊ ⌋ = 5) 5
5
𝑛 = 25
r = 6 students with the same grade 𝑛 + 1 𝑒𝑥𝑡𝑟𝑎 = 𝟐𝟔 𝒔𝒕𝒖𝒅𝒆𝒏𝒕𝒔

Check:
26
⌊ ⌋ + 1 = 6 → ⌊5.2⌋ + 1 = 6 → 5 + 1 = 6 → 𝟔 = 𝟔
5

This may or may not be true but:

• When r ≥ 3, you can use the floor function


• When it is less than 3, you can use both ceiling or floor function

Lesson 5: Modular Arithmetic

They are operations that involve remainders after division by a specified


number, called the modulus, rather than the integers themselves

Numbers “wrap” around” upon reaching a given fixed quantity to leave a


remainder

𝒂 ≡ 𝒏 𝒎𝒐𝒅 𝒎

Where:

• a is the dividend
• m is the divisor
• and n is the remainder

You can actually solve modular arithmetic using your scientific calculator

1. Press mode, and then 4 to select base-n


2. Follow the formula: 𝑛 − 𝑛 ÷ 𝑚 × 𝑚
3. Substitute those values in and your answer will be a
4. Note that it only works with positive integers

To find n:

1. Multiply m to any integer


2. Add a to the product of step 1
Example: 3 = __ mod 4

• 4 x 3 = 12 • OR 4 x 1 = 4
• 12 + 3 = 15 • 4+3=7

So, 15 mod 4 = 7 mod 4

Operations on Modular Arithmetic:

1. Addition
• (𝑨 + 𝑩) 𝒎𝒐𝒅 𝑪 = (𝑨 𝒎𝒐𝒅 𝑪 + 𝑩 𝒎𝒐𝒅 𝑪) 𝒎𝒐𝒅 𝑪
• Let A = 14, B = 17, C = 5
i. (14 + 17) 𝑚𝑜𝑑 5 = (14 𝑚𝑜𝑑 5 + 17 𝑚𝑜𝑑 5) 𝑚𝑜𝑑 5
ii. (31) 𝑚𝑜𝑑 5 = (4 + 2) 𝑚𝑜𝑑 5
iii. 1 = (6) 𝑚𝑜𝑑 5
iv. 𝟏 = 𝟏
2. Subtraction
• (𝑨 − 𝑩) 𝒎𝒐𝒅 𝑪 = (𝑨 𝒎𝒐𝒅 𝑪 − 𝑩 𝒎𝒐𝒅 𝑪) 𝒎𝒐𝒅 𝑪
• Let A = 14, B = 17, C = 5
i. (14 − 17) 𝑚𝑜𝑑 5 = (14 𝑚𝑜𝑑 5 − 17 𝑚𝑜𝑑 5) 𝑚𝑜𝑑 5
ii. (−3) 𝑚𝑜𝑑 5 = (4 − 2) 𝑚𝑜𝑑 5
iii. 2 = (2) 𝑚𝑜𝑑 5
iv. 𝟐 = 𝟐
3. Multiplication
• (𝑨𝑩) 𝒎𝒐𝒅 𝑪 = (𝑨 𝒎𝒐𝒅 𝑪 × 𝑩 𝒎𝒐𝒅 𝑪) 𝒎𝒐𝒅 𝑪
• Let A = 4, B = 7, C = 6
i. (4 × 7) 𝑚𝑜𝑑 6 = (4 𝑚𝑜𝑑 6 × 7 𝑚𝑜𝑑 6) 𝑚𝑜𝑑 6
ii. (28) 𝑚𝑜𝑑 6 = (4 × 1) 𝑚𝑜𝑑 6
iii. 4 = (4) 𝑚𝑜𝑑 6
iv. 𝟒 = 𝟒

How to find the units digit of large numbers:

1. Identify the units digit in the base ‘x’ and call it say ‘u’.
• For example, if x = 24, then the units digit in 24 is 4. Hence u = 4.
2. Divide the exponent “y” by 4
3. If y leaves a non-zero remainder “r” when divided by 4, then units digit of
xy = units digit of ur
• Special cases occur when u = 1 or 5, since the ones digit, regardless
of the power, will always be 1 or 5 as well.
4. If y is exactly divisible by 4, then
• units digit of xy = 6, if u = 2, 4, 6, 8 (or even, essentially)
• units digit of xy = 1 If u = 3, 7, 9 (odd number)
With non-zero With 0 as remainder Special cases
remainder
units digit of xy = units units digit of xy = 6, if u = 2, Special cases occur
digit of ur 4, 6, 8 (or even, when u = 1 or 5,
essentially) since the ones digit,
regardless of the
y
units digit of x = 1 If u = 3, power, will always be
7, 9 (odd number) 1 or 5 as well.

Example 1: Units digit of 20142012

1. Base is 2014 and its units digit is 4, so u = 4


2. Exponent (2012) is divisible 4, leaving no remainder
3. Since u is even and the exponent is divisible by 4, we have the unit digits of
20142012 = 6

Example 2: Units digit of 145371

1. Base is 1453, so u = 3
2. 71 when divided by 4, gives a reminder of 3, r = 3
3. Units digit of 145371 = units digit of 33, which is 7 (since 33 is 27, units digit
of it is 7)

Sources:

Units digit of Large Numbers – number raised to power -


https://www.justquant.com/numbertheory/units-digit-of-a-number-raised-to-
power/#:~:text=Units%20digit%20of%20Large%20Numbers%20%E2%80%93%
20number%20raised%20to%20power,number%20is%20divided%20by%2010.

Find the Units Digit - Large Powers-


https://www.youtube.com/watch?v=q2P8KxG3FHk

You might also like