Linear Programming Explained: A KS3 Introduction | KS3 数学:线性规划 考点精讲

📚 Linear Programming Explained: A KS3 Introduction | KS3 数学:线性规划 考点精讲

Linear programming might sound like something you write on a computer, but in mathematics it is a powerful tool for making decisions. At KS3, you can start to explore the basic ideas behind linear programming by looking at simple real-life problems. You will learn how to represent limits using inequalities, draw them on a graph, find a region that satisfies all the conditions, and then work out the best possible outcome – such as maximum profit or minimum cost. This article guides you through every step, with clear examples and plenty of practice.

线性规划听起来像是电脑编程,但在数学中,它是一个强大的决策工具。在 KS3 阶段,你可以通过简单的实际问题初步探索线性规划的核心思想。你将学会用不等式表示限制条件,把它们画在坐标图上,找出满足所有条件的区域,然后求出最佳结果——例如最大利润或最小成本。本文会一步步引导你,配有清晰的例子和大量练习。


1. What is Linear Programming? | 什么是线性规划?

Linear programming is a method used to find the best solution to a problem that has certain restrictions, or constraints. The word ‘linear’ means that all the relationships involved can be represented by straight lines on a graph, and ‘programming’ simply means planning. Imagine you are running a small business and you want to maximise your profit, but you have limited amounts of time, materials, or money. Linear programming helps you decide how much of each product to make or buy.

线性规划是一种用来寻找具有某些限制(约束条件)问题的最佳解决方案的方法。“线性”意味着所有相关的关系都可以在坐标图上用直线表示,“规划”就是计划的意思。想象一下,你在经营一个小生意,想获得最大利润,但你拥有的时间、材料或者资金有限。线性规划就能帮你决定每种产品各生产多少或采购多少。

At KS3 level, we only explore problems with two variables, such as ‘number of chairs’ (x) and ‘number of tables’ (y). The constraints are written as inequalities like x + y ≤ 10, and the objective – what we want to maximise or minimise – might be an expression like Profit = 3x + 5y. By drawing the graphs of these inequalities, we can see a feasible region, and the best solution will always lie at one of its corners.

在 KS3 阶段,我们只探讨含有两个变量的问题,例如“椅子的数量”(x)和“桌子的数量”(y)。约束条件写成不等式,如 x + y ≤ 10,而我们想要最大化或最小化的目标可能是一个表达式,比如利润 = 3x + 5y。画出这些不等式的图形,我们就能看到一个可行区域,而最佳解总是落在这个区域的某个顶点上。


2. Real-Life Example: The Farm Problem | 实际例子:农场问题

Let’s start with the classic ‘farm problem’. A farmer has 20 hectares of land. She wants to plant wheat and barley. Each hectare of wheat costs £100 to grow and requires 4 hours of labour per week. Each hectare of barley costs £200 to grow and needs 2 hours of labour per week. The farmer has a budget of £2400 and can provide up to 48 hours of labour per week. The profit is £60 per hectare for wheat and £80 per hectare for barley. How much of each should she plant to maximise her profit?

让我们从经典的“农场问题”开始。一位农民有 20 公顷土地,她想种植小麦和大麦。每公顷小麦的种植成本为 100 英镑,每周需要 4 小时劳动。每公顷大麦的种植成本为 200 英镑,每周需要 2 小时劳动。农民有 2400 英镑的预算,每周最多可以提供 48 小时的劳动。每公顷小麦利润 60 英镑,每公顷大麦利润 80 英镑。她应该分别种植多少公顷才能获得最大利润?

We can define variables: let x be the number of hectares of wheat, and y be the number of hectares of barley. These variables cannot be negative, so x ≥ 0 and y ≥ 0. The constraints come from land, budget, and labour. We will turn each into an inequality.

我们可以定义变量:设 x 为小麦的种植公顷数,y 为大麦的种植公顷数。这些变量不能为负数,所以 x ≥ 0,y ≥ 0。约束条件来自土地、预算和劳动。我们将每一个条件转化为不等式。


3. Constraints as Inequalities | 将约束条件表示为不等式

A constraint is a limit on the resources you can use. In the farm problem we have three resource limits: land, cost, and labour. The total land used cannot exceed 20 hectares, so we write x + y ≤ 20. This is our first inequality.

约束条件是对你可以使用资源的限制。在农场问题中,我们有三种资源限制:土地、成本和劳动。使用的土地总面积不能超过 20 公顷,因此我们写出 x + y ≤ 20。这是我们的第一个不等式。

The cost constraint: each hectare of wheat costs £100, so x hectares cost 100x. Barley costs 200y. The farmer cannot spend more than £2400, so 100x + 200y ≤ 2400. We can simplify this by dividing everything by 100: x + 2y ≤ 24.

