Practice Modeling in CS Thinking

Use these practice problems to test your method after reviewing the concept explanation and worked examples.

Quick Recap

Modeling is the process of building a simplified representation of a real system so you can study, predict, or explain its behavior. A model keeps the details that matter for the question and leaves out details that do not.

A model is a useful simplification. It is not reality itself, but a focused version of reality.

Showing a random 20 of 80 problems.

Example 1

challenge
George Box wrote 'all models are wrong, but some are useful.' Give a CS example illustrating each half of the quote.

Example 2

easy
A model assumes 'no friction' to predict a sliding box's motion. What part of the model is 'no friction'?

Example 3

medium
A model assumes constant 5% monthly growth: Vm=V0ร—1.05mV_m = V_0 \times 1.05^m. With V0=200V_0 = 200, find V3V_3.

Example 4

challenge
A model assumes events are independent, but in reality one event makes another more likely. Qualitatively, how will the model's risk estimate be biased?

Example 5

easy
A map of a city leaves out individual trees and house colors but keeps streets and intersections. What modeling principle does this show?

Example 6

medium
Linear regression fits y=ax+by = ax + b. If a model with a=2,b=3a=2, b=3 gives predictions y=5,7,9y=5, 7, 9 for x=1,2,3x=1, 2, 3 but observed values are 5,8,105, 8, 10, compute the residuals.

Example 7

hard
A budget model: C(n)=100+0.5n2C(n) = 100 + 0.5n^2. Compute average cost per item at n=10n=10 and n=20n=20.

Example 8

hard
A 2D physics engine models objects as circles with (x,y,vx,vy)(x, y, vx, vy) and ignores rotation. Name one real-world phenomenon that this model can't reproduce.

Example 9

hard
Modeling time: when is a monotonic clock (e.g., `CLOCK_MONOTONIC`) preferred over wall-clock time (`CLOCK_REALTIME`) in code?

Example 10

medium
What word names a quantity in a model that you tune to fit data (like the slope of a line)?

Example 11

easy
Fill in: a model is a __________ representation of a real system.

Example 12

easy
A weather app models temperature as a single float in Celsius. Name one real-world detail this model deliberately ignores.

Example 13

medium
A spreadsheet model and the real system disagree after a parameter changed. What is the disciplined first step before trusting either?

Example 14

medium
A spam classifier models messages as bags-of-words. What information about word order is lost?

Example 15

medium
A model uses inputs, parameters, and assumptions to produce an output. Which one would you most likely change if the model is structurally right but numerically off?

Example 16

medium
A queueing model assumes customers arrive once per minute and each is served in 30 seconds. Will the queue grow over time?

Example 17

easy
A queue at a coffee shop is modeled as a FIFO list. Which CS data structure is the right code representation?

Example 18

easy
A model says next year's class size N=30+2tN = 30 + 2t, with tt in years from now. Find NN at t=4t = 4.

Example 19

easy
To decide which simplification to keep in a model, what question should guide you?

Example 20

challenge
A neural-net language model has a context window of 8K tokens. State two distinct modeling consequences of this finite window.