Skip to content
Tutorials Center
My learning

Topics

Lesson 43 of 46 ยท Projects and Practice

Practice set: six modelling problems

Six practice problems covering ODEs, logistic harvesting, linear programming, queues, Markov chains and sensitivity, each with a hint and a runnable answer check.

Now it is your turn. Here are six problems, one for each major idea of the chapters 5 to 8. Try each on paper (or in your head) first, using the hint if you are stuck. Then run the answer-check code to compare. The code is not the answer key to memorize: each cell shows how a computer would verify your reasoning.

Six numbered cards naming the practice problems: cooling coffee, fish farm, delivery routes, bus stop, board game and which input matters.
The six problems and the tool each one needs.

What you will learn

  • To choose the right tool (ODE, logistic, LP, queue, Markov chain, sensitivity) from a word problem.
  • To check a hand calculation with a few lines of code.
  • To explain each answer in a sentence with units.

Key terms

Formulation: turning a word problem into variables, equations and an objective.

Sanity check: a quick test that the answer has plausible size and units.

Limiting case: a special case (zero, very large) where the answer is known.

The problems

Problem 1: Cooling coffee. A cup of coffee at 85 ยฐC is left in a 22 ยฐC room. After 8 minutes it is 61 ยฐC. Assume Newton's law of cooling. (a) Find the cooling constant k. (b) When will the coffee reach 40 ยฐC?

Hint: the gap T โˆ’ 22 decays like e^(โˆ’kยทt). Write the gap at t = 0 and t = 8 and divide.

Problem 2: Fish farm. A pond's fish population follows a logistic model with r = 0.6 per year and carrying capacity K = 2000 kg. (a) What is the maximum sustainable constant harvest? (b) With a constant harvest of 250 kg per year, find the two equilibria and say which is stable. (c) With harvest proportional to the stock, EยทN with E = 0.3 per year, find the equilibrium stock and the yield.

Hint: use H_max = rK/4, the quadratic formula and N* = K(1 โˆ’ E/r).

Problem 3: A bakery plan. A bakery makes loaves (profit 2 dollars each) and cakes (profit 5 dollars each). A loaf needs 1 kg of flour and 0.5 oven-hours; a cake needs 0.5 kg of flour and 1 oven-hour. There are 60 kg of flour and 50 oven-hours per day. How many of each should it bake to maximize profit?

Hint: write two constraints, sketch the polygon, evaluate the profit at each corner.

Problem 4: A ticket machine. Customers arrive at a ticket machine at 1.2 per minute and the machine serves 1.5 per minute (M/M/1). Find the load, the average wait in the line and the average total time.

Hint: ฯ = ฮป/ฮผ, W_q = ฯ/(ฮผ โˆ’ ฮป), W = 1/(ฮผ โˆ’ ฮป).

Problem 5: A board game. A token moves among three squares Home, Shop and School with transition matrix rows (0.5, 0.5, 0), (0.25, 0.5, 0.25), (0, 0.5, 0.5). In the long run, what fraction of turns does it spend on each square?

Hint: solve ฯ€ยทP = ฯ€ with ฮฃฯ€ = 1.

Problem 6: Which input matters? In the fish-farm model with proportional harvest, the equilibrium stock is N* = K(1 โˆ’ E/r). By what percentage does N* change if E rises by 10 percent from 0.3? Compute the elasticity.

Hint: elasticity = (dN*/dE)ยท(E/N*).

Answers and checks

Python Problems 1 and 2: ODE and logistic checks

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Problems 3 and 4: linear program and queue

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Problems 5 and 6: Markov chain and elasticity

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common misconceptions

"If the code gives the number, I understand the problem." The code checks the arithmetic, not the formulation. Always ask: do the units work, and is the answer plausible?

"The elasticity is small because the effort changed by only 10 percent." Elasticities describe percent per percent. Here a 10 percent rise in effort reduces the stock by 10 percent at the base point, and the effect grows as E approaches r.

"A queue with load 0.8 means people wait 80 percent of the time." The load is the fraction of time the server is busy; the wait is a separate quantity.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Problem 1: the coffee gap goes from 63 degrees to 39 degrees in 8 minutes. Which expression gives k?

    Gap = 63 exp(-k t), so exp(8k) = 63/39 and k = ln(63/39)/8.
  2. 2. Problem 3: which corner is optimal for the bakery?

    Profit at (0, 50) is 250 dollars, higher than the other corners (120 and 226.7).
  3. 3. Problem 4: load for lambda = 1.2 and mu = 1.5 is:

    rho = 1.2 / 1.5 = 0.8.
  4. 4. Problem 5: the long-run fractions for Home, Shop, School are:

    The vector (0.25, 0.5, 0.25) satisfies pi P = pi.
  5. 5. Problem 6: the elasticity of N* with respect to E at E = 0.3, r = 0.6 is:

    Elasticity = -E/(r - E) = -0.3/0.3 = -1.

Summary

  • Match each word problem to a tool: ODE, logistic, LP, queue, Markov chain, sensitivity.
  • Solve by hand, then verify by code and by a plausibility check.
  • State every answer in a sentence with units.
  • Use limiting cases and simulation as independent checks.

Next: Glossary: the words of modelling