0% found this document useful (0 votes)
12 views14 pages

MMW Finals Reviewer

The document discusses various coding systems and identification numbers, including UPC, EAN, and error detection methods like parity checks. It explains how these codes are used for product identification and inventory management, as well as the principles of cryptography, including encryption and decryption techniques. Additionally, it covers classical ciphers and their applications in ensuring secure communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views14 pages

MMW Finals Reviewer

The document discusses various coding systems and identification numbers, including UPC, EAN, and error detection methods like parity checks. It explains how these codes are used for product identification and inventory management, as well as the principles of cryptography, including encryption and decryption techniques. Additionally, it covers classical ciphers and their applications in ensuring secure communication.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHAPTER 8A : The Beauty Of Codes International Standard Book Number (ISBN)

Coding

Code – a symbolic way to represent information

Ex:

• Beware of Dogs Code: Security


• A student who is a pleaser and his teacher loved
him to death Code: Teachers Pet Europian Article Number (EAN)

Universal Product Code (UPC)

Identification Numbers

• used to identify individual items, specific UPC / Barcode


products, people, accounts, or documents
• The Universal Bar Code, introduced in 1973, is on
• These numbers are useful for easy recognition
every product that you buy.
and detection of materials and for tracking and
• It allows merchants to tell exactly the inventory
inventory of products or documents
on hand and significantly speed up the check out
Classification of Identification Numbers process.
• The numbers on the bar code contain a formula
• Numeric Identification Numbers
that checks its validity. With the amount of
- A single positive number or a string of digits,
counterfeit and fake products in the
sometimes separated by spaces or dashes
marketplace, it's important to know how to spot
• Alphanumeric Identification Number
a fake bar code.
- A string of digits, letters, and/or other
symbols UPC-A / Barcode

Examples of Identification Numbers • There are 12 digits in the code


• The first digit is the type of product.
Vehicle Plate Number
• The next 5 digits represent the manufacturer.
• the next 5 digits represent the size,
• color, and made of the product, and the last
number is the check digit.
• The numbers in the type of products determine
what kind of product the merchandise is.

0, 1,6 ,7, 9 any


2 Food by weight
3 Drugs, Pharma, health
4 Sale Items
5 Special offers/coupons
4. If the last digit of the result in step 2 is 0, then the
check digit is 0.

Error Detection Using Check Digits UPC 12

For example, the UPC-A barcode "036000241457" has


last digit "7" as the check digit. If the other numbers are
correct then the check digit calculation must produce 7.

1. We add the odd number digits: 0+6+0+2+1+5 = 14

2. Multiply the result by 3: 14 × 3 = 42

3. We add the even number digits: 3+0+0+4+4 = 11

4. We add the two results together: 42 + 11 = 53

5. To calculate the check digit, take the remainder of (53


/ 10), which is also known as (53 modulo 10), and
subtract from 10. Therefore, the check digit value is 7.

EAN-13 code and error detection

In the EAN-13 code, the first 12 digits of the number

identify the item the code is attached to, and the final
digit is a ‘check digit’. 9 780521 425575
BARCODE
1. Count digit positions from the left to the right, starting
Manufacturer's Number at 1.
• The UCC company prefix (the manufacturer's 2. Sum all the digits in odd positions. (9 + 8 + 5 + 1 + 2 +
number) number may consist of 6, 7, 8 or 9 5 = 30 – note that the final 5 is not included since this is
digits. This number is assigned by the GS1-US the check digit, which is what we are currently trying to
(Global Standard 1). Generally, larger companies calculate.)
have longer numbers.
3. Sum all the digits in even positions and multiply the
Product Number result by 3. (7 + 0 + 2 + 4 + 5 + 7) × 3 = 75.)
• The item code (product number) is the number 4. Add the results of step 2 and step 3, and take just the
assigned to identify individual products and may final digit (the ‘units’ digit) of the answer.
consist of two to five digits (100 to 100,000 item
codes). This number is assigned by the individual This is equivalent to taking the answer modulo-10. (The
company. sum is 30 + 75 = 105, so the units digit is 5.)

