0% found this document useful (0 votes)
223 views

MATM111 (Revised2)

1. This document discusses methods for apportionment and voting representation, including the Hamilton, Jefferson, and Huntington-Hill methods. 2. The Hamilton method uses a standard divisor to calculate the standard quota of representatives for each state based on its population. The Jefferson method modifies the standard divisor to ensure the exact number of representatives are apportioned. 3. Additional criteria for fair apportionment include the quota rule and minimizing the relative unfairness between states' average constituencies. The Huntington-Hill method assigns extra representatives to states with the greatest Huntington-Hill number to achieve equal proportions.

Uploaded by

Zyra Pascual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views

MATM111 (Revised2)

1. This document discusses methods for apportionment and voting representation, including the Hamilton, Jefferson, and Huntington-Hill methods. 2. The Hamilton method uses a standard divisor to calculate the standard quota of representatives for each state based on its population. The Jefferson method modifies the standard divisor to ensure the exact number of representatives are apportioned. 3. Additional criteria for fair apportionment include the quota rule and minimizing the relative unfairness between states' average constituencies. The Huntington-Hill method assigns extra representatives to states with the greatest Huntington-Hill number to achieve equal proportions.

Uploaded by

Zyra Pascual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

MATM111

COVERAGE EXAMPLES:
1. Apportionment and Voting Consider the fictitious country of Eastern Warriors
2. Coding theory With a population of 20,000 and five states. Eastern
3. Modular Arithmetic Warriors’ constitution calls for 25 representatives to be
4. Cryptology chosen from these states. The number of representatives is
5. Graph Theory to be apportioned according to the state’s respective
population.
APPORTIONMENT AND VOTING State Population Q HP JP
CAS 11,123 13.90 13 14 15
Apportionment
CBA 879 1.10 1 1 1
- A method of dividing a whole into various part.
CCSS 3,518 4.40 4 4 4
- Has its roots in the U.S. Constitution.
CED 1,563 1.95 1 2 2
- The apportionment of seats in the House of
COE 2,917 3.46 3 4 3
Representatives is based on the relative population of 20,000 22 25 25
each state.
The Hamilton Plan 𝟐𝟐𝟐𝟐,𝟎𝟎𝟎𝟎𝟎𝟎
𝑫𝑫 =
- This method is credited to Alexander Hamilton. 𝟐𝟐𝟐𝟐
- Standard divisor (D) – The number of citizens 𝑫𝑫 = 𝟖𝟖𝟖𝟖𝟖𝟖
represented by each representative. 𝑫𝑫𝒎𝒎 = 𝟕𝟕𝟕𝟕𝟕𝟕

𝒕𝒕𝒕𝒕𝒕𝒕𝒕𝒕𝒕𝒕 𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑 Suppose the 18 members on the National board are


𝑫𝑫 = selected according to the population of the five clubs as
𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏 𝒐𝒐𝒐𝒐 𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑 𝒕𝒕𝒕𝒕 𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂
shown in the table.
- Standard quota (Q) – The whole number part of the a. Use the Hamilton method to determine the number
quotient of the population (of the state) divided by the if board members each club should have.
standard divisor. b. Use the Jefferson method to determine the number if
𝒔𝒔𝒔𝒔𝒔𝒔 − 𝒈𝒈𝒈𝒈𝒈𝒈𝒈𝒈𝒈𝒈 𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑 board members each club should have.
𝑸𝑸 =
𝑫𝑫 Clubs Population Q HP JP
1. Using the standard divisor (D), calculate the standard Alpha Beta 7,020 6.32 6 6 7
quota (Q) rounded down to a whole number (lower Gamma Delta 2,430 2.19 2 2 2
quota). Initially, each sub-group receives a number of Epsilon Zeta 1,540 4.40 1 2 1
Eta Theta 3,720 1.39 3 3 3
seats equal to its lower quota.
Iota Kappa 5,290 3.35 4 5 5
2. If the sum of the lower quotas equals the number of
20,000 16 18 18
seats to be apportioned, the apportionment process is
complete. 𝟐𝟐𝟐𝟐,𝟎𝟎𝟎𝟎𝟎𝟎
3. If the sum of the lower quotas is less than the total 𝑫𝑫 =
𝟏𝟏𝟏𝟏
number of seats to be apportioned, then assign a seat 𝑫𝑫 = 𝟏𝟏, 𝟏𝟏𝟏𝟏𝟏𝟏. 𝟏𝟏𝟏𝟏
to the sub-group that has the highest decimal part in its 𝑫𝑫𝒎𝒎 = 𝟏𝟏, 𝟎𝟎𝟎𝟎𝟎𝟎
standard quota.
Fairness in Apportionment
4. Repeat step 3 (using the next highest decimal part)
- One criterion of fairness for an apportionment plan is
until the total number of seats has been apportioned.
that it should satisfy the quota rule
The Jefferson Plan
- Quota Rule – The number of representatives
- This method is credited to Thomas Jefferson.
apportioned to a state is the standard quota or one more
- He introduced the modified standard divisor (𝐷𝐷𝑚𝑚 ) that
than the standard quota.
yields to the correct number of representatives by trial
- Average Constituency (C)
and error so that the sum of the standard quotas is equal
to the number of representatives 𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑𝒑 𝒐𝒐𝒐𝒐 𝒕𝒕𝒕𝒕𝒕𝒕 𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔
- 𝑫𝑫𝒎𝒎 < 𝑫𝑫 𝑪𝑪 =
𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏𝒏 𝒐𝒐𝒐𝒐 𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓 𝒇𝒇𝒇𝒇𝒇𝒇𝒇𝒇 𝒕𝒕𝒕𝒕𝒕𝒕 𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔
- When adding a new representative to a state, the
representative is assigned to the state in such a way as