成本约束:每公顷小麦耗费 100 英镑,所以 x 公顷耗费 100x。大麦耗费 200y。农民的总花费不能超过 2400 英镑,因此 100x + 200y ≤ 2400。我们可以将所有项除以 100 进行化简:x + 2y ≤ 24。

The labour constraint: wheat requires 4 hours/ha, barley requires 2 hours/ha, with a maximum of 48 hours weekly. This gives 4x + 2y ≤ 48. Again simplify by dividing by 2: 2x + y ≤ 24.

劳动约束:小麦每小时/公顷需 4 小时,大麦需 2 小时,每周最多 48 小时。由此得出 4x + 2y ≤ 48。再次化简,除以 2:2x + y ≤ 24。

So the four constraints are:

因此,四个约束条件为:

  • x ≥ 0 (you cannot plant negative wheat)
  • y ≥ 0 (you cannot plant negative barley)
  • x + y ≤ 20 (land)
  • x + 2y ≤ 24 (cost)
  • 2x + y ≤ 24 (labour)
  • x ≥ 0(不能种植负公顷小麦)
  • y ≥ 0(不能种植负公顷大麦)
  • x + y ≤ 20(土地)
  • x + 2y ≤ 24(成本)
  • 2x + y ≤ 24(劳动)

4. Graphing Inequalities on the Coordinate Plane | 在坐标平面上绘制不等式图形

To graph an inequality, first draw the boundary line as if it were an equation. For x + y ≤ 20, draw the line x + y = 20 by finding its intercepts: when x=0, y=20; when y=0, x=20. Connect these points with a solid line because the sign includes ‘equal to’.

要画一个不等式的图形,首先画出边界线,就像它是一个等式一样。对于 x + y ≤ 20,通过寻找截距画出直线 x + y = 20:当 x=0 时,y=20;当 y=0 时,x=20。用实线连接这些点,因为符号包含“等于”。

Then decide which side of the line to shade. Pick a test point not on the line – the origin (0,0) is often easiest. Substitute into the inequality: 0 + 0 ≤ 20 is true, so shade the side containing (0,0). Do the same for x + 2y ≤ 24: line through (24,0) and (0,12). Test (0,0): 0 + 0 ≤ 24, true, so shade towards the origin. For 2x + y ≤ 24: line through (12,0) and (0,24). Test (0,0): 0 ≤ 24, true, shade towards origin. The non-negativity constraints mean we only consider the first quadrant (x ≥ 0, y ≥ 0).

然后确定直线的哪一侧需要涂色。选择一个不在直线上的测试点——通常原点 (0,0) 最简单。代入不等式:0 + 0 ≤ 20 为真,所以对包含 (0,0) 的一侧涂色。对 x + 2y ≤ 24 同理:经过 (24,0) 和 (0,12) 的直线。测试 (0,0):0 + 0 ≤ 24 为真,因此向原点侧涂色。对于 2x + y ≤ 24:直线经过 (12,0) 和 (0,24)。测试 (0,0):0 ≤ 24 为真,向原点侧涂色。非负约束意味着我们只考虑第一象限(x ≥ 0,y ≥ 0)。


5. Identifying the Feasible Region | 识别可行区域

The feasible region is the area where all the shaded parts overlap. It represents every combination of x and y that satisfies all the constraints at once. In our farm problem, the feasible region is a polygon with straight edges. Its boundaries are the axes and parts of the three lines.

可行区域是所有涂色部分重叠的区域。它代表了每一个同时满足所有约束条件的 x 和 y 的组合。在我们的农场问题中,可行区域是一个具有直线边界的多边形。其边界由坐标轴以及三条直线的一部分组成。

To find the vertices of this region, solve pairs of boundary equations. For example, where x=0 meets x+2y=24, substitute x=0 to get y=12, giving the point (0,12). Where x+2y=24 and 2x+y=24 meet, solve the system. Multiply the first by 2: 2x+4y=48, subtract the second: (2x+4y) – (2x+y) = 48 – 24 ⇒ 3y=24 ⇒ y=8. Then x+16=24 ⇒ x=8. So point (8,8). Also find where 2x+y=24 meets x-axis (y=0): 2x=24 ⇒ x=12, point (12,0). Another vertex is where x+y=20 crosses within the region, but that line is not binding here because the other constraints cut it off. Actually the feasible region vertices are (0,0), (0,12), (8,8), (12,0). Verify (0,0) is not optimal but is a corner.