Check Number 5. If the answer to step 4 was 0, this is the check digit.
Otherwise the check digit is given by ten minus
• The check digit is calculated from the company
the answer from step 4. (In the example, this is 10 – 5 =
prefix and item code numbers, to ensure the
5.)
data has been composed correctly.
The check digit is appended to the right of the 12
Error Detection Using Check Digits
identification digits. The check digit can have any value
The final digit of a Universal Product Code is a check digit from 0 to 9.
computed as follows:
QR Codes - abbreviated from Quick Response Code
1. Add the digits (up to but not including the check digit)
the trademark for a type of matrix barcode (or two-
in the odd-
dimensional barcode) first designed in 1994 for the
numbered positions (first, third, fifth, etc.) together and automotive industry in Japan
multiply by three.

2. Add the digits (up to but not including the check digit)
in the even numbered positions (second, fourth, sixth,
etc.) to the result.

3. Take the remainder of the result divided by 10


(modulo operation) and subtract this from 10 to derive
the check digit.
2 Parity Check Methods are there:

• Simple Parity - For Single bit Errorsage data


• Two Dimensional - For Burst Errors

How to use Parity Methods?

• Parity Generate - Sender's Side


• Parity Detect-Receiver's Side Sender

ERROR DETECTION CODES (PARITY CHECK)

Error Detection

• Data can be corrupted during transmission. Even


with best prevention methods.
• For a reliable communication, errors must be
detected and corrected.
• Error detection and correction are implemented
either at data link layer or the transport layer of Single Parity Check(VRC) Vertical Redundancy Check
the OSI model. • In Single parity check, a parity bit is added to every data
TYPES OF ERRORS unit so that the total number of 1s is even or odd.

Single Bit Error – only one bit in the data unit has changed 11010011 [1) Additional Bit added(PARITY BIT)

Information(1 byte - 8 bits)

Therefore, the total number of bits transmitted would be


9 bits. (8 bits of information + 1 bit parity = n data bits
into n+1 bits)

Single Parity check (Cont.) Parity Generation

Burst Error – it means that two or more bits in the data There are two ways to generate a Single parity bit.
unit has changed
• One is called Even parity and the other is Odd
parity.
• What is even parity?
- the total number of 1's transmitted must be
even.
• What is odd parity?
- the total number of 1's transmitted must be
Error Detection Codes odd
• Error detecting code is to include only enough Parity Generation-VRC
redundancy to allow the receiver to deduce that
an error occurred, but not which error, and have Parity bit is chosen so that the number of 1 bits in the
it request a re- transmission. code-word is even (or odd)
• Used in Low Noisy Channels - Fiber Optics
• computing the (even) parity bit as the modulo 2
• Error detection uses the concept of redundancy,
sum or XOR of the data bits.
which means adding extra bits for detecting
• use XOR and XNOR logic gates in circuits to
error at the destination
generate parity bits in practically (in devices).
• To detect an error, something extra has to be
added to the data/signal How is the even parity bit generated?
• This extra is an error detection code
Total number of '1's should be even.
Parity Check - The Simplest method Available - it's a
If the byte that we want to transmit is: 10101101
linear, systematic block code
Step 1: count the number of I's in the byte.

• Answer: 5
Step 2: compute the parity value. 1 0 1 0 1 1 0 1 1

• Since the total number of 1's is 5, the even parity


bit will have a value of 1.

If the number of bits are already even, the parity bit will
be '0'.

How is the odd parity bit generated?

Total number of '1's should be odd.

If the byte that we want to transmit is: 10101100

