0% found this document useful (0 votes)
360 views12 pages

Edexcel D1 Revision Sheets

The document discusses sorting and bin packing algorithms. It explains the full-bin algorithm, first-fit algorithm, and first-fit decreasing algorithm for bin packing problems. It also covers bubble sort and quick sort algorithms, comparing the number of comparisons and swaps each requires. Examples are provided to illustrate the algorithms.

Uploaded by

Oriel Xu
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)
360 views12 pages

Edexcel D1 Revision Sheets

The document discusses sorting and bin packing algorithms. It explains the full-bin algorithm, first-fit algorithm, and first-fit decreasing algorithm for bin packing problems. It also covers bubble sort and quick sort algorithms, comparing the number of comparisons and swaps each requires. Examples are provided to illustrate the algorithms.

Uploaded by

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

SUMMARY SHEET – DECISION MATHS

Algorithms

Chapter 1 排序问题 Before the exam you should know:


• The three bin packing algorithms. These are the Full-
Bin Algorithm, the First-Fit Algorithm and the First-Fit
Decreasing Algorithm.
• The sorting algorithms. Make sure you know which of
these algorithms you need to learn by heart.
The main ideas in this topic are
• How to count the umber of comparisons and swaps in
Understanding and implementing a variety of
each pass and know the maximum number of passes
algorithms expressed as lists of instructions,
that are required for a list of a given length.
flow charts or in pseudo code.
• The different ways algorithms are presented and make
sure you practice following unfamiliar algorithms.
What is an algorithm?
An algorithm must have the following properties • What is meant by efficiency of an algorithm.
• it is a set of precisely defined instructions.
• it has generality: it will work for all valid Presenting and Implementing Algorithms
inputs.
• it is finite: it has a stopping condition. An algorithm is a well-defined, finite sequence of instructions to solve
• it may be an iterative process: you may need to a problem. They can be communicated in various ways, including
follow the procedure a number of times in written English, pseudo code and flowcharts. Make sure you are
order to reach the best solution. experienced in all possible formats.

Bin Packing Example


These are examples of HEURISTIC algorithms. This means a) What is the output of the
Input A and B
that none of these algorithms necessarily lead you to the best algorithm when
(positive integers)
or optimal solution of the problem. A = 84 and B = 660?
1. Full-Bin Algorithm b) What does the algorithm
Let Q = int(B/A) achieve?
Look for combinations of boxes to fill bins. Pack these boxes. Let R1 = B − A × Q
For the remainder, place the next box to be packed in the first Solution
available slot that can take that box.
a)
Note – the full bin algorithm does not always lead to the same
Let B = A A 84 72 12
solution of the problem. In other words, two people could
apply the full bin algorithm perfectly correctly and end up Let A = R1
B 660 84 72
with their boxes packed differently. Let Q = int(B/A)
Let R2 = B − A × Q Q 7 1 6
2. First-Fit Algorithm
R1 72 12
Taking the boxes in the order listed, place the next box to be
packed in the first available slot that can take that box. R2 12 0
R2 > 0 ?
3. First-Fit Decreasing Algorithm yes PRINT 12
Let R1 = R2
i) Re-order the boxes in order of decreasing size. no b) It finds the highest common
ii) Apply the First-Fit algorithm to this reordered list. factor of A and B.
Print R1
You should be able to form a judgement about the relative Stop
efficiency of these algorithms. The First-Fit Decreasing
Algorithm requires a sort to be made before applying the
First-Fit Algorithm so, in terms of computation, it requires
more resources than the First-Fit Algorithm alone.

LECEA IAL MATH D1


Example: Show how the following items are to be packed into boxes each of which has a capacity of 10Kg.

Item A B C D E F 1. Full Bin


Weight (kg) 2 4 6 3 3 5 6+4=10, 5+3+2=10, 3 3 bins needed
2. First-Fit 3. First-Fit Decreasing

4kg 2kg Notice that in this example the First-Fit


3kg 3kg Decreasing Algorithm gives the same
3kg result as the Full Bin Algorithm. This
will not always be the case.
4kg 6kg 6kg
5kg 5kg

3kg
2kg

Sorting Algorithms
There are many sorting algorithms, so you must check carefully to see which, if any, you need to memorise for the examination.
Questions often ask about the relative efficiency of sorting algorithms by comparing the number of comparisons (c) and swaps that
are made to sort the same list of numbers, as seen in this example:

