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

Week 10-11 Module

The document provides learning guides for week 10 of a mathematics course. It discusses mathematics as a tool, including binary codes, integers in computers, logic and computer addition, text data, errors and error correction, error detecting codes, and repetition and hamming codes. The expected competencies are to convert between decimal and binary numbers, identify uses of text data, and determine various error codes. The content explains binary number systems, converting decimal numbers to binary and vice versa, how integers are stored in computers using bits and bytes, and different types of error detecting and correcting codes.

Uploaded by

Yuri Mahilum
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Week 10-11 Module

The document provides learning guides for week 10 of a mathematics course. It discusses mathematics as a tool, including binary codes, integers in computers, logic and computer addition, text data, errors and error correction, error detecting codes, and repetition and hamming codes. The expected competencies are to convert between decimal and binary numbers, identify uses of text data, and determine various error codes. The content explains binary number systems, converting decimal numbers to binary and vice versa, how integers are stored in computers using bits and bytes, and different types of error detecting and correcting codes.

Uploaded by

Yuri Mahilum
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

i

TECHNOLOGICAL UNIVERSITY OF THE PHILIPPINES VISAYAS


Capt. Sabi St., City of Talisay, Negros Occidental

College of Engineering Technology


Office of the Program Coordinator

LEARNING MODULE

GEC 4:
MATHEMATICS IN
THE MODERN
WORLD
(Weeks 10-13)

BASIC ARTS AND SCIENCES DEPARTMENT

PREPARED BY:

LUCILLE S. ARCEDAS, Ph. D.


LOURLEN P. PAGDATO, MBA
2020
ii

VISION
The Technological University of the Philippines shall be the premier state university
with recognized excellence in engineering and technology at par with leading universities in
the ASEAN region.
MISSION
The University shall provide higher and advanced vocational, technical, industrial,
technological and professional education and training in industries and technology, and in
practical arts leading to certificates, diplomas and degrees.
It shall provide progressive leadership in applied research, developmental studies in
technical, industrial, and technological fields and production using indigenous materials; effect
technology transfer in the countryside; and assist in the development of small-and-medium
scale industries in identified growth center. (Reference: P.D. No. 1518, Section 2)

QUALITY POLICY
The Technological University of the Philippines shall commit to provide quality higher
and advanced technological education; conduct relevant research and extension projects;
continually improve its value to customers through enhancement of personnel competence and
effective quality management system compliant to statutory and regulatory requirements; and
adhere to its core values.

CORE VALUES

T - Transparent and participatory governance


U - Unity in the pursuit of TUP mission, goals, and objectives
P - Professionalism in the discharge of quality service
I - Integrity and commitment to maintain the good name of the University
A - Accountability for individual and organizational quality performance
N - Nationalism through tangible contribution to the rapid economic growth of the country
S - Shared responsibility, hard work, and resourcefulness in compliance to the mandates of
the university
iii

TABLE OF CONTENTS
Page Numbers
TUP Vision, Mission, Quality Policy, and Core Values
Table of Contents……………………………………………………………………. iii
Overview…………………………………………………………………………………iv
Learning Guide (Week No. 10) …………………………………………………………. 1
Topic ……………………………………………………………………………………. 1
Expected Competencies………………………………………………………………….. 1
Content/Technical Information…………………………………………………………... 1
Progress Check…… ……………………………………………………………………… 6
References………………………………………………………………….....…............... 7
Learning Guide (Week No. 11) …………………………………………..……………… 8
Topic/s………………………………………………………………..…………………… 8
Expected Competencies…………………………………………………...………………. 8
Content/Technical Information ………………………………………………….……….., 8
Progress Check ………………………………………………………..…………………..12
References………………………………………………………………..………………..12
Learning Guide (Week No. 12) …………………………………………………...............13
Topic/s…………………………………………………………………….……………… 13
Expected Competencies…………………………………………………..……………… 13
Content/Technical Information…………………………………………..………………..13
Progress Check…… ………………………………………………………………………23
References…………………………………………………………………………………24
Learning Guide (Week No. 13) …………………………………………………...............26
Topic/s…………………………………………………………………….……………….,26
Expected Competencies…………………………………………………..……………… 26
Content/Technical Information…………………………………………..………………..26
Progress Check…… ………………………………………………………………………44
References…………………………………………………………………………………45
REFERENCES………………………………………………………………………….. 46
About the Authors………………………………………………………………………. 48
iv

OVERVIEW
Time flies so fast that we are now in the final term of our study. We are going to discuss
three important topics in mathematics for the first three weeks.
On Week 10, we will discuss Mathematics as a Tool. The core idea is the use of
mathematics goes beyond the ordinary. Mathematics enables the development of codes that are
useful to individuals and to society. We will discuss binary codes, integers in computers, logic
and computer addition, text data, errors and error connection, error detecting codes, and
repetition and hamming codes.
On Week 11, we will discuss the Mathematics of Finance. We will discuss simple and
compound interest, credit cards and consumer loans, stocks, bonds, and mutual funds, and home
ownership.
On Week 12, we will discuss Mathematics of Graphs. We will deal with graphs and Euler
circuits, weighted graphs, and Euler’s theorem.

On Week 13, we will study about linear programming and to find the best solution given several
inequalities. Your knowledge on this topic will be helpful in the industry for finding the best level of
production when you encounter different costs, manpower, sales, and other variables.

Lucille S. Arcedas, Ph. D.


Lourlen P. Pagdato, MBA
GEC 4 Instructors
1

LEARNING GUIDE
Week No.: 10

TOPIC: Mathematics as a Tool


• Binary codes
• Integers in Computers
• Logic and Computer Addition
• Text Data
• Errors and Error Correction
• Error Detecting Codes
• Repetition and Hamming Codes

EXPECTED COMPETENCIES: At the end of this lesson, you must have:


1. converted decimal numbers to binary numbers and vice-
versa;
2. identified the uses of text data; and
3. determined error, repetition, and hamming codes.

CONTENT/TECHNICAL INFORMATION

Binary code – the code used in digital computers. This is based on binary number system.

Binary number system – the positional numeral system that uses 2 as the base. This only uses
the digits, 0 and 1.

Decimal Numbers represented by Binary Numbers

Decimal Binary Conversion


0 0 0 (2)
1 1 1 (20)
2 10 1(21) + 0 (20)
3 11 1(21) + 1 (20)
4 100 1(22) + 0 (20) + 0 (20)
5 101 1(22) + 0 (21) + 1 (20)
6 110 1 (22) + 1 (21) + 0 (20)
7 111 1 (22) + 1 (21) + 1 (20)
8 1000 1 (23) + 0 (22) + 0 (21) + 0 (20)
9 1001 1 (23) + 0 (22) + 0 (21) + 1 (20)
10 1010 1 (23) + 0 (22) + 1 (21) + 0 (20)
2

Examples:

A. Convert the following binary numbers to decimal numbers

1. 1100 = 1 (23) + 1 (22) + 0 (21) + 0 (20) = 12


=8+4
= 12

2. 110011 = 1 (25) + 1 (24) + 0 (23) + 0 (22) + 1 (21) + 1 (20)


= 32 + 16 + 2 + 1
= 51

3. 11111 = 1 (24) + 1 (23) + 1 (22) + 1(21) + 1 (20)


= 16 + 8 + 4 + 2 + 1
= 31

4. 1110001 = 1 (26) + 1 (25) + 1 (24) + 0 (23) + 0 (22) + 0 (21) + 1 (20)


= 64 + 32 + 16 +1
= 113

5. 1101101 = 1 (26) + 1 (25) + 0 (24) + 1 (23) + 1 (22) + 0 (21) + 1 (20)


= 64 + 32 + 8 + 4 + 1
= 109

B. Convert the following decimal numbers to binary numbers


1. 29 = 1 (24) + 1(23) + 1(22) + 0 (21) + 1 (20)
= 11101

2. 34 = 1 (25) + 0 (24) + 0 (23) + 0 (22) + 1 (21) + 0 (20)


= 100010

3. 81 = 1 (26) + 0 (25) + 1 (24) + 0 (23) + 0 (22) + 0 (21) + 1 (20)


= 1010001

