2

I have a question. Please be nice; I come from the corporate world and my knowledge of computer theory is around a college freshman level.

My understanding from many popular-level sources (like Scott Aaronson's P vs NP for dummies blog post, or this New Yorker article) is that the P vs NP question asks whether a problem that can be checked "quickly” can also be solved "quickly". But to my knowledge there are well-known problems that can be checked quickly but are impossible to solve regardless of time or number of operations.

Take, for example, the (in)famous angle trisection with straightedge and compass. If asked to check that a provided angle really does trisect 60 degrees, you can very quickly verify that fact using a straightedge and compass. But if someone asks you to solve the problem of trisecting that 60 degree angle using the same straightedge and compass, you can’t do it. So the solution here really only goes "one way" (i.e. using classical tools, the 20 degree angle can be checked really quickly, but no finite amount of operations/time will ever solve the problem of constructing it).

How does this relate to P vs NP? My thought is that this would show that NOT every problem that can be checked quickly can be solved quickly. The specific case of the 60 degree angle trisection appears to be checked in P time and not solved in P time (or any time for that matter, because by using classical tools the problem of the 60 degree trisection cannot be solved at all).

I know I’m missing something, and I tried looking up the formal definition of P vs NP on the Clay Math website, and that was way over my level of understanding (I’m betting that the categories of P and NP don’t apply to my example for reasons I am just not aware of). I just went through the exercise and tried to intuit the question using some well-known math, and I’m having a tough time figuring out where my mistake is.

Any thoughtful feedback is very much appreciated :)

PS: This was moved from CS Theory StackExchange b/c it is not a research q.

John L.
  • 38,985
  • 4
  • 33
  • 90
  • 3
    You got useful feedback on CSTheory, but you don't appear to have updated the question based on that feedback -- it looks like you just copy-pasted the same question here. That is not very helpful. If you would like good answers, it would be better to use the feedback you received to improve your question. – D.W. May 03 '20 at 15:51
  • 2
    Some people have investigated cryptography in a world where usual notions of efficient computation are replaced by compass and straightedge constructions. It's pretty interesting and closely related to your question: https://en.wikipedia.org/wiki/Geometric_cryptography – Elle Najt May 03 '20 at 17:59
  • @D.W. I wasn't sure how precisely to update my question based on the feedback that I got on CSTheory. That's why I didn't include it. If there was something that I thought would have added to the question, I would have put it. I am grateful that my question was answered here :) – ActuarialNinja May 03 '20 at 18:11
  • @LorenzoNajt That is a really useful link. It is very close to what I am talking about. Thank you for sharing – ActuarialNinja May 03 '20 at 18:11
  • 1
    Trisection of all angles is not possible using straightedge & compass. The issue has nothing to do with P vs NP. PS What is your question? What does "How does this relate to P vs NP?" mean? This is too vague. The 2 statements, or variants of them, are simply 2 statements & you are asking for some ill-defined precis about them. Find out what each is & ask some specific answerable question. – philipxy May 03 '20 at 19:21
  • 1
    Your intuition at least suggests why most (but by no means all) researchers in the field suspect that P != NP but that we lack the tools to prove this. To stretch your analogy a little, geometers suspected that trisecting an arbitrary angle was impossible, but for millennia lacked the tools to prove it. – John Coleman May 03 '20 at 19:34

2 Answers2

3

Here is a possible analog of the P vs NP question for straightedge-and-compass constructions.

Suppose that we are given a line with three points $a,b,c$ on it, and consider the following question:

Given just the line and the points $a,b$, can we construct the point $c$ using a straightedge and compass?

If we are given a construction, then we can verify that it indeed constructs the point $c$. But without such a construction, it is not clear how to check whether the point $c$ can be constructed.

However, this connection is a bit misleading, for various reasons, among which is that it is not completely clear how to specify the input, and what operations are allowed on it; in contrast, the P vs NP question is completely formal.


The P vs NP question is a scaled-down version of other questions in computability theory, whose answer is known. For example:

Given a C program $P$, does $P$ ever halt?

If $P$ halts, then we can verify it by running $P$ and checking that it eventually halts; you can think of this as a verification process in which the witness is the execution trace of $P$. But without an execution trace, it is not so clear how to determine whether $P$ ever halts. Indeed, Turing proved that no algorithm can determine whether a given C program ever halts.


The $\mathsf{P}\stackrel?=\mathsf{NP}$ question can be stated as follows:

Is there a polynomial time algorithm to determine whether an input graph is 3-colorable?

(A graph is 3-colorable if we can color its vertices using 3 colors so that the endpoints of each edge get different colors.)

