How many answers

The paths that leave

Bézout's number over-counts, and the over-count is enormous — 1,458 tracked paths for 80 solutions. The obvious response is to find a method that tracks only the paths that arrive. That method exists, it was built, and it is four times slower, because the surplus paths are not merely surplus. They are cheap.

Assumes Following a root from a problem already solved.

A Gough platform’s direct kinematics, written as polynomials, is seven unknowns and seven equations. Six of the equations are cubic and one is quadratic, so Bézout’s number is 36×2=1,4583^6 \times 2 = 1{,}458.

The answer is 80.

What became of Bézout's paths. four-bar coupler pin: 2 of 4 paths arrived at a solution and 2 went to infinity; 3-RPR platform: 6 of 16 paths arrived at a solution and 10 went to infinity; Gough, generic: 80 of 1458 paths arrived at a solution and 1378 went to infinity. The surplus is not merely wasted — it is cheap: a path on its way to infinity is abandoned in a handful of steps, while every path that arrives is tracked in full.
Fig. 1 Three systems, and the fraction of Bézout’s paths that arrive at a solution. Half for the four-bar, three eighths for the planar platform, one in eighteen for the six-legged one.
Every path, in the plane of one unknown. The 16 tracked paths of the 3-RPR platform, projected onto the complex plane of y. Each curve starts at a solution of the start system and ends at a solution of the target or leaves the frame on its way to infinity. This run is γ random, start constants complex, and it found 6 solutions.
Fig. 2 The same surplus seen path by path rather than as a total. Every one of these is tracked at full cost and most of them go somewhere that is not an answer, which is what the fates chart above is a summary of.

Thirteen hundred and seventy-eight paths are tracked to nowhere. That is not a small inefficiency to be noted and moved past; it is 94.5% of the work, and any reasonable engineer looking at it concludes that the method should be replaced with one that does not do it.

This essay is about where those paths go, and about what happened when the replacement was built.

Where the surplus goes

Bézout’s theorem is exactly right. It counts intersections in projective space, with multiplicity, over the complex numbers. Every one of the 1,458 is there. The question is why so few of them are in the place a mechanism lives, which is the finite, real part.

Three things take them away, and they are worth separating because they have different characters.

Solutions at infinity. These are genuine intersections that projective space has and the plane does not. The four-bar’s two are the clearest case in the subject: every circle passes through the same two points at infinity, so any two circles meet there, and those two intersections are counted by Bézout and are of no interest to anyone building a linkage. They are not an artefact of the formulation — they are a property of circles.

Structure the degree cannot see. Bézout knows only the degree of each equation. It does not know that a rotation matrix is orthogonal, that c2+s2=1c^2 + s^2 = 1 constrains a pair rather than two independent unknowns, or that the same quaternion appears in six equations. Every such fact is a relation the system satisfies and the degree count ignores, and every one of them pushes solutions to infinity.

The platform’s leg equations are a sharp example. Written naively, each says

R(q)ai+tbi2=Li2,|R(q)\,a_i + t - b_i|^2 = L_i^2,

and expanding Ra2|R a|^2 with RR quadratic in the quaternion gives a quartic. Bézout’s number would then be 46×2=8,1924^6 \times 2 = 8{,}192. But RTR=(qq)2IR^\mathsf{T}R = (q\cdot q)^2 I for the Euler–Rodrigues matrix, and on the variety where qq=1q \cdot q = 1 that term is simply ai2|a_i|^2 — a constant. Substituting it drops each equation from quartic to cubic and takes Bézout from 8,192 to 1,458, without changing a single solution.

That substitution is not an optimisation. It is the same variety described more accurately, and the 6,734 paths it removes were all going to infinity. A worse description of the same mechanism has a worse bound, and the bound is a property of the description.

Degenerate components. Occasionally a system has whole curves or surfaces of solutions rather than isolated points — a link of zero length that satisfies a distance condition vacuously, say. Paths landing on those do not converge to anything isolated. None of the systems in this field has one, and it is worth saying that this is a fact about them and not a guarantee of the method.

