Who found it, and when

What the hindsight was worth

The best restart cutoff for the one tessellation search with a heavy tail was read off a hundred and twenty measured runs, which nobody running the search could have done in advance. The universal schedule needs no such knowledge, and on the same runs it costs 3,222 nodes in expectation against 512 for the cutoff chosen by looking — a factor of 6.3, which is close to the base-two logarithm of that cutoff, as the theory of the schedule says it should be. A larger unit brings the schedule within a few per cent of the hindsight, and choosing the unit is choosing the scale the schedule was meant not to need.

Assumes The tail was named somewhere else and The cure was named first.

The tail was named somewhere else records a borrowing. A search for a mountain-valley lettering of the rhombille tessellation patch costs eighty-four steps on its best run and does not finish inside twenty thousand on two runs in five, and stopping every attempt at a hundred steps and starting again is thirty-two times cheaper than letting each one run. None of that was found here. The heavy tail was described in the study of satisfiability search in the late 1990s, the restart that answers it in 1998, and the arithmetic of restarting a random search in 1993.

The essay ends by pointing at the part of the borrowing it did not use. The cutoff of a hundred was read off the measured runs afterwards, and nobody running the search could have chosen it in advance. The 1993 result is about exactly that situation: a restart schedule that needs no knowledge of the distribution at all, with a guarantee attached. Running it on the same runs says how much the hindsight was worth.

What the hindsight was worthThe expected cost of finding a lettering by restarting on the universal schedule, at several choices of its unit, against the best fixed cutoff read off the measured runs. At a unit of one node — the schedule that assumes nothing — the cost is a little over six times the hindsight cutoff's.the bar is what the whole job costs in expectation, in nodeson the rhombille patch, over the same 120 measured runs as the fixed cutoffsbest fixed, 100512chosen after seeing the runsunit 132226.30 times the best fixedunit 228545.58 times the best fixedunit 525424.97 times the best fixedunit 1021524.20 times the best fixedunit 2017623.44 times the best fixedunit 508481.66 times the best fixedunit 1005511.08 times the best fixedunit 2006381.25 times the best fixeda unit of one assumes nothing about the runs; every larger unit is a guess at their scale
Fig. 1 What finding a lettering of the rhombille patch costs in expectation, restarting on the universal schedule at several choices of its unit, against the best fixed cutoff read off the measured runs. At a unit of one node — the schedule that assumes nothing — the cost is 6.3 times the hindsight cutoff’s.

The schedule that needs no knowledge

Michael Luby, Alistair Sinclair and David Zuckerman considered a Las Vegas algorithm — one whose answer is always right and whose running time is random — and asked how to stop and restart it so as to minimise the expected total time.

They proved two things. If the distribution of running times is known, the best strategy is a fixed cutoff: stop every attempt at the same length, the length that minimises one attempt’s expected cost divided by its chance of success. That is the strategy the restart curve found, at a hundred nodes.

If the distribution is not known, there is a single schedule that works for every distribution. It runs attempts with cutoffs in the sequence

1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 4, 8, …

times a chosen unit — each block is the block before it repeated twice, followed by a doubling. Every power of two appears, each half as often as the one below it, so whatever the right cutoff is, the schedule spends a bounded share of its effort near it. They showed its expected cost is within a logarithmic factor of the best fixed cutoff’s, for any distribution whatever, and that no schedule ignorant of the distribution can do better than a logarithmic factor in the worst case.

The schedule that needs no knowledgeThe cutoffs the universal restart schedule uses on its first thirty-one attempts, in units of the smallest. Every power of two is tried, each one half as often as the one below it, so whatever the right cutoff turns out to be, the schedule spends a bounded share of its effort near it without having been told.the cutoff for each attempt, in turn1, 1, 2, 1, 1, 2, 4, … — each block is the block before it twice, and then a doubling44844816attempt 1attempt 31the first thirty-one attempts at a unit of one node · the cutoff doubles only after the smaller ones have been tried twice as often
Fig. 2 The cutoffs the universal schedule uses on its first thirty-one attempts, in units of the smallest. Each power of two is tried half as often as the one below it, so the schedule keeps returning to short attempts while it works its way up to long ones.

