S3-SA5-0143
What is Visualising Constraints in Optimisation?
Grade Level:
Class 10
AI/ML, Data Science, Physics, Economics, Cryptography, Computer Science, Engineering
Definition
What is it?
Visualising Constraints in Optimisation means drawing pictures or graphs to understand the limits and rules (constraints) in a problem where you're trying to find the best possible outcome (optimisation). It helps you see the 'allowed' region for your solutions. This visual method makes complex problems much easier to grasp.
Simple Example
Quick Example
Imagine you have a budget of Rs. 100 to buy pens and notebooks. Pens cost Rs. 10 each and notebooks cost Rs. 20 each. You can't spend more than Rs. 100. If you draw a graph where one axis is pens and the other is notebooks, you can draw a line representing your Rs. 100 limit. All the points below or on this line show the combinations you can afford, helping you visualise your spending constraints.
Worked Example
Step-by-Step
Let's say a small snack shop makes Samosas (S) and Kachoris (K). Each Samosa needs 2 minutes to make, and each Kachori needs 3 minutes. The cook has a total of 30 minutes. Also, due to ingredient limits, they can make at most 10 Samosas and at most 8 Kachoris. We want to visualise these constraints.
1. First, identify the variables: S = number of Samosas, K = number of Kachoris.
2. Write down the constraints as inequalities:
- Time constraint: 2S + 3K <= 30 (Total time for Samosas + Total time for Kachoris must be less than or equal to 30 minutes)
- Samosa limit: S <= 10 (Number of Samosas must be less than or equal to 10)
- Kachori limit: K <= 8 (Number of Kachoris must be less than or equal to 8)
- Non-negativity: S >= 0, K >= 0 (You can't make negative Samosas or Kachoris)
3. Set up a graph with S on the x-axis and K on the y-axis.
4. Plot the line for the time constraint: 2S + 3K = 30. To do this, find two points: If S=0, 3K=30 => K=10. Point (0, 10). If K=0, 2S=30 => S=15. Point (15, 0). Draw a line connecting (0, 10) and (15, 0).
5. Shade the region below this line because 2S + 3K <= 30 means any point below or on the line is allowed.
6. Plot the line for S <= 10: This is a vertical line at S=10. Shade the region to the left of this line.
7. Plot the line for K <= 8: This is a horizontal line at K=8. Shade the region below this line.
8. The feasible region (the area where all shaded parts overlap, including S >= 0 and K >= 0) is a polygon. Any point (S, K) inside or on the boundary of this polygon represents a valid combination of Samosas and Kachoris that satisfies all conditions. This polygon is your visual representation of the constraints.
ANSWER: The feasible region, bounded by the lines 2S + 3K = 30, S = 10, K = 8, S = 0, and K = 0, visually represents all possible combinations of Samosas and Kachoris that the shop can make within the given limits.
Why It Matters
Visualising constraints is super important in fields like AI/ML, Data Science, and Engineering because it helps designers and engineers quickly understand the boundaries of a problem. For example, it's used to decide how to best allocate resources in a factory or plan efficient delivery routes for apps like Swiggy or Zomato, helping people get their orders faster and saving fuel.
Common Mistakes
MISTAKE: Not considering the non-negativity constraints (like x >= 0, y >= 0) and drawing lines into negative regions. | CORRECTION: Always remember that quantities like number of items, time, or distance cannot be negative. Your feasible region will always be in the first quadrant (where both x and y are positive) for most real-world problems.
MISTAKE: Shading the wrong side of an inequality line (e.g., shading above for '<=' or below for '>='). | CORRECTION: To check which side to shade, pick a test point (like (0,0) if it's not on the line). Substitute its coordinates into the inequality. If the inequality is true, shade the side containing the test point; if false, shade the other side.
MISTAKE: Drawing a line for an inequality (like 'x <= 5') as a point or a region, instead of a boundary line. | CORRECTION: An inequality constraint like 'x <= 5' means 'x = 5' is the boundary line, and 'x < 5' is the region. Always draw the equality part first as a line, then determine the region.
Practice Questions
Try It Yourself
QUESTION: A baker needs to make cakes (C) and cookies (K). They have 100 grams of sugar. Each cake needs 20g sugar, and each cookie needs 10g sugar. Write the sugar constraint as an inequality and describe how you'd visualise it. | ANSWER: Inequality: 20C + 10K <= 100. Visualisation: Draw a graph with C on the x-axis and K on the y-axis. Plot the line 20C + 10K = 100 (e.g., points (0,10) and (5,0)). Shade the region below this line (and in the first quadrant).
QUESTION: For the baker in Q1, they also know they can make at most 4 cakes. Add this constraint to your visualisation. What does the new feasible region look like? | ANSWER: New constraint: C <= 4. Visualisation: On the same graph, draw a vertical line at C=4. The feasible region will now be the area where 20C + 10K <= 100, C <= 4, C >= 0, and K >= 0 all overlap. It will be a smaller polygon.
QUESTION: A t-shirt printer can print at most 50 t-shirts per day. They make two types: Type A (profit Rs. 50) and Type B (profit Rs. 70). Printing Type A takes 1 minute, Type B takes 2 minutes. They have 80 minutes of printing time available. Visualise all constraints. | ANSWER: Let A = number of Type A t-shirts, B = number of Type B t-shirts. Constraints: A + B <= 50 (total t-shirts), A + 2B <= 80 (total time), A >= 0, B >= 0. Visualisation: Draw a graph with A on x-axis, B on y-axis. Plot lines A+B=50 (e.g., (0,50), (50,0)) and A+2B=80 (e.g., (0,40), (80,0)). Shade the region below both lines in the first quadrant. The feasible region will be the overlapping polygon.
MCQ
Quick Quiz
Which of the following is NOT a typical constraint in an optimisation problem?
Budget limit
Time availability
Profit margin
Resource quantity
The Correct Answer Is:
C
Budget, time, and resource quantity are common limits or rules that define the boundaries of what's possible, making them constraints. Profit margin is usually what you are trying to maximise or minimise (the objective function), not a constraint itself.
Real World Connection
In the Real World
Imagine a logistics company like Delhivery or Ecom Express planning delivery routes for their vans. They need to deliver packages to many locations while facing constraints like the van's fuel capacity, the driver's working hours, and the time windows for deliveries. Visualising these constraints, often using mapping software, helps them find the most efficient route to save fuel and deliver on time, making sure your online orders reach you quickly!
Key Vocabulary
Key Terms
Optimisation: Finding the best possible solution (maximum profit, minimum cost) | Constraint: A limit or restriction in a problem | Feasible Region: The area on a graph that satisfies all constraints simultaneously | Inequality: A mathematical statement showing that two values are not equal (e.g., x < 5 or y >= 10) | Objective Function: The equation you want to maximise or minimise (e.g., profit = 50x + 70y)
What's Next
What to Learn Next
Next, you should learn about 'Linear Programming'. Once you can visualise constraints, Linear Programming will teach you how to use that feasible region to find the absolute best solution (like maximum profit or minimum cost) for your problem, which is the ultimate goal of optimisation. It's super exciting!


