ZT future mathematician challenge-NP-hardness and go

Source: Internet
Author: User
Future mathematician challenges
Computing problems
Yang zhaokun; Yang chongjun
I. Preface
Ii. calculation amount
3. P?
Iv. guke's law and NP-Completeness
V. Approximate Solution of NP-complete Problems
Vi. np-hardness and go
VII. Conclusion

I. Preface
Some mathematicians have said, "a good question is better than ten good answers 」. The answer is that this problem has reached the end, and it is no longer a challenge for those who are constantly innovating. The new problem lies in the ability to expand the new realm. Most people don't want to indulge in good answers, but want to find new questions, keep thinking and exploring.
You have seen many good questions in "multicasting". In particular, Professor Kang minchang recently talked about the ferma theorem and three major geometric problems, which are very interesting. Some have answers, and some have yet to be resolved. In addition to the above questions, the four-color problem (that is, any map can separate borders with only four colors), the formula for more than five square procedures, in number theory, the distribution of mass numbers has played a considerable role in the minds of professional and amateur mathematicians. This article is about NP, a major concern of many mathematicians and electronic calculators recently (since the 1970 s. The meaning of NP. After reading this article, you will naturally understand that now you may wish to remember the word "NP-hard. In the future, if you tell someone that your problem is "NP-hard", you may have to be surprised. NP-hard not only represents hard (hard), but also is NP hard!
Traveling Salesman Problem is one of the representative NP problems ). A salesperson wants to drive a car to N specified cities to promote goods. He must go through all N cities. Now he has a map of N cities and the distance between the cities. How can he get the shortest trip from home to home?

________________________________________ Figure 1 Map of salesclerk, A, B, C ,... Table city name, number of miles between two cities.

1, A, B, C ,..., G indicates 7 cities, and the salesperson wants to go back to City A and access B, C ,..., G. a feasible method for all cities is

Q: Is this the shortest path? Maybe closer? The total length of the first path is 235, while that of the second path is 230. Therefore, the second path is short, but is there a shorter path? The current method is similar to one-on-one troubleshooting, and there is no better way to find the shortest path. For the seven cities, there are 6 in total! = 720 clauses, not difficult yet, but if there are 20 cities, there are 19 clauses! Type. N in the permutation and combination for some reason! It is easy to write, but 1.21x1017 is a very big number. If it is arranged every second, it will be 3.84X109 (about 3.15X107 seconds a year), even if you use a calculator, 1 million times per second (not easy to do) must be redone for three thousand years to find the answer. "The city is born and has no knowledge or knowledge." It takes thirty centuries to find the answer in 20 cities.
Due to the development of the electronic calculator, many previous calculations, such as the value of the determinant, the inverse matrix, and the solution of the high-order equation, can be solved in a very short time. However, some new problems have suddenly emerged, and even the large calculator may sigh. Like a salesperson, because they cannot find a much better way than a hard rank, mathematicians began to want to prove that they could not find a much better way than a hard rank. This proof has not been found yet. Just like in the past, since we couldn't find a method with. Now we need to prove that it is impossible to write a calculator program to greatly simplify the salesman's Travel problem. What is different from the third question is that the former is a kind of mathematical curiosity, while today's problems are closely related to their actual use.
Here we have been emphasizing a much better method. The reason is that for such problems, if you can calculate twice or ten times faster, thousands of times faster, it will not play a major role. It seems that the problem of traveling to the 20 cities just now, even if it is several thousand times faster, we still need three years of computing time, and the three cities will immediately offset the effect of this calculation method. Therefore, we need to reduce the basic level of computing, this is what we will discuss in the next section.
Ii. calculation amount
Computing workload refers to the computing time required to solve a problem. However, the computing of each complex problem often goes through many different computations, except for addition, subtraction, multiplication, and comparison, it is very difficult to calculate data and store data. Generally, only one or two major quantities are drawn for statistics. In the preceding section, the salesman's Travel problem is used as an example, the main task is to add the total route length for each route, because for N cities, there are (n-1 )! The calculation amount is O (n !), That is, in N! Level (Order is the source of O abbreviation.
For example, if we require the sum or average of N numbers, the calculation is O (n ). However, if we want to arrange n numbers in sequence, the calculation amount will be quite different because of different practices. A straightforward method is to first obtain the largest (ratio (n-1) times), again from not the largest in the middle of the large (than (n-2) times), and then find the third largest (than (n-3) times ),...... So a total