Bézout's number, and the answer. 6 polynomial systems, each solved by tracking every one of Bézout's paths. The Bézout column is what the shape of the system permits; the solutions column is what it has. Gough, this site's: 1458 → 56; Gough, generic: 1458 → 80; five-point generator: 128 → 12; Burmester, five poses: 16 → 4; 3-RPR platform: 16 → 6; four-bar coupler pin: 4 → 2. The last column is how many paths were tracked per solution found.
Fig. 3 Every system this field counts, sorted by how many paths were tracked per solution found. Eighteen to one at the worst, two to one at the best.

The count that is not a bound

There is a better bound than Bézout’s, and it is worth naming because it explains the size of the gap.

Bézout counts by degree. The BKK bound — Bernstein, Khovanskii, Kushnirenko — counts by which monomials actually appear, and for sparse systems it is dramatically smaller. A polynomial of degree three in seven unknowns has 120 possible monomials; the platform’s leg equations have about thirty-four each. All that absence is structure, and the BKK bound sees it where Bézout does not.

This library does not implement it. Computing the BKK bound means computing mixed volumes of Newton polytopes, and constructing a start system that realises it is a genuinely more involved piece of machinery — a polyhedral homotopy. Naming the gap is the honest thing to do rather than implying that Bézout’s number is the last word on how much work there is.

What can be said is that the direction of the fix is known and the size of the prize is visible: 1,458 against 80 is an eighteen-fold over-count, and none of it is the theorem’s fault.

The obvious replacement

If the trouble is tracking paths that go nowhere, the fix is to track only paths that go somewhere. There is a method that does exactly this, and it is elegant.

Take a family of systems — the same equations with different numbers in them, which is exactly what a mechanism family is. Solve one member by any means, even badly, so that one solution is in hand. Then move the parameters round a closed loop through complex values and follow that solution as they move. Come back to where the loop started, and the system is the one it began at, so the endpoint is a solution of it — but not necessarily the one it started from, because the loop can permute the sheets of the covering.

Repeat with different loops, and the set of known solutions grows. This is monodromy, and every path it tracks ends on a solution. Nothing is wasted.

On the generic Gough platform it reaches all eighty in 968 tracked paths, against Bézout’s 1,458. A third less work, by the count that seemed to matter.

And it is four times slower

The complete run takes 3.5 seconds. Monodromy takes 13.

The reason is the thing the path count concealed: the surplus paths are not merely surplus, they are cheap. A path on its way to infinity announces itself almost at once — its coordinates grow, and once the norm passes a threshold there is nothing to gain by following it further. Abandoning it costs a handful of steps. Meanwhile every path monodromy tracks converges, and a converging path is tracked in full, with an adaptive step that gets small near the end and a polish at the finish.

So the over-count is eighteen-fold and the wasted work is about a fifth of the run. Counting paths measured the wrong quantity.

That is worth stating plainly because the library was built the other way round. monodromy was written to be the fast route that the figures would use, and the complete route was to be kept as an occasional check. The measurement reversed it: the figures use the complete route, and monodromy is kept for reasons that have nothing to do with speed.

The twelve that were at infinity, coming back. Every solution of the platform's direct kinematics, plotted by how far from the origin it sits, as the six anchors are jittered. At no jitter the site's own platform has 56 solutions and the largest is at 25.8. At a jitter of 0.2 there are 80, and the extra ones arrive from far out — they were never missing, they were at infinity.
Fig. 4 Every solution of one platform’s direct kinematics, plotted by how far out it sits, as its anchors are perturbed. The paths abandoned as divergent are the ones with no dot on this chart at all.
Where the randomness has to be. The Burmester, five poses, solved 5 times in each of four configurations. With γ random or the start system's constants complex — either one — every run finds all 4. With both removed the tracker finds 1, from every seed. The γ-trick is one of two places to put the genericity, not the only one.
Fig. 5 Where the randomness has to be, and what happens when it is there. Five seeds, the same solution count from each, and the paths that leave differ between them — which is the evidence that the surplus is a property of the formulation rather than of one unlucky start.