Pricing it on the measured runs

The runs make the price computable exactly rather than by simulation. Each of the hundred and twenty measured runs is a number of nodes, or unfinished at twenty thousand.

An attempt with cutoff cc costs E[min(X,c)]\mathbb{E}[\min(X, c)] — the average over the runs of the smaller of the run’s length and the cutoff — and fails with probability P(X>c)P(X > c), the share of runs longer than cc. Attempt ii on the schedule is reached only if every earlier attempt failed, so the expected total is the sum over attempts of the chance of reaching it times its cost:

E[total]=i(j<iP(X>cj))E[min(X,ci)]\mathbb{E}[\text{total}] = \sum_i \Bigl(\prod_{j<i} P(X > c_j)\Bigr)\,\mathbb{E}[\min(X, c_i)]

The sum is run until the chance of still being searching is below a part in a trillion. Nothing is sampled: the same hundred and twenty numbers that produced the fixed-cutoff curve produce this one, so the comparison is between two strategies on one distribution.

At a unit of one node the answer is 3,222 nodes. The best fixed cutoff, a hundred, costs 512. The universal schedule pays 6.3 times the hindsight’s price.

A logarithm, measured

A factor of 6.3 is not a random number, and the theory says what to compare it with.

The guarantee is that the schedule costs at most 192(log2+5)192\,\ell\,(\log_2 \ell + 5), where \ell is the best fixed strategy’s expected cost. On these runs that bound is 1,375,611 nodes, which the schedule beats by more than two orders of magnitude. The constant 192 is the price of a proof that holds for every distribution, and a particular distribution is usually much kinder.

The logarithm is the part that survives, and it shows. The best cutoff is a hundred nodes, and log2100\log_2 100 is 6.64. The measured factor, 6.30, is close to it. The intuition is the schedule’s own: to reach attempts of about a hundred nodes it has to have climbed through every smaller power of two, and it spends roughly as much on each level of that climb as on the level it needed. Seven levels below a hundred, and about six and a third times the cost.

The climb can be counted exactly. In the schedule’s first thirty-one attempts the cutoff one appears sixteen times, two eight times, four four times, eight twice and sixteen once, so each of five levels is handed the same sixteen units, eighty in all. The equal division continues at every length. The first attempt with a cutoff of sixty-four is the hundred and twenty-seventh, and the first with a cutoff of a hundred and twenty-eight — the first long enough to contain the hindsight’s hundred — is the two hundred and fifty-fifth.

On the rhombille patch that has a hard consequence, because its best run is eighty-four nodes. Every attempt before the two hundred and fifty-fifth has a cutoff of sixty-four or less, so every one of them runs to its cutoff and fails, with certainty. Their cutoffs add to 896 nodes. Before the universal schedule makes a single attempt that could succeed, it has spent 896 nodes — 1.75 times the hindsight cutoff’s entire expected cost. The rest of its 3,222 is the chance that the attempt of a hundred and twenty-eight fails too, and the next climb through the short levels that follows.

That is a pleasing agreement and it should not be over-read. The factor depends on how much of the distribution’s probability sits near the best cutoff; a distribution with more short runs would make the lower levels pay for themselves and the factor smaller. What the measurement supplies is one instance with a factor close to the logarithm, which is the order the theorem predicts.

Choosing the unit is choosing the scale

The schedule has one parameter, the unit its cutoffs are multiplied by, and the table in the first figure sweeps it.

At a unit of two nodes the cost is 2,854. At five, 2,542. At ten, 2,152; at twenty, 1,762; at fifty, 848. At a hundred it falls to 551, within eight per cent of the hindsight cutoff, and at two hundred it rises again to 638.

So the schedule’s gap from the hindsight is almost entirely a matter of the unit. At the right unit it is nearly as good as knowing the distribution. The difficulty is that the right unit is the best cutoff, near enough — a hundred again — and choosing it requires knowing the scale of the running times, which is the knowledge the schedule exists not to need.