Step 1: count the number of 1's in the byte. Two Dimensional Parity check(Cont.)
• Answer: 4 Parity Generation
Step 2: compute the parity value. 1 0 1 0 1 1 0 0 1 A block of bits is organized in a table (rows & columns) a
parity bit is calculated for each row and column.
• Since the total number of 1's is 4, the odd parity
bit will have a value of 1. Compute (m + n + 1) parity bits and send (mn+m+ n + 1)
bits
If the number of bits are already odd, the parity bit will
be '0'. 1) Adds a parity bit to each character then adds a
row of parity bits after a block of characters
2) The row of parity bits is actually a parity bit for
each "column" of characters
3) The row of parity bits plus the column parity bits
add a great amount of redundancy to a block of
characters
Lets see this with an example:

DRAWBACKS OF SINGLE PARITY CHECK

• Only can detect single bit errors; Single bit errors


are rare.
• Can not detect errors, if 2 bits are interchanged.
DRAWBACKS OF 2D PARITY CHECK

4- and more bit errors can be detected in some cases

Two Dimensional Parity Check(LRC)

Longitudinal Redundancy Check • 1 affect 2, 2 affect 3, 3 affect 4, 4 affect 4-so Can


not detect in this case Disadvantage: too many
• In two-dimensional parity check, a block of bits is check bits !!!
divided into rows and a redundant row of bits is
• Can not detect errors, if 2 bits in one data unit
added to the whole block.
are changed and 2 bits in exactly the same
• Even Parity Concept position in another data unit is changed.
DRAWBACKS Cipher: An algorithm for performing encryption or
decryption — a series of well-defined steps that can be
• Both simple parity and 2D parity do not catch all
followed as a procedure.
the errors.
• Simple parity only catches odd numbers of bit
errors, and can not catch if 2 bits interchanged.
• 2D parity is better at catching errors, but
requires too many check bits added to a block of
data.
• Can not use in 4 bit errors and more bit errors in
some cases.

SUMMARY Cipher text: The unintelligible gibberish obtained as a


result after applying a cipher on a plaintext.
Parity checking is a means of checking if the
communication of a sequence of bits has been correctly
received.

Parity bit is an extra bit that is attached to the data


bits/Signal that is being transferred from one location to
another.

The two types of most commonly used parity checking


are:

• Single Parity Check


- odd parity
- even parity
• 2D Parity Check Encryption: The process of transforming information
(plaintext) using an algorithm (cipher) to make it
Single Parity bit checking can detect single error only, unreadable to anyone except those possessing special
double errors will not be detected. Even the 2D parity is knowledge, usually referred to as a key. The result of the
not efficient and can not use in some cases. process is encrypted information (cipher text).
CHAPTER 8B : INTRODUCTION TO CRYPTOGRAPHY

What is Cryptography?

• The term cryptography comes from the Greek


term kryptos which means "hidden, secret"; and
graphō, which means "writing".
• Cryptography is the practice and study of hiding
information, i.e. means of converting
information from its normal, comprehensible
Decryption: The reverse of encryption, to make the
form into an incomprehensible format,
encrypted information readable again (i.e. to make it
rendering it unreadable without secret
unencrypted).
knowledge.
• Modern cryptography intersects the disciplines
of mathematics, computer science, and
engineering.

TERMINOLOGY

Plaintext: The information a sender wishes to transmit


to a receiver. It is the input fed into an encryption
algorithm.
Key: A piece of information which is generated at the
time of encryption and is required to decrypt the
encrypted data.
Substitution: Atbash Cipher

Applications of Cryptography Atbash is another simple substitution cipher.·

• Defense forces: To ensure secrecy of It consists in substituting the first letter for the last, the
communication. second for the one before last, and so on, therefore
• Intelligence Agencies: To decrypt intercepted reversing the alphabet.
communication among terrorist outfits and other
Plain: abcdefghijklmnopqrstuvwxyz
countries.
• E-Commerce (online shopping, net banking): To Cipher: zyxwvutsrqponmlkjihgfedcba
ensure secrecy of confidential information like
credit card numbers during transactions.