Aki | 1
MATM111
to give the smallest relative unfairness of Huntington-Hill Apportionment Method
apportionment - The method is credited to Edward Vermilye
- Absolute unfairness of an apportionment (A) – the Huntington and Joseph Adna Hill.
absolute value of the difference between the average - Method of equal proportions
constituency of state A and the average constituency - Used by the House of Representatives since 1940
of state B.A - Implemented by calculating what is called Huntington-
𝑨𝑨 = |𝑪𝑪𝑨𝑨 − 𝑪𝑪𝑩𝑩 | Hill number (H) which is derived from the
- Relative unfairness of an apportionment (R) – the apportionment principle.
quotient of the absolute unfairness of the - Easy to do.
apportionment and the average constituency of the - It can be used in many subjects/subgroups
state receiving the new representative. - It better to use over Relative Unfairness
Apportionment.
𝑹𝑹 =
𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂 𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖𝒖 𝒐𝒐𝒐𝒐 𝒕𝒕𝒕𝒕𝒕𝒕 𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂 - When there is choice of adding one representative to
𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂𝒂 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 𝒐𝒐𝒐𝒐 𝒕𝒕𝒕𝒕𝒕𝒕 𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓𝒓 𝒕𝒕𝒕𝒕𝒕𝒕 𝒏𝒏𝒏𝒏𝒏𝒏 𝒓𝒓𝒓𝒓𝒓𝒓
one of several states, the representative should be
- Note: The average constituency in the denominator is added to the state with the greatest Huntington-Hill
computed after the new representative is added. number
(𝑷𝑷𝑨𝑨 )𝟐𝟐
𝑯𝑯 =
EXAMPLE: 𝒂𝒂(𝒂𝒂 + 𝟏𝟏)
Suppose the that one representative will be added to one of
Where:
the states. Which state is more deserving of the new
𝑷𝑷𝑨𝑨 is the population of state A
representative?
Average Average 𝒂𝒂 is the current number of representatives from state A
State Population Representative constituency
(old)
constituency
(new)
H represents the Huntington-Hill number for state A.
Psi 16,000 10 1,600 1,455
Omega 8,340 5 1,668 1,390 EXAMPLE:
Average Constituency (Old) The table below shows the number of lifeguards that are
A R
𝟏𝟏𝟏𝟏,𝟎𝟎𝟎𝟎𝟎𝟎 assigned to three different stations at Boracay and the
𝑪𝑪𝑷𝑷𝑷𝑷𝑷𝑷 = 213 0.146
𝟏𝟏𝟏𝟏 numbers of rescues made by lifeguards at those beaches.
𝑪𝑪𝑷𝑷𝑷𝑷𝑷𝑷 = 𝟏𝟏, 𝟔𝟔𝟔𝟔𝟔𝟔 210 0.151
Use the Huntington-Hill apportionment principle to
𝟖𝟖,𝟑𝟑𝟑𝟑𝟑𝟑
𝑪𝑪𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶 = determine to which beach a new lifeguard should be
𝟓𝟓
𝑪𝑪𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶 = 𝟏𝟏, 𝟔𝟔𝟔𝟔𝟔𝟔 assigned.
Beach No. of Lifeguards No. of rescues
Average Constituency (New) Station 1 37 1,227
𝑪𝑪𝑷𝑷𝑷𝑷𝑷𝑷 =
𝟏𝟏𝟏𝟏,𝟎𝟎𝟎𝟎𝟎𝟎 Station 2 51 1,473
𝟏𝟏𝟏𝟏+𝟏𝟏 Station 3 24 889
𝑪𝑪𝑷𝑷𝑷𝑷𝑷𝑷 = 𝟏𝟏, 𝟒𝟒𝟒𝟒𝟒𝟒 Station 1:
𝟖𝟖,𝟑𝟑𝟑𝟑𝟑𝟑
𝑪𝑪𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶 = (𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏)𝟐𝟐
𝟓𝟓+𝟏𝟏 𝑯𝑯𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 = 𝟑𝟑𝟑𝟑(𝟑𝟑𝟑𝟑+𝟏𝟏)
𝑪𝑪𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶𝑶 = 𝟏𝟏, 𝟑𝟑𝟑𝟑𝟑𝟑
𝑯𝑯𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 = 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏. 𝟕𝟕𝟕𝟕
Absolute Unfairness of Apportionment (A) Station 2:
𝑨𝑨𝑷𝑷𝑷𝑷𝑷𝑷 = | 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 − 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏| (𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏)𝟐𝟐
𝑯𝑯𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 = 𝟓𝟓𝟓𝟓(𝟓𝟓𝟓𝟓+𝟏𝟏)
𝑨𝑨𝑷𝑷𝑷𝑷𝑷𝑷 = 𝟐𝟐𝟐𝟐𝟐𝟐
𝑨𝑨𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐 = | 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏 − 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏| 𝑯𝑯𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 = 𝟖𝟖𝟖𝟖𝟖𝟖. 𝟏𝟏𝟏𝟏
𝑨𝑨𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐 = 𝟐𝟐𝟐𝟐𝟐𝟐 Station 3:
(𝟖𝟖𝟖𝟖𝟖𝟖)𝟐𝟐
Relative (R) 𝑯𝑯𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 = 𝟐𝟐𝟐𝟐(𝟐𝟐𝟐𝟐+𝟏𝟏)
𝟐𝟐𝟐𝟐𝟐𝟐
𝑹𝑹𝑷𝑷𝑷𝑷𝑷𝑷 = 𝑯𝑯𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 = 𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏. 𝟐𝟐𝟐𝟐
𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏
𝑹𝑹𝑷𝑷𝑷𝑷𝑷𝑷 = 𝟎𝟎. 𝟏𝟏𝟏𝟏𝟏𝟏 𝒐𝒐𝒐𝒐 𝟎𝟎. 𝟏𝟏𝟏𝟏
𝟐𝟐𝟐𝟐𝟐𝟐
𝑹𝑹𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐 =
𝟏𝟏𝟏𝟏𝟏𝟏𝟏𝟏
𝑹𝑹𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐𝒐 = 𝟎𝟎. 𝟏𝟏𝟏𝟏𝟏𝟏 𝒐𝒐𝒐𝒐 𝟎𝟎. 𝟏𝟏𝟏𝟏 Aki | 2
MATM111
Apportionment Paradoxes EXAMPLE:
1. Albama Paradox
- Even when population of sub-groups do not
change, one sub-group loses a representative.
2. Population Paradox
- A sub-group loses a representative even when its
population is increasing faster than that of the =0
other sub-groups. = 17
=8
3. New states Paradox
=11+9 = 20
- Some other sub-group lose or gain a representative = 3 +2 = 5
even when a number of representatives was added
to account for the new sub-group’s population.
Voting Solution:
- A powerful tool indecision making Caramel = not included because it does not received the
- A method that uses votes to determine the winner. least any highest preference rating.
Methods of Voting Vanilla = 17 highest preference votes
1. Plurality Method of Voting Almond = 8 highest preference votes
2. Borda Count Method Toffe= 20 highest preference votes
3. Plurality by Elimination Solid = 5 highest preference votes
4. Pairwise comparison Voting Method
Preference Schedule Answer: Toffee is the most preferred candy by Plurality Method
- It is the matrix of summary of votes casted by the
voters. Borda Count Method of Voting
- Each voter ranks all of the candidates; that is, each
voter selects his or her first choice, second choice, third
choice, and so on.
- If there are 𝑘𝑘 candidates, each candidate receives 𝑘𝑘
points for each first-choice vote, (𝑘𝑘 − 1) points for
each second-choice vote, (𝑘𝑘 − 2) points for each third-
choice vote, and so on.
- The candidate with the most total points is declared the
winner.
EXAMPLE:

(1) (2) (2) (2) (4) (2)


Preference Ballot (5) (1) (1) (1) (1) (1)
- Is a ballot in which the voters rank the choices in order (4) (3) (4) (5) (3) (3)
of preference. (2) (5) (5) (3) (2) (4)
(3) (4) (3) (4) (5) (5)
Plurality Method of Voting
- Each voter votes for one candidate, and the candidate
with the most votes wins
- The winning candidate does not have a majority of 5 – 1pt; 4 – 2pts; 3 – 3pts; 2 – 4 pts; 1 – 5pts
the votes.
- Majority Vote: over 50 % of the people voting must Caramel:
vote for the candidate (17 x 1) + (11 x 2) + (9 x 2) + (8 x 2)+(3 x 4)+(2 x 2) = 89
- Limitation of Plurality Method: Alternative choices Vanilla:
are not considered. (17 x 5) + (11 x 1) + (9 x 1) + (8 x 1)+(3 x 1)+(2 x 1) = 118
- In-case of ties, voting should be done using the run- Almond:
off election. (17 x 4) + (11 x 3) + (9 x 4) + (8 x 5)+(3 x 3)+(2 x 3) = 192

Aki | 3
MATM111
Toffee:
(17 x 2) + (11 x 5) + (9 x 5) + (8 x 3)+(3 x 2)+(2 x 4) = 172
Solid: (3) (3) (3) (3)
(3)
(17 x 3) + (11 x 4) + (9 x 3) + (8 x 4)+(3 x 5)+(2 x 5) = 179
(2) (1) (2)
Answer: Almond is the most preferred candy by Borda (3) (2) (2) (1)
Count (196 scores of votes)

