Professional Documents
Culture Documents
Prefinal Module
Prefinal Module
Prefinal Module
People have always had a fascination with keeping information away from others. As children, many of us had
magic decoder rings for exchanging coded messages with our friends and possibly keeping secrets from parents,
siblings, or teachers. History is filled with examples where people tried to keep information secret from adversaries.
Kings and generals communicated with their troops using basic cryptographic methods to prevent the
enemy from learning sensitive military information.
A mysterious code underpins the world. But what does it mean and what can we learn from it?
A code that has the power to explain everything, from the numbers and shapes we see all around us to the
rules that govern our own lives. There are many beautiful images and animations created using computer code with a
mathematical basis. Some of them are quite simple to produce and could make good class exercises (or mini projects)
at the intersection of mathematics, coding and art.
This is also an additional video about coding: Welcome to the Code - The Code
https://www.youtube.com/watch?v=5RAtFSEkFho&feature=youtu.be&list=PLDEBDDFFEF0CE049A
Values Integration
Any researcher who wishes to become proficient at doing qualitative analysis must learn to code well and
easily. The excellence of the research rests in large part on the excellence of the coding. (Anselm L. Strauss,
Qualitative Analysis for Social Scientists, 1987, p. 27)
INPUTS
CODING
A code in qualitative inquiry is most often a word or short phrase that symbolically assigns a summative,
salient, essence-capturing, and/or evocative attribute for a portion of language-based or visual data. The data can
consist of interview transcripts, participant observation field notes, journals, documents, literature, artifacts,
photographs, video, websites, e-mail correspondence, and so on.
Code were already around since ancient times. A code is a symbolic way to represent information. In
qualitative inquiry, a code is most often a word or short phrase that symbolically assigns a summative, salient, essence-
capturing, and/ or evocative attribute for a portion of language-based or visual data (Saldaña, 2013). Below is an
example of a coded data in a qualitative data analysis (Saldaña, 2013 pp. 3–4).
1
CODE
I notice that the grand majority of homes have chain link fences in front of them. There are many Security
dogs (mostly German shepherds) with signs on fences that say, “Beware of the Dog.”
Emergency rescue workers or police officers may say, "There is a 'K'" Dead body
Readers may use other words and phrases to code the above-mentioned data since in qualitative data
analysis, coding is not a precise science.
During the ancient times, codes were already used by humans. Hieroglyphics or “sacred writings” were
codes used by ancient Egyptians in their writing system. Roman numerals were developed to easily determine the
prices of commodities and services rendered by the Romans. Roman numerals were used throughout Europe up until
the 1600s.
Hieroglyphics Roman Numerals
Identification numbers are used to identify individual items, specific products, people, accounts or
documents. These numbers are useful for easy recognition and detection of materials and for tracking and inventory of
products or documents (Kirtland, 2001).
A check digit or a check sum is used to verify errors on identification numbers. A check digit is a single
number that is generated using the other characters from the different check digit schemes.
For the Universal Product Code (UPC), the check digit is usually indicated on the far right of the UPC. UPC is
the barcode which is the identification number of a retail item such as a grocery product. It consists of twelve digits, the
first eleven (11) characters specify the source of the item and the product number. The twelfth digit is the check digit
typically a modulo 10 check digits.
3
Consider a 12-digit UPC: A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12. The following computation is carried out in which each
digit in an odd-numbered position is multiplied by 3, then all the numbers are added such that: 3A1 + A2 + 3A3 + A4 + 3A5
+ A6 + 3A7 + A8 + 3A9 + A10 + 3 A11 + A12
If this sum does not end with 0, the entered barcode number is incorrect. To illustrate how a UPC check digit is
calculated, consider the following examples:
Examples:
1. Consider the UPC 77083230854 and find its check digit.
Solution:
2. Consider the number found at the bottom of a Corn Flakes box as follows: 0 3 8 0 0 0 0 0 1 2 7 7
Solution:
3. Suppose that the packaging of a grocery item was damaged in such a way that the fifth digit of a 12-digit UPC
was scratched off, but the remaining 11 digits show
8 8 0 7 _ 2 3 0 3 5 8 4. Determine the correct UPC.
Solution:
Consider a 13-digit UPC: A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13. The following computation is carried out in which
each digit in an even-numbered position is multiplied by 3, then all the numbers are added such that: A1 + 3A2 + A3 + 3A4
+ A5 + 3A6 + A7 + 3A8 + A9 + 3A10 + A11 + 3A12 + A13
If this sum does not end with 0, the entered barcode number is incorrect. To illustrate how a UPC check digit is
calculated, consider the following examples:
A barcode is a set of vertical bars (long and short) and spaces which provide an indispensable tool for tracking
a variety of data from pricing to inventory. Cashiers in most establishment make use of automated cash registers.
Decoding information in a barcode is done through the use of a handy scanner which has the capability of converting a
code into specific data.
Barcoding is an efficient way of translating data instantaneously and accurately. It is used f or automated data
collection. It eliminates the occurrence of human error since through the use of a bar scanner, transmitting data is faster
and more reliable and takes lesser time than entering them manually. Barcodes were first used on June 26, 1974 with
10-pack Wrigley’s Juicy Fruit gum.
According to Stewart (1995), the simplest barcode is the Postnet Code X by the US Portal Service which is
commonly seen in business reply envelopes.
1.
Solution:
2.
Solution:
3.
Solution:
ACTIVITY
WHAT’S THE PASSWORD?
Given the barcode, decode it to get the password.
1.
2.
ASSESSMENT
1.
2.
UNIT 6 – APPORTIONMENT
Apportionment is a method of dividing a whole into various parts. This mathematical analysis has its roots in
the U.S. constitution. It started in1790 when the House of Representatives attempted to apportion itself. The issue then
was to find how many voters would be represented by each member of the House. The first method introduced in1790
to solve this problem was suggested by Thomas Jefferson and came to be known as the Jefferson Plan. Another
method was also proposed by Alexander Hamilton, the Hamilton Plan, which was only adopted later at about 1850.
Hamilton’s method can be described as every state gets at least its lower quota. As many states as possible
get their upper quota, with the one with highest residue having first priority, the one with second highest residue second
priority, and so on.
Hamilton’s method is still used today to apportion the legislatures of Costa Rica, Namibia, and Sweden.
Hamilton’s method creates a systematic bias in favor of larger states over smaller ones.
Values Integration
“The essence of mathematics is not to make simple things complicated, but to make complicated things
simple.” —S. Gudder
INPUTS
THE HAMILTON PLAN
To illustrate how the Hamilton plan works, consider a fictitious country named Andromeda with a population of
33,000 and having twelve states. The population of each state is given by the table below.
STATE POPULATION
Andersen 3,250
Ballard 2,750
Bednar 3,000
Christofferson 2,500
Cook 3,500
Draco 3,000
Hales 2,500
Holland 2,250
6
Libra 4,000
Nielsen 3,750
Nelson 1000
Oaks 1,500
Suppose that Andromeda’s constitution calls for 70 representatives to be chosen for these twelve states. The
number of representatives is to be apportioned according to the population of each state.
To determine the number of representatives of each Standard Divisor = ����������
state under the Hamilton method, divide first the total population ������������������
(33,000) by the number of representatives (70). This number is ��
called the standard divisor. ������������
���� ������������
STANDARD DIVISOR �����������������
�����
����,������
The Andromeda, the standard divisor is Standard Divisor =
����≈
471.43.
Now divide the population of each state by the standard divisor Solution:
and round the quotient down to a whole number. For example,
STANDARD QUOTA
7.4 and 7.6 should be rounded down to 7. Each whole number
Standard quota is the whole number part of the quotient of a
part of a quotient is called the standard quota.
population divided by the standard divisor.
Ballard 2,750
Bednar 3,000
Christofferson 2,500
Cook 3,500
Draco 3,000
Hales 2,500
Holland 2,250
Libra 4,000
Nielsen 3,750
Nelson 1000
Oaks 1,500
After solving for the standard quota, get the total of standard quota. The standard sub -quotas totaled to ___.
______ representatives short as required by the Andromeda Constitution. When this happens, the Hamilton plan
remediates by assigning one representative to the state with the largest decimal remainder. This method continues until
the required number of representatives is attained.
7
Solution:
STATE POPULATION QUOTIENT STANDARD ADDITIONAL NUMBER OF
QUOTA REPRESENTATIVE REPRESENTATIVES
Bednar 3,000
Christofferson 2,500
Cook 3,500
Draco 3,000
Hales 2,500
Holland 2,250
Libra 4,000
Nielsen 3,750
Nelson 1000
Oaks 1,500
Example: Find the correct apportion of the given problem using Hamilton Plan.
1. A total of 25 teacher aides are to be apportioned among seven classes shown in the following table:
CLASS NUMBER OF STUDENTS
Kindergarten 38
First Grade 39
Second Grade 35
Third Grade 27
Fourth Grade 21
Fifth Grade 31
Sixth Grade 33
TOTAL
Solution:
8
ACTIVITY
Solve the following problem using Hamilton Plan. Show your solution.
A. The following table shows the enrollment for each of the four divisions of the college. The four divisions are
science, business, education and engineering. There are 180 new computers that are to be apportioned
among the divisions based on the enrollments.
DIVISION ENROLLMENT
Science 3455
Business 4678
Education 5780
Engineering 1896
TOTAL 15809
B. A hospital district consists of six hospitals. The district administrators have decided that 48 new nurses
should be apportioned based on the number of beds in each of the hospitals. The following table shows
the number of beds in each hospital.
HOSPITAL NUMBER OF BEDS
Gumercindo 242
HMOMH 356
District 308
BAMC 275
Riverside 410
TOTAL 1781
As we saw with the Hamilton plan, dividing by the standard divisor and then rounding down does not always
yield the correct number of representatives. In the previous example, we were three representatives short. The
Jefferson plan attempts to overcome this difficulty by using a modified standard divisor.
Values Integration
“Nothing gives one person so much advantage over another as to remain always cool and unruffled under all
circumstances.” ― Thomas Jefferson
INPUTS
THE JEFFERSON PLAN
Under the Jefferson Plan, the standard quota is computed in the same way of way as the Hamilton Plan. But if
the total of the standard sub-quotas does not yield the correct number of representatives, a modified standard divisor is
employed. This number is chosen by trial and error. The modified standard divisor is less than the standard divisor
(using the Hamilton Plan). This is to get a larger quotient and eventually get a larger sum for the standard sub-quotas.
Suppose we let the modified standard divisor (MSD) be equal to 450. The table shows the results when the
modified standard divisor is 450.
STATE POPULATION QUOTIENT (MSD=450) NUMBER OF REPRESENTATIVES
Ballard 2,750
Bednar 3,000
Christofferson 2,500
Cook 3,500
Draco 3,000
Hales 2,500
Holland 2,250
Libra 4,000
Nielsen 3,750
Nelson 1000
Oaks 1,500
TOTAL
Observe that the total number of representatives is ___ short of the required number which is 70. Hence, 450
is not a correct MSD. In this case the MSD needed should be smaller than 450.
10
Solution:
STATE POPULATION QUOTIENT NUMBER OF REPRESENTATIVES
MSD=
Ballard 2,750
Bednar 3,000
Christofferson 2,500
Cook 3,500
Draco 3,000
Hales 2,500
Holland 2,250
Libra 4,000
Nielsen 3,750
Nelson 1000
Oaks 1,500
TOTAL
Example: Find the correct apportion of the given problem using Jefferson Plan.
2. A total of 25 teacher aides are to be apportioned among seven classes shown in the following table:
CLASS NUMBER OF STUDENTS
Kindergarten 38
First Grade 39
Second Grade 35
Third Grade 27
Fourth Grade 21
Fifth Grade 31
Sixth Grade 33
TOTAL
Solution:
11
ACTIVITY
Solve the following problem using Hamilton Plan. Show your solution.
A. The following table shows the enrollment for each of the four divisions of the college. The four divisions are
science, business, education and engineering. There are 180 new computers that are to be apportioned
among the divisions based on the enrollments.
DIVISION ENROLLMENT
Science 3455
Business 4678
Education 5780
Engineering 1896
TOTAL 15809
B. A hospital district consists of six hospitals. The district administrators have decided that 48 new nurses
should be apportioned based on the number of beds in each f the hospitals. The following table shows
the number of beds in each hospital.
HOSPITAL NUMBER OF BEDS
Gumercindo 242
HMOMH 356
District 308
BAMC 275
Riverside 410
TOTAL 1781
ASSESSMENT
A college is divided into four department. The president decided to apportionment the 27 new digital projectors
to the four departments labeled A, B, C, and D. the following table shows the number of students enrolled to a
department.
DEPARTMENT NUMBER OF STUDENTS
A 840
B 1936
C 310
D 2744
TOTAL
12