Lambdia

The jeep problem

A driver who eats one apple per loaded mile delivers 833 of 3000 across a thousand miles, because the price of a mile is the ceiling of the stock over the truck's capacity: three apples, then two, then one. The continuous optimum is 2500/3, but rounding the switch point down to mile 333 leaves 2001 apples needing three passes and produces a fake 834. A lower bound on loaded traversals proves 833 optimal without a dynamic programme, and the free return legs are the clause that separates 833 from 533.

Also asked asjeep problem · camel and bananas · desert crossing

Read the full explanation833 Apples, and the Surplus Apple That Rides for Free

Trading brainteasers

The 25% Gain From Swapping Needs a Distribution That Does Not Exist

Requiring the fifty-fifty at every amount you could open forces the weights to satisfy f(x) = f(x/2)/2, whose only solutions are proportional to 1/x, and that integrates to infinity at both ends. Conditional on the pair, the swap gains the smaller amount or loses it with equal chance, which is zero and needs no assumption at all. The article carries a proper spread where the conditional answer is genuinely x/2, and the infinite-mean spread where swapping really is right at every observable amount.

0

5050 Minus the Total, in One Pass

Sorting the list finds the gap and is merely wasteful, which is why the article says so rather than striking it out. The subtraction works because 5050 is a closed form available before the list is read, and the two conditions carrying it are distinctness and a known range. The article adds the duplicate-hunting mirror image, the sum-of-squares route when two values are absent, and the exclusive-or accumulator for when the total would overflow.

0

Twelve Marbles, Three Weighings, and Twenty-Seven Ways to Land

Twenty-four possible answers against 3^3 = 27 outcome sequences leaves just enough room, and four against four splits those answers into exactly 8, 8 and 8. Six against six always tips, so it wastes the level outcome and leaves twelve answers for nine remaining sequences, which makes halving impossible rather than merely slow. The counting argument bounds outcome sequences rather than strategies, so it rules out every adaptive continuation at once, and the explicit schedule closes the positive half.

0