Plurality with Elimination


- First, eliminate the candidate with the fewest number
of first-place votes
- If two or more of these alternative have the same (3)
(3) (3) (3) (3)
number of first-place votes, all are eliminated unless
that would eliminate all alternatives. In that case, a (2) (1) (2)
different method of voting will be used. (3) (2) (2) (1)
- Adjust the voter’s ranking at the remaining
candidates.
- Repeat the same process of elimination and adj
stment until two candidates are left.
Step 3:
EXAMPLE:
Vanilla = 17
Almond = 8 + 3 = 11
Toffee = 11 + 9 + 2 = 22

(2) (2) (2) (2) (2)

(2) (1) (1)


Step 1:
Caramel = 0
Vanilla = 17
Almond = 8
Toffee = 11 + 9 = 20
Solid = 3 + 2 = 5
(2) (2) (2) (2) (2)

(2) (1) (1)


(4) (4) (4) (4) (4)
(2)
(3)

Step 4:
Vanilla = 17
Step 2: Toffee = 11 + 9 + 2 + 8 + 3 = 33
Vanilla = 17
Almond = 8 Answer: Toffee is the most preferred candy by Plurality with
Toffee = 11 + 9 = 20 Elimination
Solid = 3 + 2 = 5

Aki | 4
MATM111
Pairwise Comparison Voting Method Caramel: 3
- Sometimes referred to as the “head-to-head method”. Almond: 17 + 11 +9 + 8 + 2 = 47
- Each voter ranks all of the candidates; that is, each
voter selects his or her first choice, second choice, 3. (Caramel, Toffee)
third choice, and so on.
- For each possible pairing of candidates, the candidate
receives 1 point for a win, 0.5 for a tie and 0 for a
loss.
- The candidate with the greatest number of points win
the elections.
EXAMPLE:

Caramel: 3
Toffee: 17 + 11 +9 + 8 + 2 = 47

4. (Caramel, Solid)

Caramel Vanilla Almond Toffee Solid


Caramel 1 2 3 4
Vanilla 5 6 7
Almond 8 9
Toffee 10
Solid