SUBSTITUTION: ROT13 CIPHER

ROT13: Applying ROT13 to a piece of text merely requires


examining its alphabetic characters and replacing each
one by the letter 13 places further along in the alphabet,
wrapping back to the beginning if necessary.

CLASSICAL CIPHERS

Substitution: A substitution cipher is a method of


encryption by which units of plaintext are replaced with
cipher text according to a sequential order.

• Caesar's shift cipher


• Atbash ROT13
• Affine SUBSTITUTION: ROT13 CIPHER

Transposition: The units of the plaintext are rearranged • ROT13 is its own inverse; that is, to undo ROT13,
in a different and usually quite complex order. the same algorithm is applied, so the same
action can be used for encoding and decoding.
• Caesar's Box Cipher
• Only those letters which occur in the English
• Columnar transposition alphabet are affected; numbers, symbols,
SUBSTITUTION: CAESAR'S SHIFT CIPHER whitespace, and all other characters are left
unchanged.
Caesar's shift cipher is one of the simplest substitution • Because there are 26 letters in the English
cipher. alphabet and 26 = 2 × 13, the ROT13 function is
its own inverse:
• ROT13 (ROT13(X)) = ROT26(x) = x for any text x.
• In other words, two successive applications of
ROT13 restore the original text (in mathematics,
this is sometimes called an involution; in
cryptography, a reciprocal cipher).

Substitution: Affine Cipher


• It is a type of substitution cipher in which each
In Affine cipher, each letter in an alphabet is mapped to
letter in the plaintext is replaced by a letter some
its numeric equivalent and then encrypted using a simple
fixed number of positions down the alphabet.
mathematical function.
• For example, with a shift of 3, A would be
replaced by D, B would become E, and so on. The encryption function for this example will be © y =
E(x) = (5x + 8) mod 26
Plain: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Cipher : DEF G H I J K L M N O P Q R S T U V W X Y Z A B C

(the shift parameter is +3)


ROTOR MACHINE

A rotor machine is an electro-mechanical device used for


encrypting and decrypting secret messages.

The primary component is a set of rotors which are


rotating disks with an array of electrical contacts on
either side. The wiring between the contacts implements
a fixed substitution of letters, scrambling them in some
complex fashion.
Transposition: Caesar's Box Cipher
The most widely known rotor cipher device is the
This cipher requires the encoder to omit any spaces and German Enigma machine used during World War II. It
then rewrite the plaintext in a square column-wise and was broken by Alan Turing.
read row-wise to get the cipher text.
MODERN CIPHERS
So for example to encode the phrase 'What an unusual
box', first omit the spaces to get 'WHATANUNUSUALBOX' Private Key ciphers are a class of algorithms for
and then write them in a box as follows: cryptography that use identical cryptographic keys for
both decryption and encryption.

A single secret key shared by sender and receiver (which


must also be kept private)

The sender and receiver must securely share a key in


advance

To write this in code, you would then print


'WAULHNSBAUUOTNAX'

COLUMNAR TRANSPOSITION CIPHER PRIVATE KEY CIPHERS


In a columnar transposition, the message is written out Stream Ciphers: A stream cipher is a private key cipher
in rows of a fixed length, and then read out column by where plaintext bits are combined with a pseudorandom
column, and the columns are chosen in some scrambled cipher bit stream (key stream), typically by an exclusive-
order. or (XOR) operation.
Both the width of the rows and the permutation of the • E.g. A5/1 is a stream cipher used to provide over-
columns are usually defined by a keyword. the-air communication (mainly voice) privacy in
For example, the word ZEBRAS is of length 6 (so the rows the GSM cellular telephone standard
are of length 6), and the permutation is defined by the • Turing is a stream cipher developed at
alphabetical order of the letters in the keyword. Qualcomm for CDMA.

