Series

Compute — the series

21 essays on one idea, from the one that introduces it to the one that assumes the rest.
  1. What the machine draws, against where the polynomial vanishes. Two objects, found two ways. The thin line is the set where x^4 + 2x^2y^2 + y^4 − 1.2x^2 + 1.2y^2 is zero, walked over a grid with no mechanism involved. The marks are where the compiled machine's tracing point went, one per converged solve, over the 147 positions of its working arc. The machine's constraint set never mentions the polynomial, so evaluating it at each traced point is an independent check: the worst value over the whole arc is 3.7e-13. The arc is 1.30 radians of the driving angle and not the whole turn, and past that arc it draws something else.

    A demand that is an equation

    Every field of this collection is handed its demand geometrically — three positions, a sampled path, a ratio at each angle — and hands back a mechanism that is right at those places and approximately right between them. This one is handed a polynomial, and the mechanism that comes back satisfies it everywhere it moves.

    part 1 · computing
  2. Two routes to the same number, along one sweep. The polynomial x^4 + 2x^2y^2 + y^4 − 1.2x^2 + 1.2y^2 evaluated at the tip of the arm as the second angle goes right round, by two routes that share nothing: once by putting the tip's coordinates into the polynomial, and once by adding up 5 cosines of whole-number combinations of the two angles. The two curves are drawn on top of each other and the worst gap between them is 8.9e-15. Where the line crosses zero is where the machine may stand: 2 crossings at this α, which is how many assemblies the compiled machine has at this driving angle.

    Every curve is a sum of cosines

    Put the two angles of a two-link arm into any polynomial in x and y and what comes out is a constant plus a finite sum of cosines of whole-number combinations of them. Nine curves, three hundred random angle pairs each, and the two routes agree to 1.8 × 10⁻¹⁴.

    part 2 · computing
  3. What each curve costs, in cosines. Every polynomial in the two arm angles is a constant plus a sum of terms A cos(mα + nβ + φ) with whole-number m and n, and the number of those terms is what a machine has to build. The count is not the degree and not the monomial count: a circle costs one term, a general line two, and a lemniscate — degree four — costs five, fewer than the cubic above it, because its symmetry cancels frequency pairs the cubic keeps. Each row's expansion was checked against a direct evaluation of its own polynomial at random angles, worst disagreement 1.8e-14.

    A circle costs one term

    A line expands to two cosines, a circle to one, a general conic to six. A lemniscate is degree four and costs five; a general cubic is degree three and costs eight. What a curve costs is not its degree — it is how many frequency pairs its own symmetry fails to cancel.

    part 2 · computing
  4. the reflector, solved. A rhombus whose far vertex is held on a line through the pivot. One side is the input, the line is the mirror, and the other side comes out reflected in it — which is where negation, doubling and addition all come from. The relation it satisfies is (μ, θ) ↦ 2μ − θ, and across a sweep of 41 positions the worst departure from it is 1.3e-13 radians. Every joint here is the output of a Newton–Raphson solve on the bar lengths; nothing is placed by the formula the picture is about.

    Four bars that add two angles

    A rhombus on two links from one pivot points along the bisector of their angle, exactly, because a rhombus has equal sides. Hold its far vertex on a line and it reflects instead. From those two facts come negation, doubling and addition — and every whole-number combination of two angles a compiled machine needs.

    part 3 · computing
  5. How much of a compiled machine is computing anything. Each machine's bars split two ways: the ones that build an angle — reflectors, means, rigid offsets, the arm — and the ones that carry a direction from where it was computed to where it is needed. On the smallest machines the arithmetic is nearly all of it. By the quintic the carrying is 80 per cent, and it goes on rising, because the arithmetic grows with the number of terms and the carrying grows with the number of pairs of them. That is the answer to why a universality construction is enormous, and it is not about the algebra being hard.

    A parallelogram carries an angle, and only so far

    A direction computed at the frame is no use where it is needed. A parallelogram carries one from point to point — but only between two points a fixed distance apart, and that single proviso is what makes a compiled machine quadratic in the number of terms and turns most of it into transport.

    part 3 · computing
  6. What it costs to multiply an angle. Multiplying an angle by n is done by doubling and adding — 2k is one reflector applied to k, and 2k+1 is one addition of k's result and the original — so the cost follows the binary expansion of n and not n itself. Eight costs three doublings; seven costs six gadgets, twice as much, for a smaller number. The other line is what a chain of n−1 additions would cost. The difference matters because the highest multiple a curve of degree d needs is d, so the arithmetic in a compiled machine grows like d log d while the carrying grows like d⁴ — which is why the arithmetic is not what makes these machines large.

    Doubling is cheaper than adding

    Multiplying an angle by eight costs three gadgets and multiplying it by seven costs six. The cost of an integer multiple follows the binary expansion of the integer and not its size — which is why the arithmetic in a compiled machine grows like d log d while everything else grows like the fourth power.

    part 4 · computing
  7. The machine compiled from a rectangular hyperbola. xy − 0.5, compiled: 20 bars and 20 joints, painted by what each part is for. The two-link arm at the pivot carries the tracing point; the reflectors and means build each term's angle; the rigid offsets fix the constant φₖ and the amplitude; the translators carry those directions out along the summing chain, whose last vertex is held on a line. That last constraint is the equation. Every joint drawn is the output of a Newton–Raphson solve on 36 equations, converged to 4.2e-16, and the polynomial at the tracing point is 2.2e-16.

    The machine, compiled

    Twenty bars, twenty joints, and one degree of freedom. Every position is a converged solve on thirty-five equations, none of which mentions the polynomial — and the polynomial at the tracing point reads 1.3 × 10⁻¹⁴ across the whole working arc.

    part 4 · computing
  8. Every curve in the catalogue, compiled and counted. The bar count is not a formula: it is the number of bar constraints the compiled mechanism actually carries, asked of the object rather than predicted. A line costs five bars and a quintic four hundred and thirteen, which is the field's central number — exactness is paid for in size. The all-revolute column replaces the one prismatic pair that closes the chain with a Peaucellier cell, which costs seven bars whatever the curve, so it is more than half the machine on a line and a rounding error on a quintic. The last column is the polynomial evaluated at the traced point, worst over each machine's working arc.

    Five bars for a line, four hundred for a quintic

    Nine curves compiled and counted: a line at five bars, a circle at eleven, a lemniscate at fifty, a general quintic at four hundred and thirteen. The growth is a fourth power of the degree, and three quarters of the largest machine is not computing anything at all.

    part 5 · computing
  9. One linkage, two curves. The same bars, the same lengths, the same driving angle — assembled two ways. One trace is where the polynomial vanishes and the other is not: the worst value of xy − 0.5 along the second is 8.7e-1, against 4.7e-14 along the first. Every position on both was solved to 9.5e-14. Nothing about the second linkage is defective; one of its parallelograms is a crossed one, so a direction is being carried wrongly, and the machine is faithfully computing a different function.

    The proof drew more than the curve

    Sixteen ways to assemble one linkage. Eight of them close. Four put the tracing point on the curve and four put it somewhere else — at a closure residual of 9.6 × 10⁻¹⁵, which is the same floor the right ones reach. No tolerance on the closure could ever have told them apart.

    part 5 · computing
  10. A brace is one redundant equation, on purpose. The compiled machine, counted and measured, with and without 4 braces. The count says the braced machine has -3 degrees of freedom — it cannot move — and the rank of the constraint Jacobian says it has 1, the same as before. Every brace contributes exactly one equation the others already imply, which is what overconstraint is, and here it is being added deliberately: the redundancy is what removes the assemblies the count knows nothing about. This is Grübler being wrong for the useful reason rather than the embarrassing one.

    A bar between two midpoints

    In a parallelogram the midpoints of two opposite sides are exactly one side apart, and in the crossed assembly they are not. One bar between them admits the first and refuses the second — and it is one redundant equation per parallelogram, added on purpose, on a site whose constraint field is otherwise about overconstraint arriving by accident.

    part 6 · computing
  11. What a singularity does, and what it does not do. The reflector driven straight through the configuration at which its two placements merge — here θ = 0.800, where the rhombus flattens onto its own mirror. Two numbers are plotted. The closure residual is how well the bars are satisfied, and it does not move: 8.3e-14 on both sides. The departure is how far the output is from the angle the gadget is supposed to produce, and it goes from the floor to order one at 0.800. Nothing breaks. The gadget goes on being a perfectly good linkage and stops being the function it was built to be.

    Where the machine stops being the function

    Drive a reflector through the angle at which its rhombus flattens and it comes out computing something else. Nothing breaks: every bar is the length it was, the closure residual stays at 8 × 10⁻¹⁴, and the machine goes on turning. That is why every compiled machine in this field works over an arc and not a turn — the quintic's over a tenth of a radian.

    part 6 · computing
  12. Exactness is not bought with links. Five straight-line mechanisms, each measured over its own working arc — walked out to its dead centres and back a tenth — and each plotted at its own bar count. Watt's four bars are wrong by 9.0 per cent of the stroke and Chebyshev's by 12.4; Peaucellier's seven are exact. There is nothing in between, and adding bars to an approximation does not walk down the axis: the compiled machine is exact for the same reason Peaucellier is — an exact algebraic relation — and its extra bars buy generality rather than accuracy.

    Exact costs more than close

    Watt's four bars are wrong by nine per cent of their stroke and Chebyshev's by twelve. Peaucellier's seven are exact to 4 × 10⁻¹⁶, and a compiled machine is exact to 4.8 × 10⁻¹⁴ in five. There is nothing in between — adding bars to an approximation does not walk down the axis, and the four-bar in every beam engine ever built is on the wrong end of it.

    part 7 · computing
  13. Bars against terms, over the whole catalogue. One mark per compiled machine. The bar count rises much faster than the term count, and the reason is the summing chain: term k has to have its direction carried to the k−1th vertex of the chain, one parallelogram per hop, so the carrying costs a translator for every pair of terms. Nine curves, from five bars to four hundred and thirteen, on a term count that goes from one to eighteen.

    What universality is worth

    The linkage exists, it is four hundred and thirteen bars, and it draws ten degrees of its curve. All three are true and only the first is in the theorem — which is the ordinary shape of a result about what exists, and the reason it was worth building one to find out.

    part 7 · computing
  14. A rectangular hyperbola, compiled from a multiple of its equation. The machine compiled from p · (1 + x² + y²) for a rectangular hyperbola, with the translators — the parallelograms that carry a direction from where it is produced to where it is needed — in their own colour. The factor 1 + x² + y² is at least one at every real point, so every equation here vanishes on exactly the same curve. The machines do not agree: 20 bars at p, 75 bars at p · (1 + x² + y²), 144 bars at p · (1 + x² + y²)². This one solves 29 positions over an arc of 0.508 radians, and at every one of them the original polynomial reads 4.93e-14.

    The price is on the equation

    A line costs five bars. The same line, written as its own equation multiplied by a factor that is never zero, costs fifty — and the machine compiled from the longer equation draws the same line just as exactly. Every cost this field quotes belongs to a polynomial and not to a curve, and the cheapest equation of a given curve is a quantity nobody here has.

    part 8 · computing
  15. Two circles, one term. The curve r² = 1.44 together with r² = 2.56, whose squared radii sum to 4.00 — four times the square of the arm's link length. Their product equation expands to 1 term, which is what either circle costs on its own, so the second circle is free. The machine compiled from it has 17 bars against 11 for the single circle, runs over 5.200 radians against 1.560, and stays on the outer component throughout: its radius varies by 4.15e-13 over 240 solved positions. A mechanism moves continuously and the two circles are disjoint, so no assembly of it reaches both.

    Two circles for the price of one

    Search every multiple of a curve's equation by a polynomial of degree two and the cheapest is the curve's own equation, on four curves and by exhaustion. On the circle a second multiplier ties — and what it describes is two concentric circles, whose squared radii sum to four times the arm's link length squared, at exactly the cost of one.

    part 9 · computing
  16. The cheapest curve of each degree. The curve of degree 6 whose equation expands into the fewest cosines of the arm's two angles: cos 3θ = 0.3: 3 concentric circles about the pivot. It costs 1 term — cos(3α − 3β + …) — and the machine compiled from it has 27 bars. The dashed circle is the arm's reach. The dots are the machine's tracing point over 140 solved positions; it draws one component and stays on it. At every even degree the cheapest curve costs one term and at every odd degree two, whatever the degree.

    The cheapest curves at each degree

    Search every equation of degree up to six, not the multiples of one curve, for the fewest cosines a compiled machine has to build, and the answer does not depend on the degree at all: one term at every even degree, two at every odd one, each reached by exactly one set of frequencies. The cheap curves are concentric circles placed where Chebyshev's polynomials put them — k of them for the price of one — and, at odd degree, a line through the pivot with circles that come free. One symmetry of the arm forbids anything cheaper: its two links can be swapped without moving the tip.

    part 10 · computing
  17. A quintic of eighteen terms, and the nearest curve that costs a few. The quintic x^5 + 0.4x^2y − y = 0, whose equation expands into 18 cosines of the arm's two angles, inside the arm's reach (dashed). Drawn over it, the curve of the same degree with at most 4 terms that comes nearest to it inside the reach, found by trying every set of terms of that size: it keeps 0,1|1,0, 1,-2|2,-1 and is at most 2.77e-2 from the quintic and the quintic at most that from it — 1.4% of the reach. The slider steps through the budgets at which the nearest curve improves.

    Four terms of eighteen draw the quintic

    A quintic whose equation costs a compiled machine eighteen terms is drawn to 1.4% of the arm's reach by four of them and to 0.02% by ten, found by trying every set. The four are not its four largest. They are a line through the pivot bent by the square of the radius, the family the cheapest curves come from, and a curve close to that family is nearly free. An ellipse, a parabola, a lemniscate and a folium are not close to it, and each costs its whole equation to come within four per cent.

    part 11 · computing
  18. Moving the pivot adds terms everywhere but one locus. The folium x³ + y³ − 1.5xy = 0, drawn in its own coordinates, and the square of pivot positions from −1 to 1 searched at steps of 0.05 (shaded). With the arm's pivot at the origin, where the catalogue puts it, the equation expands into 11 cosines of the arm's two angles. Moved anywhere in the square off the line x + y = 0 (heavy), it expands into 12; at (0.5, 0.3), for instance, 12. 41 of the 1681 pivots tried cost less than 12, all on that locus, and none costs less than the catalogue's 11.

    Moving the pivot only adds terms

    A compiled machine's cost is the number of cosines its curve's equation expands into, and moving the arm's pivot gives the same curve a different equation. So an expensive curve might only be expensive because of where the arm was put. Searched over 1,681 pivots, it never is. Moving the pivot adds the equation's own derivatives at the pivot as new terms, and they cancel only on one locus per curve — a centre, or a line — on which the catalogue's pivot already sits. Anywhere else the ellipse costs 6 instead of 4, the folium 12 instead of 11, the lemniscate 9 instead of 5, the parabola its 6 everywhere, and the quintic that four terms nearly draw costs 30 instead of 18.

    part 12 · computing
  19. Along one line the nearly free curve stays nearly free. The arm's pivot is fixed at the centre of its reach (dashed); the quintic x⁵ + 0.4x²y − y = 0 is drawn with its own point — where the catalogue put the pivot — moved 0.2 of a link along the line x = 0, which is the same as moving the pivot the other way. Heavy: the arc priced, the part of the quintic within 1.4 of its own point. Thin: the nearest curve built from at most four cosines of the arm's angles, found by trying every set of four: 6.0% of the reach away, the line through the pivot bent by the square of the radius. The equation itself costs 22 cosines here.

    The quintic's cheapness runs along a line

    A quintic whose equation costs a compiled machine eighteen cosines is drawn to a few per cent of the arm's reach by four of them, and its exact count jumps to 22 or 30 the moment the arm's pivot moves. Priced by the nearest curve instead, the two directions part completely. Along the line x = 0 the nearest four-term curve stays within 7.3% of the reach out to 0.4 of a link and the nearest six-term within 3.4%. Across it the four-term price goes from 3.2% to 18% between a twentieth and a tenth of a link, and from 0.15 on four terms buy nothing over three. The move along adds four cosines of amplitude 0.2 and 0.4 times the move; the move across adds twelve, sixty to ninety times larger in total.

    part 13 · computing
  20. The machine compiled from a rectangular hyperbola. xy − 0.5, compiled: 20 bars and 20 joints, painted by what each part is for. The two-link arm at the pivot carries the tracing point; the reflectors and means build each term's angle; the rigid offsets fix the constant φₖ and the amplitude; the translators carry those directions out along the summing chain, whose last vertex is held on a line. That last constraint is the equation. Every joint drawn is the output of a Newton–Raphson solve on 36 equations, converged to 4.2e-16, and the polynomial at the tracing point is 2.2e-16.

    A compiled machine and its own scale

    A linkage compiled from a polynomial has bars whose lengths are the polynomial's coefficients and joints whose angles are its phases. Scale it and every coefficient scales — so the machine computes the same polynomial multiplied by a constant, which is a different polynomial with the same roots.

    part 14 · computing
  21. The cheap pivots lie in a valley tilted off the line x = 0. The price of the quintic's arc drawn by the line through the pivot bent by the square of the radius, four cosines, as a share of the arm's reach, at pivots a two-hundredth of a link apart across and a twentieth along, within 0.16 and 0.45 of the catalogue's point. Darkest: within 5%; then within 10% and 20%. The cheapest pivot at each height (dots) lies on a line at dx/dy = -0.172, 9.8° off the line x = 0 (dashed), with prices from 1.4% to 2.7%; on x = 0 itself the price reaches 7.3%.

    The quintic's cheap pivots lie off the line

    Four cosines draw the quintic within a few per cent of the arm's reach from its catalogue pivot, and the earlier measurement found that cheapness surviving along the line x = 0 and dying across it. Mapped over a grid of pivots, it does neither exactly. The cheap pivots form a narrow valley tilted ten degrees off that line, about a twentieth of a link wide. In the valley four cosines hold the arc to 1.4–2.5% at every height out to 0.4 of a link; on the line itself, at the same heights, they miss by 6–7%. At two valley pivots every set of four cosines and every set of six was tried, and none beat the bent line. The amplitudes of the cosines a move adds predict a tilt a seventh as large, so they do not explain it.

    part 15 · computing

All series