What abandoning a path costs

Bailing out early is not free of risk, and the risk is exactly the one this field keeps returning to: a path abandoned wrongly is a solution lost, and a lost solution looks like a smaller number rather than like an error.

There is one guard that catches it, and it is a piece of luck in the formulation rather than a design. The platform’s equations are written in quaternions, and a quaternion and its negative are the same rotation, so every solution comes with its own negative and the count must be even.

That check has already earned its place. A run with a threshold set too tight returned 79. Seventy-nine is a perfectly plausible-looking number; nothing about it says anything is wrong; and it is impossible, because the solutions pair off. Loosening the threshold and allowing more steps returned 80, and the pairing check is what said which of the two runs to believe.

There is no equivalent guard for the planar systems, which have no such symmetry. For those the check is that the count is stable across seeds — four different random deformations giving the same answer — which is weaker, and is stated as weaker.

The shape of the waste, across the field

Sorting the systems by their waste ratio gives a pattern rather than a list.

The four-bar wastes two paths of four. Both are the circular points, and the fraction is as small as it gets on this site.

The planar platform wastes ten of sixteen. Four unknowns, four quadratics, and the trigonometric identity c2+s2=1c^2 + s^2 = 1 is doing the work: it is a quadratic that describes a circle, so it brings the circular points back in, and the leg equations bring more.

Burmester’s five-position system wastes twelve of sixteen, and its structure is different again. Its equations are bilinear — degree one in the moving pin, degree one in the fixed pivot — so their total degree is two but their bidegree is (1,1). A bound that counted the two groups of unknowns separately would give four, which is the exact answer. Bézout, which cannot see the grouping, gives sixteen and loses twelve paths to it.

The five-point function generator wastes 116 of 128 — seven quadratics, and only twelve solutions.

The Gough platform wastes 1,378 of 1,458.

There is a rule visible in that list and it is not about size. The waste tracks how much structure the equations have that the degree cannot express: identities, groupings, orthogonality. The systems with the most structure are the ones a mechanism engineer would call the most natural, which is a slightly uncomfortable way of saying that Bézout’s bound is worst exactly where the subject is richest.

The four-bar’s two, in more detail

The smallest case repays being worked through completely, because it is the only one where every missing path can be named.

A four-bar with its crank fixed gives two circle equations. In homogeneous coordinates each becomes

X2+Y22cxXW2cyYW+(c2r2)W2=0,X^2 + Y^2 - 2c_xXW - 2c_yYW + (|c|^2 - r^2)W^2 = 0,

and on the line at infinity, where W=0W = 0, both collapse to X2+Y2=0X^2 + Y^2 = 0. That factors as (X+iY)(XiY)(X + iY)(X - iY), so the two points are (1,i,0)(1, i, 0) and (1,i,0)(1, -i, 0) — the circular points, and they belong to every circle without reference to its centre or radius.

Two conics meet in four points; two of the four are pinned there before the link lengths are chosen; two are left for the plane. That is the whole accounting, and it is exact rather than approximate.

The consequence for the tracker is visible in the run: the two divergent paths grow in norm steadily and are abandoned, while the two convergent ones settle in a dozen steps. And it explains something that would otherwise be puzzling — that the four-bar’s waste ratio does not improve when the link lengths are chosen well. It is 2 of 4 for every four-bar there has ever been, because the loss is structural.

Something similar is true one level up. The planar platform’s fourth equation, c2+s2=1c^2 + s^2 = 1, is a circle in the (c,s)(c, s) plane, and it contributes its own pair of points at infinity in the same way. Ten of the sixteen lost paths on that system can be attributed to circles; the rest come from the interaction of the leg equations with each other.

Which is the honest number to quote

There are now three candidate numbers for “how many solutions does this mechanism have”, and the essays in this field use all three in different places, so it is worth fixing what each one means.

The Bézout number is what the shape of the equations permits. It is an upper bound, it depends on the formulation, and improving the formulation improves it — 8,192 to 1,458 for the platform, by one substitution that changed no solution.