4. 121 = 1 (26) + 1 (25) + 1 (24) + 1 (23) + 0 (22) + 0 (21) + 1 (20)


= 1111001

5. 540 =1(29) + 0 (28) +0 (27) + (26) + 0 (25) + 1 (24) + 1 (23) + 1 (22) + 0 (21) + 0(20)
= 1000011100
3

Integers in Computers

Computers use a fixed number of bits to represent a portion of data. Integers are stored in binary
format. The n-bit storage location can represent up to 2^n distinct entities. For example, a 3-bit
memory location can hold one of these eight binary
patterns: 000, 001, 010, 011, 100, 101, 110, or 111 (Hock-Chuan, 2014). According to
Schmalz (n.d.) due to precision problem, the laws of continuous algebra are not always
applicable in computer arithmetic.

Byte – the basic unit of information in computer in computer storage and processing. A byte
consists of 8 adjacent binary digits called bits which consists of a 0 or 1.

Name Equivalent Size (in bytes)

Byte 8 bits 1
Kilobyte 1 024 bytes 1 024
Megabyte 1 024 kilobytes 1 048 576
Gigabyte 1 024 megabytes 1 073 741 824

Computer Arithmetic

Parhami (2001) describes computer arithmetic as “a branch of computer engineering that deals
with methods of representing integers and real values (e.g., fixed- and floating-point numbers)
in digital systems and efficient algorithms for manipulating such numbers by means of
hardware circuits or software routines.”

Parhami also discussed several forms of representing numbers. The onset of electronic
computers paved the way for the use of binary numbers or bits which has only two values: 0
and 1. This is compatible with electronic signals.

In binary addition,
0+0=0
0+1=1
1+0=1
1 + 1 = 10 (which is 0 carry 1)

Practice:
1. 1 + 11
2. 1010 + 11
3. 100101 + 10101
4

Answers:

1 1010 100101
11 11 10101
100 1101 111010

Text Data (Sarkar, 2018)


• consists of documents, which can represent words, sentences or paragraphs of free-
flowing text.

Uses of Text Data (Gentzkow, et al., 2019)

1. Finance: texts from news, social media, and company files are used to predict assets
2. Economics: texts are used to forecast variation in unemployment, inflation, and
uncertainty
3. Politics: texts from news, social media, and politicians’ speeches are used to study
influencers, political leanings, and agenda.
4. Industrial organizations and marketing: texts from advertisement and product reviews
are used in consumer decision-making

Example (Gentzkow, et al.)


Suppose that we have a sample of documents, each of which is w words long, and
suppose that each word is drawn from a vocabulary of p possible words. Then the
unique representation of these documents has dimension pw. A sample of thirty-word
Twitter messages that use only the one thousand most common words in the English
language, for example, has roughly as many dimensions as there are atoms in the
universe.

Raw text consists of an ordered sequence of language elements: words, punctuation,


and white space. To reduce this to a simpler representation suitable for statistical
analysis, we typically make three kinds of simplifications: dividing the text into
individual documents i, reducing the number of language elements we consider, and
limiting the extent to which we encode dependence among elements within documents.

Sources of text data


• Library databases
• Social media
• Open sources
• Web scraping
• Language corpora
• Transcription from audio/video data

Text Data Mining – the process of extracting essential data from standard language text. All
data generated from text messages, documents, emails, and files are written in the common
language text. Text mining is used to draw useful insights or patterns from the given data.
5

Errors and Error Correction (Gibson, et al., 2021)

Error – a situation that happens when the output data does not equate with the input data. This
occurs when digital indicators encounter noise that may initiate errors in the binary bits
moving from one system to another during communication. For example, a 0 bit may be
altered to 1 or a 1 bit may be altered to 0.

Error detection – the discovery of errors, which results from noise or other deficiencies,
during transit from the transmitter to the receiver

Error correction – discovery of errors and its rehabilitation to original, error-free data status

Error Correcting codes – distinguishes the original message from fraudulent message and
diagnoses the exact position of the corrupt bit

Error Detecting Codes – are utilized to prevent the data from getting altered during
communication. These are added to a given digital message to help us identify whether an
error appeared during message transfer.

Commonly used error detection mechanisms


• Application of Redundancy Bits – bits are added in order to discover errors.
• Simple Parity Check – portions of data from the source undergo a check bit or maker
system
• Two-dimensional Parity Check – parity checks bits are computed for each row and
computed for all columns. Then both are transmitted along with the data. Computed
parity check bits for both rows and columns are compared with the parity bits computed
on the received data.
• Checksum – the data are separated into sections for each bit. The sections are added
using 1’s aggregate arithmetic to get the sum on the sender’s end. Then checksum
section is sent along with the standard data sections. Then all sections are added using
1’s aggregate to get arithmetic sum on the receiver’s end. If the result is zero, the
received data is accepted; otherwise, data are rejected.
• Cyclic Redundancy Check – based on binary division. If remainder exists, then this
signifies that the data has been impaired in the transit and must be declined.

Error detection and error correction are used in the following:


• Internet
• Deep-space telecommunications
• Satellite broadcasting
• Data storage
• Error-correcting memory
6

Repetition and Hamming Codes (Macleod, 2021; www.math.utah.edu)

Repetition codes are the simplest type of linear block codes with error-
correcting capability. A bit is encoded into a block of n identical bits, resulting in an (n,
1) block code. Assuming the code has error-correcting capability t, a bit is encoded as
a sequence of 2t+1 identical bits, thus yielding 2t+1,1 linear block codes. In the case of
hard-decision decoding, a majority logic decision needs to be made, i.e., if the number
of 0s exceeds the number of 1s, the decoder decides in favor of a 0, otherwise, it decides
in favor of a 1. The soft-decision decoding can be easily implemented to enhance the
error rate performance at a modest level of complexity and the performance
improvement due to soft-decision decoding can be significant. There are thus only
two codewords in the code: all-zero codeword and all-one codeword. This code
requires the use of significant bandwidth as it has a very low code rate 12t+1≤13, and
therefore such codes are inefficient. However, repetition codes are attractive for deep-
space communications, as there exists huge bandwidth at extremely high frequency
band.

Hamming codes are distance-3 linear block codes, so they can be used for single error
correction or dual error detection. For binary Hamming codes, the codeword length is
given by n = 2r – 1, the number of parity bits is r, and the number of message bits is
therefore given by k = n – r.

The goal of Hamming Code is to detect and correct errors while sending less data than
repetition codes. This process is used in computing and telecommunications as an
efficient 1-error and 2-error detecting code. Hamming Codes are linear codes, and can
be described as [n,k], for length n and dimension k. A Generator matrix, G, is a k x n
matrix that has a row space equal to the code being sent. A check matrix is used to
verify the sent data, it is formed using the calculates used to create the sent data

PROGRESS CHECK
I. Convert the following binary numbers to decimal numbers
1. 10111
2. 1010101
II. Convert the following decimal numbers to binary numbers
1. 65
2. 124

III. Add the following binary numbers:


1. 1001 + 10111
2. 1101 + 110
7

REFERENCES

Encyclopædia Britannica (2020). Binary code.


https://www.britannica.com/technology/binary-code

Error-Correcting Code: Parity and Hamming Codes.


http://www.math.utah.edu/~gustafso/s2018/2270/projects-
2018/submittedprojects/valerieGerman/ErrorCorrectingCode.pdf

Gentzkow, M., Kelly, B., & Taddy, M. (2019) Text as Data. Journal of Economic Literature.
57(3), 535–574. https://doi.org/10.1257/jel.20181020

Gibson, R., Nuttal, I., Nichol, T. L., & Priya, M. (2021). Error Detection.
https://teachcomputerscience.com/error-detection/

Macleod, M.D. (2021). Hamming Code.


https://www.sciencedirect.com/topics/engineering/hamming-code

Parhami, B. (2001). Number Representation and Computer Arithmetic.


https://web.ece.ucsb.edu/~parhami/pubs_folder/parh02-arith-encycl-infosys.pd

Sarkar, D. (2018). Traditional Methods for Text Data.


https://towardsdatascience.com/understanding-feature-engineering-part-3-traditional-
methods-for-text-data-f6f7d70acd41

