Research notes on every problem, and a library of the papers behind them. Built from the open erdos repository.
Updated
Two odd-greedy termination conventions
Problem 282 uses the least unused allowed denominator whose reciprocal does not exceed the remainder. The usual odd-greedy algorithm allows a denominator to be used again. Pihko's paper defines the latter rule in equations (2.1)--(2.2), and Remark 2.4 identifies the possible repetition. The following elementary reduction compares the universal questions. It does not identify the two trajectories for every input.
Write for ordinary odd greedy and for the rule requiring unused odd denominators. Both start from a rational with , in lowest terms with odd denominator. Both stop at remainder zero. Subtracting an odd-denominator unit fraction preserves the property that the reduced denominator is odd.
For any remainder , let be the smallest positive odd integer with . Then . If , the new remainder is . If , minimality gives , and therefore
Consequently every subsequent denominator in strictly increases until termination. In this starting range and coincide.
If , chooses twice and reaches . Thus universal termination of on is equivalent to its universal termination on .
For , consider instead the initial consecutive prefix . If the remainder after choosing is at least , the next choice is : all smaller odd denominators have been used, and is affordable. The prefix must reach remainder less than , or zero, by at latest. Indeed, if it has reached , then
At that point every used reciprocal exceeds the remainder. Ordinary greedy from the remainder can use none of those denominators; the strict-increase argument applies thereafter. Hence the rest of is an ordinary odd-greedy trajectory from a rational in with odd reduced denominator, unless it has already terminated.
It follows that these three assertions are equivalent:
- terminates for every rational with odd reduced denominator.
- terminates for every rational with odd reduced denominator.
- terminates for every rational with odd reduced denominator.
The reduction is author-recorded. Its only source use is to identify the ordinary algorithm; the inequalities above give the complete argument. No computational experiment or unproved termination premise is used. The precise finite assertion is a prefix of at most six choices before reduces to , not a bound on total running time. Neither universal assertion has been proved here. For example, at ordinary greedy immediately repeats , whereas the unused rule cannot do so.
The remaining hard step is termination of ordinary odd greedy in the smaller range. Checking bounded numerators, denominators or trajectory lengths cannot replace it without an additional descent invariant. A useful test of a proposed invariant is whether it decreases across every greedy subtraction in this range; stop the route if it only bounds finitely many initial inputs. The reduction says nothing about other residue classes, square denominators, or an arbitrary allowed set in Problem 282.