Max Cut

Lax799700.MaxCut · concepts/Lax799700/MaxCut.lean · lax-799700

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    MAX CUT: is there a set SS of vertices such that at least kk edges have exactly one endpoint in SS? Since a cut can have quadratically many edges, the threshold is carried at arity two, as the cardinality of a marked binary relation, on the vocabulary Feedback Arc Set uses. The cut is read as a set of ordered pairs (CutRel), uu adjacent to vv with uu inside SS and vv outside, which on a symmetric adjacency relation counts every cut edge exactly once. Membership is by an existential second-order definition, hardness by an ordered first-order reduction from NAE-3SAT.

    Concept map
    9 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 3 statements. Each proof establishes one of them relative to its assumptions.

    1 hasLargeCut_iso proven

    2 maxCut_iff proven

    Lean source view on GitHub

    1import Mathlib.Data.Fintype.EquivFin
    2import Mathlib.Data.Set.Card
    3import Mathlib.SetTheory.Cardinal.Finite
    4import Mathlib.Logic.Equiv.Prod
    5import Mathlib.ModelTheory.Semantics
    6import Mathlib.ModelTheory.Complexity
    7import Mathlib.Tactic.FinCases
    8import Mathlib.ModelTheory.Syntax
    9import Lax799700.Feedback
    10import Lax904597.Classes
    11import Lax799700.Problems
    12
    13/-!
    14---
    15title: Max Cut
    16type: theorem
    17---
    18MAX CUT: is there a set SS of vertices such that at least kk edges have
    19exactly one endpoint in SS? Since a cut can have quadratically many
    20edges, the threshold is carried at arity two, as the cardinality of a
    21marked binary relation, on the vocabulary Feedback Arc Set uses. The cut
    22is read as a set of ordered pairs (CutRel), uu adjacent to vv with uu
    23inside SS and vv outside, which on a symmetric adjacency relation
    24counts every cut edge exactly once. Membership is by an existential
    25second-order definition, hardness by an ordered first-order reduction
    26from NAE-3SAT.
    27
    28-/
    29
    30namespace Lax799700.MaxCut
    31
    32open Lax799700.Feedback
    33
    34open FirstOrder
    35
    36open Language Structure
    37
    38section Semantics
    39
    40variable {A : Type}
    41
    42/-- The cut determined by `S`, as a relation: `a` is adjacent to `b`, `a` lies
    43inside `S` and `b` outside. Reading the cut as a set of ordered pairs of this
    44shape counts every cut edge of a symmetric adjacency relation once. -/
    45def CutRel (Adjp : A → A → Prop) (S : A → Prop) (a b : A) : Prop :=
    46 Adjp a b ∧ S a ∧ ¬S b
    47
    48/-- Some cut is at least as large as the number encoded by the `Kp`-marked
    49pairs: “some cut has at least `k` edges”. -/
    50def MaxCutOn (Adjp : A → A → Prop) (Kp : A → A → Prop) : Prop :=
    51 ∃ S : A → Prop,
    52 {p : A × A | Kp p.1 p.2}.ncard ≤ {p : A × A | CutRel Adjp S p.1 p.2}.ncard
    53
    54end Semantics
    55
    56section Problem
    57
    58/-- An arc-marked graph has a cut at least as large as its marked relation.
    59(Finiteness of the universe is part of the property: cardinality thresholds
    60are only meaningful on finite structures.) -/
    61def HasLargeCut (A : Type) [markedArcGraph.Structure A] : Prop :=
    62 Finite A ∧ MaxCutOn (MAGAdj (A := A)) (MAGMarked (A := A))
    63
    64end Problem
    65
    66open Lax904597.Problems Lax904597.Classes Lax799700.Problems
    67
    68/-- The property `HasLargeCut` is isomorphism-invariant. -/
    69axiom hasLargeCut_iso : ∀ {A B : Type} [Lax799700.Feedback.markedArcGraph.Structure A] [Lax799700.Feedback.markedArcGraph.Structure B],
    70 (A ≃[Lax799700.Feedback.markedArcGraph] B) → (HasLargeCut A ↔ HasLargeCut B)
    71
    72/-- The problem MaxCut: does the structure satisfy `HasLargeCut`? -/
    73def MaxCut : DecisionProblem Lax799700.Feedback.markedArcGraph :=
    74 DecisionProblem.ofPred HasLargeCut
    75
    76/-- The yes-instances of MaxCut are exactly the structures satisfying
    77`HasLargeCut`. -/
    78axiom maxCut_iff : ∀ (A : Type) [Lax799700.Feedback.markedArcGraph.Structure A], MaxCut A ↔ HasLargeCut A
    79
    80/-- MaxCut is NP-complete. -/
    81axiom maxCut_NP_complete : NP.Complete MaxCut
    82
    83end Lax799700.MaxCut
    84
    Show ProofShow ProofShow Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…