The task can be completed. Therefore, we use O (n2), that is, to list the computing workload of this method at the N2 level. Another fast sorting method is to divide n numbers into several small pieces, and sort them together. It can be proved that the calculation amount of this method is 1, because of the number and ranking word, the telephone number is the same, which is very useful. For example, if there are 1 million users in a city, n2 = 1012, and only 2X107, the difference is the ratio of three months to one minute.
Generally, the calculation amount is distinguished by the following table layers,

In the above table, K is a positive integer greater than 2. There is a gap between them and there is a basic layer. In the calculator theory, if someone can find a new method, to reduce the amount of computing at a level, his new method is qualified to be called a breakthrough, which can survive. Table 1 provides a comparison of the preceding metrics based on the principle that the calculator performs 1 million (106) computations per second.
N
N
N2 N3 2n 3N n!
10 10-6 10-5 10-5 10-4 10-3 10-3 0.059 0.45
20 10-6 10-5 10-5 10-4 10-2 1 (second) 58 (minute) 1 year
50 10-5 10-4 10-4 0.0025 0.125-36 years 2x1010
1000 10-5 10-3 10-3 1 16 hours 10333 years huge
106 10-5 1 6 January 10 5 years extremely huge
109 10-5 16 hours 6 days 3 years 3x109 huge
Table 1: The time required to complete the calculation of each level when the calculator performs 1 million times per second (if there is no unit, the unit is seconds)
In this table, pay special attention to the difference between N3 and 2n. Generally, 2n indicates that the calculation amount increases exponentially, while the calculation amount of N3 or NK increases exponentially by 2, for the current and future calculators, the increase in the number of submissions should be able to cope with, but there is no hope for an exponential increase in the amount of N. As a result, the calculator's focus is on how to simplify an exponential increase in computing capacity into a single increase in computing capacity. We define that, for the most important parameter n in a problem, if a method can be found, it can be completed with the increase of computing power, we call this problem a p-problem (P is the first letter of the English polynomial), which contains a set of all such problems expressed in P.
3. P?
This topic is a bit unusual. Our purpose is to remind readers that P, which is commonly used in this article, is a set of problems that can be solved using O (NK) computing. Adding a question mark outside P means that we do not know whether it is an empty set outside P so far.
So far, there have been hundreds of interesting or useful questions in addition to the salesman's Travel problem, which cannot be solved using the O (NK) computing workload. Here are several examples.
Question 1: salesman Travel problem ()
That is, the problem described in section 1 is no longer repeated, but it is assumed that all distances are positive integers 3.
Question 2: salesman Travel problem (B)
The condition is the same as that in the first question, but now there is a given positive integer B. The problem is whether there is a path whose total distance is not greater than B. (Problem 1 is similar to problem 2 on the surface, but it will be quite different in theory in the future)
Question 3: Bag-in-back problem ()
There are n objects, each weighing W1, W2 ,..., Wn, now I want to divide them into two bags. How can I divide them into two bags to maximize the weight. (Assume that all WI is a positive integer, which does not lose its general nature .)
Question 4: Bag-in-back problem (B)
Given a positive integer B for the above questions, I would like to ask if several wi s can be selected to make them

Question 5: packaging problems
There are n items weighing less than 1 kg and boxes that can hold 1 kg of things. Today, the items are packed in the box, and multiple items can be packed in a box, but no more than 1 kg for any box. Try to find the minimum number of boxes.
Question 6: Partner issues
Today there are n boys and N girls attending the dance. Each boy and girl is handed over to the host with a name indicating his or her favorite partner (at least one person, but more than one person ). After receiving the list, the host can divide the list into N pairs so that each person can get his or her favorite partner.
Question 7: inventory problems
A warehouse has D warehouses which are arranged in a column. There are n batches of goods today, each of which can occupy one or more warehouses, and the date on which each batch of goods is stored and proposed is known. It is not difficult to store the goods in a warehouse. If more than one warehouse is required for the same batch of goods, the warehouse must be adjacent.
Question 8:
We know the three positive integers A, B, and N and ask if there is a positive integer smaller than N