What the hindsight was worthThe expected cost of finding a lettering by restarting on the universal schedule, at several choices of its unit, against the best fixed cutoff read off the measured runs. At a unit of one node — the schedule that assumes nothing — the cost is a little over six times the hindsight cutoff's.the bar is what the whole job costs in expectation, in nodeson the rhombille patch, over the same 120 measured runs as the fixed cutoffsbest fixed, 100512chosen after seeing the runsunit 132226.30 times the best fixedunit 424864.86 times the best fixedunit 1617503.42 times the best fixedunit 6410141.98 times the best fixedunit 2567461.46 times the best fixeda unit of one assumes nothing about the runs; every larger unit is a guess at their scale
Fig. 3 The same comparison with the unit multiplied by four each time. The cost falls from 3,222 at a unit of one to 1,014 at sixty-four and 746 at two hundred and fifty-six — each step toward the scale of the runs buys back part of the hindsight’s advantage.

A unit is a guess at the scale of the distribution, and a good guess is worth a factor of six. A unit of one is the honest choice for somebody with no information. Any larger unit is an assumption about how long a run of the search usually takes, and on the rhombille patch that assumption, if right, recovers nearly everything.

That is a sharper version of the original borrowing’s caution. The restart result transferred intact; what did not transfer was the measured cutoff, which looked like a property of the search and was a property of having already run it.

The same price in a different problem

The shape of this gap has a familiar form outside search.

A person going skiing for an unknown number of days can rent skis each day or buy them once. If the number of days were known the choice would be trivial. Not knowing it, the best a strategy can guarantee is to rent until the rental paid equals the purchase price and then buy — which never costs more than twice what the best choice in hindsight would have. The study of such problems, in which a decision must be made before the information that would settle it arrives, measures a strategy by that ratio to the hindsight optimum.

The universal restart schedule is the same kind of object. It is an online strategy for a decision — when to give up on an attempt — that depends on a distribution not yet seen, and its worst-case ratio to the hindsight optimum is a logarithm where the skier’s is a constant. The 6.3 measured here is that ratio, observed on a folding search, and it is a small illustration of a large idea: the price of not knowing can be bounded, and the bound is a different kind of number from the saving the knowledge would buy.

Stopping early costs less than finishingWhat a cutoff-and-restart strategy would have cost on the one patch whose search has a long tail. Each bar is the expected total for stopping every attempt at that many nodes and starting again with a fresh order: one attempt's cost divided by the chance that attempt succeeds.the bar is what the whole job costs if every attempt is stopped thereon the rhombille patch, read off 120 measured runsstop at 10051219% of runs finish by thenstop at 15053226% of runs finish by thenstop at 20053033% of runs finish by thenstop at 30069834% of runs finish by thenstop at 500105435% of runs finish by thenstop at 1000162442% of runs finish by thenstop at 2000263847% of runs finish by thenstop at 5000569749% of runs finish by thena run that never finished counts as above every cutoff, so the tail is read conservatively
Fig. 4 The fixed cutoffs the hindsight chose among, read off the same runs: stopping every attempt at a hundred nodes costs 512 in expectation, and the cost rises steadily with the cutoff. The universal schedule does not know this curve and pays for not knowing it.

What is being restarted

It is worth being concrete about what an attempt produces, because the whole arithmetic depends on it and it is easy to lose sight of.

A finished attempt returns a lettering of the rhombille patch — a mountain or valley for each of its creases — whose arcs close no loop, which the search checks as it goes and which is then put past the four conditions at every vertex and past a folded sheet rebuilt from scratch. That is what makes the search a Las Vegas algorithm in the borrowed sense: its answer is always right when it comes, and only the time to it is random. An unfinished attempt produces nothing at all, and discarding it loses nothing but the nodes it spent.

