Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

4.

Borda count method (more on


LESSON 5.1 : VOTING computation)

METHODS ● Each voter ranks all of the


candidates; that is each other voter
1. Plurality method selects his or her first choice,
second, third, and so on.
● The one with the most number of ● If there are “k” candidates, each
votes or with the most candidate receives “k” points for
first-preference votes WINS each first-choice vote, “k-1” points
for each second-choice vote, “k-2”
2. Plurality with elimination method pointd for each third-choice vote,
● Each person votes for his or her and so on. the candidate with the
favorite candidate (or choice). most total points is declared as the
● If no candidate receives a majority, winner.
then the candidate with rhe fewest ● {count and add each every choice,
votes is eliminated and a new then times to 3,2,or1, then add from
election is held. this process up to down every letter}
continues until a candidate receives
a majority of the votes 5. Pairwise comparison method

3. Ranked-choice or instant runoff method ● Each voter ranks all of the


(each row lang) candidates; that is each voter
selects his or her first choice,
● Each voter RANKS all of the second, third, and so on
candidates; that is each voter ● For each possible paring of
selects his or her first choice, candidates, the candidate with the
second, third, and so on. get the most votes receives 1 point; if there
sum of the first choice votes for each is a tie, each candidate receives 1/2
candidate. the candidates who gets point.
the highest majority vote wins ● The candidate who receives the
● If no candidate receives a majority, most points is devlared the winner
then the candidate with the fewest ● {format ph vs usa / ph: usa: |
first choice votes is eliminated and format ph vc col / ph: col: }
the process is eliminated; meaning, then,
the first choice votes are added for ● {ex: a vs b = if b starts in the column,
each candidate. that’ll be the one u’ll write}
● If a candidate now has a majority of
first-choice votes, that candidate is
declared the winner. if no candidate
receives a majority, this process
continues until a candidate receives
a majority vote.
● But was adopted by the US
congress later on from 1852 until
1911
LESSON 5.2 : ● This kerhod tends to fabor larger
APPORTIONMENT states

TERMINOLOGIES : Steps in hamilton’s method :

states - the parties having a stake in the 1. Determine how many ppl each
apportionment representative should represent by
calculating the “standard divisor”
seats - indivisible objects that are divided
among n states 2. Divide each states’s population by the
divisor to determine how many
population - ser of n positive numbers that representayives it should have, a.k.a.
are used as the basis for the apportionment “standard quota”
of the seats to the states
3. Cut off (round down) all the decimal
standard divisor (d) parts of all the quotas. add up the remaining
- ratio of the total population to the total whole numbers.
number of seats to be allocated
4. Assuming that the total from step 3 is
d = total population / total number of seats less than the total number of
representatives, assign the remaining
standard quota (q) representatives, one each, to the states
- ratio of a state’s population to the standard whose decimal parts of the quita were
divisor largest, until the desired total is reached.

standard quota (q) = state’s population / d EXAMPLE:

SIX (6) APPORTIONMENT


METHODS

1. Hamilton’s Method

● Proposed by: ALEXANDER


HAMILTON (1755-1804)
● First aportionment method to be
approved in US congress 1791, but
was vetoed by President George
Washington in 1792
2. Jefferson’s Method

● Proposed by: THOMAS


JEFFERSON (1743-1826)
● First used in US Congress in 1791
until 1842 after Hamilton’s method
was vetoed by Pres. Washington
● Jefferson’s method tends to favor
larger states
● First 3 steps are the same as
Hamilton’s method

Steps in Jefferson’s Method :

Except that:

If the total from step 3 is less than the total


number of representatives, reduce the
divisor and recalculate the quota and
allocation. Continue doing this until the
total in step 3 is equal to the total number of
representatives

EXAMPLE:
3. Adam’s Method

● Proposed by: JOHN QUINCY


ADAMS (1767-1848)
● Adams proposed using modiAied
divisor greater than the standard
divisor, and he rounded up the
modiAied quota to get the upper
quota. To “round up” means to add 1
to the whole number part if the
decimal part is not equal to zero
● It tends to favor smaller states

Steps in Adam’s Method :