Bubble Sort
List 1st 2nd 3rd
pass pass pass First pass: the first number in the list is compared with the second and whichever is
6 1 1 1 smaller assumes the first position. The second number is then compared with the third
1 3 3 3 and the smaller is placed in the second position, and so on. At the end of the first pass,
3 6 5 5 the largest number will be at the bottom. For the list of five numbers on the right, this
7 5 6 6 involves 4 comparisons and 3 swaps.
5 7 7 7 Second pass: repeat first pass but exclude the last number (on the third pass the last two
c 4 3 2 numbers are excluded and so on).
s 3 1 0 The list is repeatedly processed in this way until no swaps take place in a pass.
total number of comparisons: 9 For a list of 5 numbers, the list will definitely be sorted after the 4th pass (why?), so this is
the maximum number of passes. The maximum number of comparisons is 4+3+2+1=10
total number of swaps: 4 and the maximum number of swaps is 10. You should be able to generalise this to a list
of n numbers.

list 1st 2nd 3rd 4th Quick Sort


pass pass pass pass
Select a pivot – usually the middle item in the list
6 1 1 1 1
1 3 3 3 3 First pass: numbers are sorted into two sub lists, those smaller than the pivot
3 6 6 5 5 element and those greater than the pivot element. The pivot element is now fixed
7 7 5 6 6 in its correct position I the list.
5 5 7 7 7 Second pass: choose a pivot element in each of the two sub lists and repeat the
c 4 2 1 0 sorting procedure.
s 1 1 1 0
Continue this process until all numbers are fixed and the list is sorted.
total number of comparisons: 7
total number of swaps: 3

In this case the quick sort takes fewer comparisons and swaps than the bubble sort, though it does take one more pass to achieve
the sort. It is worth noting that the relative efficiency of the different types of algorithm will vary depending on how “mixed up”
the list is.

LECEA IAL MATH D1


SUMMARY SHEET – DECISION MATHS
Graph Theory

C h a p t er 2 概念章节 Before the exam you should know:


• The terms vertices (nodes), edges (arcs), digraphs, trees
and paths.
• All the other vocabulary used to describe ideas in graph
theory.
The main ideas in this topic are • How to draw a graph from an incidence matrix.
• The definition of a graph and the associated • How to model problems using graphs (e.g. Konigsberg
vocabulary. Bridges).
• Mathematical modeling with graphs. • What is meant by a tree.
• How to recognise isomorphic graphs.

Terminology for Graph Theory • What is meant by a Hamiltonian cycle.


• Graph – collection of vertices & edges. • What is meant by an Euler cycle.
• Vertex/Node – the dots in a graph (usually where 2 or
more edges meet, but not necessarily).
• Edge/Arc – a line between two vertices.
• Tree – a graph with no cycles.
• Order (degree) of a vertex – the number of edges starting vertices
or finishing at that vertex.
• Simple graph – a graph with no loops or multiple edges. edge
• A path – a route from one vertex to another which does
not repeat any edge.
loop
• A cycle – a route starting and finishing at the same vertex.
• Connected graph – a graph in which there is a route from
each vertex to any other vertex (i.e. the graph is in one
part).
• Complete graph – a simple graph in which every pair of
vertices is connected by an edge.
• Bipartite graph – one in which the vertices are in two sets These two graphs are
and each edge has a vertex from each set. isomorphic.
• Planar graph – one which can be drawn with no edges
crossing.
• Sub graph – any set of edges & vertices taken from a These diagrams all show trees of the graph above
graph is a sub-graph.
• Hamiltonian cycle – a cycle that visits every vertex of the
graph.
• Eulerian cycle – a cycle that travels along every edge of
the graph.
• Eulerian graph – a graph with no odd vertices.
• Di-graph – a graph in which the edges indicate direction.
Example:
• Incidence matrix – a matrix representing the edges in a
graph.

LECEA IAL MATH D1


To
A
This shows a graph and its A B C
Incidence matrix. A − 1 1
B 1 − 1
C From
C 1 1 2
B

Graphs can be used to represent many different things

This graph represents a tetrahedron

Alan Biology

Betty English This bipartite graph shows which


subjects four students study.
Chris Maths

Donna Music

Example
The table shows the number of vertices of degree Order of vertex 1 2 3 4
1, 2, 3 and 4 for three different graphs. Graph 1 3 0 1 0
Draw an example of each of these graphs. Graph 2 0 0 4 1
Graph 3 0 2 2 1
solution
graph 1 graph 2 graph 3