Given a 3-coloring, it is easy to check (in polynomial time) that it is a valid 3-coloring. But without such a 3-coloring, it is not clear how to check whether a given graph is 3-colorable. Indeed, people conjecture that this cannot be done in polynomial time (but it can obviously be done in exponential time, by trying all possible 3-colorings).

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
  • Thanks for putting in the effort, I really like the answer. May I ask some clarifying questions? i)"it is not clear how to check whether the point can be constructed". I especially created my example so that according to the rules it cannot be constructed (point in this context being sin(20) or something like that) ii) "it is not completely clear how to specify the input, and what operations are allowed on it". My understanding is that straightedge and compass constructions are also formally defined, and there are lots of math proofs associated with these constructions. – ActuarialNinja May 03 '20 at 10:53
  • ii) We usually assume that the input is given in textual form. This doesn't work for real inputs. However, there are models (like the so-called Real RAM) which support real inputs, and also specify what kinds of operations are allowed on them. The set of allowed operations is important here, just as some numbers are constructible using straightedge and compass, and others are constructible using a trisector. The set of operations here define what an algorithm solving the problem is allowed to do. – Yuval Filmus May 03 '20 at 10:58
  • In order to say that a certain problem cannot be solved (or cannot be solved efficiently), the first step is to explain what class of solutions we are interested in. Which operations are you allowing your algorithm to use, in order to determine whether the point $c$ is constructible? That's up to you to define. There's no commonly accepted definition, in contrast to classical notions of computability. – Yuval Filmus May 03 '20 at 11:00
  • i) The problem we are trying to solve is: given a point $c$, determine whether $c$ can be constructed from $a,b$. For some inputs, the answer will be Yes, for others, it will be No. You gave an example of a No input. I don't see how this helps us understand the general problem. – Yuval Filmus May 03 '20 at 11:01
  • 1
    I think I am slowly getting what you are saying. Rephrasing in my own words (ie "for dummies"), computers can only deal with discrete units of information, whereas my example deals in Platonic mathematical abstractions like idealised lines and circles and their intersection. Therefore my problem isn't something that a computer can do at all (because a computer can't deal with "actual" circles, only discrete approximations of circles to some desired accuracy). That's my layman take on what's said here. To really show that P!=NP, I would have to show some "one way" function for discrete... – ActuarialNinja May 03 '20 at 11:11
  • That's exactly right. That said, in computational geometry people do find it useful to think of inputs as real numbers, even though the corresponding algorithms cannot really be implemented on computers (at least not on arbitrary real inputs). – Yuval Filmus May 03 '20 at 11:13
  • 1
    ... objects like the 3-coloring of a graph or the solution to a Sudoku or something like that. Well, at least that's my best try at understanding why my example breaks down. (PS, you answered before I could even finish the thread. Your homepage says you were fast, and that was no joke, lol) – ActuarialNinja May 03 '20 at 11:13
  • 1
    By the way, for real computation we have the following: "Given a multivariate polynomial of degree 4 with at least one real zero, determine whether it has a real zero with all coordinates non-negative". The P vs NP question asks whether this question can be solved using polynomially many arithmetic instructions (including comparisons), where "polynomially" is with respect to the number of variables of the polynomial. You can check this survey if you're interested. – Yuval Filmus May 03 '20 at 11:18
  • I missed your response to my "i". My issue is still solved because the fact that computers don't deal in my example resolves my problem. For completeness: "You gave an example of a No input. I don't see how this helps us understand the general problem". My answer to that is: take c=sin(20). You are right that this is a "No" for constructing c, but it is also a "Yes" for verifying c - you can use classical tools to verify that a provided point c=sin(20). It is a case where you can verify something in a "quick" (polynomial?) number of operations, but cannot "solve" for it similarly "quickly". – ActuarialNinja May 03 '20 at 13:36
  • It looks to me like if PvsNP was in the same scope of my example, then the answer really would be that not everything that can be checked quickly can be solved quickly. But it’s not in the same scope for the reasons you shared (i.e. computers simply don't deal with perfect circles or real number lines, they merely approximate them using discrete math), so I’m happy to call the issue solved. – ActuarialNinja May 03 '20 at 13:44
  • What you are referring to is similar to the NP vs coNP question, which asks whether every non-3-colorable graph has a short proof of non-3-colorability (here "proof" is defined in an extremely liberal way). Most researchers believe that the answer is No. – Yuval Filmus May 03 '20 at 13:44
1

First of all, P vs NP is about computability by Turing machines/computers and not about straightedge and compass constructions.

Your "problem", as you suspect, does not really fit the definition of "problem" in the sense of P vs NP.

A problem in the sense of P vs NP (formally called a "language") is simply a set of (binary) strings. So, if $\{0,1\}^*$ denotes the set of all binary strings, then a language is simply any $L\subseteq \{0,1\}^*$. The "problem" associated with a language $L$ is simply to check, given an arbitrary binary string $x$, whether $x\in L$ or not.

As a simple example, "the set of all gramatically correct English sentences" could be a language (the sentences should be encoded as binary strings but this is just a detail). Another example would be "the set of all numbers that are composite numbers (i.e., numbers which are not prime)". Being able to solve these problems quickly means being able to quickly (i.e., polynomial time) determine whether a sentence is valid English or whether a number is composite.

Formally, a problem can be "quickly checked" if there exists a procedure/algorithm/Turing machine that takes two inputs (binary strings) $x,y$. Given $(x,y)$, the algorithm must output either "yes" or "no". The rules are as follows:

  • If $x\not \in L$, then the output is always "no".

  • If $x\in L$, then there is some $y$ such that the output for $(x,y)$ is "yes".

And this must be done quickly (in polynomial time in $|x|$). You can think of $y$ as a "solution" for the problem instance $x$ and the algorithm as checking whether a solution is correct.

Going back to the example of composite numbers, the string $y$ could be the prime factorization of $x$. The procedure would take $y$ and verify that the numbers in $y$ when multiplied give $x$ (and then either output "yes" or "no" accordingly). This means that the "composite number problem" is in NP.

To cast "angle trisection" as a computational problem we would first have to define an encoding of "angles" as binary strings. Supposing that could be done, we could define $L$ as the set of (binary encodings of) angles that admit a straightedge/compass trisection. Clearly $L$ would be the empty set (or just the set of representations of $0^\circ$ angles if you allow those). The problem $L$ is trivial to solve since we can just output "no" by default since no (non-trivial) angle can be trisected.

Tom van der Zanden
  • 13,238
  • 1
  • 35
  • 54