Comments on: NP Complete
http://www.metafilter.com/190520/NP-Complete/
Comments on MetaFilter post NP CompleteFri, 19 Feb 2021 08:49:03 -0800Fri, 19 Feb 2021 08:49:03 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60NP Complete
http://www.metafilter.com/190520/NP-Complete
<a href="https://www.youtube.com/watch?v=5ovdoxnfFVc">Zero Knowledge Proofs</a> - "By their name, they are proofs that reveal absolutely no information to the verifier... at the end of it, you know nothing more than you knew before except that the claim I made was true... It seems counterintuitive to say the least because we somehow associate conviction with information transfer."[<a href="https://crypto.stackexchange.com/questions/64347/can-you-explain-what-an-np-statement-is-when-they-refer-to-it-in-zero-knowledge">1</a>,<a href="https://en.wikipedia.org/wiki/Zero-knowledge_proof">2</a>,<a href="https://crypto.stanford.edu/cs355/18sp/lec3.pdf">3</a>] <br /><br />also btw...
<ul><li><a href="https://www.quantamagazine.org/computer-scientists-achieve-crown-jewel-of-cryptography-20201110/">Computer Scientists Achieve 'Crown Jewel' of Cryptography</a> - "A cryptographic master tool called indistinguishability obfuscation has for years seemed too good to be true. Three researchers have figured out that it can work."[<a href="https://www.forbes.com/sites/tonybradley/2020/12/15/cryptographers-unveil-breakthrough-in-achieving-indistinguishability-obfuscation/">4</a>,<a href="https://www.schneier.com/blog/archives/2020/11/indistinguishability-obfuscation.html">5</a>,<a href="https://crypto.stackexchange.com/questions/44770/what-is-indistinguishability-obfuscation">6</a>,<a href="https://eprint.iacr.org/2013/454.pdf">7</a>,<a href="https://www.cs.columbia.edu/2015/indistinguishability-obfuscation-secure-software/">8</a>,<a href="https://elaineou.com/2016/06/07/obfuscated-obfuscation/">9</a>]</li>
<li><a href="https://spectrum.ieee.org/tech-talk/computing/software/ibm-makes-cryptographic-paradox-practical">IBM Makes Encryption Paradox Practical</a> - "'Fully homomorphic' cryptography allows... for the processing of encrypted files without ever needing to decrypt them first."</li></ul>post:www.metafilter.com,2021:site.190520Fri, 19 Feb 2021 08:42:14 -0800kliulessNPZKPcryptographycomputationcomplexityalgorithmsmaththeoryproofknowledgeinformationlogicobfuscationprogrammingencryptionBy: He Is Only The Imposter
http://www.metafilter.com/190520/NP-Complete#8069036
I tried watching this a few days ago and it went way over my head. If anyone wanted to break it down a little bit further - or maybe even just put in into some more context -- I'd be much obliged.comment:www.metafilter.com,2021:site.190520-8069036Fri, 19 Feb 2021 08:49:03 -0800He Is Only The ImposterBy: polytope subirb enby-of-piano-dice
http://www.metafilter.com/190520/NP-Complete#8069039
Computerphile published a <a href="https://www.youtube.com/watch?v=HUs1bH85X9I">video</a> about zero knowledge proofs a few years ago.comment:www.metafilter.com,2021:site.190520-8069039Fri, 19 Feb 2021 08:56:40 -0800polytope subirb enby-of-piano-diceBy: Pirate-Bartender-Zombie-Monkey
http://www.metafilter.com/190520/NP-Complete#8069041
@He_is_only_the_imposter:
As I understand it, it's like "informational escrow". I need you to accept that my information is correct, valid, etc. But if I show you the information, you can steal it. So I put it into "escrow".
You can look at it inside the "IE" box, but all you will see is the "true" light flashing. The details are shrouded.
You have now verified that my claim about the information is "true", but the information itself has not been "unlocked" in the process in a way that would allow it to be stolen..
I think that's right.comment:www.metafilter.com,2021:site.190520-8069041Fri, 19 Feb 2021 09:06:21 -0800Pirate-Bartender-Zombie-MonkeyBy: Balthamos
http://www.metafilter.com/190520/NP-Complete#8069049
I like to watch videos like this Numberphile episode as an alternative to hallucinogenics. They reveal the complete and utter boundedness of my understanding of anything/everything and at the same time the complete and utter boundary-lessness of anything/everything. It makes me feel very calm.comment:www.metafilter.com,2021:site.190520-8069049Fri, 19 Feb 2021 09:34:52 -0800BalthamosBy: cortex
http://www.metafilter.com/190520/NP-Complete#8069052
This was interesting and I feel like I'm in roughly the same space as Numberphile in that I followed the general outline Avi gave but feel like I need a better understanding of the actual <i>how</i> of the process of translating a given mathematical statement to a map. Would love to see an accessible explanation of that Cook-Levin process.
One thing I wonder about Avi's explanation vs. Numberphile's questions: how much of the disconnect is Avi doing the mathematician thing of saying something is easy and simple (e.g. whatever the Cook-Levin algorithm is I guess) and not also saying "...and also computationally enormous and impractical" in a way that better conveys why it's not a magic machine that collapses the complexity of everything.
Like my gut here is the bit that I didn't understand to be explicitly outlined in this video is that the Cook-Levin algorithm is a simple, and solved, and works, and also is hugely impractical in exactly the same way that computing NP Complete problems is hugely impractical. So it doesn't solve the problem of high-complexity computation time, it just creates an isomorphism between all high-complexity NP Complete problems and the specific elegant NP Complete problem of testing a mapping for 3-colorability? But I'm not confident that I've got that right in any case.
The other thing that I'm unsure about with the Zero Knowledge Proof process is: if the way to test someone's black box proof is to check local subsets of the solution (e.g. checking a random pair of adjacent countries in a map for valid different colors), then you can prove your black box works by always producing a good pair. But to test every single pair would for a large problem be a ton of work, yeah? So do you need to check every single pair to accept the black box proof, or do you simply check a large enough sample to reduce the chances of an invalid mapping to a very very small number and call it a day?comment:www.metafilter.com,2021:site.190520-8069052Fri, 19 Feb 2021 09:41:28 -0800cortexBy: cortex
http://www.metafilter.com/190520/NP-Complete#8069054
(I should say that I feel like Avi was addressing the enormous complexity thing when he clarified that Wiles' FLT proof would, if translated into the formal logic that presumably the Cook-Levin algorithm processes, would go from being a whatever-hundred page paper to being millions of pages of logic. I just wish there had been a little more actually direct discussion of that and of the complexity implications during the interview to make that bit clearer.)comment:www.metafilter.com,2021:site.190520-8069054Fri, 19 Feb 2021 09:43:56 -0800cortexBy: ikea_femme
http://www.metafilter.com/190520/NP-Complete#8069055
As I understand it, a zero knowledge proof would be like, "I'd like to know if Alice's balance is high enough to pay for this transaction" and a zero knowledge proof is a scheme where Alice can prove it without sharing her balance or directly asking a trusted third party to check the balance for you. So it could be like "I have an algorithm that only returns true and a verification code if I put in a signed bank statement, your requested minimum balance, and your public key. If I tamper with any of these values, your algorithm will tell you that I'm lying."
Obviously, that's not the only case, but that's part of how Monero works so you can validate transactions without actually knowing who has what balance.
A popular example is imagine if you want to prove to a blindfolded person you have a flat coin with a different decal on each side, but they suspect it might be the same design on both sides, and you don't want to say what's on the decals for some weird reason. Have that person keep the coin out of your view, and let them flip it if they choose to. They then show you the coin and ask it's been flipped. Each time, there's a 50% chance you can guess correctly if they're the same, but it's 100% of the time if the designs are different. If you repeat this test a few times, it becomes half as probable each time that you're lying.comment:www.metafilter.com,2021:site.190520-8069055Fri, 19 Feb 2021 09:48:02 -0800ikea_femmeBy: rustcrumb
http://www.metafilter.com/190520/NP-Complete#8069058
FWIW, the "proof" is still somewhat probabilistic. Every time you inspect a small part of the full 3-coloring solution, you will either see two different colors, which gives you a little bit of confidence that the solution is valid, or you see two of the same color, which proves the solution is invalid. You repeat the inspection process until you have the desired level of confidence in the solution, but the adversary gets to shuffle the colors around each time, to prevent you from drawing conclusions about the relationship of nodes to each other in each subsequent round of inspections.comment:www.metafilter.com,2021:site.190520-8069058Fri, 19 Feb 2021 09:50:54 -0800rustcrumbBy: kaibutsu
http://www.metafilter.com/190520/NP-Complete#8069074
Here's a kinda-close example using public key crypto:
You have a public key and private key, and the private key is never revealed. We start a conversation, and I want to verify that you are who you say you are by determining whether you have your super-secret private key. To prove that you have the private key, I can encrypt a random word with the public key and send it across to you. Then all you have to do is decrypt the word with the private key and send it back. Then I still don't know what the private key is, but I do know you have it. <small>(with very high probability: if you send back a random word instead of decrypting, there's a tiiiiny chance you pick the same random word.)</small>
---
The <a href="https://en.wikipedia.org/wiki/Zero-knowledge_proof#Discrete_log_of_a_given_value">discrete log</a> example on wikipedia is similar to this, but without a public key (which in practice means we need to know that the public key is really yours, relying on some prior knowledge or a trusted third party to vouch that the public key is really yours).
The core tool in the real zero-knowledge proofs is the probabilistic interactive proof step: At each step, we either verify that you're not cheating, or that you can do a certain operation with the info you claim to have. Do it enough times, and the probability that you're telling the truth approaches 1.comment:www.metafilter.com,2021:site.190520-8069074Fri, 19 Feb 2021 10:17:55 -0800kaibutsuBy: BungaDunga
http://www.metafilter.com/190520/NP-Complete#8069105
<em>Have that person keep the coin out of your view, and let them flip it if they choose to. They then show you the coin and ask it's been flipped. Each time, there's a 50% chance you can guess correctly if they're the same, but it's 100% of the time if the designs are different. If you repeat this test a few times, it becomes half as probable each time that you're lying.</em>
I believe the canonical explanation is the "<a href="https://en.wikipedia.org/wiki/Zero-knowledge_proof#The_Ali_Baba_cave">Cave of Ali Baba</a>".comment:www.metafilter.com,2021:site.190520-8069105Fri, 19 Feb 2021 11:15:52 -0800BungaDungaBy: explosion
http://www.metafilter.com/190520/NP-Complete#8069107
Here's where the video lost me:
How do I, the observer, know that the 3-color map that you've provided me is actually a representation of the problem? What makes it clear to me that this map corresponds to "Fermat's Last Theorem" and not "Is a Hot Dog a Sandwich"?comment:www.metafilter.com,2021:site.190520-8069107Fri, 19 Feb 2021 11:17:07 -0800explosionBy: Dr. Curare
http://www.metafilter.com/190520/NP-Complete#8069111
<em>
I like to watch videos like this Numberphile episode as an alternative to hallucinogenics.</em>
¿Por qué no los dos?comment:www.metafilter.com,2021:site.190520-8069111Fri, 19 Feb 2021 11:24:13 -0800Dr. CurareBy: cortex
http://www.metafilter.com/190520/NP-Complete#8069116
explosion: I think it's that the 3-color mapping problem is just the example they're using here because it's a nice simple problem that also happens to be NP Complete. They stick with it for consistency's sake in the interviewer, but the whole thing isn't fundamentally about 3-coloring, it's about being able to generally look at a piece of the answer, for ANY question that someone has a black box solution for, and seeing that that answer is consistently correct.
So if they had a black box that could take a statement (e.g. "this food item has the sandwich property") and produce an answer, and you can give them a food item that you personally already know the sandwichness state of, and they consistently give you back an answer that confirms that knowledge for any given food item you hand them, they've produced proof that they can determine sandwichness without giving you any information you didn't already have. You know a hotdog is (or is not) a sandwich, but you don't know what their generalized method of calculating sandwichness is, only that it always works.
The video's focus on 3-colorability is enough to cover every NP Complete problem because every NP Complete problem can be translated to a 3-colorability problem, is the key thing. The actual <i>method</i> for doing that, the Cook-Levin algorithm, is something I still don't really have a good handle on, but the result of it is that if determining sandwichness is NP Complete then determining sandwichness is equivalent to determining 3-colorability.
So to put it another way: you should be able to ask about sandwichness either in the formal language of satisfying sandwichness, whatever that is, <i>or</i> in the formal language of satisfying 3-colorability, whichever is more convenient for both parties. The questions can be reduced to the same problem; either way you know the answer and the owner of the black box is establishing (at least against increasingly vanishingly small odds) that they can determine that answer for arbitrary input.comment:www.metafilter.com,2021:site.190520-8069116Fri, 19 Feb 2021 11:36:09 -0800cortexBy: polymodus
http://www.metafilter.com/190520/NP-Complete#8069119
I haven't watched the video yet but IMO one awesome part of zero knowledge is the famous theorem, IP = PSPACE.
Whether P = NP is unknown, and whether NP = PSPACE is also unknown. But the complexity theory of interactive proofs says in a tantalizing way that most truths we care to know about (decision problems) can be <em>known</em> by the act of communication between two beings (computational agents). I find that very profound, a mathematical illustration of the notion of dialectical truth.comment:www.metafilter.com,2021:site.190520-8069119Fri, 19 Feb 2021 11:41:31 -0800polymodusBy: kitten_hat
http://www.metafilter.com/190520/NP-Complete#8069155
Explosion: The reason I can't show you some arbitrary map is because we both know Cook-Levin. You can do Cook-Levin <em>for yourself</em> to translate the statement you want a truth-value for into a map. Then, if I ever answer one of the challenges in a way that is invalid for the map, you can just stop the protocol and conclude that I don't really know an answer to your problem.
You don't know how to answer the question, but you do know how to <em>phrase</em> the question using Cook-Levin, and could detect if I am answering according to an invalid translation.
Cortex: Cook-Levin style transformations are <em>actually</em> easy, to the point where we can use them to phrase questions about the correctness of real hardware chips and software systems. Of course, answering those questions efficiently on realistic problems is the subject of intense research, but it has broken through into a few applications. I think Microsoft <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/nbjorner-smt-application-chapter.pdf">actually ships (see, Industrial Adoption subsections)</a> tools that use Cook-Levin style transformations of device drivers to phrase questions like "is there an input that will make this driver crash the whole computer?"comment:www.metafilter.com,2021:site.190520-8069155Fri, 19 Feb 2021 12:24:21 -0800kitten_hatBy: polymodus
http://www.metafilter.com/190520/NP-Complete#8069187
It's interesting because as with the Microsoft example, the argument is that it seems there's an observed concordance in that in practical cases we care about, the intractable problems are often actually manageable despite the theory saying in the general case it might not be. Gurevich who is a computer scientist supported by Microsoft has mentioned there are actual projects to check the halting problem for a given piece of C code. His talks are on YouTube, pretty neat and entertaining.comment:www.metafilter.com,2021:site.190520-8069187Fri, 19 Feb 2021 13:06:06 -0800polymodusBy: sjswitzer
http://www.metafilter.com/190520/NP-Complete#8069197
This is pretty fascinating, but something eludes me. I may misunderstand, but isn't Cook-Levin about propositional logic, i.e. without quantification? I grasp the reduction of SAT to three coloring, and the reduction of any mathematical assertion to first-order logic. I'm just not seeing how first-order logic reduces to SAT. I very vaguely remember a procedure for throwing out universal quantifiers and replacing existential quantifiers with constants; I forget its name, but it seems possibly relevant?comment:www.metafilter.com,2021:site.190520-8069197Fri, 19 Feb 2021 13:21:32 -0800sjswitzerBy: sjswitzer
http://www.metafilter.com/190520/NP-Complete#8069205
This seems to be the <a href="https://en.wikipedia.org/wiki/Propositional_calculus#Equivalence_to_equational_logics">answer to my question</a>. I'll see if I can make any sense of it.comment:www.metafilter.com,2021:site.190520-8069205Fri, 19 Feb 2021 13:38:44 -0800sjswitzerBy: klausman
http://www.metafilter.com/190520/NP-Complete#8069210
When you have a proof of a statement and we both agree that statement has been transformed into a map (or graph) by the Cook-Levin process, you begin by converting your proof into a 3-coloring of the map. Then we go into a loop, the length of which being determined by my threshold for doubt, wherein:
1. You apply a random permutation of the colors in your 3-coloring. ["if we have one, we have six."]
2. I choose (probably at random) a pair of neighboring countries (vertices) and verify that they are of different colors, and I keep a tally of the color pairs I observe (Red&Blue vs. Yellow&Red, etc.)
After some enormous number of loops, I look at my tally and see that each of the three distinct pairs of colors was observed sufficiently close to 1/3 of the time. If so, I declare that you have a proof of the statement, though I don't know anything about the coloring, since each observation happened after a random shuffling of colors. I also randomly chose two neighboring countries since I want to make sure every possible pair has an equal shot so I don't miss out on finding two neighboring countries with the same color (should that exist in your coloring, thereby showing your proof is not valid).
One quick question:
Are there many graphs that are <em>barely</em> 4-colorable, in the sense that just a few subgraphs require that 4th color? Would I want to pre-process my list of neighboring countries to check so I didn't miss those? Are there simple algorithms for finding such places, or am I left to randomly shuffle all possible pairs of neighboring countries and just pick a large enough N?comment:www.metafilter.com,2021:site.190520-8069210Fri, 19 Feb 2021 13:43:31 -0800klausmanBy: klausman
http://www.metafilter.com/190520/NP-Complete#8069218
[I actually don't know if I have that totally right.]comment:www.metafilter.com,2021:site.190520-8069218Fri, 19 Feb 2021 13:52:30 -0800klausmanBy: polymodus
http://www.metafilter.com/190520/NP-Complete#8069220
<em>I'm just not seeing how first-order logic reduces to SAT.</em>
Your question made me think of Tao's <a href="https://terrytao.wordpress.com/2009/04/10/the-completeness-and-compactness-theorems-of-first-order-logic/">remarks on Skolemisation</a> in his blog post on completeness and decidability, would that be related?
Whereas in computation <em>complexity</em>, first-order logic with arbitrary quantifiers is part of the <a href="https://en.wikipedia.org/wiki/Polynomial_hierarchy">polynomial hierarchy</a> (PH), and it is not known if it can be collapsed (we do know it's in between, as if: NP <= PH <= PSPACE), as I understand my rusty CS theory. "Exist-Forall" is a distinct complexity class from "Exist" (which is SAT), and so forth.comment:www.metafilter.com,2021:site.190520-8069220Fri, 19 Feb 2021 13:57:52 -0800polymodusBy: sjswitzer
http://www.metafilter.com/190520/NP-Complete#8069331
Thanks! Skolem Normal Form is <em>exactly</em> what I was trying to remember, but I haven't thought about it since grad school many many years ago. Many.comment:www.metafilter.com,2021:site.190520-8069331Fri, 19 Feb 2021 16:46:17 -0800sjswitzerBy: sjswitzer
http://www.metafilter.com/190520/NP-Complete#8069342
Something I once realized about SAT being NP-complete is that converting from conjunctive normal form to disjunctive normal form must be at least NP-hard because you can just read off all the satisfying solutions from it. Probably "everybody" knows that, but I don't remember being taught it.
(Edit; I probably meant NP complete there but too tired and too foggy on the details to think clearly about it.)comment:www.metafilter.com,2021:site.190520-8069342Fri, 19 Feb 2021 16:57:47 -0800sjswitzerBy: kitten_hat
http://www.metafilter.com/190520/NP-Complete#8069373
Sjswitzer: Cook-Levin and the NP-completeness of SAT is indeed about propositional logic. You are right to be suspicious about converting arbitrary first-order sentences into propositional logic. The trick in complexity theory is the <em>size</em> of objects being quantified over. Basically, we're converting a <em>single</em> first-order formula into a <em>family</em> of propositional formulas, each of whose size depends on the particular problem size we want to solve. Let me try and be precise.
When we talk about NP, we mean problems that are efficiently — deterministic polynomial time — verifiable, given a "witness." In logical language, this witness is bound with an existential quantifier. For the map-coloring example, we could say, in first-order logic: "There exists a valid coloring of this map," and the coloring itself is the witness.
Now then, how big can any coloring be? That is, how many bits will it take to describe? If we call the number of nodes in the graph n, just 2n bits: write down which of the three colors per node, in order. Notice that this witness is efficiently describable; not much larger than the graph itself! We can imagine a simple computer program (Turing Machine) that reads a graph and a proposed witness, and checks if this is an actual 3-coloring.
Cook-Levin consists of transforming the Turing Machine (TM) that checks a witness <em>and the input (eg, graph)</em> but <strong>not</strong> the witness into a propositional formula. The formula is a long list of statements about the local consistency of witness-checking computation on this particular input. Like "on step 27, the Turing Machine moves tape head exactly one cell left or right, and finds the same symbol as was there last time" The variables in this formula reflect how the computation evolves and encode the bits of a witness. The upshot is, the <em>size</em> of that formula depends on the size of the initial graph. It is "reasonably" sized — polynomial — compared to the graph we are asked to color.
If we could solve SAT, we could find an assignment to all these "computation transcript" variables that make the machine say "yes" on this particular input.comment:www.metafilter.com,2021:site.190520-8069373Fri, 19 Feb 2021 18:22:15 -0800kitten_hatBy: kitten_hat
http://www.metafilter.com/190520/NP-Complete#8069379
polymodus: One of the best parts of complexity theory is trying to grapple with this apparent contradiction between the classical theory (worst-case NP hardness) and empirical reality: reasonable heuristics can solve surprisingly large SAT instances.
This is called "average-case complexity theory." We say, look, we're not <em>worried</em> about arbitrarily bad instances of (for example) SAT we're worried about problems that actually tend to occur in nature — or in Intel's chips. So let's restrict attention to sources of problems that are "reasonable" in the following sense: there is an efficient Turing Machine that turns random bits into a SAT instance. Then, we try to understand what it is about different sources of SAT instances that make them easy or hard.
The main problem here is to decide which <a href="https://blog.computationalcomplexity.org/2004/06/impagliazzos-five-worlds.html">complexity world</a> we live in. These five worlds reflect a more nuanced picture than the classical theory, which does indeed seem to contradict our practical experience.
Trying to figure this out is hard. I refuse to speculate as to which world we live in.comment:www.metafilter.com,2021:site.190520-8069379Fri, 19 Feb 2021 18:37:36 -0800kitten_hatBy: flabdablet
http://www.metafilter.com/190520/NP-Complete#8069401
<em>FWIW, the "proof" is still somewhat probabilistic. Every time you inspect a small part of the full 3-coloring solution, you will either see two different colors, which gives you a little bit of confidence that the solution is valid, or you see two of the same color, which proves the solution is invalid. You repeat the inspection process until you have the desired level of confidence in the solution, but the adversary gets to shuffle the colors around each time, to prevent you from drawing conclusions about the relationship of nodes to each other in each subsequent round of inspections.</em>
It doesn't <em>need</em> to be probabilistic. Both of you have the same map; what you're trying to establish is whether your adversary has a 3-colouring of it. So you can systematically work through <em>every</em> border in the map, asking your adversary for their randomly permuted colour-pairs for the cells on either side of that border, until you've checked them all.
The part of this I currently having difficulty with is the idea that doing this could actually remain zero-knowledge. Intuition tells me that although any <em>individual</em> colour pair is indistinguishable from random, given a map of any decent size for which an adversary possesses a <em>particular</em> 3-colouring whose colours they're permuting in order to answer your queries, it ought to be possible to <em>reconstruct</em> that 3-colouring from the query results, unscrambling the colour permutations by comparing test results from map cells that get checked multiple times because they have multiple borders in much the same way as far too many "anonymized" data sets have turned out to have fairly easy de-anonymizations by exploiting internal correlations.
So there's probably some really elegant way that stuff cancels out other stuff that I'm not seeing yet.comment:www.metafilter.com,2021:site.190520-8069401Fri, 19 Feb 2021 20:18:55 -0800flabdabletBy: cortex
http://www.metafilter.com/190520/NP-Complete#8069419
flabdablet, my reckoning is that the key here is to ask what comparing multiple pairs with the same common country in one half would mean. Because you're not going in with a lack of knowledge about whether a given input map is 3-colorable: you know that, you just want the owner of the black box to prove that <i>they</i> can prove that too, for an arbitrary input.
Because the random permutation of colors on each check, if you have a country A that borders on countries B, C, D, and E, and you check {A,B}, {A,C}, {A,D}, and {A,E}, the colors you'd get back for each pair would have a random color for A and a random different color for B, C, D, and E, yeah? So you could take notes on each of those comparisons and conclude through the accumulation of data that...A is a different color than B or C or D or E. If you already know your map is 3-colorable, you've learned nothing: the inference is that this 3-colorable map is in fact 3-colorable.comment:www.metafilter.com,2021:site.190520-8069419Fri, 19 Feb 2021 21:41:27 -0800cortexBy: flabdablet
http://www.metafilter.com/190520/NP-Complete#8069433
<em>you're not going in with a lack of knowledge about whether a given input map is 3-colorable: you know that, you just want the owner of the black box to prove that they can prove that too</em>
I might well have misunderstood, but I thought that the point was that you're both working off the same input map, your adversary <em>asserts</em> that they are able to 3-colour it, and that the task is to check the truth of that assertion without learning their actual 3-colouring. I wasn't under the impression that you need to start off in possession of a 3-colouring of your own to make this work.comment:www.metafilter.com,2021:site.190520-8069433Fri, 19 Feb 2021 23:08:50 -0800flabdabletBy: flabdablet
http://www.metafilter.com/190520/NP-Complete#8069434
I suspect that the resolution to my perceived dilemma might be along the lines that processing the adversary's responses in order to reconstruct their 3-colouring will in general involve at least as much computation as constructing my own from first principles, in which case talking to them about it doesn't give me anything of value.comment:www.metafilter.com,2021:site.190520-8069434Fri, 19 Feb 2021 23:24:33 -0800flabdabletBy: cortex
http://www.metafilter.com/190520/NP-Complete#8069436
I might have misunderstood too, so, heh. This is very much an "I think this is the situation" take, not "I think you will find, upon further examination, that I am right about this", as far as that goes. My gut sense so far of the Zero Knowledge aspect of this is that for you to not gain knowledge, you need to know going in what the black box can prove on the way out, so learning the satisfiability of your input map would be additional knowledge that violates that expectation. But I don't know if I've got that right.comment:www.metafilter.com,2021:site.190520-8069436Fri, 19 Feb 2021 23:40:43 -0800cortexBy: kaibutsu
http://www.metafilter.com/190520/NP-Complete#8069438
I wonder if you can involve a random permutation of the graph vertices in an interesting way, similar to how the colors are randomly permuted. (Countries = graph vertices, edges = borders between countries.)
A key feature in the crypto interactive proofs is getting /either/ a check of correctness /or/ a check of non-cheating at each step. So Peggy (the prover) puts a random permutation in one envelope, and then has an envelope for the color of each country. Victor (the verifier) can ask for /either/ two random countries colors, /or/ some salient information about the permutation (combined in a clever way with the problem so that the answer isn't completely arbitrary).comment:www.metafilter.com,2021:site.190520-8069438Fri, 19 Feb 2021 23:52:53 -0800kaibutsuBy: Pyry
http://www.metafilter.com/190520/NP-Complete#8069447
<em>It doesn't need to be probabilistic. [...] So you can systematically work through every border in the map</em>
If the prover knows which edge you are going to ask for, they can simply lie about that edge. The key point is that the prover sends you <em>binding commitments</em> about their permuted assignment-- think of it like each round they send you a bunch of locked boxes, each one containing a color for a vertex. You ask for the keys to open two of the boxes, check that the vertex assignments inside really are different colors, and burn the rest of the boxes. Then next round they send you a new set of boxes. So if the prover knows you're going to ask about vertex 123 and vertex 456 in a particular round, in that round they can put "Blue" into box 123 and "Red" into box 456 and stuff the other boxes with anything at all because they know you aren't going to open them.
But by choosing edges randomly you give the prover nowhere to hide: either they commit to a genuine solution, or there is a chance you will catch them in an inconsistency, and by repeating the process you can amplify that chance of catching them to any arbitrary level you're comfortable with.comment:www.metafilter.com,2021:site.190520-8069447Sat, 20 Feb 2021 03:05:44 -0800PyryBy: Pyry
http://www.metafilter.com/190520/NP-Complete#8069450
<em>I suspect that the resolution to my perceived dilemma might be along the lines that processing the adversary's responses in order to reconstruct their 3-colouring will in general involve at least as much computation as constructing my own from first principles</em>
Well, each round you learn that for a particular edge (i, j), color(i) != color(j). Suppose that you play long enough that you manage to ask about every edge, then you will have learned that for all edges (i, j), color(i) != color(j). Solving this set of constraints is exactly the original problem!comment:www.metafilter.com,2021:site.190520-8069450Sat, 20 Feb 2021 03:27:26 -0800PyryBy: flabdablet
http://www.metafilter.com/190520/NP-Complete#8069459
The thing that's just clicked for me is that there is absolutely no reason at all why the colours that the prover puts inside the envelopes need to be a mere <em>permutation</em> of the colours in the prover's putative 3-colouring, as suggested during the colour-renaming part of the Numberphile exposition. They can be a completely arbitrary <em>coding</em> of those colours into symbols drawn from a very large symbol space.
The vague outline of the crack that I intuited might be possible to run against the described zero-knowledge proof process relied on cross-checking the query results for edge(i, j) with those for edge(i, k), edge(j, k) and so on, using the results accumulated around <em>loops</em> in the graph to discern which of the six possible permutations of three colour names had been globally applied on any given query step.
But if all I'm seeing revealed inside my chosen envelopes at each step are something like <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier">GUIDs</a> that code for colours, and the GUID codes chosen for each query response are completely independent of those chosen for previous responses, then there is no way <em>at all</em> to correlate results across query steps and the crack doesn't even get out of the starting gate.
So I'm a happy camper now.comment:www.metafilter.com,2021:site.190520-8069459Sat, 20 Feb 2021 05:23:47 -0800flabdabletBy: Pyry
http://www.metafilter.com/190520/NP-Complete#8069481
No, it has to be a permutation because if the prover was allowed to use a >3 symbol space they could fool the verifier with an N-coloring instead of a 3-coloring. If the prover could use an <em>arbitrarily</em> large color set, they could trivially give each vertex a unique color and then every edge check would pass. But even with just permutations, cross checking doesn't give the verifier any information because the prover picks a random permutation each round.
Now, you might say that the prover could perhaps get to use a different set of three colors each round: that it declares "this round I'm using (red, green,blue)" or "this round I'm using (fjCpeYqEN0OvkMMjg7fckw, WE4T7SAYskuocA5drXnWwg, mMtqikjvFEudYkYZFckoqw)", but this is just permutations by a different name since each round we can always rename the first color 'red', the second 'green', and the third 'blue' or (0,1,2) or whatever canonical labeling we want.comment:www.metafilter.com,2021:site.190520-8069481Sat, 20 Feb 2021 06:33:39 -0800PyryBy: flabdablet
http://www.metafilter.com/190520/NP-Complete#8069490
<em>If the prover could use an arbitrarily large color set, they could trivially give each vertex a unique color and then every edge check would pass.</em>
Oops.
<em>even with just permutations, cross checking doesn't give the verifier any information because the prover picks a random permutation each round.</em>
I am going to have to sit down with a <em>lot</em> of brown paper before intuition stops nagging me about this.
Thanks for the reality checks.comment:www.metafilter.com,2021:site.190520-8069490Sat, 20 Feb 2021 07:03:15 -0800flabdabletBy: straight
http://www.metafilter.com/190520/NP-Complete#8069563
<em>Every time you inspect a small part of the full 3-coloring solution, you will either see two different colors, which gives you a little bit of confidence that the solution is valid, or you see two of the same color, which proves the solution is invalid. You repeat the inspection process until you have the desired level of confidence in the solution, but the adversary gets to shuffle the colors around each time, to prevent you from drawing conclusions about the relationship of nodes to each other in each subsequent round of inspections.
</em>
Sheesh. Mathematicians. The guy in the video goes through and explains everything, but then leaves the explicit description of the dramatic reveal as an exercise for the viewer to imagine. He gets right up to it, but he doesn't actually say what you just said. He doesn't explicitly paint the picture of "Okay, here's what happens as we verify it," the way you just did.comment:www.metafilter.com,2021:site.190520-8069563Sat, 20 Feb 2021 11:16:29 -0800straightBy: kaibutsu
http://www.metafilter.com/190520/NP-Complete#8069564
It's probably helpful to try a minimal example.
Take a four-cycle; write a coloring as XYZW where each letter is the color of a vertex, and adjacency 'wraps.' Then without loss of generality, the first two vertices are RG, and there are three legal completions: RGRG, RGRB, and RGBG. Then suppose the Prover has one of these three colorings, and the verifier wants to figure out ANYTHING about which coloring the Prover is using.
The verifier then wants to figure out is whether vertices 1 and 3 have the same color. But since the colors are permuted every time, it's impossible to figure that out looking at one edge at a time.
It's interesting to consider what happens here if the Verifier asks for the non-edge (1, 3). If the Prover gives the actual colors, they've revealed info about the coloring (eg, if the colors match, it isn't RGBR). So the Prover has to respond 'hey that's not a real edge!' or the scheme collapses. Seems like the envelope opening contains exactly one bit of information: "Is this edge legal or not?" and if it /doesn't/ tell you that, you're probably getting some other bit of information about the graph coloring.comment:www.metafilter.com,2021:site.190520-8069564Sat, 20 Feb 2021 11:25:19 -0800kaibutsuBy: sjswitzer
http://www.metafilter.com/190520/NP-Complete#8070458
Both the holder of the secret proof and the interrogator know the graph and labeling of its nodes/edges. After all, the thing being proven is whether a <em>given</em> graph can be 3-colored.comment:www.metafilter.com,2021:site.190520-8070458Mon, 22 Feb 2021 15:07:50 -0800sjswitzer