Find the number of edges and the sum of the degrees of all the vertices of the graphs. What do you notice?
Graph 1: number of edges 3 sum of degrees of vertices 1+1+1+3 = 6
Graph 2: number of edges 8 sum of degrees of vertices 3+3+3+3+4=16
Graph 3: number of edges 7 sum of degrees of vertices 2+2+3+3+4 = 14

The sum of the degrees of the vertices is always twice the number of edges.

Also note that there are always an even number of odd vertices.

LECEA IAL MATH D1


SUMMARY SHEET – DECISION MATHS 1
NETWORKS – Minimum spanning tree and shortest path
Chapter 3 MST 问题 Before the exam you should know:
• How to show all the working clearly, there are more
marks for the working than for getting the right answer.
• The distinction between Kruskal’s and Prim’s algorithms.
• How to apply Prim’s algorithm to both a network and a
table correctly.
• That Prim’s and Kruskal’s algorithms will usually give
The main ideas in this topic are the same MST but often select the edges in a different
• Appling Kruskal’s and Prim’s Algorithms to order. Make sure you show sufficient working so that the
find the minimum spanning tree of a network. examiner can see which algorithm you have used.
• How to work with networks or tables and be able to
• Applying Dijkstra’s Algorithm to find the
convert between the two.
shortest (or least value path from one vertex
• That you must always show all the working values as
to any other vertex in the network.
well as the permanent labels when using Dijkstra’s
algorithm.

Minimum Spanning Tree


The minimum connector problem is to make a selection of the available edges so that any one vertex can be
reached from any other, and the total length of the chosen edges is as small as possible. A connected set of
edges with no loops is called a tree and the set which solves the minimum connector problem is the minimum
spanning tree for the network.
Kruskal’s Algorithm 1. Choose the shortest 2. Choose the next shortest 3. Choose the next shortest
edge (if there is more edge in the network (it edge which does not create
D than one, choose any of doesn’t have to be joined a cycle and add it…
A 3 the shortest)… to the edges already… D
4
3 F
6 F
2 3
4 C C 2
C 3 2 2 C
2 2 E 2
E E
B E B
D B
A D
4. Repeat step 3 until all 3
4 3 Length of minimum spanning
the vertices are 3 F
2 3 F tree: 14
connected then stop. C 2 2
C 2
E
B B E

Prim’s Algorithm on a network


1. Choose a vertex… A A

2. Choose the shortest edge from this A 4 4 C


vertex to any vertex connected directly 2
to it… B B
A A D D
3. Choose the nearest vertex not yet in A
the solution which is connected to any 3 3
3 F
vertex which is in the solution and 4
which does not create a cycle… C 4 4
2 2 C C
4. Repeat step 3 until all the vertices B E 2 2 2 2
B E B E
are connected then stop.

LECEA IAL MATH D1


1 2 1 3 2 1
Prim’s Algorithm on a Table A B C D E F A B C D E F A B C D E F
1. Choose a column and cross out its row. Here D A - 4 4 A - 4 4 A - 4 4
has been chosen. Delete row D. B 4 - 2 B 4 - 2 B 4 - 2
2. Choose the smallest number in the column D C 4 2 - 3 2 6 C 4 2 - 3 2 6 C 4 2 - 3 2 6
and circle it. If there is a choice, choose either. D 3 - 3 D 3 - 3 D 3 - 3
3. For the number you have just circled, cross out E 2 - 3 E 2 - 3 E 2 - 3
its row and put an arrow above its row at the F 6 3 3 - F 6 3 3 - F 6 3 3 -
top of the table. 3 2 1 4 5 6 3 2 1 4 5
3 2 1 4
4. Choose the smallest number not already A B C D E F A B C D E F
A B C D E F
crossed out from the arrowed columns and
A - 4 4 A - 4 4 A - 4 4
circle it.
5. For the number you have just circled, cross out B 4 - 2 B 4 - 2 B 4 - 2
its row C 4 2 - 3 2 6 C 4 2 - 3 2 6 C 4 2 - 3 2 6
6. and put an arrow above it’s row at the top of D 3 - 3 D 3 - 3 D 3 - 3
the table. E 2 - 3 E 2 - 3 E 2 - 3
7. Continue till all vertices have been included in F 6 3 3 - F 6 3 3 - F 6 3 3 -
the tree.
Length of minimum spanning tree 14

Dijkstra’s Algorithm for the shortest path 1. Label the start vertex with permanent label 0 and order label 1.
1 0 2. Assign temporary labels to all the vertices that can be reached
D directly from the start.
A 3 3. Select the vertex with the smallest temporary label and make its
4 3 6 F label permanent. Add the correct order label.
1. Step 1 4. Put temporary labels on each vertex that can be reached directly
4
C 3 from the vertex you have just made permanent. The temporary
2 2
E label must be equal to the sum of the permanent label and the
B
direct distance from it. If there is an existing temporary label at a
vertex, it should be replaced only if the new sum is smaller.
5. Repeat steps 3 and 4 until the finishing vertex has a permanent
label.
1 0 6. To find the shortest paths(s), trace back from the end vertex to the
D start vertex. Write the route forwards and state the length.
A 3
4 3 6 F 5 7
2. Steps 2 4 1 0
C 3 7
and 3 2 2 D
A 3
B E 4 10 9
2 4 4 3 6 F
4 5. Steps 4 and 5 4
C 3
2 2
1 0 B E
D 3 4
A 2 4 4 6
3 10 4
4 4 6
3 6 F
4 5 7
3. Steps 4 2
C
2 3 1 0 7
and 5 3 4 E D 6 9
B A
4 4 3 10 9
2 4 3
4 6 F
6. Steps 4 4
C 3
1 0 and 5 2 2
7 B 3 4 E
D 4 6
A 3 2 4 4
4 10 9
3 6
6 F 4
4. Steps 4 4
C 3
and 5 2 2
B 3 4 E
4 6 7. Step 6 Solution:
2 4 4 Shortest path ACEF
6
4 Length 9

LECEA IAL MATH D1


REVISION SHEET – DECISION MATHS
Networks: Route Inspection
C h a p t e r 4 修路问题 Before the exam you should know
• That an Euler cycle is a tour which travels along every
edge of a network.
• The meaning of: order of a vertex (node), traversable
graph and Eulerian graph.
The main ideas in this topic are
• That the direct route between two vertices is not
An Eulerian network has all its vertices even. always the shortest.

Apply the Chinese Postman Algorithm to • That you need to identify ALL the odd vertices in the
obtain the closed trail of minimum weight. route inspection problem.

The Route Inspection Problem


The problem is to find a route of minimum length which goes along each edge in the network once and returns to the
starting point. This type of problem arises in contexts such as a rail safety expert needing to inspect every piece of track
in a railway system, or a postman needing to walk along every street to deliver mail in the most efficient way possible,
hence it is often called the Chinese Postman problem because a Chinese mathematician developed the algorithm.
For a network to be traversable it must be Eulerian (no odd nodes) or semi-Eulerian (two odd nodes). A network will
always have an even number of odd nodes (handshaking theorem). If the network is Eulerian (every vertex is of even
order) there are many equal optimum solutions.
The Algorithm can be stated as follows
1. Identify the odd vertices in the network. Example: For the network shown below
2. Consider all the routes joining pairs of odd Find the length of the shortest closed trail that covers
vertices and select the one with the least every edge on the network below and write down a
weight. suitable route
3. Find the sum of the weights on all the edges.
4. Shortest distance is the sum of the weights
plus the extra that must be traveled.
5. Find a tour which repeats the edges found in 24
B E
step 2. 8

12 10
Solution: 6
9
(a) Odd vertices are A, C, D and E. A 6 18 F
Consider all the possible pairings of odd vertices: C
AC = 6 and DE = 14 total = 20
11 8 12
AD = 11 and CE = 6 total = 17
AE = 12 and CD = 8 total = 20
D
The pairing of least weight is AD and CE = 17.
The sum of the weights in the network is 124.
Repeating AD and CE gives a total weight = 124 + 17 = 141.
A suitable route is A – B – E – F – D – A – C – B – F – C – E – C – D – A.

LECEA IAL MATH D1


C h a p t e r 5 商旅问题
SUMMARY SHEET – DECISION MATHS
CRITICAL PATH ANALYSIS

CHAPTER 6 项⽬管理 Before the exam you should know


• How to draw precedence networks. as you possibly can.
• When you need to use dummy activities.
• How to perform forward and backward passes on a precedence
network to calculate early and late start times.
The main ideas in this topic are • How to find the critical activities.
• Drawing Activity or Precedence Networks • How to calculate the various types of float.
• Performing Forward and Backward Passes • How to draw a cascade chart and construct a resource histogram.
and Identifying Critical Activities • Where resource levelling is required and how to make effective
use of float to improve efficiency.
• Drawing Cascade Charts and Resource
Levelling • What is meant by crashing a network.

Terminology Example:
An activity is a task which needs to be done and takes an The table shows the activities involved in creating a small patio
amount of time/resources to complete. in a garden.
Precedence tables show the activities that need to be done
together with their duration and their immediate predecessors. Activity Task Time Preceding
Precedence networks show the sequence of the activities. The Name (hrs) Activities
network must have one start node and one end node.
An event is the start/finish of one or more activities. A Clear Garden 4
Dummy activities are used to keep the correct logic and to B Measure area 1
ensure each activity is uniquely defined by (i, j) where i is its C Design Patio 2 B
starting event and j is the finishing event.
D Purchase fencing 1 B
E Buy pots and plants 3 A,C
This is correct F Plant all pots 1 E
This is incorrect G Purchase paving 1 C
H Construct Garden 6 A, D,G
It can be a good idea to do an initial sketch as it’s often possible
to make your diagram clearer by repositioning activities to avoid The network for this precedence table
them crossing over one another.
Forward pass establishes the earliest times that events can E(3)
happen. A(4)
F(1)
Backward pass establishes the latest time that an event can
happen.
Critical activites are those whose timing is critical if the project G(1)
is to be completed in the minimum time. The critical activities C(2)
B(1)
will form a path through the network H(6)
Float is the amount of time by which an activity can be delayed
D(1)
or extended.
Independent float does not affect other activities.
Interfering float is shared between two or more activities.

LECEA IAL MATH D1


The forward and backward pass

This is the earliest This is the latest


start time for the start time for the 4 4
next activity next activity 7 9
E(3)

A(4)
F(1)

0 0 10 10
G(1)
C(2)
B(1) 3 3
H(6)

The duration of the project is 10 hours D(1)


The critical activities are A, B, C, G and H 1 1 4 4

Float

activity float type


D 2 hours independent In this example there are two hours of float shared between
E 2 hours Interfering (with F) activities E and F
F 2 hour Interfering (with E)

Cascade Chart and Resources levelling


0 1 2 3 4 5 6 7 8 9 10 A Cascade Chart shows each activity set against a time line.
A Float time is sometimes shown by using shading.
B Dependencies are shown by vertical lines.
C The cascade chart can be adjusted by using the float times
D to make use of resources more efficient.
E
F
G
H
If activity A needs two people and all the rest can be done
4 by one person, then the resource histogram looks like this
3 (note that 4 people are needed in the second hour).
2 2
1
0 1 2 3 4 5 6 7 8 9 10

0 1 2 3 4 5 6 7 8 9 10 If only three people are available for the first three hours,
A but a fourth friend can then come and help for an hour, we
B could move activity D within its float time to make this
C possible.
D
E This would make the cascade chart look like this
F
G
H

4
3 The resource histogram would now look like this
2 2
1
0 1 2 3 4 5 6 7 8 9 10

LECEA IAL MATH D1


SUMMARY SHEET – DECISION MATHS
GRAPHICAL LINEAR PROGRAMMING

C h a p t er 7 线性规划问题 Before the exam you should:


• Practice formulating linear programming problems. This
can often be the trickiest part of the problem. Remember
to be consistent with units.
• Learn the terminology – the OBJECTIVE FUNCTION is
what you have to maximise or minimise subject to a
The main ideas in this chapter are number of CONSTRAINTS.
• Make sure you are able to draw straight line graphs
quickly from the constraints by considering where they
Formulating a problem as a linear
cross the x and y axes.
programming problem, solving a Linear
Programming Problem (maximisation and • You must be able to find the solution to problems from
minimisation) and Integer Programming. the graph. Make sure you can draw graphs accurately.
• Remember to shade OUT the unacceptable region to keep
the feasible region clear and easy to identify.
• You must be able to find correct solutions to problems
Formulating a problem as a where the answer must be an integer.
Linear Programming Problem
First: identify the variables about which a decision is to be made. These are sometimes called the decision variables. For example
if your problem is to decide how many chairs to make and how many tables to make to maximise profit, begin with a statement like
– let x be the number of chairs and let y be the number of tables. If your problem is to work out how many grams of wheatgerm and
how grams of oat flour there should be in a new food product to meet nutritional requirements and minimise cost then let x be the
number of grams of wheatgerm and let y be the number of grams of oat flour.
Next: Decide what the objective function is (this is the value you are trying to maximise or minimise) and what the constraints are
as inequalities involving x and y.
Be careful to use the same units consistently. For example it’s possible that some distances appearing in a problem are given in
metres and some are given in centimetres. Or some times they could be given in seconds with some given in minutes. Choose one
type of units and convert everything into those units.

Example: Formulation as a linear program


A clothing retailer needs to order at least 200 jackets to The decision is about how many of two types of jacket need to
satisfy demand over the next sales period. He stocks two be ordered.
types of jacket which cost him £10 and £30 to purchase. Let x = number of cheaper jackets ordered
He sells them at 20 pounds and 50 pounds respectively. Let y = number of expensive jackets ordered
He has 2700 pounds to spend on jackets. The profit, P, given by selling all of these, is P = 10 x + 20 y ,
since the profit made on a cheaper jacket is 10 pounds and the
The cheaper jackets are bulky and each need 20cm of profit made on an expensive one is 20 pounds.
hanging space. The expensive jackets need only 10cm The constraints are:
each. He has 40m of hanging space for jackets. 1. “needs to order at least 200” giving x + y ≥ 200
The retailer wishes to maximise profit. Assuming that all 2. “cost him 10 pounds and 30 pounds” and “has 2700 pounds
jackets will be sold, formulate a linear program, the to spend” giving 10 x + 30 y ≤ 2700
solution of which will indicate how many jackets of each 3. “20cm of hanging space” and “10cm” and “has 40m of
type should be ordered. hanging space” giving 0.2 x + 0.1 y ≤ 40

LECEA IAL MATH D1


Solving a Linear Programming Problem
Draw a graph in which each constraint is represented by a line with shading. The unacceptable side of the line should be shaded.
This leaves a “feasible region”. The solution of the problem will be one of the vertices of the feasible region. These can be checked
to find the best. We do this below for the example introduced over the page.

Drawing the line representing a constraint. The feasible region.


As an example, take the constraint Once you have drawn all the constraints, the feasible region
0.2 x + 0.1 y ≤ 40 from the example over the page. is the intersection of the acceptable regions for all of them.
The initial aim is to y
draw the line Constraint 1
350 (0,400) y
0.2 x + 0.1 y = 40 . We x + y ≥ 200
know this is a 350
straight line so it’s
enough to find two Constraint 2
points on the line 10 x + 30 y ≤ 2700
and join them. When
x = 0, y = 400 and
when y = 0, x = 200. (200,0) Feasible Constraint 3
So the points 50 Region
(0, 400) and (200, 0) 0.2 x + 0.1 y ≤ 40
50 350 x 50
are on the line.
Then shade out, the unacceptable region. To find the 50 350 x
unacceptable region just test a point to see if it satisfies the
constraint or not. For example, in this case (10, 10) clearly
satisfies the constraint and so is in the acceptable region.

Finding the solution Considering


The solution of the problem will be at one of the vertices Gradients.
of the feasible region. You will need to solve simultaneous By calculating
equations to find the co-ordinates of these vertices. Then the gradients of
A B each of the
each vertex must be checked to find the best. For example
in the above we have a feasible region as in the diagram on constraints and
the right. The coordinates of point A are found by solving the gradient of
x + y = 200 and 10x + 30y = 2700 simultaneously. The the objective
solutions are x = 165 and y = 35. So the point is (165, 35) function, it’s
and the profit at that point is P = 10x + 20y = 1650 + 700 = possible to
2350. Similarly it can be seen point B is (186, 28) giving a predict in
160 C 210 x
profit of 2420. Point C is (200, 0) giving a profit of 2000. advance which
So the best profit that can be made is by buying 165 cheap vertex will give
coats and 35 expensive coats. the optimal
solution.

Minimisation problems are solved in exactly the same way. Just remember that this time you are looking for the vertex
which makes the objective function the lowest.

Integer Programming
If the solution to the problem has to have integer values then points with integer value coordinates, close to the optimal point
can be checked. This is likely to reveal the optimal solution but it is not guaranteed to. For example suppose the Objective
Function is 2 x + 3 y and that this should be maximised. The optimal point may be (30.6, 40. 8) but do not assume that
(30.40) will give the best solution; you must look at all the points with integer coordinates that are nearby: (31, 40), (30, 41),
(30, 40) and (31, 41).
However (31, 41) and (31, 40) are not in the feasible region. You can check this by substituting in the values into the
constraints. Of the two points nearby which are in the feasible region, namely (30, 41) and (30, 40), it can be seen that
(30, 41) provides the best profit.

LECEA IAL MATH D1

You might also like