Question 9:
(A) given an N-digit positive integer a, is it a prime number?
(B) Given a given n-digit positive integer a, Can I ask if M exists, n> 1 and A = Mn?
Question 10: clustering problem
Given that the distance between the points is a positive integer and two positive integers K and B are given, we can ask whether the N points can be divided into subsets smaller than K that do not overlap, so that the distance between any two points in the same subset is not greater than B?
Now we can see the general structure of this type of problem. Obviously, some problems are extremely useful, and some can be converted into useful problems. For example, if a partner has a problem, it is very useful to replace boys and girls with workers or doctors and patients. None of these problems can prove to belong to P at present, and everyone guesses that they may be out of P, that is, their calculation workload increases exponentially.
In 1960s, some people put some problems into one category, that is, several problems were mutually dependent. If one of them belongs to P, the others also belong to P, the proof method is mostly to prove that there is a bridge between the two mutual dependency problems that only requires O (NK) time. Until 1971 (Stephen. cook) published the "the complexity of theorem proving procedures" statement to classify non-p-related issues into three categories: NP, NP-complete, and NP-hard 4. Now let's talk about the ancient law.
Iv. guke's law and NP-Completeness
It is difficult to prove the law of guke, that is, to understand it. We will look at this problem from several perspectives and try to solve it. The main result is that most of the problems in the previous section are attributed to a more easily proved set, called NP, finding a batch of mutual dependency in NP is called NP-complete class and the following result is obtained.
1. If an NP-complete problem can be solved using the O (NK) computing workload, all NP problems can be solved using the O (NK) computing workload, that is
1' if there is an NP-complete, P = NP.
In other words, NP-complete is a problem in NP. NP-complete solves 5 and NP solves. However, if a problem that belongs to NP rather than NP-complete is solved, other NP problems may not be solved.
What is NP? NP is the abbreviation of Nondeterministic polynomial, which means non-deterministic polynomial time. To decrypt this word. Let's take a look at the functions of a common calculator.
It is now known that using a calculator is very difficult to solve the salesman's Travel problem. But if we have many calculators to use at the same time, can we solve the original problem quickly within the O (NK) Time? "Many", not one or two, but one or two of them are not helpful. If you have hundreds or thousands of them, you still need to pay for them. It cannot be very helpful, because one thousand machines can be used separately, it can only be one thousand times faster. As mentioned in the first section, it is not helpful. As a result, the calculator experts can look at it and simply allow you to add machines infinitely. Now, we should note that not all problems with an infinite number of machines can be solved immediately, because some problems are sorted in order, for example, when calculating the formula
[(A1 A2) A3 A4] A5 A6

