Designing Under Constraints

Watch the video explainer

Learning goals

  • Identify constraints, feasible designs, and an objective in a design problem
  • Compare fencing layouts under a fixed budget and a changed site assumption
  • Count the most items that fit within a specified packing layout family
  • Justify a proven optimum over a stated set of possible dimensions
  • Revise a packaging recommendation when an estimate of waste changes

Find the designs you can use

A constraint is a requirement a design must meet. For a garden, a spending limit and the available space are both constraints. A feasible design satisfies every constraint. The objective is what you want to make as large or as small as possible among the feasible designs. For the garden, it could be the area available to plant.

An assumption helps turn the real situation into something you can calculate. If you count the whole area inside the fence as plantable, for instance, you are assuming the model can ignore paths. When the design changes, keep track of which requirements and assumptions your calculation uses.

Worked example 1 Compare three garden plans

Problem. A school has a fencing budget of 408408 dollars for a rectangular garden. The two edges parallel to the sidewalk cost 1212 dollars per meter each. The two edges perpendicular to it cost 88 dollars per meter each. Assume the site can fit all three proposals below, fence can be bought in the exact lengths needed, and the full enclosed area is plantable.

  • Plan A. 1212 m parallel to the sidewalk by 66 m perpendicular.
  • Plan B. 1010 m parallel by 1010 m perpendicular.
  • Plan C. 1212 m parallel by 99 m perpendicular.

Find the cost and area of each plan. Which feasible proposal has the most planting area?

Three proposals for the same fencing budgetThe horizontal sides cost 12 dollars per meter and the vertical sides cost 8 dollars per meter. Dimensions are labeled for each plan.Plan APlan BPlan C12 m10 m12 m6 m10 m9 mHorizontal edges run along the sidewalk direction
The top and bottom edges are parallel to the sidewalk. Try calculating the price of those two edges before adding the cost of the ends.

Solution. Call the dimension parallel to the sidewalk ss and the perpendicular dimension dd, both in meters. Multiply each dimension by its rate and by two because the fence has two edges of each kind.

Cost in dollars=2(12s)+2(8d),Area in square meters=sd.\begin{aligned} \text{Cost in dollars}&=2(12s)+2(8d),\\ \text{Area in square meters}&=sd. \end{aligned}

For A, the cost is 2(12)(12)+2(8)(6)2(12)(12)+2(8)(6) dollars, or 384384 dollars. Its area is 12(6)12(6) square meters, or 7272 square meters.

For B, 2(12)(10)+2(8)(10)2(12)(10)+2(8)(10) gives a cost of 400400 dollars. Its area is 10(10)10(10) square meters, or 100100 square meters.

For C, 2(12)(12)+2(8)(9)2(12)(12)+2(8)(9) gives a cost of 432432 dollars. Its area is 12(9)12(9) square meters, or 108108 square meters.

PlanDimensions (m)Area (square m)Cost (dollars)Feasible?
A1212 by 667272384384Yes
B1010 by 1010100100400400Yes
C1212 by 99108108432432No

B gives the most planting area among the feasible proposals. C has more area, but its cost exceeds the cap. A leaves more money unspent, but the objective is planting area.

Check your understanding

A design costs exactly the budget, fits the site, and meets every other requirement. Its area is smaller than another feasible design's. How should you classify it?

Answer choices

Recheck feasibility when the site changes

A best tested design wins among the feasible designs you actually compared. A proven optimum wins over every design allowed by the model. When the allowed choices really are a short list, checking every one can prove the optimum. If your list is a sample, you need another argument to cover the designs you left out.

Worked example 2 Use an existing fence

Problem. The school reconsiders the same three garden plans. It still has a 408408 dollar cap. Previously, each of the two edges parallel to the sidewalk cost 1212 dollars per meter and each of the two perpendicular edges cost 88 dollars per meter. An existing fence can supply one whole parallel edge of any proposal at no cost. The other rates, dimensions, and planting areas stay the same.

  • Plan A. 1212 m parallel by 66 m perpendicular. Its old cost was 384384 dollars.
  • Plan B. 1010 m parallel by 1010 m perpendicular. Its old cost was 400400 dollars.
  • Plan C. 1212 m parallel by 99 m perpendicular. Its old cost was 432432 dollars.