In this case, the order would be "6 3 2 4 1 5". Block Ciphers: A block cipher is a private key cipher
operating on fixed-length groups of bits, called blocks. A
For example, suppose we use the keyword ZEBRAS and block cipher encryption algorithm might take (for
the message WE ARE DISCOVERED. FLEE AT ONCE. example) a 128-bit block of plaintext as input, and output
In a columnar transposition, we write this into the grid a corresponding 128-bit block of cipher text. The exact
as transformation is controlled using a second input — the
secret key.

• E.g. DES, AES

Public Key Encryption

• The distinguishing technique used in public key


cryptography is the use of asymmetric key
algorithms, where the key used to encrypt a
message is not the same as the key used to
This results in the following ciphertext: decrypt it.
• The asymmetric key algorithms are used to
EVLN ACDT ESEA ROFO DEEC WIREE create a mathematically related key pair: a
secret private key and a published public key
PUBLIC KEY ENCRYPTION systematically, a dictionary attack tries only
those possibilities which are most likely to
• Unlike symmetric key algorithms, it does not
succeed, typically derived from a list of words
require a secure initial exchange of one or more
like a dictionary (hence the phase dictionary
secret keys to both sender and receiver.
attack), or easily-predicted variations on words,
• Each user has a pair of cryptographic keys - a such as appending a digit.
public key and a private key.
• The private key is kept secret, whilst the public CONCLUSION
key may be widely distributed.
• Cryptography is a very important field of study in
• The keys are related mathematically, but the
today's world whether in our daily lives or in
private key cannot be feasibly (i.e. in actual or
national security
projected practice) derived from the public key.
• .It is evolving at a rapid pace.
Messages are encrypted with the recipient's public key • Theoretically, no cipher can provide absolute
and can only be decrypted only with the corresponding secrecy. Given enough time and computational
private key. power, any encrypted data can be deciphered.
Only practical limitations (time and computing
resources) makes an encryption technique
sufficiently secure.

CHAPTER 9 : LINEAR PROGRAMMING

Uses of Linear Programming

Mathematically, linear programming is a process of


finding the best way to:

• utilize available resources.


• make intelligent decisions
It was the discovery of such algorithms which • determine the number of units to produce to
revolutionized the practice of cryptography beginning in reach maximum revenue.
• minimize inventory cost considering the
the middle 1970s.
various constraints and
• E.g. RSA (which stands for Rivest, Shamir and • demand for the product.
Adleman, who first publicly described it), PGP
Particularly, linear programming is used in the
(short for Pretty Good Privacy
business industry such as production, transportation
DECRYPTION TECHNIQUES and delivery, and different kinds of scheduling.

Brute force attack is a strategy used to break the LINEAR EQUATIONS


encryption of data which involves traversing all possible
keys until the correct key is found. A linear equation is an algebraic equation of the first
degree. Basically, a linear equation in two variables
• The selection of an appropriate key length is in the form ax+by=c where x and y are variables;
depends on the practical feasibility of a and b are coefficients which cannot be equal to 0;
performing a brute force attack. and c is the constant.
• The resources required for a brute force attack
System of Linear Equations
scale exponentially with increasing key size, not
linearly.
A system of linear equations is composed of two or
• As a result, doubling the key size for an algorithm more linear equations made up of two or more
does not simply double the required number of variables such that all equations in the system are
operations, but rather squares them. considered simultaneously.

Dictionary attack is a technique for defeating a cipher or Types of Linear Systems


authentication mechanism by trying to determine its
decryption key or passphrase by searching likely There are two main types of systems of linear
possibilities. equations in two variables
according to their nature of solutions.
• Dictionary attack uses a brute-force technique of
successively trying all the words in an exhaustive A consistent system has at least one solution.
list called a dictionary (from a pre-arranged list There are two types of consistent linear
of values). system: an independent and dependent system.
• In contrast with a normal brute force attack,
where a large proportion key space is searched
a) An independent system has exactly one SOLVING SYSTEMS OF LINEAR EQUATIONS
solution pair which is the point of intersection
of two lines. [Link] Method

