Mathematical Foundations

VI.1 · Optimization

What does one number tell us about a whole parameter choice?

Choose a parameter point, read its objective value, and compare nearby alternatives. Contours, gradients, and curvature turn a scalar score into an inspectable optimization landscape.

Explore a parameter landscape

Parameter space: θ₁ and θ₂

Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed. Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed.

Loss slice: θ₂ = 0

This is a slice of the objective in parameter space, with θ₂ fixed at zero.

Candidate parameters
(2, 1)
Objective value
4
Actual gradient
(2, 4)
Hessian of the objective
(1, 0); (0, 4)

≈ binary64 calculation · = analytic classification. Replay selects the same evaluated step in every view.

Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed.

L=a2(θ1−c)2+2θ22L=\tfrac a2(\theta_1-c)^2+2\theta_2^2

Evaluate the candidate

Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed.

L=a2(θ1−c)2+2θ22L=\tfrac a2(\theta_1-c)^2+2\theta_2^2

from −3 to 3, up to 2 decimal places

from −3 to 3, up to 2 decimal places

from 0.25 to 4, up to 2 decimal places

from −2 to 2, up to 2 decimal places

Choose a point on the objective landscape. Compare the same parameter coordinates with the loss and gradient shown in the inspector.

On the default quadratic, compare (2,0)(2,0) with (0,1)(0,1) before reading the values. Both have loss 22. Do they also have the same sensitivity to a small parameter change? Move to (2,1)(2,1) and recover loss 44 from its two separate contributions.

Intuition: a score attached to every candidate

An engineer choosing two controller gains needs a way to compare settings. A loss might combine tracking error with the energy used by the controller. Each parameter pair is one candidate; the objective assigns it one scalar score. Smaller scores are preferred when we minimize.

The drawn landscape places parameter coordinates on the horizontal plane and objective values at their heights. A contour joins points with equal score. It is not an optimizer path: points on the same contour can have different gradients, and an algorithm can cross many contours in one update. The gradient describes local sensitivity; curvature describes how that sensitivity changes.

Definition: objective, domain, and optimizer

An objective function is a map L:D→RL:D\to\R from a specified parameter domain DD. Here θ=(x,y)\theta=(x,y) abbreviates a two-component column vector. Minimization asks for the smallest attainable value, and for the parameter choices attaining it:

L∗=min⁡θ∈DL(θ),arg min⁡θ∈DL(θ)={θ∈D:L(θ)=L∗}.L^*=\min_{\theta\in D}L(\theta),\qquad \argmin_{\theta\in D}L(\theta) =\{\theta\in D:L(\theta)=L^*\}.

This notation assumes a minimum exists. The infimum can describe a lower bound without attainment, and an objective can instead be unbounded below. The scalar L∗L^* and the set of minimizing parameters are different objects. An optimizer is an algorithm searching for parameters; it is not the objective itself.

Our recurring family is

L(x,y)=a2(x−c)2+2y2,a=1, c=0 by default.L(x,y)=\frac a2(x-c)^2+2y^2, \qquad a=1,\ c=0\text{ by default}.

For a>0a>0 its unique minimizer is (c,0)(c,0). The explorer keeps a>0a>0. In the analytic extensions used by the code and exercises, a=0a=0 makes every (x,0)(x,0) a minimizer, while a<0a<0 makes the loss unbounded below along the x direction. The parameters a,ca,c describe the chosen landscape, while x,yx,y are the parameters being optimized within that landscape.

Mechanics: one point, several derived quantities

Read the current point θ\theta, its loss L(θ)L(\theta), and its gradient together. Differentiate the gradient to obtain the Hessian used in the analysis below. Changing xx or yy evaluates a different candidate. Changing cc moves the quadratic’s horizontal center. Changing aa changes horizontal curvature; it does not change the vertical curvature 44.

The default equations are

L=x22+2y2,∇L=(x,4y),H=[1004].L=\frac{x^2}{2}+2y^2,\qquad \nabla L=(x,4y),\qquad H=\begin{bmatrix}1&0\\0&4\end{bmatrix}.