Caramel: 0
1. (Caramel, Vanilla) Solid: 17 + 11 +9 + 8 + 3 + 2 = 50

5. (Vanilla, Almond)

Caramel: 11 + 9 + 8 + 3 + 2 = 33
Vanilla: 17
Vanilla: 17
2. (Caramel, Almond) Almond: 11 + 9 + 8 + 3 + 2 = 33

Aki | 5
MATM111
6. (Vanilla, Toffee) Almond: 17 + 9 + 8 = 34
Solid: 11 + 3 + 2 = 16

10. (Toffee, Solid)

Vanilla: 17
Toffee: 11 + 9 + 8 + 3 + 2 = 33

7. (Vanilla, Solid) Toffee: 11 + 9 = 20


Solid: 17 + 8 + 3 + 2 = 30

Caramel Vanilla Almond Toffee Solid


Caramel Caramel Almond Toffee Solid
Vanilla Almond Toffee Solid
Almond Almond Almond
Toffee Solid
Solid
Vanilla: 17
Solid: 11 + 9 + 8 + 3 + 2 = 33 Caramel = 1
Vanilla = 0
8. (Almond, Toffee) Almond = 4
Toffee = 2
Solid = 3

Answer: Almond is the most preferred candy by Pairwise


Comparison method

Almond: 17 + 8 + 3 = 28 SUMMARY:
Plurality Method = Toffee
Toffee: 11 + 9 + 2 = 22
Borda Count Method = Almond
Plurality with Elimination Method = Toffee
9. (Almond, Solid)
Pairwise Comparison Method = Almond