The finite complex count is what the system has. It is a property of the family and does not move as the link lengths move, and it is the number a mathematician means by “the degree of the direct kinematics problem”. For a generic six-legged platform it is 80 in quaternion coordinates, which is the classical 40 poses counted twice by the double cover.

The real count is what a machine shop could build. It is not a property of the family — it changes with the dimensions and with the commanded lengths — and it is the only one of the three that answers a practical question. It is also the one that cannot be quoted without saying which member of the family it is about.

Confusing the second and third is the ordinary mistake and it is the one the essay on the count that does not move is about. Confusing the first and second is rarer and produces a different error: the belief that a mechanism with a large Bézout number is a complicated mechanism, when it may just be one that has been written down carelessly.

What a search that has finished looks like. Monodromy on the Gough, generic, from 2 seeds, everything else identical. The true count is 80. Seed 7 finished at 75 after 1688 tracked paths; Seed 99 finished at 80 after 1928 tracked paths. Each line flattens before it stops, and flattening is what both outcomes look like.
Fig. 6 The cheap route’s count against the number of rounds it has run, from two seeds. Every path it tracks arrives at a solution, and it is still the slower of the two methods.

Why monodromy is kept anyway

Being slower on these systems is not a reason to delete it, for two reasons.

The first is that its cost scales with the answer and the complete route’s scales with the bound. Eighty solutions cost eighty paths per round however large Bézout’s number is. There are systems in this subject where the bound cannot be enumerated at all — nine-point path synthesis of a four-bar is the standard example, where the classical count of the solutions runs to several thousand and the naive bound is very much larger — and for those the complete route is not slow, it is impossible. This field does not reach them, and the method that would is here.

The second is that monodromy fails in an instructive way. It cannot tell when it has finished: it stops finding new solutions and there is nothing to distinguish that from having found them all. On this platform, from four seeds with everything else identical, it returns 75, 80, 78 and 80 — and in each failure it had spent fourteen consecutive rounds finding nothing before giving up, which is exactly what success also looks like.

That failure is the subject of the essay on the search that was right, and it is the same failure as the search-based assembly count one level up. Having a method on the site that demonstrably suffers from it is more useful than having only methods that do not.

A note on what “cheap” depends on

The claim that the surplus paths are cheap is a claim about an implementation, and it is worth saying what it rests on so that a reader can tell when it would stop being true.

It rests on divergent paths being recognisable early. Here they are: a path heading for infinity grows steadily in norm, and a threshold on that norm catches it within tens of steps. If the target system had solutions of very large but finite magnitude, that threshold would have to be raised, and every divergent path would then be followed much further before being abandoned. The measurement in this essay would change, and so would the conclusion.

That is not hypothetical. It is exactly what happens on the platform whose architecture is special, where perturbing the anchors brings twelve poses back from infinity at coordinates of order 10310^3 — and a threshold tuned for solutions of order 10 would discard them as divergent. Twenty-eight, not forty is about that platform, and the run that measures it uses a threshold three orders of magnitude looser for exactly this reason, and takes correspondingly longer.

So the honest form of the claim is conditional: Bézout’s over-count is nearly free when the divergent paths diverge fast, and how fast they diverge is a property of the system rather than of the method.

What this changes about reading a bound

The practical residue of all this is a small correction to a habit.

A Bézout number in a paper is not an estimate of how much work a computation will be. It is an upper bound on how many answers there are, and the relationship between it and the cost of finding them depends entirely on how quickly the hopeless paths give up — which is a property of the implementation, not of the mathematics.

On this site the ratio is measured rather than assumed, and the figures print it: how many paths were tracked, how many arrived, and how many steps the whole run took. A reader who wants to know whether a count was expensive can read all three, and the second divided by the first is not the answer to that question.

What this makes readable

Essays that name this one as a prerequisite.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

The 8 of 12 essays linking to this one that name the most of the same objects.

The objects this essay names

Each one links to every other essay that touches it.

BezoutComputational costGough platformHomotopy continuationMonodromyPath trackingPolynomial systemSolutions at infinity