Schmalz, M.S. (n.d.). Organization of Computer Systems.


https://www.cise.ufl.edu/~mssz/CompOrg/CDA-lang.html#Sec2.4
8

LEARNING GUIDE
Week No.: __11__
TOPIC: The Mathematics of Finance
• Simple and Compound Interest
• Credit Cards and Consumer Loans
• Stocks, Bonds, and Mutual Funds
• Home Ownership

EXPECTED COMPETENCIES: At the end of this lesson, the you must have:
1. solved simple and compound interest;
2. gained idea about credit cards and consumer loans;
3. differentiated stocks, bonds, and mutual funds; and
4. determined ways to acquire home.

CONTENT/TECHNICAL INFORMATION
At this time, we will focus on finances. Our first topic is interest. We will discuss two
types of interest: the simple interest and the compound interest.

Simple Interest

Simple interest formula: I = Prt


where: I = interest
P = principal
r = rate
t = time (per year)

For example, you borrowed Php 10, 000 with an interest rate of 10% annually. How much
will you pay after 5 years? To find for the interest, multiply the principal by rate by time.
I = Prt = Php 10, 000.00 (0.1) (5) = Php 5,000.00
After 5 years, you are going to pay P15, 000.00

Another example: You borrowed P20000 from a cooperative with an interest rate is 2%. If
you pay after 9 months, how much will you pay?
I = Prt = Php 20, 000.00 (0.02) (0.75) = Php 300.00
Total = P + I = 20,000 + 300 = Php 20, 300.00
Not all interests are simple. We have compound interest. The formula and examples
are in the next pages.

Compound interest
𝑟
A = P (1 + 𝑛 )nt
Where: A = amount
P = principal
r = interest rate
n = number of times interest is compounded per unit “t”
t = time (number of years)
9

Example 1:
Suppose you signed into a 5-year loan which is compounded annually at 5%. How much will
you pay if you borrowed Php 10,000.00.
Given:
P = 10,000.00
r = 0.05
n=1
t=5

Solution:
𝑟
A = P (1 + 𝑛 )nt
= Php 10,000 (1 + 0.05/1)1(5)
= Php 10, 000 (1.276282)
= Php 12, 762.82

In details, this is how we get the total amount


Rate of
Years Principal Amount Interest Compound Amount
Interest
1 Php 10, 000.00 5% Php 500.00 Php 10, 500.00
2 Php 10, 500.00 5% Php 525.00 Php 11, 025.00
3 Php 11, 025.00 5% Php 551.25 Php 11,576.25
4 Php 11,576.25 5% Php 578.81 Php 12, 155.06
5 Php 12, 155.06 5% Php 607.75 Php 12, 762.81

Example 2:
You borrowed Php 50,000.00 to start a new business. This has an interest rate of 5%
compounded monthly. How much will you pay after 10 years?
Given:
P = 50,000.00
r = 0.05
n = 12
t = 10

Solution:
𝑟
A = P (1 + 𝑛 )nt
= Php 50,000 (1 + 0.05/12)12X10
= Php 50, 000 (1.6470095042509848)
= Php 82, 350.47
10

Credit Cards
Credit Card – a plastic card that contains information and authorizes the owner to purchase
products or services. This be billed later within the credit limit of the owner. Interest is charged
when the monthly balance is not paid in full. The average interest rate on credit cards is 15%,
depending on the payment history and credit score.