Aki | 6
MATM111
CODING THEORY Parity Checking
- the study of the properties of codes and their - one the types of Error Detection.
respective fitness for specific applications. - also called as Vertical Redundancy Check (VRC).
- Codes are used for data - can be one-dimensional or two dimensional.
compression, cryptography, error detection and - In a single parity-check code, an extra bit is added to
correction, data transmission and data storage. every data unit (e.g., byte, character, block, segment,
frame, cell, and packet).
- Codes are studied by various scientific disciplines—
- The objective of adding the parity bit (a 0 or a 1) is to
such as information theory, electrical engineering, make the total number of 1s in the data unit (including
mathematics, linguistics, and computer science— for the parity bit) to become even.
the purpose of designing efficient and reliable data - Some systems may use odd-parity checking, where the
transmission methods. total number of 1s should then be odd.
- This typically involves the removal of redundancy and - Even parity is typically used for synchronous
the correction or detection of errors in the transmitted transmission and odd parity for asynchronous
data. transmission
Four types of Coding
1. Data compression (source coding) Parity bit
2. Error control (channel coding) - means nothing but an additional bit added to the data
3. Cryptographic coding at the transmitter before transmitting the data.
4. Line coding - Before adding the parity bit, number of 1’s or zeros is
calculated in the data.
Data Compression (source coding) - Based on this calculation of data an extra bit is added
- defined as converting the message from the sender into to the actual information / data.
bits suitable to the communication channel. - The addition of parity bit to the data will result in the
- bit (short for "binary digit") is the smallest unit of change of data string size.
measurement used to quantify computer data. - This means if we have an 8-bit data, then after adding
- It contains a single binary value of 0 or 1. a parity bit to the data binary string it will become a 9-
- An example of this is the ASCII (AMERICAN bit binary data string.
STANDARD CODE) that converts each character in Two types of Parity Bits
the message to a byte of 8 bits. Even Parity
- In most computer systems, a byte is a unit of data that - If the data has even number of 1’s, the parity bit is 0.
is eight binary digits long. - Odd number of 1’s, the parity bit is 1.
- A byte is the unit most computers use to represent a - Ex: data is 10010001 -> parity bit 1
character such as a letter, number or typographic Odd Parity
symbol. - If the data has odd number of 1’s, the parity bit is 0.
EXAMPLE - Even number of 1’s, the parity bit is 1.
Consider the source encoding of four directions as follows: - Ex: data is 10010101 -> parity bit 1
NORTH - 00 Repetition code
SOUTH - 01 - one of the most basic error-correcting codes.
EAST - 10 - In order to transmit a message over a noisy channel
WEST - 11 that may corrupt the transmission in a few places, the
Suppose the message “NORTH”, which is encoded as 00, idea of the repetition code is to just repeat the message
is transmitted over a noisy channel. The message may several times
encounter errors and may be received as 01. The receiver - Suppose that the source encoding is already done and
will get the message 01 and decode it as “SOUTH” without that the encoded message is of fix length k. The
realizing that the message is corrupted channel encoding by repetition is performed by taking
the k bits then repeating it 2r + 1, where r is greater
Channel coding than or equal to 1 is a fixed integer.
- defined as adding some form of redundancy to the EXAMPLE
source encoded message so that the errors can be Suppose that the source encoded message is 110 where k=3.
detected or corrected. If you choose r= 2, the message must be repeated 2r +1 =
2(2) + 1 or 5 times. This will result to 110110110110110
Aki | 7
MATM111
EXAMPLE - To. determine the least residue is to simply get the
Assume that the message transmitted through a noisy remainder when b is divided by n.
channel and distorted. The received message is - b(mod n) means b divided by n. n is referred to as the
111001101110010. The channel encoding uses repetition modulus (divisor). Do not use a calculator.
code where k= 3. Decode the received message. EXAMPLES
If k=3, it means that the original coded message has a - Determine the least residue of 89 (mod 9)
size of 3 bits. The decoding process will be done in this Dividing 89 by 9 will give a quotient 9 and a remainder of
manner: 8. Therefore, 89 (mod 9) = 8
• First Bit - Consider the most frequent bit in positions 89/9 = 9
1,4,7,10, and 13 9 x 9 = 81
• Second Bit – Consider the most frequent bit in 89 – 81 = 8
positions 2,5,8,11, and 14 • Determine the least residue of 120(mod10)
• Third Bit – Consider the most frequents bit in Since 120 is exactly divisible by 10. The least residue of
positions 3, 6, 9, 12, and 15 120 (mod 10) = 0.
111/001/101/110/010
123/456/789/10 11 12/13 14 15 • Determine the least residue of 32(mod 40)
Decoded Message: 111 Dividing 32 by 40 will give a quotient of 0 and a remainder
of 32. Therefore, the least residue of 32(mod40) = 32.
MODULAR ARITHMETIC
- a system of arithmetic for integers, which considers • Determine the least residue of -12 (mod 5)
the remainder. /-12/ (mod 5)
- numbers "wrap around" upon reaching a given fixed 12(mod 5) = 2
quantity (this given quantity is known as the modulus) Subtract the least residue 2 from the modulus 5
to leave a remainder. 5-2= 3
- often tied to prime numbers, for instance, in Wilson's Therefore, /-12/ (mod 5) = 3
theorem, Lucas's theorem, and Hensel's lemma, and Operations in Modular Arithmetic
generally appears in fields - just normal operations, same as how we use in normal
like cryptography, computer science, and computer arithmetic
algebra. Consider modulo n
Congruence a) Modulo addition is defined (a + b) mod n
Let a and b are integers and n is a natural counting number. b) Modulo subtraction is defined as (a – b) mod n
We say that a is congruent to b modulo n in symbols: c) Modulo multiplication is defined as (a*b) mod n
d) Modulo division is defined as (a ÷ b) mod n
a ≡ b(mod n) EXAMPLES
If the difference of a and b is divisible by n. • (19 + 23) mod 12 = 42 mod 12 = 6
In addition, if n >0, and r is the remainder when b is divided - (19 + 23) mod 12
by n, the integer r is referred to as the least residue. - 42 mod 12 (42 ÷ 12 = 3)
- 12 x 3 = 36
EXAMPLES
- 42 – 36 = 6
- Verify if 12 ≡ 36 (mod 4)
• (78 – 45) mod 20 = 33 mod 20 =13
To verify, we perform 36-12=24 and 24 is divisible by 4,
- (78 – 45) mod 20
then we can say that the expression is a congruence.
- 33 mod 20 (33 ÷ 20 =1)
- 20 x 1 =20
- Verify if 25 ≡ 150 (mod 6)
- 33 – 20 = 13
To verify, we perform 150 -25 =125 and 125 is not
• (25* 8) mod 4 = 200 mod 4 = 0
divisible by 6, then we can say that the expression
- (25* 8) mod 4
is not a congruence.
- 200 mod 4 (200 ÷ 4 = 50)
- 4 x 50 = 200
- 200 – 200 = 0