Opposite of Jefferson’s method. Instead of


rounding down the standard quota, round it
up to get the “upper quota”. If the sum of
the upper quotas does not equal the total
number seats to be apportioned, choose a
modiAied divisor greater than the standard
divisor and recalculate the standard quotes
and upper quotas then add the modiAied
upper quotas, Continue doing this trial and 4. Webster’s Method
error method until the sum of the upper
quotas. ● Proposed by: DANIEL WEBSTER
(1782-1852)
EXAMPLE: ● US Congress adopted this method in
1842 but in 1852, Hamilton’s method
replaced it
● Webster proposed rounding off the
standard quota to get the “rounded
quota”
● First 3 steps are the same as the
other methods

Steps in Webster’s Method :

Instead of rounding up or rounding down the


standard quota, round it OFF. the usual
rounding off rules apply.

If the sum of the rounded quotas does not


equal the total number of seats to be
apportioned, choose a modiAied divisor
greater or less (depending on whether the
sum is > or < the total # of seats) than the
standard divisor and recalculate the
modiAied rounded quotas

EXAMPLE:
Steps in Huntington-Hill’s Method :

First 3 steps are similar to Hamilton’s and


Jefferson’s methods

1. Compute the standard divisor

2. Compute the standard quota for


each state

3. Round down the standard quota to


get the lower quota (n)

4. Using the lower quota (n), compute


the geometric mean

Geometric Mean = the square root


of the product of the lower quota and
the next higher value

5. Compare the lower quota and the


geometric mean
* if the lower quota is larger than the
geometric mean, round up the quota
* if the lower quota is smaller than
the geometric mean, round down the
quota
5. Hill-Huntington’s Method
6. Add up the resulting whole numbers
● Proposed by: EDWARD in step 5 to get the initial allocation
HUNTINGTON and JOSEPH HILL
● This method is currently the method 7. If the initial allocation in step 6 is
of apportionment used by the US equal to the total number of seats, it
Congress will also be the Ainal allocation.
● Similar to webster’s method, but ● If the initial allocation is less
attempts to minimize the percent than (greater than) the total
differences of how many ppl each number of representatives,
representative will represent reduce (increase) the
● It slightly favors small states standard divisor and
recalculate the quota and
allocation

EXAMPLE:

Reminder: for initial allocation part:


● if higher standard quota than
geometric means - round up
● if geometric means is higher than
standard quota - round down

6. Lowndes’ Method

● Proposed by: WILLIAM LOWNDES


(1782-1822)
● When deciding where the remaining
representatives should go, we
divide the decimal part of each
state’s quota by the whole
number part
● More faavorable to smaller states

First 3 steps are similar to Hamilton’s and


Jefferson’s methods.

1. Cocmpute the standard divisor:

2. Compute the standard quota for


each state

3. Round down the standard quota to


get the lower quota (n)

4. Add the lower quotas.


Assuming that the total is less than
the total number of representatives,
divide the decimal part of each
state’s standard quota by the
whole number part (ratio).

5. Assign the remaining


representatives, one each to the
states whose ratio were largest, until
the desired total is reached
● increase/decrease the divisor if the
sum is not equal to the number of
representatives

5. HILL-HUNTINGTON’S METHOD
● Get the standard quota

● Get where n is the


lower quota to decide
● Compare the standard quota

with whether to
round it up or round it down

6. LOWNDES’ METHOD
● Get the lower quota
● Get the ratio by dividing the decimal
part by the whole number part of the
standard quota
● The one with highest ratio receives
one extra allocation
RECAP OF APPORTIONMENT
Google Sheet:
1. HAMILTON’S METHOD https://docs.google.com/spreadsheets/d/
● Get the lower quota 11CSyYnrnK9m9pOMvMqJgwSSJ4ZA9J0
● The state(s) with the highest decimal LdaQKt2rTJeiI/edit?usp=sharing
values, will each get additional one
representative

2. JEFFERSON’S METHOD LESSON 6.1 : MATHEMATICAL


● Get the lower quota
SYSTEMS
● Reduce the divisor if the sum is not
equal to the number of
representatives ● In mathematica, MODULAR
ARITHMETIC (sometimes called
3. ADAM’S METHOD clock arithmetic) is a system of
● Get the upper quota arithmetic for integers, where
● Increase the divisor if the sum is not numbers wrap around after they
equal to the number of reach a certain value - the modulus
representatives
LEONHARD EULER
4. WEBSTER’S METHOD ● Pioneered the modern approach to
● Get the rounded quota (usual congruence in 1750, when he
rounded off rules) explicitly introduced the idea of
congruence modulo a number N.
CARL FRIEDRICH GAUSS
Perform the following operations:
● Further advanced in his book
published in 1801 related to that of 1. In Z(8), what is 4 + 9?
the remainder in division
Answer: 5
● The operation of finding the
remainder is sometimes referred to 2. In Z(8), what is 15 + 21?
as the modulo operation.
Answer: 4
● Dividing an integer Z by 5 will have
the remainders 3. In Z(8), what is 106 + 102?

{0 , 1, 2, 3, 4} Answer: 0

4. In Z(8), what is 22 - 3?
Thus, we define as the set of integers
from 0 , 1 , 2 , … , n -1 modulo n, i.e. Answer: 3

5. In Z(8), what is 3 - 20?

= {0 , 1 , 2 , … , n-1} Answer: 7

6. In Z(8), what is 11 x 5?
In particular, we define with the
following set of positive integers: Answer: 7

Z(3) = (0 , 1 , 2}, modulo 3 7. In Z(15), what is 11 + 12?


Z(5) = {0 , 1 , 2 , 3 , 4 , 5}, modulo 5
Z(8) = {0 , 1 , 2 , 3 , 4 , 5 , 6 , 7}, modulo 8 Answer: 8

8. In Z(15), what is 11 + 22?


Note that has exactly n non-negative
integers. Answer: 3

9. In Z(15), what is 14 x 6?
In , modulo is simply the remainder r
Answer: 9
when an integer is simply divided by
n.
THE MODULO TABLE
: a/n has a remainder r<n
(Integer : a whole number (not a fraction
is closed under the binary operations number) that can be positive, negative, or
of addition and multiplication of integers zero.)
modulo n.

ADDITIVE INVERSE

In , two numbers a and b are additive


inverse of each other if a + b = 0 mod n.

Example 1 : Find the additive inverse of 7


in mod 16
Answer: 9
Because 7 + 9 = 0 mod 16

Example 2 : Find the additive inverse of 2


in mod 12
Answer: 10

Example 3 : Find the additive inverse of 5


in Z(7)
Answer: 2

THE MODULO CONGRUENCE MULTIPLICATIVE INVERSE

Two integers a and b are daid to be


congruent modulo n, where n is a natural In , two numbers a and b are
number, if a-b/n is an integer. multiplicative inverse of each other if ab = 1
mod n.

Example 1 : Find the multiplicative inverse


of 5 in Z(7)
Answer: 3
Because (5)(3) = 1 mod 7

Example 2 : Find the multiplicative inverse


of 3 in Z(10)
Answer: 7
Because (3)(7) = 1 mod 10

Example 3 : Find the multiplicative inverse


of 4 in mod 6
Answer: none

Every number has an additive inverse but not


necessarily a multiplicative inverse

LESSON 6.2 : APPLICATIONS


APPLICATIONS OF MODULO TO UPC, ISBN, AND CREDIT
ARITHMETIC CARDS

ZELLER’S CONGRUENCE International Standard Book Number


[ISBN]

Where:
d = date of the month
m = month (3 = March, 4 = April, 5 = May
……13 = Jan, 14 = Feb) ● This 13-digit number was created to
y = year (last two digits of the year) help ensure that orders for books
c = century (first two digita of the year) are filled accurately and that books
X = day (0 = Saturday, 1 = Sunday, 2 = are catalogued correctly.
Monday…)

Cautions:
[x] is the rounded down value of x.

Jan and Feb are the 13th and 14th months


of the previous year. ● The first three digits of an ISBN are
January 20, 2011 is like the 13th month of 978 the next digits indicates the
2010 country in which the publisher is
incorporated (0, and sometimes 1,
for books written in English), the
next two to seven digits indicate the
publisher, the next group of digits Because the check digit is 6 and not 4 as it
indicates the title of the book, and should be, the receiving clerk knows that an
the last digit (the 13th one) is incorrect ISBN has been sent.
called a check digit.

If we label the first digit of an ISBN d(1), the UNIVERSAL PRODUCT CODE (UPC)
second digit d(2), and so on to the 13th digit
d(13), then the check digit is chosen to
satisfy the following congruence.

● This number is placed on many


items and is particularly useful in
SAMPLE SCENARIO : grocery stores. A check-out clerk
passes the product by a scanner,
The ISBN for the fourth edition of the which reads the number from a bar
American Heritage Dictionary is code and records the price on the
978-0-395-82517-4. cash registe. If the price of an item
changes for a promotional sale, the
Suppose, however, that a bookstore clerk price is updated in the computer,
sends an order for the American Heritage thereby relieving a clerk of having to
Dictionary and inadvertently (hindi reprice each item. In addition to
sinasadya) enters the number pricing items, the UPC gives the
store manager accurate information
978-0-395-28517-4. about inventory and the buying
where the clerk transposed the 8 and 2 in habits of the store’s customers.
the five numbers that identify the book.
● The UPC is a 12-digit number that
Note: Correct ISBN: 978-0-395-82517-4 satisfies a congruence equation that
Incorrect ISBN : 978-0-395-28517-4 is similar to the one for ISBNs.

● The last digit is the check digit. If we


The receiving clerk calculates the check label the 12 digits of the UPC as d1,
digit as follows: d2, … , d12, we can write a formula
for the Upc check digit d12.
d(13) = 10 - (9+3(7)+8+3(0)+3+3(9)+5+3(2)+8+3(5)+1+3(7)) mod 10
= 10 - 124 mod 10
= 10 - 4 = 6 (check digit)
SAMPLE SCENARIO :

Find the check digit for the DVD release of


the film Alice in Wonderland.

7-86936-79798-X

d(12) = 10 - [3(7) + 8 + 3(6) + 9 + 3(3) + 6 + 3(7) + 9 = 3(7) + 9 + 3(8)] mod 10


● The Luhn algorithm, used to
determine whether a credit card
= 10 - 155 mod 10 number is valid.

= 10 - 5 = 5 STEP 1 :
Beginning with the next-to-last digit (the
The check digit is 5 last digit is the check digit) and reading from
right to left, double every other digit. If a
Is 1 - 32342 - 65933 - 9 a valid UPC? digit becomes a teo-digit number after being
doubled, treat the number as two individual
Because 100 = 0 mod 10, the UPC is valid. digits.

STEP 2 :
CREDIT CARDS Now find the sum of the new list of digits

● Credit card numbers are normally 13 STEP 3 :


to 16 digits long. The first one to four The final sum must be equal 0 mod 10.
digits are used to identify the card
issuer. Example ;

Determine whether 5234-8213-3410-1298 is


a valid credit card number.

Solution: highlight every other digit,


beginning with the next-to-last digit and
reading from right to left.
5234-8213-3410-1298

Next, double each of the highlighted digits.


10 2 6 4 16 2 2 3 6 4 2 0 2 2 18 8

Finally, add all digits, treating two-digit


numbers as two single digits.
(1+0)+2+6+4+(1+6)+2+2+3+6+4+2+0+2+2+
(1+8)+8 = 60
Because 60 = 0 mod 10, this is a VALID
credit card number.

—-------------------------------------------------------

ONSITE DISCUSSION

Multiplicative Inverse

a.b☰1
—----------
a.?☰1
3.?☰1

1
3.1 — = 1 (Reciprocal / multiplicative inv)
3

What is the multiplication inverse of 2 in


mod 4?
a=2
b=?

2 . b ☰ mod 4
Let b = 8
2.8 = 16

16
— = 4 rem. 0
4

Additive Inverse

a+?=0
3+?=0
3 + (-3) = 0

additive inverse
of 3
—-------------------------------------------------------

You might also like