A negative gradient component means increasing that coordinate lowers the loss to first order. A positive component means decreasing it lowers the loss to first order. Neither statement yet chooses a finite distance to travel. Keep the plotted point, the inspector’s coordinates, and the formula substitution in agreement.

Derivation: contours and the local model

Differentiate each term of the family independently:

∂L∂x=a(x−c),∂L∂y=4y,H=diag⁡(a,4).\frac{\partial L}{\partial x}=a(x-c),\qquad \frac{\partial L}{\partial y}=4y,\qquad H=\operatorname{diag}(a,4).

Expanding the squares gives an exact identity for a displacement δ=(u,v)\delta=(u,v):

L(θ+δ)=L(θ)+∇L(θ)⋅δ+12δTHδ.L(\theta+\delta) =L(\theta)+\nabla L(\theta)\cdot\delta +\frac12\delta^{\mathsf T}H\delta.

The gradient term is the linear prediction of the loss change; the Hessian term accounts for the bending of this quadratic. For a general smooth function this expression is a local second-order approximation, with a remainder. For this family it is exact at every displacement.

For a>0a>0 and a positive contour level ℓ\ell, rearrange L=ℓL=\ell:

(x−c)22ℓ/a+y2ℓ/2=1.\frac{(x-c)^2}{2\ell/a}+\frac{y^2}{\ell/2}=1.

These ellipses have horizontal radius 2ℓ/a\sqrt{2\ell/a} and vertical radius ℓ/2\sqrt{\ell/2}. At the default a=1a=1, equal horizontal and vertical parameter displacements have different costs. The fourfold vertical curvature produces the narrower vertical radius.

Worked examples: equal height does not mean equal slope

At (2,1)(2,1) with a=1,c=0a=1,c=0,

L(2,1)=222+2(1)2=4,∇L(2,1)=(2,4).L(2,1)=\frac{2^2}{2}+2(1)^2=4, \qquad \nabla L(2,1)=(2,4).

The point (2,0)(2,0) has loss 22 and gradient (2,0)(2,0). The point (0,1)(0,1) also has loss 22, but gradient (0,4)(0,4). Their gradient norms are 22 and 44: equal heights on a contour do not give equal local steepness. A small displacement in the negative y direction from the second point changes loss twice as fast per unit distance as steepest descent from the first.

Now choose a=2,c=1a=2,c=1 and θ=(2,−1/2)\theta=(2,-1/2). The displacement from the center is x−c=1x-c=1, so

L=2(1)22+2(−12)2=32,∇L=(2,−2),H=diag⁡(2,4).L=\frac{2(1)^2}{2}+2\left(-\frac12\right)^2=\frac32, \qquad \nabla L=(2,-2),\qquad H=\operatorname{diag}(2,4).

Worked example: Explore a parameter landscape

Parameter space: θ₁ and θ₂

Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed. Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed.

Loss slice: θ₂ = 0

This is a slice of the objective in parameter space, with θ₂ fixed at zero.

Candidate parameters
(2, 1)
Objective value
4
Actual gradient
(2, 4)
Hessian of the objective
(1, 0); (0, 4)

≈ binary64 calculation · = analytic classification. Replay selects the same evaluated step in every view.

Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed.

L=a2(θ1−c)2+2θ22L=\tfrac a2(\theta_1-c)^2+2\theta_2^2

Evaluate the candidate

Candidate θ ≈ (2, 1); objective ≈ 4; gradient ≈ (2, 4). Coordinates are model parameters; data inputs are held fixed.

L=a2(θ1−c)2+2θ22L=\tfrac a2(\theta_1-c)^2+2\theta_2^2

Replay the canonical quadratic evaluation at (2,1): loss 4 and gradient (2,4). Use the opening explorer for the shifted and equal-height comparisons.

Executable reference code

The standard-library reference uses Fraction for the polynomial objectives, gradients, and the quadratic Hessian. It independently checks literal points on equal contours and the contrasting landscapes. The logarithmic example is separate: real logarithms are evaluated as binary64 approximations, with an explicit x>0x>0 domain check.

The NumPy program evaluates a batch of points through a quadratic form and matrix multiplication, cross-checks the Hessian spectrum with eigvalsh, and samples a double-well grid with array operations. Finding the smallest sampled grid value is evidence about those samples; it is not a proof of a whole-domain minimum.