Credit card mechanics (https://www.finder.com/credit-cards-101)

Billing cycles – the time that you need to pay the bank for the purchases you made. It depends
on your financial provider when it starts and ends. Its length is between 25 and 31 days. It can
start from the 1st day of the month and end at the 30th day. It can also start from the 25th of one
month to the 25th of another month.

Credit card statement – the summary of all the transactions you have made on your credit card
during the billing cycle. It provides information like how much you need to pay to your card
provider, your minimum amount to pay, and the potential late fees.

Balance – the amount of money you owe from the credit card provider

Interest – the money your bank charges as a fee for borrowing money or as payment for the
delayed payment on purchases.

Grace period – the time provided by the card provider if you cannot yet pay your bills in full.
This is usually between 21 and 25 days

Annual fee – payment to retain ownership of the credit cards

Introductory annual fee – paid during the first year

Consumer Loans (Rodriguez, et al., 2018)


- type of loans that has a fixed date for monthly repayments
Types:
1. Student loans – used to help cover the cost of tuition fees and other expenses related to
finishing a degree.
2. Mortgages – loans offered by banks to consumers planning to buy houses they can’t
pay in cash. If the borrower failed to pay at a certain period, then the house is subject
to foreclosure.
3. Auto loans – otherwise known as the car loan. Inability to pay means losing the car.
4. Personal loans – used for personal expenses
5. Payday loans – short-term, high-interest used by borrowers to solve budget problems
from one payday to the next.
6. Borrowing from Retirement and Life Insurance – used by clients with retirement funds
or insurance plans.
7. Consolidated loans – used to pay several outstanding debts like credit card debt
8. Borrowing from friends and family – informal loan
9. Cash advances – short-term loan in the credit card
11

Stock – represents a fractional ownership share of a company. This is sold in terms of share.

Bonds – loans from individual investors and institutions to a company with the expectation
that the money will be paid back at a specific date in the future with a certain interest rate.

Mutual Fund – another way to invest in stocks, bond, or cash alternatives.

Sample story:

After graduation, Eunice loaned from a bank to establish a small restaurant. Over the years, her
business became successful and she was able to pay her bank loan. Then she was able to earn
400 000 pesos of profit every year. The business then got a book value of 1 million pesos and
the average product stock is 10 times its earnings. The earnings will be multiplied by 10 times,
so it is 4 million plus the book value of 1 million pesos.

Eunice decided to expand the business, so she needs additional money. Instead of going to the
bank, she decided to sell stocks. She decided to sell 40% of her income to interested
entrepreneurs through stocks. She was able to open a new branch which provides 700 000 pesos
annual income.

Eunice then decided to open other branches. Another businessman, Andy, came and wanted to
be part of the company. Eunice restaurant sells a bond worth 8 million pesos to Andy. Thus,
Andy as the lender holds a bond or a contract. Eunice commits to repay on a monthly basis
until the maturity date of 10 years. On the agreement of the bond, an annual interest of 50 000
pesos be paid.

Home Ownership

Owning Land/Real Estate in the Philippines (www.philippineconsulatela.org)

In general, only Filipino citizens and corporations or partnerships with least 60% of
the shares are owned by Filipinos are entitled to own or acquire land in the
Philippines subject to the following exceptions:

1. acquired before the 1935 Philippine Constitution


2. acquired by reason of succession or inheritance (parent/s was/were Filipino
citizens at the time of their death)
3. purchase of not more than 40% interest in a condominium project
4. Former natural-born Filipinos can own land in the Philippines, subject to
limitations prescribed by Philippine Republic Act 8179 (for residence
purposes- up to 1000 square meters of urban land or one hectare of rural land)
and Batas Pambansa 185 (for business or investment purposes 5000 square
meters of urban land or three hectares of rural land).
5. Filipinos who are married to aliens who retain their Filipino citizenship, unless
by their act or omission they have renounced their Filipino citizenship
12

Requirements of Home Ownership (pagibigfund.gov.ph)


• Active member with at least 24 months savings
• Not more than 65 years old at the date of loan application and is not more than 70
years old at the date of loan maturity
• Legal capacity to acquire and encumber real property
• No Pag-IBIG housing loan foreclosed, cancelled, bought back, or voluntarily
surrendered
• If with existing Pag-IBIG Housing account or Short-Term Loan (STL), payments
must be updated

PROGRESS CHECK
Show neat and complete solution:
1. Suppose you signed into an 8-year loan which is compounded annually at 7%. How
much will you pay if you borrowed Php 20,000.00.
2. You borrowed Php 80,000.00. This has an interest rate of 4% compounded monthly.
How much will you pay after 6 years?

REFERENCES
Pag-IBIG Housing Loan (n.d.). Pag-IBIG Housing Loan (pagibigfund.gov.ph)
Rodriguez, M. J., Salvador, I.G., Ragma, F., Torres, E., Manalang, E., Oredina, N., & Ogoy,
J. I. (2018). Mathematics in the Modern World. Nieme Publishing House Co. Ltd.
13

LEARNING GUIDE
Week No.: _12_

TOPIC: The Mathematics of Graphs


• Graphs and Euler Circuits
• Weighted Graphs

EXPECTED COMPETENCIES. At the end of this lesson, you must have:


1. drawn graphs of identified locations;
2. differentiated paths from circuits; and
3. solved for the optimal solution of a circuit.

CONTENT/TECHNICAL INFORMATION

Graphs and Euler Circuits

Graph Theory started with the Königsberg Bridge Problem posted by the Swiss
mathematician Leonhard Euler. The city of Königsberg was located on the Pregel river in
Prussia. The river divided the city into four separate landmasses, including the island of
Kneiphopf. These four regions were linked by seven bridges as shown in the diagram.
Residents of the city wondered if it was possible to leave home, cross each of the seven bridges
exactly once, and return home (Figure 1).

Figure 1
The bridges of city of Königsberg
14

The key to Euler’s solution was in a very simple abstraction of the puzzle (Figure 2).
Let us redraw our diagram of the city of Königsberg by representing each of the land masses
as a vertex and representing each bridge as an edge connecting the vertices corresponding to
the land masses. We now have a graph that encodes the necessary information. The problem
reduces to finding a “closed walk” in the graph which traverses each edge exactly once, this is
called an Eulerian circuit.

Figure 2
Abstraction of the puzzle

Definition of Terms

Graph Theory – a branch of mathematics concerned about how networks can be encoded, and
their properties measured
– the study of graphs, which are mathematical structures used to model pairwise
relations between objects.
Graph – consists of vertices or nodes and line segments or curves called edges
– can be used to illustrate connections such as flight destination of airlines, social
networks in Facebook, and computer system connectivity in school

Figure 3
The Graph

Degree of a vertex – number of edges intersecting that vertex


• odd vertex – A, B, C, D, E, F
• even vertex – G
15

Adjacent vertices – at least one edge connect them.


– In figure 3, vertices C and D are adjacent vertices connected by e 4.

Path – a sequence of adjacent vertices and the edges are used only once
– In figure 4, A, C, D, E, F, G, H, K is a path

Circuit – a path that begins and ends at the same vertex.


– in figure 4, D, E, F, D is a circuit.

Figure 4
Paths and Circuits

Euler’s theorem

For any connected graph:


1. If all vertices are even, the graph has at least one Euler circuit. An Euler circuit can start
at any vertex.
2. If exactly two vertices are odd, the graph has no Euler circuits but at least one Euler
path. The path must begin at one odd vertex and end at the other odd vertex.
3. If there are more than two odd vertices, the graph has no Euler path and no Euler circuit.

Euler Path – a path that passes through every edge exactly once.

Euler Circuit – a circuit that passes through every edge exactly once
16

Fleury’s Algorithm
To find Euler path or Euler circuit
1. If a graph has no odd vertex, start at any vertex. If the graph has two odd vertices, start
at either odd vertex.
2. Number the edges as you trace through the graph making sure not to traverse at any
edge twice.
3. At any vertex where you have a choice of edges, choose one that is not a bridge for the
part of the graph that has not yet been numbered.

Hamilton Paths
- Paths that passes through every vertex exactly once

Hamilton Circuit
- Circuits that passes through every vertex exactly once
- Number of Hamilton Circuits = (V-1)! Where V is the number of vertices

Complete weighted graph


- each of the vertices is connected to every other vertex by an edge and each edge has
an associated cost or weight

Figure 5
Solving for Hamilton Circuit

The Brute Force Method


• Step 1. Draw the graph
• Step 2. List all possible Hamilton circuits starting at one particular vertex
• Step 3. Find the sum of the weights of the edges for each circuit
• The circuit with the least amount of sum is the OPTIMAL SOLUTION
17

Step 1: Draw the graph

Step 2. List all possible Hamilton circuits starting at one vertex

1 2

3 4
18

5 6

7 8

9 10
19

11 12

13 14

15 16
20

• Step 3. Find the sum of the weights of the edges for each circuit

1 2

1. 37 + 44 + 28 + 53 + 46 = 208 2. 50 + 28 +44 + 37 = 159

3. 37 + 44 + 33 + 46 = 160 4. 48 + 44 + 28 + 53 = 173

5. 51 + 28 + 53 + 46 = 178 6. 37 + 41 + 53 + 46 = 177

7. 50 + 41 + 37 = 128 8. 46 + 33 + 51 = 150

9. 53 + 48 + 41 = 142 10. 28 + 50 + 51 = 129

11. 33 + 44 + 48 = 125 12. 41 + 44 +28 = 113

13. 51 + 37 + 44 = 132 14. 46 + 48 + 37 = 131

15. 46 + 53 + 50 = 149 16. 33 + 53 + 28 = 114

This is the circuit with the optimal solution.


21

Trees – a graph in which at least two vertices are connected by exactly one path
Characteristics:
• Has no circuits
• Are connected graphs
• Every edge is a bridge
• N vertices has exactly n-1 edges

Figure 6
The tree

Spanning Trees
A tree that results from the removal of as many edges as possible from the original graph
without making it disconnected and still contains all vertices from the original graph

Figure 7 Figure 8
The original tree The spanning tree
22

Application

The table below famous local destinations. The symbol ✓ signifies direct flight. Let us draw a
graph that represents this information. In making a graph, the number of vertices and how they
are joined by edges is important. The position of the vertices, length of edges, and shape of
edges do not matter. We will discuss how weights are assigned to the graphs in the next section.

Silay Manila Baguio Cebu Davao


Caticlan
City City City City City
Silay City - ✓ ✓ ✓
Manila City ✓ - ✓ ✓ ✓ ✓
Baguio City ✓ -
Caticlan ✓
Cebu City ✓ ✓ - ✓
Davao City ✓ ✓ ✓ ✓ -

Figure 9
Graph of famous local destinations

Baguio

Caticlan

Manila
Cebu

Silay

Davao

Representing boundaries
23

PROGRESS CHECK

I. Enumerate the vertices of the graph below. Identify whether it is odd or even.

II. The table below lists the distances in kilometres between popular cities with their
airports. Suppose you would like to visit four other cities. Make a Hamiltonian
circuit departing from Silay airport and write the distance of the routes that you
make.

Silay Manila Baguio Cebu Davao


Caticlan
City City City City City
No direct No direct
Silay City - 697 210 808
flight flight
Manila
697 - 245 439 829 1 494
City
Baguio No direct No direct No direct No direct
245 -
City flight flight flight flight
No direct No direct No direct No direct No direct
Caticlan 439
flight flight flight flight flight
No direct No direct
Cebu City 210 829 - 665
flight flight
No direct
Davao City 808 1 494 1 076 665 -
flight
24

REFERENCES

Baltazar, E. C., Ragasa, C., & Evangelista, J. (2018). Mathematics in the Modern World. C &
E Publishing, Inc.
Dickson, A. (2006). Introduction to Graph Theory.
9https://www.math.utah.edu/mathcircle/notes/MC_Graph_Theory.pdf
Distances of cities (n.d.). https://www.google.com/maps
Panay island (n.d.). https://www.researchgate.net/figure/Map-of-Panay-Island-Provinces-are-
outlined-in-red-island-wide-and-municipalities-are_fig1_260019350
Sobecki, D. (2019). Math in our World (4th Ed). McGraw-Hill Education.
25

REFERENCES

Baltazar, E. C., Ragasa, C., & Evangelista, J. (2018). Mathematics in the Modern World. C &
E Publishing, Inc.
Dickson, A. (2006). Introduction to Graph Theory.
9https://www.math.utah.edu/mathcircle/notes/MC_Graph_Theory.pdf
Distances of cities (n.d.). https://www.google.com/maps
Encyclopædia Britannica (2020). Binary code.
https://www.britannica.com/technology/binary-code

Error-Correcting Code: Parity and Hamming Codes.


http://www.math.utah.edu/~gustafso/s2018/2270/projects-
2018/submittedprojects/valerieGerman/ErrorCorrectingCode.pdf

Gentzkow, M., Kelly, B., & Taddy, M. (2019) Text as Data. Journal of Economic Literature.
57(3), 535–574. https://doi.org/10.1257/jel.20181020

Gibson, R., Nuttal, I., Nichol, T. L., & Priya, M. (2021). Error Detection.
https://teachcomputerscience.com/error-detection/

Macleod, M.D. (2021). Hamming Code.


https://www.sciencedirect.com/topics/engineering/hamming-code

Pag-IBIG Housing Loan (n.d.). Pag-IBIG Housing Loan (pagibigfund.gov.ph)


Panay island (n.d.). https://www.researchgate.net/figure/Map-of-Panay-Island-Provinces-are-
outlined-in-red-island-wide-and-municipalities-are_fig1_260019350
Parhami, B. (2001). Number Representation and Computer Arithmetic.
https://web.ece.ucsb.edu/~parhami/pubs_folder/parh02-arith-encycl-infosys.pd

Rodriguez, M. J., Salvador, I.G., Ragma, F., Torres, E., Manalang, E., Oredina, N., & Ogoy,
J. I. (2018). Mathematics in the Modern World. Nieme Publishing House Co. Ltd.
Sarkar, D. (2018). Traditional Methods for Text Data.
https://towardsdatascience.com/understanding-feature-engineering-part-3-traditional-
methods-for-text-data-f6f7d70acd41

Schmalz, M.S. (n.d.). Organization of Computer Systems.


https://www.cise.ufl.edu/~mssz/CompOrg/CDA-lang.html#Sec2.4

Sobecki, D. (2019). Math in our World (4th Ed). McGraw-Hill Education.


26

LEARNING GUIDE
Week No.: _13_

TOPIC: Linear Programming


• Linear Inequalities
• Geometry of Linear Programming
• Simplex Method

EXPECTED COMPETENCIES. At the end of this lesson, you must have:


1. found the values of the given unknown variables;
2. differentiated paths from circuits; and
3. solved for the optimal solution of a circuit.

CONTENT/TECHNICAL INFORMATION

We have discussed about equation. That is, there is always the presence of equality
between two sides of the equation. But there are so many inequalities around us. So, we end
mathematics in the modern world by studying linear inequalities and understanding linear
programming. Stapel (2021) defines linear programing is the process of taking different linear
inequalities and finding the best value which can be attained under these conditions. An
example is considering the limitations of materials and labor, then determining the best
production levels for maximum profits. According to Pierce (2018), this is very useful in
industries for finding the best production level when meeting different costs, manpower, sales,
and other variables.

Before we start with linear programming, let us discuss first inequalities. This can
happen in the following forms:

Symbol Words Example


> greater than x+5>6
< less than 8y < 24
> greater than or equal to 7 > 2z – 5
< less than or equal to 3a – 2 < 13

Solving Inequalities
In solving for inequality, our goal is to have the variable to be on the left of the inequality sign.

These actions do not change the direction of the inequality sign:


• adding or subtracting a number from both sides
• multiplying or dividing both sides by a positive number
• simplify a side

These actions change the direction of the inequality sign:


• multiplying or dividing both sides by a negative number
27

• swapping left- and right-hand sides


Let us take our examples above

x+5>6
Subtract 6 from both sides
x+5–5>6–5
x>1
That means, the value of x refers to all numbers greater than 1.

8y < 24
Divide both sides by positive 8
8y  8 < 24  8
y<3
In this example, the value of y refers to all numbers that are less than 3.

7 > 2z – 5
Add 5 to both sides
7 + 5 > 2z – 5 + 5
12 > 2z
Divide two sides by 2
12  2 > 2z  2
6>z
We need to swap the left- and right-hand side so we change the direction of the arrow.
z<6
That means the value of z refers to all numbers less than or equal to 6.

3a – 2 < 13
Add 2 to both sides.
3a – 2 + 2 < 13 + 2
3a < 15
Divide both sides by 3
3a  3 < 15  3
a<5
Therefore, the value of a refers to all values less than or equal to 5.

Let us have five more examples:


-4b < -12
Divide both sides by -4.
-4b  -4< -12 -4
Since we are dividing by a negative number, we will change the direction of our arrow.
b>4
Thus, the value of b refers to all numbers greater than 4.

-5 > 3c + 2
Subtract both sides by 2
-5 – 2 > 3c + 2 – 2
-7 > 3c
Divide both sides by 3
-7/3 > c
Swap then reverse the inequality: c < -7/3
28

Therefore, the value of b are all numbers less than or equal to -7/3.
𝑥−5
>3
4

Multiply both sides by 4


𝑥−5
4( ) > 3 (4)
4
x – 5 > 12
Add 5 to both sides.
x – 5 + 5 > 12 + 5
x > 17

2 − 5𝑥
−3 < <5
4
If there are two inequalities, we are going to simplify it first. Multiply all sides by 4.
2−5𝑥
−3 (4) < 4 (4) < 5 (4)
−12 < 2 − 5𝑥 < 20
Subtract 2 from each part.
−12 − 2 < 4 − 2 − 5𝑥 < 20 − 2
−14 < −5𝑥 < 18
Since our unknown is negative, let us multiply by -1. Then reverse the inequality.
14 > 5x > −18
Divide all sides by 5
14 18
>𝑥>−
5 5
Since negative number is smaller than positive ones, let us arrange the numbers from
smaller to larger one and then reverse the inequality.
−18 14
<𝑥<
5 5
This means that the values of x is between -18/5 and 14/5.

xy > 3y
Given two variables, it is impossible for us to identify if the value of y is positive or
negative. Therefore, this equation has no answer unless the sign of the variables are
explicitly indicated.

Graphing Inequalities
x + 5 > 6 or x > 1

Since 1 is not included, the circle is hollow. For greater than, the arrow goes to the right.
29

8y < 24 or y < 3

For less than, the direction is to the left.

7 > 2z – 5 or z < 6

See the shaded circle at 6? This means 6 is included or that there is equality.

3a – 2 < 13 or a < 5

-18/5 < x < 14/5

-4 < x < 5

3<x<8
30

Graphing Linear Inequalities

Steps (mathisfun.com)
1. Rearrange the equation so “y” is on the left and everything else is on the right.
2. Plot “y =” (make it solid line for y< or y>, and a dashed line for y< or y>).
3. Shade above the line for “greater than” (y> or y>) or below the line for “less
than” (y< or y <).

Examples:
y > 2x + 1
Using the slope-intercept formula, y = mx + b, m is the slope and b is the y-
intercept.

If we let x = 0, then y = 2.
If we let y = 0, then x = -1/2
Since y > 2x + 1, we shade above the dashed line.

3y < 12 x – 6
Simplify the equation first by dividing 3 to both sides.
y<4x–2
If we let x = 0, y = -2
If we let y = 0, x = ½
Since we are graphing y < 4 x – 2, the shade is below the solid line.
The graph is on the next page.
31

2y + 5 > x + 1
First, we simplify the equation and place simply y to the left.
2y > x + 1 – 5
2y > x – 4
y > x/2 – 2
If we let x = 0, y = -2
If we let y = 0, x = 4
Since we are graphing y < 4 x – 2, the shade is below the solid line.
32

The Geometry of Linear Programming

Steps in Solving Linear Programming Problems (online.math.uh.edu)


1. Graph the system of constraints. This will give the feasible set.
2. Find each vertex (corner point) of the feasible set.
3. Substitute each vertex into the objective function to determine which vertex
optimizes the objective function.
4. State the solution to the problem.

Fundamental Theorem of Linear Programming (online.math.uh.edu)


• Given that an optimal solution to a linear programming problem exists, it must occur
at a vertex of the feasible set.
• If the optimal solution occurs at two adjacent vertices of the feasible set, then the
linear programming problem has infinitely many solutions. Any point on the line
segment joining the two vertices is also a solution.

Example (richland.edu): Maximize P = 40 x + 30 y


Subject to: x + 2y < 16
x+y<9
3x + 2y < 24
x, y > 0

Image from richland.edu

The feasible set is bounded, and we are instructed to get the maximum
value of P = 40 x + 30 y. The vertices of the feasible set are (0, 0), (0,
8), (2, 7), (6, 4), and (8, 0). The vertex on the origin will not be
counted because we will be looking for the maximum value.
33

Vertex of the Feasible Set Value of P = 40 x + 30 y


(0, 8) P = 40 (0) + 30 (8) = 240
(2, 7) P = 40 (2) + 30 (7) = 290
(6, 4) P = 40 (6) + 30 (4) = 360
(8, 0) P = 40 (8) + 30 (0) = 320

Therefore, the maximum value is 360 and it occurs at the point (6, 4).

Example (online.math.uh.edu). Use the graphical method to solve the following linear
programming problem.
Maximize R = 4x + 11y
Subject to: x + y < 3
2x + y < 4
x, y > 0

Solution:

The diagram shows that the feasible set is bounded. Therefore, this problem has an optimal
solution. The vertices of the feasible set are (0,0), (0, 3), (1, 2) and (2, 0).

Vertex of the Feasible Set Value of R = 4x + 11y

(0, 3) R = 4 (0) + 11 (3) = 33

(1, 2) R = 4 (1) + 11 (2) = 26

(2, 0) R = 4 (2) + 11 (0) = 8

The maximum value is 33 and it occurs at (0, 3).


34

Example (online.math.uh.edu)
Minimize S = 2x + 7y
Subject to: 5x + y > 5
x + 3y > 9
x, y > 0

The x- and y-intercepts for Line (1) are (1, 0) and (0, 5), respectively. Since the
inequality 5x + y > 5 contains an equal sign, a solid line can be drawn through those two
intercepts. We need to choose a test point to substitute into the original inequality to determine
which half-plane to shade. We will choose the point (0, 0):
5x + y > 5
5 (0) + 0 > 55
0>5

The point (0, 0) does not satisfy the inequality. Therefore, we will shade the half-plane
that does not contain (0, 0).

The x- and y-intercepts for Line (2) are (9, 0) and (0, 3), respectively. Since the
inequality 5x + y > 5 contains an equal sign, a solid line can be drawn through those two
intercepts. We need to choose a test point to substitute into the original inequality to determine
which half-plane to shade. We will choose the point (0, 0):
x + 3y > 9
0 + 3 (0) > 9
0>9

The point (0, 0) does not satisfy the inequality. Therefore, we will shade the half-plane
that does not contain (0, 0).

Lines (3) and (4), represent the y-axis and x-axis, respectively. The inequalities x ≥ 0
and y ≥ 0 together represent the first quadrant, so Quadrant I should be shaded.

The feasible set, shown below, is where all shaded regions intersect, along with any
solid boundaries of the shaded region.

The diagram shows that the feasible set is unbounded, so this problem may or may not
have an optimal solution.
35

Next, we need to find the vertices of the feasible set. We can see that points (0, 5) and
(9, 0) are obvious corner points. The point of intersection of Line (1) and Line (2) is not clear
by simply looking at the graph. That is why we will find it algebraically by solving the
following system of equations:

5x + y = 5
x+3y = 9

By elimination method, we will multiply the first equation by 3.

15x + 3y = 15
-x-3y =- 9
14x = 6
14x = 6
14 14
x = 3/7

To find y, let us substitute 3/7 to x.


3/7 + 3y = 9
3y = 60/7
3y = 60/7
3 3
y = 20/7

3 20
The point of intersection of Line (1) and Line (2) is (7 , 7 )which gives us our vertex.

Vertex of the Feasible Set Value of S = 2x + 7y

(0, 5) S = 2 (0) + 7 (5) = 35

(9, 0) S = 2 (9) + 7 (0) = 18


3 20 3 20 6
(7 , 7 ) S = 2 (7) + 7 ( 7 ) = 20 7

The minimum value is 18 and occurs at (9, 0). Since our data is unbounded this may
not truly represent the optimal value.

Example (online.math.uh.edu)

Maximize and minimize Q = 3x + 5y


Subject to: x+y<6
2x + y > 8
y>0
36

The feasible set is bounded so we have the minimum and maximum values. The vertices are
(4, 0), (2, 4), (6, 0).

Vertex of the Feasible Set Value of Q = 3x + 5y

(4, 0) Q = 3 (4) + 5 (0) = 35

(2, 4) Q = 3 (2) + 5 (4) = 18

(6, 0) 20 6
Q = 3 (6) + 5 ( 7 ) = 20 7

Example (Sekhon & Bloom, 2021)

Maria holds two part-time jobs, Job 1, and Job 2. She never wants to work more than a total of
12 hours a week. She decided that for every hour she works at Job 1, she needs 2 hours of
preparation time, and for every hour she works at Job 2, she needs one hour of preparation
time, and she cannot spend more than 16 hours for preparation.

If Maria makes Php 40 an hour at Job I, and Php 30 an hour at Job 2, how many hours should
she work per week at each job to maximize her income?

Solution

We start by choosing our variables.

• Let x = The number of hours per week Niki will work at Job 1.
• Let y = The number of hours per week Niki will work at Job 2.

Now we write the objective function. Since Niki gets paid Php 40 an hour at Job 2, and Php 30
an hour at Job 2, her total income I is given by the following equation.

I = 40x + 30y

Our next task is to find the constraints. The second sentence in the problem states, "She never
wants to work more than a total of 12 hours a week." This translates into the following
constraint: x + y ≤ 12
37

The third sentence states, "For every hour she works at Job 1, she needs 2 hours of preparation
time, and for every hour she works at Job 2, she needs one hour of preparation time, and she
cannot spend more than 16 hours for preparation." The translation follows.

2x + y ≤ 16

The fact that x and y can never be negative is represented by the following two constraints:

x ≥ 0, and y ≥ 0

Well, good news! We have formulated the problem. We restate it as

Maximize I = 40x + 30y


Subject to: x + y ≤ 12
2x + y ≤ 16
x ≥ 0, y ≥ 0

To solve the problem, we graph the constraints and shade the region that satisfies all the
inequality constraints.

Any appropriate method can be used to graph the lines for the constraints. However often the
easiest method is to graph the line by plotting the x-intercept and y-intercept.

The line for a constraint will divide the plane into two regions, one of which satisfies the
inequality part of the constraint. A test point is used to determine which portion of the plane to
shade to satisfy the inequality. Any point on the plane that is not on the line can be used as a
test point.

• If the test point satisfies the inequality, then the region of the plane that satisfies the
inequality is the region that contains the test point.
• If the test point does not satisfy the inequality, then the region that satisfies the
inequality lies on the opposite side of the line from the test point.

In the graph below, after the lines representing the constraints were graphed, the point (0,0)
was used as a test point to determine that
• (0,0) satisfies the constraint x + y ≤ 12 because 0 + 0 < 12
• (0,0) satisfies the constraint 2x + y ≤ 16 because 2(0) + 0 < 16

Therefore, in this example, we shade the region that is below and to the left of both constraint
lines, but also above the x axis and to the right of the y axis, in order to further satisfy the
constraints x ≥ 0 and y ≥ 0.
38

The shaded region where all conditions are satisfied is the feasible region or the feasible
polygon.

The Fundamental Theorem of Linear Programming states that the maximum (or minimum)
value of the objective function always takes place at the vertices of the feasible region.

Therefore, we will identify all the vertices (corner points) of the feasible region. They are listed
as (0, 0), (0, 12), (4, 8), (8, 0). To maximize Niki's income, we will substitute these points in
the objective function to see which point gives us the highest income per week. We list the
results below.

This shows that the point (4, 8) gives the most profit: $400.

Vertex of the Feasible Set Value of I = 40x + 30y

(0, 0) I = 40 (0) + 30 (0) = Php 0

(0, 12) I = 40 (0) + 30 (12) = Php 360

(4, 8) I = 40 (4) + 30 (8) = Php 400

(8, 0) I = 40 (8) + 30 (0) = Php 320

Therefore, we conclude that Niki should work 4 hours at Job I, and 8 hours at Job II.
39

Simplex Method (Sekhon & Bloom, 2021).

The simplex method is an efficient algorithm that allows to work on problems with more than
two variables. It begins with a vert4ex of the feasibility region where all the main variables are
zero and systematically moves from vertex to vertex, while improving the value of the objective
function.

Steps:
1. Set up the problem. That is, write the objective function and the inequality constraints.
2. Convert the inequalities into equations. This is done by adding one slack variable for
each inequality.
3. Construct the initial simplex tableau. Write the objective function as the bottom row.
4. The most negative entry in the bottom row identifies the pivot column.
5. Calculate the quotients. The smallest quotient identifies a row. The element in the
intersection of the column identified in step 4 and the row identified in this step is
identified as the pivot element. The quotients are computed by dividing the far-right
column by the identified column in step 4. A quotient that is a zero, or a negative
number, or that has a zero in the denominator, is ignored.
6. Perform pivoting to make all other entries in this column zero. This is done the same
way as we did with the Gauss-Jordan method.
7. When there are no more negative entries in the bottom row, we are finished;
otherwise, we start again from step 4.
8. Read off your answers. Get the variables using the columns with 1 and 0s. All other
variables are zero. The maximum value you are looking for appears in the bottom
right hand corner.

Example:

Maria holds two part-time jobs. She never wants to work more than a total of 12 hours
a week. She decided that for every hour she works at Job 1, she needs 2 hours of preparation
time, and for every hour she works at Job 2, she needs 1 hour of preparation time. In addition,
she cannot spend more than 16 hours of preparation. If she makes Php 40 an hour at Job 1, and
Php 30 an hour at Job 2, how many hours should she work per week at each job to maximize
her income?

Step 1: Set up the problem


Let
x – the number of hours per week Maria will work at Job 1
y – the number of hours per week Maria will work at Job 2

Maximize I = 40x + 30y


Subject to: x + y < 12
2x + y < 16
x>0
y>0
40

Step 2: Convert the inequalities into equations. This is done by adding one slack variable for
each inequality.

x + y + z = 12
2x + y + a = 16
Rewrite the objective function into -40x – 30y + I = 0
Thus:
Objective function -40x – 30y + I = 0
Subject to constraints: x + y + z = 12
2x + y + a = 16
x>0
y>0

Step 3: Construct the initial simplex tableau. Each inequality constraint appears in a row. The
objective function is written at the bottom row.

Now that the inequalities are converted into equations, we can represent the problem into an
augmented matrix called the initial simplex tableau as follows.

x y z a I | C
1 1 1 0 0 | 12
___2 1 0 1 0 | 16___
__-40 -30 0 0 1 | 0____

Above, the vertical line separates the left-hand side of the equations from the right side. The
horizontal line separates the constraints from the objective function. The right side of the
equation is represented by the column C.

The reader needs to observe that the last four columns of this matrix look like the final matrix
for the solution of a system of equations. If we arbitrarily choose z =0 and a = 0, then we
have

𝑧 𝑎 𝐼 | 𝑐
1 0 0 | 12
[ ]
0 1 0 | 16
0 0 1 | 0
which can be read as:
z = 12
a = 16
I=0

The solution obtained by randomly assigning values to some variables and then solving for
the remaining variables is called the basic solution associated with the tableau. So, the above
solution is the basic solution associated with the initial simplex tableau. We can label the
basic solution as seen on the table below.
x y z a I | C
1 1 1 0 0 | 12 z
___2 1 0 1 0 | 16___ a
__-40 -30 0 0 1 | 0____ I
41

Step 4. The most negative entry in the bottom row identifies the pivot column.
The most negative entry in the bottom row represents the largest coefficient in the
objective function - the coefficient whose entry will increase the value of the objective
function the quickest.

The most negative entry in the bottom row is -40; therefore, the column 1 is identified.

STEP 5. Calculate the quotients. The smallest quotient identifies a row. The element in the
intersection of the column identified in step 4 and the row identified in this step is identified
as the pivot element.

Following the algorithm, in order to calculate the quotient, we divide the entries in the far-
right column by the entries in column 1, excluding the entry in the bottom row.

x y z a I | C
1 1 1 0 0 | 12 1
___2 1 0 1 0 | 16 2___
__-40 -30 0 0 1 | 0_ ___

The smaller of the two quotients, 12 and 8, is 8. Therefore row 2 is identified. The
intersection of column 1 and row 2 is the entry 2, which has been highlighted. This is our
pivot element.

STEP 6. Perform pivoting to make all other entries in this column zero.

x y z a I | C
1 1 1 0 0 | 12
___1 1/2 0 1/2 0 | 8 ___
__-40 -30 0 0 1 | 0_ ___

To obtain a zero in the entry first above the pivot element, we multiply the second row by -1
and add it to row 1. We get

x y z a I | C
0 1/2 1 -1/2 0 | 4
___1 1/2 0 1/2 0 | 8 ___
__-40 -30 0 0 1 | 0_ ___

To obtain a zero in the element below the pivot, we multiply the second row by 40 and add it
to the last row.

x y z a I | C
0 1/2 1 -1/2 0 | 4 z
___1 1/2 0 1/2 0 | 8 x
__ 0 -10 0 20 1 | 320_ I
42

We now determine the basic solution associated with this tableau. By arbitrarily choosing y =
0 and a = 0, we obtain x = 8, z = 4, and I = 320. If we write the augmented matrix, whose left
side is a matrix with columns that have one 1 and all other entries zeros, we get the following
matrix stating the same thing.

𝑧 𝑎 𝐼 | 𝑐
0 1 0 | 4
[ ]
1 0 0 | 8
0 0 1 | 320

We can restate the solution associated with this matrix as x=8, y=0, z=4, a=0 and I=320. At
this stage of the game, it reads that if Niki works 8 hours at Job 1, and no hours at Job 2, her
profit I will be Php320.

STEP 7. When there are no more negative entries in the bottom row, we are finished; otherwise,
we start again from step 4.

Since there is still a negative entry, -10, in the bottom row, we need to begin, again, from step
4. This time we will not repeat the details of every step, instead, we will identify the column
and row that give us the pivot element and highlight the pivot element. The result is as follows.

x y z a I | C
0 1/2 1 -1/2 0 | 4 z 4  1/2 = 8
___1 1/2 0 1/2 0 | 8 x 8  1/2 = 16
0 -10 0 20 1 | 320 I

We make the pivot element 1 by multiplying row 1 by 2, and we get


x y z a I | C
0 1 2 -1 0 | 8 x
___1 1/2 0 1/2 0 | 8 _ z
0 -10 0 20 1 | 320 I

Now to make all other entries as zeros in this column, we first multiply row 1 by -1/2 and add
it to row 2, and then multiply row 1 by 10 and add it to the bottom row.

x y z a I | C
0 1 2 -1 0 | 8 x
___1 0 -1 1 0 | 4 _ z
0 0 20 10 1 | 400 I

We no longer have negative entries in the bottom row; therefore, we are finished.
The bottom row corresponds to the equation: 0x + 0y + 20z + 10 a + I = 400 or
I = 400 -20z – 10a

Since all variables are non-negative, the highest value I can achieve is 400, and that would be
possible only if z and a are zero.
43

Step 8. Read off your answers.

We now read off our answers, that is, we determine the basic solution associated with the
final simplex tableau. Again, we look at the columns that have a 1 and all other entries zeros.
Since the columns labeled z and a are not such columns, we arbitrarily choose z=0 and a=0,
and we get
𝑥 𝑦 𝐼 | 𝑐
0 1 0 | 8
[ ]
1 0 0 | 4
0 0 1 | 400

The matrix reads as x = 4, y = 8 and I = 400.

The final solution can be stated as: If Maria works 4 hours at Job 1 and 8 hours at Job 2, she
will maximize her income to Php 400.

Example (Larson, n.d.)


A small petroleum company owns two refineries. Refinery 1 costs $20,000 per day to
operate, and it can produce 400 barrels of high-grade oil, 300 barrels of medium-grade oil, and
200 barrels of low-grade oil each day. Refinery 2 is newer and more modern. It costs $25,000
per day to operate, and it can produce 300 barrels of high-grade oil, 400 barrels of medium-
grade oil, and 500 barrels of low-grade oil each day. The company has orders totaling 25,000
barrels of high-grade oil, 27,000 barrels of medium-grade oil, and 30,000 barrels of low-grade
oil. How many days should it run each refinery to minimize its costs and still refine enough oil
to meet its orders?

Step 1. Set up the problem. That is, write the objective function and the inequality
constraints.

Let
x – the number of days the first refinery is operated
y – the number of days the second refinery is operated

Minimize C = 20,000x + 25,000y


Subject to: 400x + 300y > 25,000 (High grade)
300x + 400y > 27,000 (Medium grade)
200x + 500y > 30,000 (Low grade)
x>0
y>0

The augmented matrix corresponding to this minimization problem is


𝑥 𝑦 | 𝐶
400 300 | 25,000
300 400 | 27,000
200 500 | 30, 000
… … | …
[20,000 25,000 | 0 ]
44

The matrix corresponding to the dual maximization problem is

400 300 200 | 20,000


[ 300 400 500 | 25,000 ]
25,000 27,000 30,000 | 0

We now apply the simplex method to the dual problem as follows.

400 300 200 1 0 20,000


300 400 500 0 1 25,000
-25,000 -27,000 -30,000 0 0 0

280 140 0 1 -2/5 10,000


3/5 4/5 1 0 1/500 50___
-7,000 -3,000 0 0 60 1,500,000

1 1/2 0 1/280 -1/700 250/7


0 ½ 1 -3/1400 1/350 200/7
0 500 0 25 50 1,750,000

From the third simplex tableau, we can see that the solution to the original minimization
problem is
C = 1,750,000 – minimum cost

This occurs when x = 25 and y = 50. Thus, the two refineries should be operated for the
following number of days. Refinery 1: 25 days, Refinery 2: 50 days.

PROGRESS CHECK

I. A. Graph the following (2 points each)


1. x > 3
2. x < -8
B. Graph the following (3 points each)
1. 2x + 3y > 15
2. x + 5y < 10

II. Use the graphical method to maximize. (10 points)


Objective function: z = x + 2y
Constraints: x – 3y < 1
x + 2y < 4
x, y > 0

III. Use simplex method to minimize. (10 points)


Objective function: z = 3x + 3y
Constraints: 2x + y > 4
x + 2y > 4
x, y > 0
45

REFERENCES

Larson (n.d.). Linear Programming.


https://college.cengage.com/mathematics/larson/elementary_linear/4e/shared/downloa
ds/c09s4.pdf

Pierce, R. (2020). Solving Inequalities. Math Is Fun. Retrieved 28 Apr 2021 from
http://www.mathsisfun.com/algebra/inequality-solving.html

Pierce, R. (2018). Linear Programming Definition (Illustrated Mathematics Dictionary). Math


Is Fun. http://www.mathsisfun.com/definitions/linear-programming.html

Sekhon, R. & Bloom, R. (2021). Linear Programming – Maximization Applications.


https://math.libretexts.org/@go/page/40134

Sekhon, R. & Bloom, R. (2021). Maximization by Simplex Method.


https://math.libretexts.org/@go/page/37869

Stapel, E. (2021). Linear Programming: Introduction. Purplemath. Retrieved 28 April 2021


from https://www.purplemath.com/modules/linprog.htm

https://online.math.uh.edu/Math1313-unpaid/ch2/s21/1313_Section_2_1_Text.pdf

https://people.richland.edu/james/ictcm/2006/simplex.html
46

REFERENCES

Baltazar, E. C., Ragasa, C., & Evangelista, J. (2018). Mathematics in the Modern World. C &
E Publishing, Inc.

Dickson, A. (2006). Introduction to Graph Theory.


9https://www.math.utah.edu/mathcircle/notes/MC_Graph_Theory.pdf

Distances of cities (n.d.). https://www.google.com/maps

Encyclopædia Britannica (2020). Binary code.


https://www.britannica.com/technology/binary-code

Error-Correcting Code: Parity and Hamming Codes.


http://www.math.utah.edu/~gustafso/s2018/2270/projects-
2018/submittedprojects/valerieGerman/ErrorCorrectingCode.pdf

Gentzkow, M., Kelly, B., & Taddy, M. (2019) Text as Data. Journal of Economic Literature.
57(3), 535–574. https://doi.org/10.1257/jel.20181020

Gibson, R., Nuttal, I., Nichol, T. L., & Priya, M. (2021). Error Detection.
https://teachcomputerscience.com/error-detection/

Larson (n.d.). Linear Programming.


https://college.cengage.com/mathematics/larson/elementary_linear/4e/shared/downloa
ds/c09s4.pdf

Macleod, M.D. (2021). Hamming Code.


https://www.sciencedirect.com/topics/engineering/hamming-code

Pag-IBIG Housing Loan (n.d.). Pag-IBIG Housing Loan (pagibigfund.gov.ph)

Panay island (n.d.). https://www.researchgate.net/figure/Map-of-Panay-Island-Provinces-are-


outlined-in-red-island-wide-and-municipalities-are_fig1_260019350

Parhami, B. (2001). Number Representation and Computer Arithmetic.


https://web.ece.ucsb.edu/~parhami/pubs_folder/parh02-arith-encycl-infosys.pd

Pierce, R. (2020). Solving Inequalities. Math Is Fun. Retrieved 28 Apr 2021 from
http://www.mathsisfun.com/algebra/inequality-solving.html

Pierce, R. (2018). Linear Programming Definition (Illustrated Mathematics Dictionary). Math


Is Fun. http://www.mathsisfun.com/definitions/linear-programming.html

Rodriguez, M. J., Salvador, I.G., Ragma, F., Torres, E., Manalang, E., Oredina, N., & Ogoy,
J. I. (2018). Mathematics in the Modern World. Nieme Publishing House Co. Ltd.
Sarkar, D. (2018). Traditional Methods for Text Data.
https://towardsdatascience.com/understanding-feature-engineering-part-3-traditional-
methods-for-text-data-f6f7d70acd41
47

Schmalz, M.S. (n.d.). Organization of Computer Systems.


https://www.cise.ufl.edu/~mssz/CompOrg/CDA-lang.html#Sec2.4

Sekhon, R. & Bloom, R. (2021). Linear Programming – Maximization Applications.


https://math.libretexts.org/@go/page/40134

Sekhon, R. & Bloom, R. (2021). Maximization by Simplex Method.


https://math.libretexts.org/@go/page/37869

Sobecki, D. (2019). Math in our World (4th Ed). McGraw-Hill Education.

Stapel, E. (2021). Linear Programming: Introduction. Purplemath. Retrieved 28 April 2021


from https://www.purplemath.com/modules/linprog.htm

https://online.math.uh.edu/Math1313-unpaid/ch2/s21/1313_Section_2_1_Text.pdf

https://people.richland.edu/james/ictcm/2006/simplex.html
48

ABOUT THE AUTHORS

Lucille S. Arcedas, Ph. D. is a TUPV faculty member


from Basic Arts and Science Department. She started her teaching
career on June 2001 after obtaining a degree in Bachelor of
Secondary Education major in Mathematics from Kabankalan
Catholic College. She received Master of Education major in
Mathematics degree from University of Saint La Salle, Bacolod
City. In 2007, she is one of the Filipinos who was chosen to be a
scholar of Ford Foundation International Fellowships Program.
This enabled her to earn a degree in Master of Professional Studies
(Applied Statistics) at Cornell University, a member of the Ivy
League in Ithaca, New York, United States of America. She
gained the degree in Doctor of Philosophy in Science Education major in Mathematics from
West Visayas State University, Iloilo City as a scholar of the Department of Science and
Technology – Science Education Institute – Capacity Building Program for Science and Math
Education.

You may contact her through email ([email protected].) or through Facebook


(https://web.facebook.com/lucille.arcedas).

Lourlen P. Pagdato, MBA is an instructor at


Technological University of the Philippines Visayas teaching
various Mathematics and Logic courses. Currently she is the
Department In-Charge of Basic Arts and Sciences
Department of the said university. She is a graduate of BS
Applied Mathematics in University of the Philippines Visayas
and finished her Master in Business Administration at
University of St. La Salle. Currently she is pursuing her Lean
Six Sigma Yellow Built Certification with Process Doctors
Academy.
You may contact her through email ([email protected]) or
through Facebook (Lourlen Pagdato).

You might also like