Find the new costs and choose the feasible proposal with the most planting area. What can you conclude if the three plans are only a sample?

Solution. Each plan saves 1212 dollars for every meter of one parallel edge. The savings are 144144 dollars for A and C and 120120 dollars for B.

PlanArea (square m)Four new edgesOne edge supplied
A7272384384 dollars, fits budget240240 dollars, fits budget
B100100400400 dollars, fits budget280280 dollars, fits budget
C108108432432 dollars, over budget288288 dollars, fits budget

C now meets the budget. It is the best tested plan because its area is greater than the other two areas. Its area was already greatest of the three before the change. Using the existing fence made that area affordable.

If the list is a sample, the recommendation applies to these three plans. To claim a proven optimum, we would need to know the full range of layouts the site permits and show that none of them can do better.

Check your understanding

Four layouts are tested for a room. They all fit, and the fourth seats the most people. What extra fact would make the seating maximum a proven optimum from the table alone?

Answer choices

Count a packing family

A layout family is a set of layouts that follow the same placement rules. Rules about rows, orientation, and clearance can turn a packing question into a count you can check completely.

Worked example 3 Pack tiles in two kinds of rows

Problem. A tray is 2727 cm wide and 1919 cm deep inside. Each rectangular tile is 88 cm by 55 cm. Use one layer with edges parallel to the tray edges. Each row runs across the tray width and has just one tile orientation. Rows may differ in orientation. Tiles can touch, and rows cannot overlap. What is the most tiles that fit under these rules?

The two orientations for a rowBoth outlines represent the same 8 by 5 centimeter tile.8 cm5 cm5 cm8 cm5 cm deep8 cm deep
One tile shown in each allowed orientation. The row width runs left to right.

Solution. A 55 cm deep row holds 33 tiles across. Three widths of 88 cm use 2424 cm, and a fourth would need 3232 cm. An 88 cm deep row holds 55 tiles across. Five widths of 55 cm use 2525 cm, and a sixth would need 3030 cm.

At most two 88 cm deep rows can fit in 1919 cm. For each possible number, fill the remaining depth with as many 55 cm deep rows as will fit.

Number of 8 cm deep rowsRemaining depth (cm)Number of 5 cm deep rowsTiles
0019193399
111111221111
2233001010

The maximum in this layout family is 1111 tiles. One 88 cm row and two 55 cm rows use 1818 cm of depth and achieve that count. The cases cover all allowed row counts. For layouts that break these row rules, the table gives no upper bound. A different argument would be needed to decide whether any such layout can hold more.

Check your understanding

A tray is 1919 cm across. Each package in a particular row needs 66 cm across. What maximum row count can you certify?

Answer choices

Prove a minimum when dimensions can vary

When dimensions may be any positive real numbers that satisfy the constraints, a few test sizes can suggest a choice. To prove it is best, look for a bound that applies to every feasible size and check whether one feasible size reaches it.

Worked example 4 Find the least board for a divided box

Problem. A closed rectangular box with a lid needs 480 cm3480\text{ cm}^3 of total inside volume and a height of 55 cm. It has a full-height divider spanning the width. The box width can be any positive length up to 99 cm, and there is no separate length limit. Ignore board thickness, overlaps, and cutting waste. Find the length and width that use the least board for the six outside faces and the divider. Prove the minimum and give the board area.

Where the divider goesThe box has two outside walls that span the width plus the divider. The two other walls run along the length.wℓDivider
Top view with the lid removed, drawn schematically. The dashed divider spans the width w and has the same height as the sides.

Solution. Measure the width ww and length ℓ\ell in centimeters. The height and volume fix the base area at 9696 square centimeters.

wℓ=4805.w\ell=\frac{480}{5}.

The base and lid together need 192192 square centimeters of board. Two walls and the divider each have area 5w5w. The other two walls each have area 5ℓ5\ell. Therefore the board area in square centimeters is

S=192+5(3w+2ℓ).S=192+5(3w+2\ell).

A board-area bound for every feasible width#

Try width 66 cm and length 1616 cm. The two terms 3w3w and 2ℓ2\ell have numerical values 1818 and 3232. Their product is 576576 and their sum is 5050. Compare that with two equal terms of 2424: their product is also 576576, but their sum is only 4848.

