Thursday, September 13, 2018

P = NP and Cancer

Often when the question comes to what happens if P = NP, one typically hears the response that it kills public-key cryptography. And it does. But that gives the impression that given the choice we would rather not have P = NP. Quite the opposite, P = NP would greatly benefit humanity from solving AI (by finding the smallest circuit consistent with the data) and curing cancer. I've said this before but never explained why.

Of course I don't have a mathematical proof that P = NP cures cancer. Nor would an efficient algorithm for SAT immediately give a cancer cure. But it could work as follows:
  1. We need an appropriately shaped protein that would inhibit the cancer cells for a specific individual without harming the healthy cells. P = NP would help find these shapes perhaps just the DNA of the person and the type of cancer.
  2. At this point we don't understand the process that takes a ACGT protein sequence and describes that shape that it forms. But it must be a simple process because it happens quickly. So we can use P = NP to find a small circuit that describes this process.
  3. Use P = NP to find the protein sequence that the circuit from #2 will output the shape from #1.
We'll need an truly efficient algorithm for NP problems for this to work. A n50 algorithm for SAT won't do the job. All this steps may happen whether or not P = NP but we'll need some new smart algorithmic ideas.

Please note this is just a thought exercise since I strongly believe that P ≠ NP. I do not want to give false hope to those with friends and loved ones with the disease. If you want to cure cancer your first step should not be "Prove P = NP". 


  1. Ill-informed articles such as this one are the reason why Trump got elected.

  2. Why is it ill-informed? Elaborate ...

  3. n-body simulation is PSPACE-complete and thus no guarantee that P=NP (even a linear time algorithm) would mean we can simulate the folding of proteins quickly (

    And even if we could, no guarantee that we can actually so precisely target cancer cells using just proteins in the first place.

  4. So we keep mentioning the efficiency of the algorithm in terms of the input size (n), but what defines (n) for SAT ? Is it the number of clauses ? Is is the number of total variables ? Which one of them ?

    1. As with most decision problems, complexity for SAT is conventionally measured in terms of the length of the input. This is roughly O(clauses * log(variables)). Some authors use 'n' for the number of variables though, so in actual papers you want to check the definitions. It rarely matters in casual contexts, since SAT problems with very low or very high clause/variable ratios are generally easy.

    2. Ty, that really helped.

  5. This article sounds just about as ridiculous to biologists as it does to quantum computing folks when people with no background talk about their field...

  6. You could see my proof of UP=NP in

    and see my proof of P = NP in

    You could download them in Zenodo in the respective url:

    For UP=NP, we have

    For P=NP, we have

    In general, you could see my whole research in

    Thanks in advance....

  7. How many variables are in those problems?
    (We do have kind of efficient SAT solvers.
    But don't we need NP=LIN to handle those bio problems?)

  8. So according to Ryan Williams on Twitter SAT ist solvable now, but the next level of the PH requires exponential time. I guess this is not proven, just a new ETH. History might repeat itself, and maybe in 15 years Sigma2 SAT is solvable in practice and cancer will be cured after all.