Complete Word-RAM solver and initialized program for [CIMY26], Theorem 2.2 #
Assembles preprocessCode and queryStep into solveFromTries, and joins inputSetupCode with
solveFromTries into the complete initialized Program .standard 56 (program).
Main definitions #
Cslib.Algorithms.WordRAM.TrimmedYates.solveFromTries: evaluates selected entries ofcoveringProduct/ rankedsubsetConvolutionfrom pre-built depth-dtries forfandg.Cslib.Algorithms.WordRAM.TrimmedYates.program: complete flatProgram .standard 56evaluating selected entries ofcoveringProduct/ rankedsubsetConvolutionfromState.init inst.encode.
Main results #
Cslib.Algorithms.WordRAM.TrimmedYates.exec_solveFromTries,exec_solveFromTries_subsetConvolution:ExecWithinbounds for generalcoveringProduct(highPeakbound) and rankedsubsetConvolution([CIMY26], Theorem 2.2 core).Cslib.Algorithms.WordRAM.TrimmedYates.computesListInTime_program:ComputesListInTimeboundInstance.timeBoundforcoveringProducton all widths satisfyingInstance.FitsWidth.Cslib.Algorithms.WordRAM.TrimmedYates.executesList_program: complete initialized Word-RAM bound for [CIMY26], Theorem 2.2 / Problem 2.1 (ExecutesListinO((d + 1)² · (n + ∑_{j ≤ s} C(d, j) + |Cs| · ∑_{s ≤ j ≤ t₁ + t₂} C(t₁ + t₂, j)))instructions).
References #
- A. Björklund, T. Husfeldt, P. Kaski, M. Koivisto, Fourier meets Möbius: fast subset convolution
- A. Björklund, T. Husfeldt, P. Kaski, M. Koivisto, Trimmed Moebius inversion and graphs of bounded degree
- T. M. Chan, R. Itakura, Z. Ma, Y. Yu, 3SUM Made Simpler (Without Matrix Multiplication), k-SUM Hypothesis Refuted for Odd k, and Real 3SUM/APSP Derandomized
Answer all queries in Reg.queryPtr[0 .. Reg.queryCount - 1] from pre-built depth-Reg.dim
tries Reg.trieF and Reg.trieG, allocating preprocessing tables and the length-prefixed answer
array above Reg.free (returning the answer array header address in Reg.outPtr).
Pre-built input tries bound. From depth-d tries representing f and g below baseFree
and query masks Cs at qPtr, solveFromTries writes the encoded covering-product answers as a
length-prefixed array at Reg.outPtr within
200 * (d + 1) ^ 2 * (lowCount d s + Cs.length * max 1 (highPeak s Cs)) instructions.
Ranked subset-convolution bound from pre-built input tries ([CIMY26],
Theorem 2.2 core): when f is supported on sets of size t₁, g on sets of size t₂, and every
query C ∈ Cs has size t₁ + t₂ with s ≤ t₁ + t₂ (t₁ = t₂ = t in Theorem 2.2),
solveFromTries returns (Cs.map (subsetConvolution f g)).map Signed.encode within
200 * (d + 1) ^ 2 * (lowCount d s + Cs.length * highCount (t₁ + t₂) s) instructions.
Complete flat Program .standard 56 evaluating selected entries of covering product / ranked
subset convolution from State.init inst.encode.
program computes the encoded covering-product query answers within Instance.timeBound
instructions on every width satisfying Instance.FitsWidth.
Complete initialized Word-RAM bound for [CIMY26], Theorem 2.2 / Problem 2.1.
Given a sparse weighted set-function instance inst over Fin inst.d where leftEntries have
size t₁, rightEntries have size t₂, and queries have size t₁ + t₂ with
inst.s ≤ t₁ + t₂ (set t₁ = t₂ = t for Theorem 2.2), running program from
State.init inst.encode halts via ExecutesList with the encoded subset-convolution answers in at
most 250 * (inst.d + 1) ^ 2 * (inst.numEntries + lowCount inst.d inst.s + inst.queries.length * highCount (t₁ + t₂) inst.s) instructions.