For any feasible width, put a=3wa=3w and b=2ℓb=2\ell. Their product is always 576576 because wℓw\ell is fixed at 9696. The identity below compares their sum with their difference.

(a+b)2=4ab+(a−b)2,(a+b)2=2304+(a−b)2.\begin{aligned} (a+b)^2&=4ab+(a-b)^2,\\ (a+b)^2&=2304+(a-b)^2. \end{aligned}

The square of the difference is at least zero. Since both terms are positive, their sum is at least 4848. The bound is reached when the difference vanishes, so the two terms must both be 2424. This requires width 88 cm and length 1212 cm. The width meets the 99 cm cap, and the volume is 8⋅12⋅58\cdot12\cdot5 cubic centimeters, or 480480 cubic centimeters. The equality case is therefore feasible.

The minimum board area is 192+5(48)192+5(48) square centimeters, or 432432 square centimeters. Every permitted size was covered because the proof used only the fixed product and positivity before checking the width cap at the equality case.

Check your understanding

A proof gives a lower bound of 432432 square centimeters for a box design, attained only at width 88 cm. A revised rule allows widths up to 77 cm. What does that proof still establish?

Answer choices

Revise the cost calculation

Material and cost can rank two designs differently. A supplier might charge for cutting as well as for the board itself. And if a cut wastes material, the paid-for area can exceed the area that ends up in the box.

Worked example 5 Price the board that gets thrown away

Problem. A shop can order either of two closed rectangular packages. It needs exactly 480 cm3480\text{ cm}^3 of capacity, and both designs fit the shelf. The board costs 0.50.5 cents per square centimeter of board used or wasted. Each package also has a fixed cutting fee. Initially the shop budgets for no waste.

  • Design A. Inside dimensions 1212 cm by 1010 cm by 44 cm. Cutting fee 1212 cents.
  • Design B. Inside dimensions 1010 cm by 88 cm by 66 cm. Cutting fee 3636 cents.

Ignore board thickness and overlaps. Which package costs less per unit at first? Which costs less if A needs an extra 12 cm212\text{ cm}^2 of board per package for waste and B still has no waste?

Solution. The products 12⋅10⋅412\cdot10\cdot4 and 10⋅8⋅610\cdot8\cdot6 both give 480 cm3480\text{ cm}^3, so both packages meet the capacity requirement.

For A, the six faces use 2(120+48+40)2(120+48+40) square centimeters of board, or 416416 square centimeters.

For B, they use 2(80+60+48)2(80+60+48) square centimeters, or 376376 square centimeters.

Multiply the purchased area by 0.50.5 and add the cutting fee to get the cost in cents.

For A, 0.5(416)+120.5(416)+12 gives 220220 cents initially.

For B, 0.5(376)+360.5(376)+36 gives 224224 cents initially.

The revised estimate adds 66 cents to A because the shop pays for 1212 more square centimeters.

DesignBoard in package (square cm)Cost with no waste (cents)Cost with revised waste (cents)
A416416220220226226
B376376224224224224

A is cheaper at first by 44 cents per package. With the revised waste estimate, B is cheaper by 22 cents. An additional 88 square centimeters for A would add exactly 44 cents, enough for a tie. That threshold shows how sensitive the first decision is to the waste estimate.

Check your understanding

One package is 66 cents cheaper than another. Only the cheaper design needs an extra 2020 square centimeters of board. At 0.300.30 cents per square centimeter, what happens to the cost comparison?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

In 1785, the Continental Congress debated how to survey western land acquired from Indigenous nations. One draft called for square townships seven miles on a side. William Grayson moved to reduce the side to six miles, and James Monroe seconded him. The final ordinance set the side at six miles. A full township could be divided into thirty-six one-mile-square lots.

The approved plan told surveyors to run lines north and south and cross them at right angles. It also allowed surveyors to depart from the grid where the boundaries of land purchases from Indigenous nations made the grid impracticable. The same ordinance that set out the square grid told surveyors when they could depart from it. Congressional debate, volume 28, pages 327 to 328 and Land Ordinance of May 20, 1785

Your progress

See all your progress →