code/python/optimization_landscapes.py
"""Exact polynomial landscapes; logarithmic values use binary64 separately."""
from fractions import Fraction as F
from math import isfinite, log


def quadratic(x, y, a=1, c=0):
    x, y, a, c = map(F, (x, y, a, c))
    loss = a * (x - c)**2 / 2 + 2 * y**2
    gradient = (a * (x - c), 4 * y)
    hessian = ((a, F(0)), (F(0), F(4)))
    return loss, gradient, hessian


def polynomial_losses(x, y):
    x, y = F(x), F(y)
    return {
        "double well": (x*x - 1)**2 + y*y,
        "cubic": x**3 - 3*x + y*y,
        "ridge": -x*x - y*y,
        "saddle": x*x - y*y,
        "flat": x**4 + y**4,
        "degenerate": x**3 + y*y,
        "nonsmooth": abs(x) + y*y,
    }


def barrier(x, y):
    x, y = float(x), float(y)
    if not isfinite(x) or not isfinite(y) or x <= 0:
        raise ValueError("The log objective requires finite x > 0 and finite y")
    loss, gradient = -log(x) + y*y, (-1/x, 2*y)
    if not all(isfinite(v) for v in (loss, *gradient)):
        raise OverflowError("The binary64 result is non-finite")
    return loss, gradient


def main():
    loss, gradient, hessian = quadratic(2, 1)
    assert loss == 4 and gradient == (2, 4)
    assert hessian == ((1, 0), (0, 4))
    assert quadratic(2, 1, a=2, c=1)[:2] == (3, (2, 4))
    assert quadratic(0, 1)[0] == 2 and quadratic(2, 0)[0] == 2
    assert polynomial_losses(-1, 0)["double well"] == 0
    assert polynomial_losses(1, 0)["double well"] == 0
    assert polynomial_losses(0, 0)["double well"] == 1
    assert polynomial_losses(1, 0)["cubic"] == -2
    assert polynomial_losses(-3, 0)["cubic"] == -18
    assert polynomial_losses(1, 0)["ridge"] == -1
    assert polynomial_losses(1, 0)["saddle"] == 1
    assert polynomial_losses(0, 1)["saddle"] == -1
    assert polynomial_losses(0, 0)["flat"] == 0
    assert polynomial_losses(-1, 0)["degenerate"] == -1
    h = F(1, 100)
    right = polynomial_losses(h, 0)["nonsmooth"] / h
    left = polynomial_losses(-h, 0)["nonsmooth"] / -h
    assert (left, right) == (-1, 1)  # No classical x derivative at zero.
    assert barrier(1, 0) == (0.0, (-1.0, 0.0))
    for x in (0, -1, float("nan"), float("inf")):
        try:
            barrier(x, 0)
        except ValueError:
            pass
        else:
            raise AssertionError("Invalid logarithmic domain accepted")
    print("Exact canonical loss, gradient, Hessian:", loss, gradient, hessian)
    print("Exact alternative losses at (1,0):", polynomial_losses(1, 0))
    print("Log objective at (2,1), binary64 approximation:", barrier(2, 1))


if __name__ == "__main__":
    main()
code/python/optimization_landscapes_numpy.py
"""Vectorized binary64 landscape samples; a finite grid is not an optimum proof."""
import numpy as np


def quadratic(points, a=1.0, c=0.0):
    points = np.asarray(points, dtype=np.float64)
    if points.ndim != 2 or points.shape[1] != 2 or not np.all(np.isfinite(points)):
        raise ValueError("Require finite points of shape (n,2)")
    if not np.isfinite(a) or not np.isfinite(c):
        raise ValueError("Require finite a and c")
    shifted = points - np.array([c, 0.0])
    hessian = np.diag([a, 4.0])
    loss = np.einsum("ni,ij,nj->n", shifted, hessian, shifted) / 2
    gradient = shifted @ hessian
    if not np.all(np.isfinite(loss)) or not np.all(np.isfinite(gradient)):
        raise OverflowError("The binary64 result is non-finite")
    return loss, gradient, hessian