Example:
b) A dependent system has infinitely many
solutions. The graph of this system is Solve the following linear system using substitution.
coincident lines. . x+y=5

2. An inconsistent system has no solution. The 2x - 5y = 10


graph of this linear system is
parallel lines. Solution:

• Isolate x for x+y = 5=x=5 - y.


DETERMINING THE TYPE OF LINEAR SYSTEMS
• Substitute x = 5 - y to the equation 2x - 5y = 10.
Determining the Type of Linear Systems • We have a - 5y=10 2(5-y)-5y=10 10-7y=10 y=0
The type of a linear system can be determined using Substitute y =0 to the equation x=5 - y x=5-0 x=5
a ratio test. In here, we simply express the • Therefore, the solution to the given system is x =
coefficients (a and b) and the constants (c) of the 5, y = 0 or (5,0).
given equations.
[Link] Method
Example:
Example:
Determine the type of the following systems of linear
equations Solve the following linear system using elimination.
. 2x+3y = 6
2x+5y=10
a. Let a1=2, b1=5, c1=10 and a2=1, b2=3, c2=15. -2x+5y = 10

x+3y=15 Solution:
b. Express the values in ratios such that
• Eliminate the x-variable by addition of the two
equations and solve for y.
• So, 2x-2x-F3y-I-5y=6+10 8y=16 y=2.
• Substitute the value of y to either equation (e.g.
2x+3y=6) to find the value of x. We have, 2x-1-
3y=6 2x-F3(2)=6 2x-F6=6 x=0.
• Hence, the solution to the given system is x=0,
y=2 or (0,2).

[Link] Method

The graphical method uses the Cartesian coordinate


system to find the solution of a linear system.

Example: Solve the following linear system by graphing.

2x + y = -8

x - y = -1

[Link] the intercepts of its equation.

LINEAR INEQUALITIES

In order to optimize linear programming problems, there


is a need to have a comprehensive understanding about
linear inequalities.
An inequality happens when two mathematical
expressions or numbers are not equal. Generally,
inequalities can be either numerical, algebraic, or a
combination of both.

A linear inequality is an inequality that includes at least


one linear algebraic expression. That is, for any two reals,
a and b (a<b) or (a>b) if and only if (b-a) is a positive
number.

PROPERTIES OF INEQUALITIES

Similar to equations, inequalities have its properties. [Link] the graph of x + 2y ≥ 8.


Specifically, there are five properties of inequalities.
a. [Link] the inequality to equation.
[Link] Property: For any real numbers a and b, • From x+2y≥ 8, we have x+2y = 8.
exactly one of the following is true: a<b; a = b; a>b b. Find the intercepts of the equation.
[Link] Property: For all real numbers a, b, and c: • That is, if x=0, then x+2y=8 0+2y=8
y=4. Therefore, the y-intercept is at
a. If a<b,then a±c<b±c the point (0,4).
b. If a>b,then a±c>b±c • If y=0, then x+2y=8 x+2(0)=8 x=8.
[Link] Property. For any real numbers a, b, and Therefore, the x-intercept is at the
c: point (8,0).
c. Graph the equation using the intercepts
a. If a<b, and c is positive, then ac<bc
b. If a<b, and c is negative, then ac>bc.

[Link] Property. For all real numbers a, b, and c:

a. If a<b and c is positive, then a/c<b/c.


b. If a<b and c is positive, then a/c>b/c.

[Link] Property. For all real numbers a, b, and c:

a. If a<b and c is positive, then a^c<b^c.


b. If a<b and c is positive, then a^c>bAc.

SOLVING LINEAR INEQUALITIES BY GRAPHING

[Link] the graph of x>5.

In this case, the graph of x>5 is the shaded region starting


from the broken line. Note that the graph starts with a
broken line. [Link] the following system by graphing:
This indicates that the number 5 is not included as a X+y≥3
solution set. In notation, we have (5,+..).
2x + y > 4