Aki | 8
MATM111
• (216 ÷ 8) mod 15 = 27 mod 15 = 12 Key
- (216 ÷ 8) mod 15 - information that will allow someone to encipher
- 27 mod 15 (27 ÷ 15 = 1) the plaintext and also decipher the ciphertext.
- 15 x 1 = 15 - refers to the strings of information that is used to
- 27 – 15 = 12 reveal the encrypted message into readable form.
The Additive (or shift) Cipher System
CRYPTOLOGY
- The first type of monoalphabetic substitution cipher
Cryptography
we wish to examine is called the additive cipher.
- Originated from the Greek works Krypto which
- In this cipher method, each plaintext letter is replaced
means hidden and Graphene means writing.
by another character whose position in the alphabetic
- a method of making and breaking of secret codes.
a certain number of units away. We actually shift each
Cryptology
letter a certain number of places over.
- defined as the science of making communication
- One of the first additive ciphers was used by Julius
incomprehensible to all people except those who
Caesar around 50 B.C.
have the right to read and understand it.
The study of cryptology consists of two parts:
• Cryptography- which concerns itself with the
secrecy system itself and its design, and
• Cryptanalysis- which concerns itself with the
breaking of the secrecy system above.
Code Simple Methods of Cryptography
- a set of information that will allow words to be Shift Cipher
changed to other words or symbols that is not the type - it is called Caesar Cipher
of analyze. - it is the simple type of substitution of cipher.
- The only way to decode a message is by having the set - It is the method of cryptology where in the message
of words and their codes. If someone is able to get his is encrypted using a fixed number of shift (move) in
hands on the codebook, then every secrecy message order the have the equivalent character in a form of
can be broken. ciphertext.
Plaintext - The number of shifts can be any number from 0 - 25
- refers to the original message Method of Shift Cipher
- the message that you wish to put into a secret form. 1. Shift to either left or right
- usually written in all lower
- case letters without spaces.
- Numbers are written out and punctuation is ignored. Left
“I will meet you at 5 PM in the mall” is written as:
iwillmeetyouatfivepminthemall
Cipher
- the method for altering the plain text.
Ciphertext
- the secret version of the plaintext.
- refers to the coded message
ex. iwillmeetyouatfivepminthemall may be changed to: Left
NBNQQRJJYDTZFYKNAJURNSYMJRFQQ

Encryption/Encipher
- changing from plaintext to ciphertext
Decryption/Decipher - Sa A ka magsisimula lagi, to the left daw, paglipat mo
- changing from ciphertext to plaintext sa Z, isang count plng un. Parang itabi mo si A kay Z.

Aki | 9
MATM111
Terminologies
• In general, graphs can contain vertices that are not
connected to any edges.
• If two or more edges connect the same vertices, they
are called multiple edges.
• If an edge begins and ends at the same vertex, it is
called a loop.
• A graph is connected if any vertex can be reached from
any other vertex by tracing along edges.
• A connected graph in which every possible edges is
drawn between vertices is called complete graph.
Complete Graph

GRAPH THEORY
- a set of points called vertices and line segments or
curves called edges that connects vertices.
• Graphs and Euler Circuits
• Weighted Graphs
• Planarity and Euler’s Formula
• Graph Coloring

Terminologies

- Each dot represents a person, and a line segment


connecting two dots.
- It means that those two people are friends on Facebook.
Constructing a Graph
The following table lists five students at a college.
An “X” indicates that the two students participate in the Equivalent Graphs
same study group this semester. Two or more are called equivalent graphs if the edges form
the same connections of vertices in each graphs.

Draw a graph that represents this information where each


vertex represents a student and an edge connects two
vertices if the corresponding student’s study together.