def barrier(points):
    points = np.asarray(points, dtype=np.float64)
    if points.ndim != 2 or points.shape[1] != 2 or not np.all(np.isfinite(points)) or np.any(points[:, 0] <= 0):
        raise ValueError("Require finite (n,2) points with x > 0")
    x, y = points.T
    loss = -np.log(x) + y*y
    gradient = np.column_stack((-1/x, 2*y))
    if not np.all(np.isfinite(loss)) or not np.all(np.isfinite(gradient)):
        raise OverflowError("The binary64 result is non-finite")
    return loss, gradient


def main():
    points = np.array([[2, 1], [2, 0], [0, 1], [0, 0]], dtype=np.float64)
    loss, gradient, hessian = quadratic(points)
    np.testing.assert_array_equal(loss, [4, 2, 2, 0])
    np.testing.assert_array_equal(gradient, [[2, 4], [2, 0], [0, 4], [0, 0]])
    np.testing.assert_array_equal(np.linalg.eigvalsh(hessian), [1, 4])
    np.testing.assert_array_equal(quadratic([[2, 1]], a=2, c=1)[0], [3])
    coordinates = np.linspace(-2, 2, 17)
    x, y = np.meshgrid(coordinates, coordinates, indexing="xy")
    wells = (x*x - 1)**2 + y*y
    assert wells.min() == 0 and np.count_nonzero(wells == 0) == 2
    np.testing.assert_array_equal(barrier([[1, 0]])[1], [[-1, 0]])
    for invalid in ([[0, 0]], [[-1, 0]], [[np.nan, 0]]):
        try:
            barrier(invalid)
        except ValueError:
            pass
        else:
            raise AssertionError("Invalid logarithmic domain accepted")
    print("Quadratic sample losses ≈", loss, "gradients ≈", gradient)
    print("Binary64 grid minimum ≈", wells.min(), "(finite samples only)")


if __name__ == "__main__":
    main()

Explore: compare different mechanisms

Use the alternative landscapes as questions about the objective, before choosing an algorithm:

ObjectiveA useful observation
(x2−1)2+y2(x^2-1)^2+y^2Two separated zero-loss wells at (±1,0)(\pm1,0)
x3−3x+y2x^3-3x+y^2A local minimum at (1,0)(1,0), yet arbitrarily low values toward negative x
−x2−y2-x^2-y^2The origin is a peak; moving outward lowers the objective
x2−y2x^2-y^2The origin rises along x and falls along y
x4+y4x^4+y^4A unique zero-loss minimum with zero Hessian at the origin
x3+y2x^3+y^2A stationary origin that still has nearby negative and positive values
∣x∣+y2\abs{x}+y^2A minimum at the origin with no classical x derivative there
−log⁡x+y2-\log x+y^2Only x>0x>0 is allowed, and increasing x can lower loss without bound

Predict the change along one coordinate, then inspect another. On the quadratic, increase aa while keeping cc fixed: which contours become narrower? Move cc without changing aa: which derivatives change at a fixed (x,y)(x,y), and which second derivatives remain fixed?

Common mistakes and counterexamples

A loss is not automatically a probability, a nonnegative quantity, or a distance. The cubic and logarithmic objectives legitimately have negative values. A zero objective value alone says nothing about optimality: −log⁡x+y2-\log x+y^2 is zero at (1,0)(1,0) and lower at larger x with y=0y=0.

Changing the plotted vertical scale can disguise an actual change to the objective. If L~=3L+7\widetilde L=3L+7, all rankings and minimizers stay the same, but ∇L~=3∇L\nabla\widetilde L=3\nabla L. An algorithm using the same learning rate now takes a triple displacement. The constant 77 changes displayed heights but contributes no derivative.

The displayed rectangle is also not the mathematical domain. A low point on the edge of a finite picture may simply be the lowest visible sample of an unbounded objective. Inspect the formula and its domain before declaring a winner.

Numerical considerations

Exact rational substitutions in the polynomial examples justify equality signs. Logarithms, sampled contour geometry, and numerical trajectories use binary64 approximations; displayed rounding must not become an exact mathematical claim. Rounding two losses to the same visible number does not establish that the underlying values are equal.