a. Transform the inequalities to equations and find the


intercepts of each in equation

[Link] the graph of x ≥ 2.

Observe that in this example, the shaded region starts


with a solid line. This means that the number 2 is
included as a solution set. In notation, we have the
solution set [2,+..).
Find the solution set of the given inequalities in a
graphical method X + 2y ≥ 4 2x + y ≤ 6

4. Solve the following system by graphing:

5X + 2y ≥ 10

2x + 4y ≤ 8

SOLVING LINEAR PROGRAMMING PROBLEM


GRAPHICALLY

A linear programming problem in two unknowns x and y

is one in which we are to determine the maximum and


minimum value of a linear expression.

P = 𝑎1𝑥 + 𝑏1𝑥 (for maximization) C = 𝒂𝟏𝒙 + 𝒃𝟏𝒙 (for


minimization) called the objective function, subject to a
number of linear constraints of the form

𝑎2𝑥 + 𝑏2𝑥 ≤ c or 𝑎2𝑥 + 𝑏2𝑥 ≤ c or 𝑎2𝑥 + 𝑏2𝑥 = c

Objective Function

An objective function is an expression which shows the


relationship between the variables in the problem and
the firm's goal. There are two types of constraints:
structural and non-negativity.

a. The structural constraint is a limit on the


availability of resources; it is also
referred as explicit constraint.
b. Non-negativity constraint is the
constraint that restricts all the variables
to zero and positive solution; it is also
referred as implicit constraint.
Take the example below: 2. A Linear programming (LP) problem with bounded,
non-empty feasible regions alwa)
Maximize: P = 1,200x + 1,600y
contain optimal solutions.
Subject to 3x + 2y ≤ 18
LINEAR PROGRAMMING
2x + 4y ≤ 20
Linear Programming was invented by a mathematician
x≤5 Structural constraint
named George Dantzig. His idea about linear
x ≥ 0, y ≥ 0 Non-negativity constraint programming was to consider any business variable (e.g.
manufacturing, scheduling, or distribution) and
formulate a mathematical linear model that would
The highest (maximization problem) or lowest value optimize the business objective. Essentially, optimizing
(minimization problem) of the objective function the business objective means to find the maximum profit
referred to optimal value. The optimal solution is a or minimum cost considering various constraints. In this
combination of decision variable amounts that yield the section, we will explore one method which is the
best possible value of the objective function and satisfy graphical method.
all the constraints. There may be multiple combinations LINEAR PROGRAMMING
of decision variables that yield the same best value of the
objective function • A widely used problem solving method
• Use to determine the optimal value of a linear
Feasible Region
function which defines the objectives of the
The feasible region is the set of combinations of values problem subject to a set of linear constraints
for the decision variables that satisfy the nonnegativity - Constraints - it defines the limit or
conditions and all the constraints simultaneously that is decision environment of the problem
the allowable decisions. Extreme point is the corner of - Optimal – it may mean maximizing profit
the feasible region; it is the location of the maximum and or minimizing cost in a specific context
minimum point of the feasible region. • Linear Programming Models are used to assist
people and organizations in making decisions

TERMINOLOGIES IN LINEAR PROGRAMMING

1. An objective function is an equation which is


minimized or maximized. This illustrates the relationship
between variables of interest with a goal.

2. Structural constraints refer to the restrictions in terms


of the available resources.

3. Non-negativity refers to the decision variable that


subjects the linear programming model to zero or
positive values.

4. An optimal solution refers to the set of values that


yields the maximum profit or minimum cost.
The Extreme Point Theorem
5. The feasible region is the common region determined
The linear objective function will have its optimal by all constraints ([Link] and non-negativity
solutions at the extreme points (corner points) of the constraints).
feasible region whenever the feasible region is bounded.
If the feasible region is unbounded, there is no optimal PROPERTIES OF LINEAR PROGRAMMING MODEL
solution. In cases wherein there is an optimal solution • The objective function is to be optimized by
even though the feasible region is unbounded, it lies at either maximization or minimization.
the extreme (or corner) of the feasible region. • There are constraints restricting the activities
Fundamental Theorem of Linear Programming Problem that are required to carry out the objective.
• All equations are linear.
There are two things we need to consider in solving • The activities (or decision variables) are
linear programming problem such as. generally non-negative
1. If a Linear Programming (LP) problem has optimal
solution, there is always at least of extreme point (corner
point) solution of the feasible region.
Problem #1 • P50.00 profit for each graphing calculators sold
50y
A calculator company produces scientific calculators and
graphing calculators. Long-term projections indicate an Step 4: Know the Resources Controlled by the decision
expected demand of at least 100 scientific calculators maker
and 80 graphing calculators each day. Because of
A calculator company produces scientific calculators and
limitations on production capacity, no more than 200
graphing calculators. Long-term projections indicate an
scientific calculators and 170 graphing calculators can be
expected demand of at least 100 scientific calculators
made daily. To satisfy a shipping contract, a total of at
and 80 graphing calculators each day. Because of
least 200 calculators must be shipped each day. If each
limitations on production capacity, no more than 200
scientific calculator sold result in a P20.00 loss, but each
scientific calculators and 170 graphing calculators can be
graphing calculator produces a P50.00 profit, how many
made daily. To satisfy a shipping contract, a total of at
of each type should be made daily to maximize net
least 200 calculators must be shipped each day. If each
profit?
scientific calculator sold result in a P20.00 loss, but each
Step 1: Know the Objective graphing calculator produces a P50.00 profit, how many
of each type should be made daily to maximize net
A calculator company produces scientific calculators and
profit?
graphing calculators. Long-term projections indicate an
expected demand of at least 100 scientific calculators Resources Controlled:
and 80 graphing calculators each day. Because of
limitations on production capacity, no more than 200 • There is an expected demand of at least 100 SC
scientific calculators and 170 graphing calculators can be • There is an expected demand of at least 80 GC
made daily. To satisfy a shipping contract, a total of at • No more than 200 SC can be made daily
least 200 calculators must be shipped each day. If each • No more than 170 GC can be made daily
scientific calculator sold result in a P20.00 loss, but each • A total of at least 200 calculators must be
graphing calculator produces a P50.00 profit, how many shipped daily
of each type should be made daily to maximize net Step 5: Know the Technical Coefficients that link the
profit? decision variables and the resources
Objective: Technical Coefficient:
• Maximize Net Profit • Variable x must be at least 100 relative to the
• Let P denote the Net Profit expected demand
Step 2: Know the Decision Variables • Variable y must be at least 80 relative to the
expected demand
Decision Variables: • x must not exceed 200
• Let x – number of scientific calculators to be • y must not exceed 170
made daily • x + y is the total number of calculators which
• Let y - number of graphing calculators to be must be at least 200
made daily

Step 3: Know the Coefficients of the Decision Variables in


the objective function

A calculator company produces scientific calculators and


graphing calculators. Long-term projections indicate an
expected demand of at least 100 scientific calculators
and 80 graphing calculators each day. Because of
limitations on production capacity, no more than 200
scientific calculators and 170 graphing calculators can be Step 6: Set up the Constraints
made daily. To satisfy a shipping contract, a total of at
least 200 calculators must be shipped each day. If each
scientific calculator sold result in a P20.00 loss, but each
graphing calculator produces a P50.00 profit, how many
of each type should be made daily to maximize net
profit?

Coefficients of the Decision Variables:

• P20.00 loss for each scientific calculator sold


-20x
Step 7: Linear Programming Model Step 9: Consider the Extreme Points, substitute them to
the objective functions

Step 8: Solution Using Graph

Step 10: Construct a Conclusion

You might also like