A lettering of the rhombille patch that agrees with itselfThe rhombille tessellation patch, lettered by a search that tests the arcs the letters force at every step rather than after every letter is chosen. Mountain and valley are distinguished by colour and by dash. Every panel of the folded sheet can be ordered consistently with these letters, which is not true of the lettering the construction itself produces.a lettering of the patch that agrees with itselffound by testing the arcs while the letters were chosen, not after561 nodes · 246 backtracks · verified against a rebuilt folded sheet157 panels · 282 creasesits own lettering sends its panels round in a circle0 of 200 random letterings agree with themselvesthis one was found in 561 nodes and 246 backtracksit differs from the drawn lettering on 155 of 282 creasesthe drawing is the pattern; nothing here is a picture of the folded object
Fig. 5 What a finished attempt returns: a lettering of the rhombille patch whose arcs close no loop, checked afterwards by the two tests that did not find it. Every attempt on either strategy is looking for one of these, and restarting throws away only the partial search, never a found lettering.

That is also why the comparison is fair to both strategies. Neither the fixed cutoff nor the universal schedule changes what counts as success or how an attempt searches. They differ only in when they give up, and the question of when to give up on a search whose answer, when it comes, is certain is exactly the question the 1993 result answered.

The other borrowings this field has recorded had a different shape. A test imported without its hypothesis took a rule and lost the sentence saying which sheets it applied to; the same vertex found four times was rediscovery, the same object found independently. This one imported a theorem with its hypothesis intact — attempts independent, answers certain — and what it lost was a number. The fixed cutoff was carried over as though it were a property of the search, and it was a property of a particular set of runs.

And then the coin

The measurement has a complication that the borrowed literature would have predicted, and it changes what the 6.3 is a price of.

The difficulty was in the coin found where the rhombille patch’s tail comes from. The search chooses which letter to try first on each crease by tossing a coin, so that different seeds give different letterings; replace the coin with a constant and the patch is lettered in about eighty steps on every run, with no spread and no tail. The heavy tail is not a property of the pattern but of the randomisation, which is exactly the framing of the 1997 measurements: a heavy tail belongs to a randomised search meeting an instance, not to the instance.

So the restart schedule here is answering a problem the coin created. With the coin removed, neither the fixed cutoff nor the universal schedule is needed: the search finishes in its minimum every time.

That is not a reason to discard the measurement. A search usually has a coin for a reason — here, to explore letterings rather than return the same one — and a practitioner who wants the exploration and cannot afford the tail needs exactly the schedule priced above. But it is a reason to say that the 6.3 is a price paid for a design choice, and that the cheapest remedy for a heavy tail is sometimes to find where it came from.

Four patches the search walks through, and one it does notThe same search run from a hundred and twenty different seeds on each of five patches, and the middle result. Four of the patches cost between twenty-five and fifty-six nodes whatever the seed. The fifth runs from eighty-four nodes to past the budget, on the same pattern and the same code.the bar is the middle run of a hundred and twentysame pattern, same code — only the order the letters are tried in differsthe square patch2725 at best · 27 at the middle · 36 at worstthe elongated patch3432 at best · 34 at the middle · 39 at worstthe hexagonal patch4339 at best · 43 at the middle · 51 at worstthe triangular patch4539 at best · 45 at the middle · 53 at worstthe rhombille patch16684 at best · 166 at the middle · 48 of 120 unfinished at 20000an unfinished run is left out of the middle rather than counted as its budget
Fig. 6 The distributions the whole question comes from: five tessellation patches, each searched a hundred and twenty times. Four finish between twenty-five and fifty-six nodes whatever the seed; the rhombille patch runs from eighty-four nodes to past the budget, which is the tail both the hindsight cutoff and the universal schedule are answering.

What the comparison cannot show

The figures price two strategies on a hundred and twenty runs, and a hundred and twenty runs are a sample.

The hindsight cutoff was chosen on the same runs it is priced on, which flatters it: a cutoff chosen on one sample and priced on another would do slightly worse, and the gap to the universal schedule would be slightly smaller. Forty-eight of the runs did not finish within twenty thousand nodes, and the pricing counts them as longer than every cutoff, which is conservative for short cutoffs and uninformative about how long those runs would have been — so the schedule’s attempts past twenty thousand cannot be priced at all, and at units of one the schedule’s probability of still searching when it reaches that length is small enough not to matter.

Nor can the figures show a different patch. The four patches with no tail would make the universal schedule pointless and a fixed cutoff pointless too, since every run finishes near its minimum. The comparison is informative only where there is a tail, and among the five patches measured there is one.

Which condition the search actually backtracks onFor each of five patches, how many times the search took a letter back and what refused it. Every backtrack is a loop in the arcs the letters force. The four conditions at a vertex — developability, Kawasaki, Maekawa and the big-little-big lemma — refuse nothing at all, because they are propagated into the choice rather than tested after it.the bar is how many times the search took a letter backand every one of those was the arcs closing a loop, never a vertex running out of labellingsthe square patch126 nodes · 1 refused by the arcs · 0 by the vertex conditionsthe elongated patch335 nodes · 3 refused by the arcs · 0 by the vertex conditionsthe hexagonal patch241 nodes · 2 refused by the arcs · 0 by the vertex conditionsthe triangular patch747 nodes · 7 refused by the arcs · 0 by the vertex conditionsthe rhombille patch246561 nodes · 246 refused by the arcs · 0 by the vertex conditionsthe vertex conditions are propagated rather than tested, so they narrow the choice instead of refusing it
Fig. 7 Where each patch’s search spends its backtracks. Every one is a loop in the arcs the letters force and none is a vertex condition refusing a letter — the structure of the work a restart discards, on the patch with the tail and on the four without.

And they cannot show what a worst case looks like. A logarithmic factor is a worst-case guarantee, the kind of statement hardness results make about the hardest instance rather than a typical one, and one measured distribution landing near the logarithm says nothing about how bad the factor can be on a distribution built to defeat the schedule.

The search the prices assume

Attempts are independent. Each restart reseeds the coin and starts from nothing, carrying no learnt constraint forward, which is what makes a Las Vegas algorithm’s restart arithmetic apply. A search that learnt from its failed attempts would be a different object with different prices.

The runs are a faithful sample of the distribution. The pricing treats the hundred and twenty measured lengths as the distribution itself. With more runs the numbers would move a little and the logarithmic shape would not.

And cost is nodes. The expected totals count search nodes, not time, and a node’s cost is taken to be the same on every attempt.

How the prices were computed

Both prices are exact expectations over the same runs. The fixed-cutoff cost is one attempt’s expected cost over its chance of success; the universal schedule’s is the sum over attempts of the chance of reaching each times its expected cost. No attempt is simulated.

The schedule is required to cost more than the hindsight cutoff and less than its own guarantee, and some unit larger than one is required to improve on a unit of one. The first condition is what makes the hindsight worth something; the second is what makes the guarantee a guarantee; the third is what makes the unit a real choice.

Still open: whether the unit can be learnt while searching

The gap between a unit of one and a unit of a hundred is most of the gap to the hindsight, and a unit is a single number. That suggests a middle course the two strategies bracket: estimate the scale of the running times from the attempts already made, and set the unit from the estimate. Every failed attempt carries information about the distribution — at the least, that runs of that length fail — and a schedule that adjusted its unit as it went would sit somewhere between knowing nothing and knowing everything.

Whether that recovers the factor of six without giving up the guarantee is a question the borrowed field has studied, and it is worth asking here only as a measurement on these runs: the instrument exists and the answer is a few lines of arithmetic on numbers already in hand.

The other continuation runs back through the diagnosis. If the tail comes from the coin, then the question worth asking of any randomised search on a crease pattern is how much randomness it needs for the exploration it wants — and whether a smaller amount of randomness, spent somewhere other than on every crease, would keep the exploration and lose the tail.

The habit worth carrying is a question to put to any tuned parameter. Was it chosen before the data or after? A parameter read off the results it is evaluated on is a measurement of hindsight, and the honest comparison is always against the strategy that did not have it.

What this makes readable

Essays that name this one as a prerequisite.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

HeuristicRandomised algorithmRediscoveryRestartSearch costWorst-case analysis