Constraint System Examples: 43 Problems with Answers

Worked examples of Constraint System to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

medium
Find all values of (x,y) satisfying x+y=10, x≥0, and y≥0.
Show solution

Answer

All (x,10−x) where 0≤x≤10.

First step

1.
From x+y=10: y=10−x.

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Free: full solutions on 3 topics a day. No card.

Every topic, every day: the Family plan

Example 2

hard
A shop sells notebooks for $3 and pens for $1. You have $12 and want at least 2 notebooks. How many pens can you buy?

Example 3

medium
Solve the system x+y=11, x−y=3.

Example 4

medium
Solve 3x+4y=20 and x=4.

Example 5

medium
Solve 5x−2y=1 and 3x+2y=23.

Example 6

hard
Maximize x+2y subject to x≤4, y≤5, x,y≥0.

Example 7

challenge
A vending machine accepts only nickels and dimes. You insert $0.85 in exactly 11 coins. How many of each?

Practice Problems

Try each one, then open the solution to compare your method.

Example 1

easy
List the integer solutions of x+y=5 with x≥1 and y≥1.

Example 2

medium
Is (3,4) in the feasible region of x+y≤8 and x≥2?

Example 3

easy
Does x=4 satisfy both x>0 and x<10?

Example 4

easy
Does x=−2 satisfy x>0 and x<5?

Example 5

easy
Which integer satisfies both x≥2 and x≤2?

Example 6

easy
If x+y=5 and x=2, find y.

Example 7

easy
List the integers satisfying both x>1 and x<4.

Example 8

easy
Does (x,y)=(1,1) satisfy x+y=2 and x−y=0?

Example 9

easy
A length x satisfies x<10. What implicit constraint also applies?

Example 10

easy
Is x=6 in the solution set of the system x≥5 and x≤8?

Example 11

medium
Solve the system x+y=10, x−y=4.

Example 12

medium
Find all integers x with x>0, x≤6, and x even.

Example 13

medium
Solve 2x+y=8 and y=x−1 simultaneously.

Example 14

medium
A number x satisfies x>0, x+y=10, and y≤6. Find the smallest allowed x.

Example 15

medium
Solve the system x+2y=7, 3x−2y=5.

Example 16

medium
Determine whether the system x+y=4, x+y=6 has a solution.

Example 17

challenge
Find all (x,y) with x,y≥0 integers and 2x+3y=12.

Example 18

challenge
For what value of k does the system x+y=4, 2x+2y=k have infinitely many solutions?

Example 19

challenge
Maximize x+y subject to x≤3, y≤5, and x,y≥0.

Example 20

medium
Solve x−y=1 and x+y=7.

Example 21

medium
Find integers with x≥1, x≤5, and x odd.

Example 22

medium
Solve y=2x and x+y=9.

Example 23

easy
List integers x satisfying x≥3 and x≤6.

Example 24

easy
Does x=0 satisfy x>0 and x<4?

Example 25

easy
What is the only integer satisfying both x≥5 and x≤5?

Example 26

medium
Solve 2x+y=9 and x−y=0.

Example 27

medium
Find integer pairs with x+y=6 and x,y≥0.

Example 28

medium
Determine whether x+2y=7 and 2x+4y=10 has a solution.

Example 29

medium
Find (x,y) with x≥0, y≥0, and x+y=7 that maximizes x.

Example 30

medium
List integer (x,y) with x+y≤3, x≥0, y≥0.

Example 31

medium
Solve x+y=10, x−y=−2.

Example 32

hard
Find all integers (x,y) with x,y≥0 and 3x+5y=30.

Example 33

hard
Find k so that x+y=5 and 2x+2y=k have infinitely many solutions.

Example 34

hard
Solve x+y+z=6, y=2, z=1.

Example 35

challenge
How many lattice points satisfy x+y≤4 with x,y≥0 integer?

Example 36

challenge
Solve x+y+z=9, x=y, z=2y.

What to focus on

Core idea: A constraint system requires the same values to satisfy every equation and inequality simultaneously.

Common stuck point: The procedure for constraint system is the easy part; the trap is satisfying some constraints but not all. Asking "Must the same values satisfy multiple conditions at the same time?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Ask yourself: Must the same values satisfy multiple conditions at the same time?

Concept recap

A collection of equations and inequalities that must ALL be satisfied simultaneously by the same set of variable values.

Picture a stack of sieves, one per condition. Pour in every possible pair of values; each sieve lets through only the values that pass its test. Whatever reaches the bottom is the feasible set. If the holes in different sieves don't line up anywhere, nothing gets through, and the system has no solution.

Read the full lesson on Constraint System

Constraint System is covered with related ideas in the guide Solving Systems of Equations: Substitution, Elimination, and Matrices.

Background knowledge

These ideas may be useful before you work through the harder examples.

systems of equationsinequalities