Large parameter magnitudes can overflow squared or higher-order terms even when inputs are finite. The references check the logarithmic domain and reject non-finite floating results where they expose floating inputs. A gap in a plot may represent an invalid domain point rather than a very high loss. Near x=0x=0 the logarithmic gradient −1/x-1/x also becomes large, so domain safety matters for updates as well as for display.

Engineering and ML connections

A training objective often aggregates data-fitting errors and parameter penalties. Choosing a sum instead of a mean multiplies the data term by the number of examples. With no other terms that preserves minimizers but changes gradient scale; when a separate penalty is retained, it also changes their relative weight. State the entire objective before interpreting an optimizer trace.

Least squares gives concrete quadratic fitting objectives. The gradient chapter explains directional sensitivity, and Hessian and curvature explains local shape. These become the ingredients of the parameter updates in gradient descent. A better search algorithm cannot repair an objective that rewards the wrong engineering behavior.

Exercises

Keep the objective value, its derivatives, and the domain distinct. Use exact fractions for the hand calculations.

calculation

Inspect the canonical landscape

For L(x,y) = (x−c)²a/2 + 2y² with a=1, c=0, evaluate the loss, both gradient components, and the two diagonal Hessian entries at (2,1).

prediction

Move and reshape the bowl

Set a=2, c=1 in L=a(x−c)²/2+2y². At (2,−1/2), give loss and the x,y gradient components.

calculation

Same height, different sensitivity

For L=x²/2+2y² compare p=(2,0) and q=(0,1). Give L(p), L(q), the squared gradient norm at p, and the squared gradient norm at q.

explanation

Respect the logarithmic domain

For L(x,y)=−log x+y², which description correctly interprets x=0 and (x,y)=(1,0)?

Choose one answer

prediction

Separate the objective from its scale

Replace the quadratic L by L̃=3L+7. To preserve a gradient step with original rate η, what must happen?

Choose one answer

Summary and checkpoints

An objective maps a valid parameter choice to a scalar score. Contours preserve score; gradients describe local changes; Hessians describe curvature. Check that you can recover loss 44, gradient (2,4)(2,4), and Hessian diag⁡(1,4)\operatorname{diag}(1,4) at (2,1)(2,1), distinguish changing a point from changing a landscape, and reject an out-of-domain logarithmic input. Next, compare a nearby best point with a best point over the whole domain.

The map of the book

97 of 97 chapters written · eight Parts

demo Foundation demo Try the live vector example Open as a page

Part I

Mathematical Language

The notation and mental objects everything else uses.

9 of 9 chapters written

  1. I.1 Scalars, quantities, units, powers and roots available
  2. I.2 Coordinates and points available
  3. I.3 Vectors: components, magnitude, and direction reference chapter available
  4. I.4 Algebraic expressions, equations and inequalities available
  5. I.5 Functions as input → transformation → output available
  6. I.6 Essential function families available
  7. I.7 Sets, intervals, and relations available
  8. I.8 Indexed quantities and summation available
  9. I.9 The notation map for ML available

Part II

Linear Algebra

Matrices as transformations: the strongest foundation in the book.

19 of 19 chapters written

  1. II.1 Vector addition and subtraction available
  2. II.2 Scalar multiplication and vector scaling available
  3. II.3 Norms, magnitude, and normalization available
  4. II.4 Dot product, angle, and orthogonality available
  5. II.5 Projection and distance to a direction available
  6. II.6 Linear combinations and span available
  7. II.7 Linear independence, basis, and coordinates available
  8. II.8 Matrices as linear transformations available
  9. II.9 Matrix × vector available
  10. II.10 Matrix × matrix as composition available
  11. II.11 Transpose and orthogonality available
  12. II.12 Determinant: orientation and area/volume scaling available
  13. II.13 Linear systems as intersecting constraints available
  14. II.14 Gaussian elimination and row operations available
  15. II.15 Rank and invertibility available
  16. II.16 Inverse matrices available
  17. II.17 Eigenvalues and eigenvectors available
  18. II.18 Orthogonal bases and least-squares geometry available
  19. II.19 Singular Value Decomposition available

