Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

§4.2.4, p. 9: reduction to ei=1e_i = 1ei​=1 (OPT′=OPT\mathrm{OPT}' = \mathrm{OPT}OPT′=OPT)

Proved
FMMM.TSM.copy_reduction

by mikedeng1 · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-algorithmsballs-in-binsonline-matchingstochastic-matching

Let EEE be the edges between ads AAA and impression types III, with integers ei≥0e_i \ge 0ei​≥0 and n=∑iein = \sum_i e_in=∑i​ei​, and let G′G'G′ be the copy instance: eie_iei​ copies of each type iii, each copy adjacent to the neighbours of its type. Let ω0,…,ωn−1\omega_0, \dots, \omega_{n-1}ω0​,…,ωn−1​ be draws of copies, and τt\tau_tτt​ the type of the copy ωt\omega_tωt​.

  1. For every sequence of copies, the maximum matching of the realization graph of G′G'G′ equals the maximum matching of the realization graph of GGG on the types: OPT′(ω)=OPT(τ)\mathrm{OPT}'(\omega) = \mathrm{OPT}(\tau)OPT′(ω)=OPT(τ).
  2. If the copies are drawn i.i.d. uniformly, the types are drawn i.i.d. from DDD, Pr⁡[i]=ei/n\Pr[i] = e_i/nPr[i]=ei​/n: for every sequence of types τ\tauτ,
Pr⁡[the types of the draws are τ0,…,τn−1]=∏t=0n−1eτtn.\Pr[\text{the types of the draws are } \tau_0, \dots, \tau_{n-1}] = \prod_{t=0}^{n-1} \frac{e_{\tau_t}}{n}.Pr[the types of the draws are τ0​,…,τn−1​]=t=0∏n−1​neτt​​​.

This justifies applying the case ei=1e_i = 1ei​=1 to the copy instance: drawing a type from DDD and naming it uniformly among its copies is the same as drawing a copy uniformly, and the optimum does not change.

Differences from the source:

  • encoding: draw a type i ∼ D, then name it uniformly at random as one of its e_i copies → draw a copy uniformly from the n copies (unifProb over Copy e); reason: the two procedures give the same joint law of (type, name); part 2 states the type marginal
  • encoding: n i.i.d. uniform draws (balls into bins) → the counting probability unifProb on sequences Fin n → Ω, draws indexed 0, …, n − 1; reason: the uniform measure on Ωⁿ is the law of n i.i.d. uniform draws; same probabilities
Preamble
import Mathlib
import Definitions.Def_FMMM_TSM_unifProb
import Definitions.Def_FMMM_TSM_realOPT
import Definitions.Def_FMMM_TSM_Copy
import Definitions.Def_FMMM_TSM_copyEdges
Formal statement
namespace FMMM.TSM

/-- **The reduction to `e_i = 1`: `OPT′ = OPT`, and the named draws have law `D`.**
Feldman, Mehta, Mirrokni, Muthukrishnan, *Online Stochastic Matching: Beating 1-1/e*,
arXiv:0905.4100v1, §4.2.4, p. 9: "Given a set of instance Γ = (G, D, n), we reduce to a new instance
Γ′ = (G′, D′, n) with e′_i = 1 by making e_i copies of each impression type i. Then, when an
impression of type i arrives online, "name" it randomly according to one of its copies. The
resulting distribution D′ is uniform over the impression types I′ in the new instance. Let Î be
the impressions that are drawn from D in one run of the algorithm, and let Î′ be the resulting draws
from D′. By the arguments above, we achieve the desired bound on ALG/OPT′ with high probability,
where OPT′ is with respect to Î′; however we have OPT′ = OPT, since the realization graphs
Ĝ = (A, Î′, Ê′) and Ĝ′ = (A, Î, Ê) are in fact the same graph."

Let `E` have impression types `I` with integers `e : I → ℕ` and `n = ∑ e_i`.
1. For every sequence `ω` of `n` named draws (copies), the maximum matching of the copy
   realization graph equals that of the original one: `OPT′(ω) = OPT(types ω)`.
2. Under uniform named draws, the types are i.i.d. `D`: for every `τ : Fin n → I`,
   `Pr[types ω = τ] = ∏_t e_{τ t}/n`. -/
theorem copy_reduction {A I : Type} [Fintype A] [DecidableEq A] [Fintype I] [DecidableEq I]
    (E : Finset (A × I)) (e : I → ℕ) :
    (∀ ω : Fin (∑ i, e i) → Copy e,
      realOPT (copyEdges E e) ω = realOPT E (fun t => (ω t).1)) ∧
    ∀ τ : Fin (∑ i, e i) → I,
      unifProb (Copy e) (∑ i, e i) (fun ω => (fun t => (ω t).1) = τ) =
        ∏ t, (e (τ t) : ℝ) / ((∑ i, e i : ℕ) : ℝ) := by sorry

end FMMM.TSM
Source
Feldman, Mehta, Mirrokni, Muthukrishnan, Online Stochastic Matching: Beating 1-1/e, arXiv:0905.4100v1, §4.2.4, p. 9 (reduction for integer e_i)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me