A k i | 10
MATM111
Euler Circuits Weighted Graph
- A path in a graph can be thought of as a movement - A weighted graph is a graph in
from one vertex to another by traversing edges. which each edge is associated
- If a path ends at the same vertex at which it started, it with a value, called a weight.
is considered a closed path, or circuit.
- A circuit that uses every edge, but never uses the same
edge twice, is called an Euler circuit.
- The number of edges that meet at a vertex is called the Traveling Salesman Problem
degree of a vertex. - The travelling salesman problem (TSP) asks the
Eulerian Graph Theorem following question: "Given a list of cities and the
A connected graph is Eulerian distances between each pair of cities, what is the
if and only if shortest possible route that visits each city exactly once
each vertex of the graph is of even degree. and returns to the origin city?“
Euler Path - The traveling salesman problem consists of a salesman
- Euler path is a path that uses every edge of a graph and a set of cities. The salesman has to visit each one
exactly once. of the cities starting from a certain one (e.g. the
- Euler circuit is a circuit that uses every edge of a hometown) and returning to the same city. The
graph exactly once. challenge of the problem is that the traveling salesman
- Euler path starts and ends at different vertices. wants to minimize the total length of the trip.
- Euler circuit starts and ends at the same vertex.
Euler Path Theorem The Greedy Algorithm
- A connected graph contains a Euler path if and only if A method of finding a Hamiltonian circuit in a complete
the graph has two vertices of odd degree with all other weighted graph is given by the following greedy algorithm.
vertices of even degree. 1. Choose a vertex to start at, then travel along the
- Furthermore, every Euler path must start at one of the connected edge that has the smallest weight.
vertices of odd degree and end at the other. 2. After arriving at the next vertex, travel along the
Hamiltonian circuits edge of smallest weight that connects to a vertex not
- a path that uses each vertex of a graph exactly once. yet visited. Continue this process until you have
- A graph that contains a Hamiltonian circuit is called visited all vertices.
Hamiltonian. 3. Return to the starting vertex.
Note: The greedy algorithm attempts to give a circuit of
minimal total weight, although it does not always succeed.

The Edge-Picking Algorithm


Another method of finding a Hamiltonian circuit in a
complete weighted graph is given by the following edge-
picking algorithm.
1. Mark the edge of smallest weight in the graph.
2. Mark the edge of the next smallest weight in the
Dirac’s Theorem graph, as long as it does not complete a circuit and
- Consider a connected graph with at least three vertices does not add a third marked edge to a single vertex.
and no multiple edges. 3. Continue the process until you can no longer mark
- Let 𝑛𝑛 be the number of vertices in the graph. If every any edges. Then mark the final edge that completes
𝑛𝑛
vertex has a degree of at least , then the graph must the Hamiltonian circuit.
2
Note: The edge-picking algorithm attempts to give a circuit
be Hamiltonian.
of minimal total weight, although it does not always
succeed.

A k i | 11
MATM111
Planar Graphs Euler’s Formula
- a graph that can be drawn so that no edges intersect - In a connected planar graph drawn with no intersecting
each other (except at vertices). edges, let v be the number of vertices, e the number of
edges, and f the number of faces. Then v + f = e + 2.
Coloring Map
- If the map is divided into regions in some manner,
what is the minimum number of colors required if the
neighboring regions are to be colored differently?
- There is a connection between map coloring and graph
theory. Maps can be modeled by graphs using the
countries as the vertices and two vertices (countries)
are adjacent if they share a common boundary.
Platonic Solids - In graph coloring, each vertex of a graph will be
assigned one color in such away that no two adjacent
vertices have the same color. The interesting idea here
is to determine the minimum number of (distinct)
colors to be used so that we can color each vertex of a
graph with no two adjacent vertices have the same
color.
Four-Color Theorem
- Every planar graph is 4-colourable.
The Chromatic Number of a Graph
- The minimum number of colors needed to color a
graph so that no edge connects vertices of the same
color is called the chromatic number.
2-Colorable Graph Theorem
- A graph is 2-colourable if and only if it has no
circuits that consist of an odd number of vertices.

Ang sabi ng prof namin, definition of terms lng lalabas


Subgraphs
dyan sa graph. Kaya mapapansin nyo puro definition lng
- A part of a graph G is called a subgraph of G.
nilagay ko sa lesson na yan. And sabi din nya mga 2-3
Subgraph Theorem
questions lng lalabas sa exam un about sa graph.
- “If a graph G has a subgraph that is not planar,
Pasensya na kung d na ako naglagay ng explanations sa
the G is also not planar. In particular, if contains
mga example, d ko alam kung paano ko ieexplain ee tsaka
the Utilities Graph or K5 as a subgraph, G is not
baka humaba pa un reviewer na to hahahah
planar.”
Sana makatulong sainyo too!! Good luckkk 😊😊 – Aki
Nonplanar Graph Theorem
- A graph is nonplanar if and only if it has the
Utilities Graph or K5 as a subgraph, or it has a
subgraph that can be contracted to the Utilities
Graph or K5.

A k i | 12

You might also like