Part III

Calculus

Change, local approximation, and sensitivity made visible.

15 of 15 chapters written

  1. III.1 Limits through approach available
  2. III.2 Continuity and local behavior available
  3. III.3 Derivative as secant → tangent available
  4. III.4 Derivative as rate of change and local linear model available
  5. III.5 Derivative rules available
  6. III.6 Chain rule available
  7. III.7 Multivariable functions and partial derivatives available
  8. III.8 Gradient and directional derivatives available
  9. III.9 Jacobian available
  10. III.10 Computational graphs and automatic differentiation available
  11. III.11 Hessian and curvature available
  12. III.12 Integrals as accumulation available
  13. III.13 Fundamental derivative/integral connection available
  14. III.14 Numerical differentiation available
  15. III.15 Numerical integration available

Part IV

Probability

Uncertainty through sample spaces, evidence, and repetition.

16 of 16 chapters written

  1. IV.1 Random experiments, outcomes, and sample spaces available
  2. IV.2 Events and probability mass available
  3. IV.3 Counting and finite probability where needed available
  4. IV.4 Conditional probability as restricted sample space available
  5. IV.5 Independence available
  6. IV.6 Bayes' theorem as probability-mass update available
  7. IV.7 Random variables available
  8. IV.8 PMF, PDF, and CDF available
  9. IV.9 Bernoulli and Binomial distributions available
  10. IV.10 Uniform and Gaussian distributions available
  11. IV.11 Expectation available
  12. IV.12 Variance and standard deviation available
  13. IV.13 Joint, marginal, and conditional distributions available
  14. IV.14 Covariance and correlation available
  15. IV.15 Law of Large Numbers available
  16. IV.16 Central Limit Theorem available

Part V

Statistics

From observed data to estimates, intervals, and likelihood.

10 of 10 chapters written

  1. V.1 Data summaries: mean, median, mode available
  2. V.2 Spread: variance, standard deviation, robust interpretation available
  3. V.3 Population, sample, and sampling variability available
  4. V.4 Estimators and estimation available
  5. V.5 Confidence intervals through repeated sampling available
  6. V.6 Covariance matrices and multivariate spread available
  7. V.7 Regression fundamentals available
  8. V.8 Likelihood available
  9. V.9 Maximum Likelihood Estimation available
  10. V.10 Maximum A Posteriori estimation available

Part VI

Optimization

Learning as repeated parameter updates governed by an objective.

10 of 10 chapters written

  1. VI.1 Objective functions and optimization landscapes available
  2. VI.2 Local vs global optima and stationary points available
  3. VI.3 Convexity available
  4. VI.4 Gradient descent flagship chapter available
  5. VI.5 Learning rate and convergence behavior available
  6. VI.6 Momentum available
  7. VI.7 Stochastic and mini-batch gradient descent available
  8. VI.8 Adam intuition available
  9. VI.9 Constraints and projected/penalized intuition available
  10. VI.10 Numerical stopping and optimization diagnostics available

Part VII

Information Theory

Logarithms, entropy, and the loss behind token prediction.

8 of 8 chapters written

  1. VII.1 Logarithms and log probabilities in computation available
  2. VII.2 Self-information available
  3. VII.3 Entropy available
  4. VII.4 Cross entropy and negative log-likelihood available
  5. VII.5 KL divergence available
  6. VII.6 Logits and softmax available
  7. VII.7 Numerical stability: log-sum-exp and stable softmax available
  8. VII.8 From token logits to language-model loss available

Part VIII

Numerical Computing

Why equivalent expressions behave differently on real machines.

10 of 10 chapters written

  1. VIII.1 Floating-point representation available
  2. VIII.2 Rounding and representation error available
  3. VIII.3 Error propagation and conditioning available
  4. VIII.4 Catastrophic cancellation available
  5. VIII.5 Overflow and underflow available
  6. VIII.6 Stable algorithms available
  7. VIII.7 Numerical linear algebra realities available
  8. VIII.8 Sparse matrices and sparse structure available
  9. VIII.9 Vectorized computation available
  10. VIII.10 Reproducibility, random seeds, and nondeterminism available