Doubt in Algorithm?

sushant005

sushant005

@sushant005-tyt4WK Oct 23, 2024
Hi Friends,

What is NP-Complete problem?

Is it true to say that a problem which is solvable in polynomial time that are verifiable in polynomial time?

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • vishnu priya

    vishnu priya

    @vishnu-priya-L6wLMl Jun 8, 2010

    If a problem is<a href="https://www.mathreference.com/lan-cx,intro.html" target="_blank" rel="nofollow noopener noreferrer">Complexity Theory</a>np complete, it can be solved quickly by a non deterministic computer, which only needs to verify its lucky guess; but the problem is exponentially difficult to solve on a deterministic machine, which has to try every possibility in search of an answer. Consider the factorization of a large number n into two primes p and q. If you make a lucky guess, and you stumble upon p and q, it is easy to verify that p×q = n. It hardly takes any time at all, even if p and q are thousands of digits. However, if you don't know p and q, and you have to guess, you could be computing until our sun grows dim. This is the basis of rsa encryption, which is used to keep your electronic transactions secure.
    Although this example is easy to understand, it isn't a very good example, because factoring may not be an np complete problem. (We haven't proven it to be in any case.) The classic example of an np complete problem is satisfy ably, which attempts to "satisfy" a boolean expression by setting its inputs to true or false in just the right way. This is np complete because an algorithm that solves this problem solves all the other np problems, such as factoring, all in one go. You can almost see how this would work. Write p and q in binary, with boolean variables acting as the bits. Write a large boolean expression that implements p×q = n. Solve the boolean expression, and read p and q in binary, thereby factoring n. It's that easy.
  • devQuotidian

    devQuotidian

    @devquotidian-rfWHET Jun 8, 2010

    Given the style of the question, I suggest reading something not-so-intimidating on NP-complete problems. May I therefore be so bold as to direct you to a short note I wrote some time ago, that also contains further references: #-Link-Snipped-#
    Cheers,