Unless you change the form, you must solve the brackets step by step. If you have more hosts, you cannot speed up the calculation. If you have more hosts, you will be in constant contact, the signal sent from thousands of other machines is also exhausted. Therefore, we only assume that all the machines are connected only to a single-line job, without any horizontal contact 6. That is to say, machine 1 can pass its results to the following machine, such as A1, a2 ,..., And each sub-machine can pass their results to its sub-machine, but in A1, A2 ,..., An. Take the salesman's Travel problem as an example. If there are 20 cities and the first machine starts, the following 19 machines will each take a different city and calculate the distance from, the 19 machines handed over the distance they obtained to their 18 sub-machines so that they could add a distance from their own city, so that they could go down. In the tenth time, in the tenth stage, the camera told the next camera that it had taken nine cities and the total distance, and told them to take another city that was different from the city that had been taken, and add the distance, so it had been 19th times, the distance of all routes has been obtained. In terms of time, the distance obtained is O (n) (but 19 is used! A calculator.
It is important to remember that because there is no horizontal contact, the salesclerk's problem (a) is not solved after the distance between all paths is reached ), because I don't know who is the shortest (if we compare it to the shortest distance, we need O (N !) Therefore, we cannot say that the salesman Travel problem (a) is an NP problem. But in question 2 of the previous section, salesman travel question B, any single line can know whether its total distance is not greater than B, therefore, each single line has a "yes" or "no" answer. As long as there is a "yes" answer, we know that this problem has been solved, so question 2 is an NP problem. In a single-line job, each machine can do three things.
1. At present, the answer is not clear. You have to work on your own.
2. A line has found the answer and immediately stops. Everyone stops their homework and solves the problem.
3. This cannot be achieved. This line does not work, but does not stop.
From the above function, it is easy to see that the calculation time for finding the answer is the time when a line is stopped, that is, the sum of the calculation amount in any "yes" Answer line, that is to say, the time required to find the answer "shortcut. Easily speaking, in a non-deterministic calculator system, its sub-machines have the function of "guessing" to "Shortcuts. If someone guesses an answer in any calculation step and the calculator can answer "yes" or "no" in O (NK) time, this is an NP question. Take salesclerk travel (A) and Figure 1 as examples. if you guess a path

We cannot know whether this path is the shortest, but in question (B), the result of a "yes" or "no" can be answered with only seven additions. Therefore, according to the new definition, question 2 is an NP problem.
From these two definitions, it is not difficult for readers to see that problems 2, 4, 6, 7, 8, 9 (B) and 10 are NP problems, especially problems 9 (a), (B ), the problem is actually the same, but if you guess two m, n, you can immediately know whether a is Mn.
The key to the ancient theorem is to prove that if an example called satisfactability problem belongs to P, all NP problems belong to P (that is, this problem belongs to NP-complete ), the following three basic logical operations (for logical symbols 0 and 1, except 1 = 1 ,, ). Make f a logic variable Containing N (U1, U2 ,..., UN. Suppose we can find a group of u1, U2 ,..., UN Makes F (U1, U2 ,..., UN) = 1, then f (U1, U2 ,..., UN) is called yes. For example

For a function that can meet the requirements, you can use U1 = U2 = U3 = 1,

0 forever, so f is not satisfied.
Intuitively, in addition to u1, U2 ,..., In addition to checking 2n times with 0, 1 in UN, there is no shortcut to follow. The paper of 1971 proves that this is the mother of all NP problems.
Guke theorem:
The problem is NP-complete.
Now it can be proved that the problems in the previous section are all NP-complete problems except Problems 1, 3, 5, and 9.
V. Approximate Solution of NP-complete Problems
NP-complete problems cannot be found with feasible solutions, while many NP-complete problems are widely used in calculator language, program, circuit design, statistics, and program operations, therefore, we had to go back and find a feasible approximate solution. Unfortunately, although all NP-complete problems are connected at the NP level, different solutions are often required for approximate solutions, here are two examples.
Example 1
In section 3 question 5, if the packaging problem is solved, the method of "can be loaded" is adopted, that is, if the existing box can be loaded, no new box is needed, the number of boxes required by this method is K1 and K0, which is the least possible.
Proof
The weight of N items is W1, W2 ,..., Wn kg, because each box can only hold 1 kg

On the other hand, the "can be loaded" method cannot have more than two boxes at the same time less than kg, so

This example is used.
The result of this problem is that we can do about half the best thing with the "can install and install" method. After a complex proof, Johnson proved in 1974 that when N was large,
(I)
And there is a situation that can be generated.
(Ii)

That is to say, the "can be loaded" method won't break to more than 70%, but it can break to more than 70% boxes.
An intuitive way for a salesperson to travel is to first visit the city that has not been visited recently, called the "first visit near City" method. In Figure 1, the procedure is as follows:

Rosenkrantz and others proved in 1977 that this was not an ideal way to go. They proved that if the distance between cities satisfies the Triangle Inequality 7, the relationship between the total process D1 and the shortest path D0 in the "first visit near City" method is

In addition, when n is large, there can be a situation where

In the above formula, [x] indicates the smallest integer greater than X, for example, [5] = 5, [2.5] = 3. Because it can be very large when n is large, D1 can be very different from D0, but in the same paper, rosenkrantz proves that another complex "Intuitive" approach can be achieved.
In the above theorem, the conditions of the triangle inequality are very important. If the distance between cities does not have this relationship, Sahni and gonzarez proved in 1976: If NP, therefore, it is impossible to have a finite m and an O (NK) calculation formula, so that the entire process of D1 can meet

In the above formula, M is not equal to an infinite number, that is, all O (NK) practices are not very good.
Vi. np-hardness and go
Not all problems can be attributed to the NP problem. For example, the current speculation of Go is that it is more difficult to calculate than all NP problems, that is, the NP-hard problem, the NP-hard problem is defined as follows:
Definition: If X is an NP-hard problem, then if NP, then.
That is to say, even if p = NP, X is not necessarily P, but NP, X is no more likely than NP. In section 3, problems 1 and 3 are not necessarily NP problems, but if they can be solved using O (NK) computing, problems 2 and 4 can also be solved by O (NK). Therefore, if problems 1 and 3 are solved by problems 2 and 4, because problems 2 and 4 are NP-complete, NP = P. This is consistent with the definition of NP-hard. Therefore, problems 1 and 3 are NP-hard. Similarly, question 5 also belongs to NP-hard, but these NP-hard seem to be less difficult than NP, but playing chess may be more difficult than NP, And go can be viewed as follows.
Question 11. (go problem)
According to the general go rule, a board with N x n is placed on the upper and lower sides of the board, and a mess is given (two sub-members can be considered as the mess). First, can we determine whether sunspots are under the best practice, will it win?
This problem cannot be proved to be NP by a general method. Because no one can guess a winning method at present and prove it is correct in O (NP), because it is related to how the other Party handles it, the enemy's handling is related to his speculation about your future method. When he goes down like this, the first thing that is difficult is the red light on the memory, that is, the progress of the expected memory may be presented more than once.
Because each memory should be calculated at least once, otherwise this memory would not be as good as it would be. Therefore, if the memory of a problem increases exponentially, the computing workload would not rise exponentially, however, if a problem only requires the memory of a square increase, it cannot be guaranteed that it only requires the calculation of the square increase.
As a result, calculators define three new sets:
Pspace = {X: X memory that only needs to rise once}
Note: X indicates the problem.
Pspace-complete:
If pspace,
Pspace-complete,
And,
P = pspace.
Pspace-hard:
If pspace-hard,
And,
P = pspace.
Note that pspace-complete pspace in the above formula, that is, pspace-complete is a difficult problem in pspace, but pspace-hard is not necessarily a pspace. Stockmeyer and Meyer proved a theorem similar to ancient grams in 1937.
If an X parameter exists, and X represents one of all X and Q tables, X is the Boolean variable 0 and 1, then we call f (Q1 X1, Q2 X2 ,..., Qn XN) is a quantum Brinell formula. If F may be 1, F is called satisfied. For example, rewrite the formula (1) in section 4

The above formula cannot be met, because f is not all 1 for (U3 is 0 or 1.
The Theorem of stockmeyer and Meyer is:
Theorem:
It is a pspace-complete problem to verify that a quantum Brinell formula can be satisfied.
When we play chess in the face of a mess of thinking, our requirement is
Is there a winning game for me?
Any enemy playing chess
After that, can I have a winning game?
Any enemy playing chess
......
Is there a winning game I can handle?
Any enemy playing chess
I win
So this is completely ,,,,... The alternation is closely related to stockmeyer's and Meyer's theorem. In 1918, Robert son and Munro proved that go was a pspace-hard problem, at present, some people have calculated more than 10600 of the memory computing workload of Go 8, regardless of the memory of the human brain or computer, there is no need for an atom, and today we know that the number of cosmic atoms is only about 1075. The road to chess is awesome! How easy is it to be a go-winning robot!
VII. Conclusion
Now you understand the major challenge of the 20th century, P = NP? In simple words, it is to determine whether to find a method to increase the number of submissions to Solve Travel, packaging, dance and other problems. We look forward to your extraordinary answers to ordinary questions.
1. Gorey, M. R. and Johnson, D. S. Computers and intractability-A Guide to theory of NP-completeness, 1979, Freeman and company.
2. Pearl, J. hearistics-intelligent search strategies for computer problem solving, 1984, addsion-Wesley.
3. Cook, S. A. <The complexity of theorm-proving procedure>, Proc. 3rd Ann. ACM Symp. on Theory of computing, 1971,151-158.
4. Jonhson, d.s. et. al. <worst case performance bounds for simple one-dimen1_packing algorithms>, siam j. Comp., 1974,299-325.
5. rosenkrantz, d.j. Et. TL. <an analysis of several heurishics for the traveling salesman problem>, siam j. Comp., 1977,563-581.
6. Sahin, S. and gonzarez, <p-complete approximation problems>, J. ACM, 1976,555-565.
7. stockmeyer, l.j. and Meyer, P. r. <word problems requiring exponential time>, Proc. 5th. ann. ACM Symp. on Theory of computing, 1973, 1-9.
8. Robert son, E. and Munro, I. <NP-completeness, puzzles, and games> utilifas math., 1978, 99-116.

Related Article

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.