Decoding, and well-formed graph crawling is NP-complete
Lax117614.CrawlDecoding · concepts/Lax117614/CrawlDecoding.lean · lax-117614
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
The decoder is sound: an instance it reads off a presented website has a crawl within budget exactly when the presented website graph is a yes-instance of the graph crawling problem. It is total on well-formed websites: every nonempty presented website with exactly one root decodes to an instance. And well-formed graph crawling, whose yes-instances are exactly the website graphs with one root and a cheap crawl, is NP-complete, so the restriction the decoder needs loses nothing.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax904597.Classes |
| 2 | import Lax117614.WebsiteGraphs |
| 3 | import Lax117614.GraphCrawlingProblem |
| 4 | import Lax117614.CrawlInstances |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: Decoding, and well-formed graph crawling is NP-complete |
| 9 | type: theorem |
| 10 | --- |
| 11 | The decoder is sound: an instance it reads off a presented website has a |
| 12 | crawl within budget exactly when the presented website graph is a |
| 13 | yes-instance of the graph crawling problem. It is total on well-formed |
| 14 | websites: every nonempty presented website with exactly one root decodes |
| 15 | to an instance. And well-formed graph crawling, whose yes-instances are |
| 16 | exactly the website graphs with one root and a cheap crawl, is NP-complete, |
| 17 | so the restriction the decoder needs loses nothing. |
| 18 | -/ |
| 19 | |
| 20 | namespace Lax117614.CrawlDecoding |
| 21 | |
| 22 | open FirstOrder FirstOrder.Language Structure |
| 23 | open Lax904597.Problems Lax904597.Classes |
| 24 | open Lax117614.WebsiteGraphs Lax117614.GraphCrawlingProblem Lax117614.CrawlInstances |
| 25 | |
| 26 | /-- The decoder is sound: an instance it reads off a presented website has a |
| 27 | crawl within budget exactly when the presented website graph is a |
| 28 | yes-instance of GraphCrawling. -/ |
| 29 | axiom crawlDecode_sound : ∀ (S : FinPresentation siteGraph) (i : CrawlInstance), |
| 30 | i ∈ crawlDecode S → (ConcreteCrawlHolds i ↔ GraphCrawling (Fin S.card)) |
| 31 | |
| 32 | /-- The decoder is total on well-formed websites: a nonempty presented website |
| 33 | with exactly one root decodes to an instance. -/ |
| 34 | axiom crawlDecode_total : ∀ S : FinPresentation siteGraph, |
| 35 | 0 < S.card → Fin S.card ⊨ crawlWFSentence → (crawlDecode S).isSome |
| 36 | |
| 37 | /-- The yes-instances of WFGraphCrawling are exactly the website graphs with |
| 38 | exactly one root satisfying `HasCheapCrawl`. -/ |
| 39 | axiom wfGraphCrawling_iff : ∀ (A : Type) [siteGraph.Structure A], |
| 40 | WFGraphCrawling A ↔ (A ⊨ crawlWFSentence ∧ HasCheapCrawl A) |
| 41 | |
| 42 | /-- WFGraphCrawling is NP-complete: the restriction to well-formed websites |
| 43 | loses nothing. -/ |
| 44 | axiom wfGraphCrawling_NP_complete : NP.Complete WFGraphCrawling |
| 45 | |
| 46 | end Lax117614.CrawlDecoding |
| 47 |
Builds on
Used by
none
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments