Computing complexity of sharp-P (# P) and NP

Source: Internet
Author: User

Today we are mainly studying the computing complexity of sharp-P (# P) and NP. NP computing complexity most people have heard of, that is, non-fixed polynomial (NP) time complexity class, or non-deterministic polynomial time complexity class, contains the problems that can be verified in polynomial time to determine whether the solution is correct. Note: The definition of NP does not address any problem about the solution. It just says: verify whether the solution is correct in polynomial time. For example, if we provide a solution for a 0-1 backpack, we can verify whether the condition is met within the polynomial time. Whether a solution that meets the conditions can be found is not specified in NP complexity.

The definition of sharp-P (# P) mainly refers to the number of instances or paths that meet the conditions in the NP problem. In other words, when we get an NP question, we don't want to ask whether or not. If we change the question, it will be converted into a sharp-P (# P) question. For example, if a 0-1 backpack asks if this method is used to make the benefit of a backpack greater than a certain parameter, and the weight is smaller than a single parameter, this is an NP problem. However, if I ask how many methods can be used to make the items in the backpack meet this condition, it is the sharp-P (# P) problem. It can be seen that the sharp-P (# P) problem is more complex than NP.

There are also two closely related concepts: NP-complete and sharp-p-complete (# P-complete ). NP-complete is a NP problem first, and all NP problems can be reduced with it within the polynomial time. The problem of sharp-p-complete (# P-complete) is first a # P problem, and then all the # P problems can be reduced by a Turing Machine Within the polynomial time.

The following is an example of sharp-p-complete (# P-complete) in uncertainty data management. Consider a Boolean expression E = (S1 cross T1) and (s2 cross T1 ). Assume PR (S1) = 0.8, Pr (S2) = 0.5, Pr (T1) = 0.6. in order to calculate the probability of the true value of E, we need to first list all possibilities where E is the true value (, 1), (, 1), and (, 1 ). The final probability is: 0.24 + 0.06 + 0.24 = 0.54.

In the above question, in order to calculate an event e as true, we have to list all the really worthwhile situations. In this way, the problem of sharp-p-complete (# P-complete) occurs. Therefore, the # P-complete problem is very common when we are not sure that data management requires probability calculation.

This article can be freely reproduced. Please retain the full text and indicate the source:
Reproduced from jiaheng said [http://www.jiahenglu.net/]
Link: http://www.jiahenglu.net/blog/5.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.