要找到这个区域的顶点,需要求解成对的边界方程。例如,在 x=0 与 x+2y=24 相交处,代入 x=0 得到 y=12,即点 (0,12)。在 x+2y=24 和 2x+y=24 相交处,联立方程求解:将第一个方程乘以 2 得 2x+4y=48,减去第二个方程:(2x+4y) – (2x+y) = 48 – 24 ⇒ 3y=24 ⇒ y=8,然后 x+16=24 ⇒ x=8,所以点为 (8,8)。同时找到 2x+y=24 与 x 轴 (y=0) 的交点:2x=24 ⇒ x=12,点 (12,0)。另一个顶点为 x+y=20 与区域相交处,但这条线在这里并不起约束作用,因为其他约束已经切割了它。实际上可行区域的顶点为 (0,0)、(0,12)、(8,8)、(12,0)。验证 (0,0) 并不是最优解,但它是一个顶点。


6. Introducing the Objective Function | 引入目标函数

The objective function is the formula we want to maximise or minimise. For the farmer, it is the total profit: P = 60x + 80y. This is also a linear expression, so its graph would be a straight line on the plane. We need to find the point within the feasible region that gives the highest value of P.

目标函数是我们想要最大化或最小化的公式。对于农民来说,它就是总利润:P = 60x + 80y。这也是一个线性表达式,因此它在平面上的图形将是一条直线。我们需要找到可行区域内能使 P 值最大的点。

The idea behind linear programming is that the maximum (or minimum) of a linear objective function over a convex polygon will always occur at a vertex, or corner point. So we only need to test the vertices of the feasible region, not every single point inside.

线性规划的核心思想是:在一个凸多边形上,线性目标函数的最大值(或最小值)总是出现在多边形的某个顶点或角点上。因此我们只需要测试可行区域的顶点,而不需要测试区域内的每一个点。


7. Testing Vertices of the Feasible Region | 测试可行区域的顶点

We have identified four vertices: (0,0), (0,12), (8,8), and (12,0). Now we calculate the profit P at each point.

我们已经确定了四个顶点:(0,0)、(0,12)、(8,8) 和 (12,0)。现在我们计算每个点处的利润 P。

Vertex (Point) Calculation Profit P (£)
(0,0) 60×0 + 80×0 0
(0,12) 60×0 + 80×12 960
(8,8) 60×8 + 80×8 1120
(12,0) 60×12 + 80×0 720

The highest profit among these is £1120 at the point (8,8). So planting 8 hectares of wheat and 8 hectares of barley gives maximum profit.

在这些顶点中,最大利润是 1120 英镑,出现在点 (8,8) 处。因此种植 8 公顷小麦和 8 公顷大麦能获得最大利润。


8. Finding the Optimal Solution | 求最优解

The optimal solution is the combination of x and y that gives the highest possible value of the objective function while satisfying all constraints. In this case, (8,8) is optimal. We should always check whether the solution makes practical sense: can the farmer plant exactly 8 hectares of each? Yes, fractions are allowed unless stated otherwise. If only whole numbers are allowed (integer programming), then we must test points around the vertices.

最优解是既满足所有约束条件,又使目标函数取得最大可能值的 x 和 y 的组合。在本例中,(8,8) 是最优解。我们始终应该检查这一解是否在实际中合理:农民能够各自正好种植 8 公顷吗?可以,除非另有说明,否则允许出现分数。如果只允许整数(整数规划),那么我们必须测试顶点附近的整数点。

Often in KS3 problems, solutions will be whole numbers, but the method still works with decimals. The key insight is that we only needed to test the corners of the feasible region – not randomly guess values.

在 KS3 问题中,解通常是整数,但涉及小数时该方法依然有效。关键的启示是:我们只需要测试可行区域的角点,而不需要随意猜测数值。


9. Checking Integer Solutions | 检验整数解

Sometimes the variables must be integers, such as when you cannot plant a fraction of a tree. In that case, we look for integer coordinate points inside or on the boundary of the feasible region that are nearest to the optimal vertex and still give a high profit. In our problem, (8,8) is already integer, so it works. But if the optimal vertex had been, say, (7.5, 8.2), we would test nearby integer points like (7,8), (8,8), (7,9), etc., making sure they are feasible, and pick the one with the highest profit.

有时变量必须是整数,例如你不可能种植一小部分树木。在这种情况下,我们寻找可行区域内或边界上最靠近最优顶点的整数坐标点,同时使其仍能给出较高利润。在我们的问题中,(8,8) 已经是整数,所以适用。但如果最优顶点是 (7.5, 8.2),我们就要测试附近的整数点,如 (7,8)、(8,8)、(7,9) 等,确保这些点在可行区域内,然后选择利润最高的那个。

This integer-checking step is a simple extension that KS3 students can try with small numbers. Always draw or list the nearby integer points and test them in the constraints before substituting into the objective function.

