Concept
Enumerating weighted tuples without storing the complete list
Order the finite mode variables. For each variable, try exponents from zero through the remaining weight budget divided by its positive weight, then recurse to the next variable. A prefix is never a dead end: setting all remaining exponents to zero completes it. Thus the number of visited prefixes is at most one plus the number of complete tuples times the number of variables. Consecutive outputs are separated by only polynomial work. Store the current exponents and remaining budgets, not all tuples; both the number of variables and each exponent bit length are polynomial in root s.
0
1
Updated 2026-11-08
Tags
Math