这个整数检验步骤是一个简单的延伸,KS3 学生可以使用较小的数字来尝试。始终画出或列出附近的整数点,在代入目标函数之前先用约束条件检验它们。


10. Summary of Steps | 步骤总结

Here is a summary of the linear programming method you can use for KS3 problems:

以下是你可以用于 KS3 问题的线性规划方法总结:

  • Define the variables: State clearly what x and y represent.
  • Write the constraints: Translate the worded limits into inequalities, including x ≥ 0, y ≥ 0.
  • Graph the inequalities: Draw boundary lines and shade the correct side for each.
  • Identify the feasible region: Find the polygon where all shades overlap.
  • List the vertices: Work out the corner points by solving pairs of boundary equations.
  • Write the objective function: The expression you want to maximise or minimise.
  • Test the vertices: Substitute each vertex into the objective function and find the best value.
  • Check integer requirements: If needed, test integer points around the optimal vertex.
  • 定义变量:清楚说明 x 和 y 代表什么。
  • 写出约束条件:将文字限制转化为不等式,包括 x ≥ 0,y ≥ 0。
  • 画出不等式图形:画出边界线,并对每一侧正确涂色。
  • 识别可行区域:找出所有颜色重叠的多边形区域。
  • 列出顶点:通过解边界线方程组求出角点。
  • 写出目标函数:你想要最大化或最小化的表达式。
  • 测试顶点:将每个顶点代入目标函数,找出最优值。
  • 检查整数要求:如有必要,测试最优顶点附近的整数点。

11. Practice Problem | 练习题

Try this problem on your own. A baker makes two types of cake: chocolate (x) and vanilla (y). Each chocolate cake needs 2 eggs and 3 cups of flour. Each vanilla cake needs 3 eggs and 2 cups of flour. The baker has 24 eggs and 24 cups of flour. The profit is £5 per chocolate cake and £4 per vanilla cake. How many of each should the baker make to maximise profit? (Assume the cakes can be fractional if you like, but you can also find the best integer answer.)

试着自己解决这个问题。一位面包师制作两种蛋糕:巧克力蛋糕(x)和香草蛋糕(y)。每个巧克力蛋糕需要 2 个鸡蛋和 3 杯面粉。每个香草蛋糕需要 3 个鸡蛋和 2 杯面粉。面包师有 24 个鸡蛋和 24 杯面粉。每个巧克力蛋糕利润为 5 英镑,每个香草蛋糕利润为 4 英镑。面包师各应制作多少个才能获得最大利润?(如果你想,可以允许蛋糕数量为分数,但你也可以找出最佳的整数解。)

Write down the inequalities: 2x + 3y ≤ 24 (eggs), 3x + 2y ≤ 24 (flour), x ≥ 0, y ≥ 0. Objective: P = 5x + 4y. Graph, find feasible region vertices: (0,0), (0,8), (6,4) [where 2x+3y=24 and 3x+2y=24], (8,0). Test profits: (0,8) gives 32; (6,4) gives 46; (8,0) gives 40. Max is 46 at (6,4) which is integer. So 6 chocolate, 4 vanilla cakes.

写出不等式:2x + 3y ≤ 24(鸡蛋),3x + 2y ≤ 24(面粉),x ≥ 0,y ≥ 0。目标函数:P = 5x + 4y。画图,找出可行区域顶点:(0,0)、(0,8)、(6,4) [2x+3y=24 与 3x+2y=24 的交点]、(8,0)。测试利润:(0,8) 为 32;(6,4) 为 46;(8,0) 为 40。最大值在 (6,4),利润 46,是整数。因此,制作 6 个巧克力蛋糕和 4 个香草蛋糕。


12. Key Takeaways | 重点回顾

Linear programming gives you a structured way to solve real-world optimisation problems. The core ideas at KS3 are to translate word problems into inequalities, draw a clear graph, find the overlapping region, and evaluate the objective function at the vertices. Remember that the best answer lies at a corner of the feasible region. This technique builds a strong foundation for GCSE and beyond, where you will meet more complex constraints and even cases where you want to minimise costs.

线性规划为你提供了一种结构化的方法来解决现实中的优化问题。在 KS3 阶段,核心思想是将文字问题转化为不等式,画出清晰的图形,找出重叠区域,并在顶点处计算目标函数的值。记住,最优解总是位于可行区域的某个角点上。这一技巧为 GCSE 及更高阶段的学习打下了坚实的基础,届时你将遇到更复杂的约束条件,甚至需要最小化成本的情况。

Published by TutorHao | Mathematics Revision Series | aleveler.com

更多咨询请联系16621398022(同微信)

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading