Vous êtes sur la page 1sur 4

P=NP

Author: Dmitri Shakhov, e-mail: dmitriyshahov@gmail.com, cell:+380634802001, +380973655040

FOREWORD

In the theory of algorithms, the issue of equality of complexity classes P and NP is one of the central open problems for more than three decades. If it will be given an affirmative answer, it would mean that it is theoretically possible to solve many difficult problems much faster than now. P = NP problem is this: if a positive answer to any question you can quickly check (in polynomial time), then is it true that the answer to this question, you can quickly find (in polynomial time and using polynomial memory)? The answer to the question of the equality of classes P and NP would Diagram of complexity determine whether the problem is easier to verify than to solve (P NP). Or resolve is as simple as check (P = NP). classes provided that The relationship between the classes P and NP are considered in P NP complexity theory (see theory of computation), which studies the resources required to solve some problem. The most common resources - this time (how many steps you need to do) and memory (how much memory you need to solve the problem). [2] In the theory of algorithms, NP-complete problem - it is a challenge in the class NP, which can be reduced to any other problem in the class NP. Thus, NP-complete problems are in some sense form a subset of the "most difficult" problems in the class NP; and if some of them will be found "fast" algorithm for the solution, and any other problem in the class NP can be solved as "quickly".[2] THE PROBLEM This article presents the results of solving NP-complete problem by compiling a crossword puzzle. It will be shown that this problem is NP-complete and it can be reduced in polynomial time, one of six major NP-complete problems on three-dimensional combination. The following is a statement of the conditions of the problem, since it is placed in the book [1, Page.258]. CONSTRUCTIGN CROSSWORD PUZZLE CONDITION: A finite set W * of words and an n n matrix A of 0(zeros) and 1(ones). QUESTION: Can an n n crossword puzzle be built up from the words in W and blank squares corresponding to the 0s of A, i.e., if E is the set of pairs i, j such that Ai , j 0 , is there an assignment f : E such that the letters assigned to any maximal horizontal or vertical contiguous sequence of members of E form, in order, a word of W? REFERENCE: [Lewis and Papadimitriou, 1978]. Transformation from X3C. COMMENTS: The problem remains NP-complete, even if all elements are zeros.[1, Page.258] From the above conditions the problem that the number of operations needed to solve the problem by compiling a crossword puzzle using the exhaustive search will be expressed by a combination without
k repetition Cn

n! . Which gives an exponential increase in the number of operations at busting n k !k!

increase in the number of input parameters such as size of the matrix A and the number of words in the dictionary W.

PROOF OF NP-Completeness [1, p. 63]. If you already have a known NP-complete problem, the procedure of the proof of NPcompleteness of other tasks much easier. To prove the NP-complete problem, it suffices to show that any of the known NP-complete problems P' can be reduced to P. Thus, the further the process of proving NPcomplete recognition problem P will consist of the following four steps: 1. The proof that P is in NP; 2. Selecting a known NP-complete problem P'; 3. Constructing a function f, which reduces the problem of P' to the problem P, and 4. Evidence that the function f performs a polynomial reduction The P versus NP problem is a major unsolved problem in computer science. Informally, it asks whether every problem whose solution can be efficiently checked by a computer can also be efficiently solved by a computer. It was introduced in 1971 by Stephen Cook in his paper "The complexity of theorem proving procedures" and is considered by many to be the most important problem in the field. It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a US$ 1,000,000 prize for the first correct solution. [2] HISTORY In 2000, the author became interested developing a program for making crossword puzzles. Through the floor, it became clear that the method of total backtracking to solve this problem it does not, then the project was stopped. But in 2003, the author did return to this issue, studies were found first and most important part of the algorithm, but since this was not enough for commercial projects, the work was again halted. Six years later, in autumn 2009, the author returned to this problem, but as a scientific problem solving NP-hard problems. As a result of development of the algorithm was successfully completed. The algorithm was implemented as a program in C# on the platform of Microsoft .Net Framework 2.0. The very problem has been solved in general form as the mass, ie allows you to specify any parameters, such as: the alphabet size, the size of the matrix separately for horizontal and vertical (which extends the initial formulation of the problem, where the vertical and horizontal dimensions of the matrix are the same), the number of words in the dictionary separately for horizontal and vertical. The results are shown in the table below.

ACTUAL RESULTS # tes t 1 2 3 4 5 6 7 8 Vertic al matrix size 10 10 10 10 10 10 150 150 Horizont al matrix size 10 10 10 10 10 10 150 150 Number words in dictionar y for vertical 100 200 300 400 1000 5000 1500 30000 Number words in dictionar y for horizont al 100 200 300 400 1000 5000 1500 30000 Estimate d time for brute force 200 day 1400 years 130 000 years 3200000 years 1010 years 1020 years 10200 years 10400 years Estimated time for Dmitri.Shakhov. NP 1 sec 25 sec 2 min 9 sec 6 min 49 sec 4 hours 26 min 115 days 20 hours 15 min 410 years Used memory, Mbytes for Dmitri.Shakhov. NP less than 1 less than 1 less than 1 less than 1 less than 4 less than 20 less than 30 less than 2000

COMMENTS FOR ACTUAL RESULTS Testing was conducted in the following testbeds: CPU Pentium Dual Core 2,5GHz, Memory: 2GB, Windows 7, computational capabilities of the video adapter is not used, the number of running threads: 1 Tests #1, #2, #3, #4, #5, #7 - in the projected time and with a projected amount of memory used was obtained the expected result. Tests #6 and #8 were not carried out due to an unacceptably long time waiting the result. POSSIBILITY OF OPTIMIZATION PROGRAM The program is currently implementing the algorithm uses only one instruction stream processor to perform the calculation. But the algorithm allows to parallelize the flow of instructions in any required quantity, only a limited number of processor cores. Further details of these flows can be fully independent, allowing use of the algorithm in distributed computing and cloud systems, as well as with the use of computing power video card, such as technology NVIDIA CUDA, which will proportionally reduce the computation time, of course, provided equal performance computing modules distributed system. The table above shows the calculation time on the computer with the following parameters affect the calculation time is: CPU: Dual Core 2,5 GHz (800MHz), Memory: 2GB (800MHz). The increase in processor speed and / or tires, as well as the number of used cores will proportionally reduce the computation time. Mechanism for allocating memory using the existing functions of the platform. Net Framework 2.0, which in turn adversely affect speed. And also uses a data structure embedded in the. Net Framework 2.0, which is also not effective for this algorithm. In addition, there is potential for optimization of the code. In this regard, may accelerate the work program is about 10 times!

POSSIBILITY OF FORECASTING THE OUTCOME This algorithm allows to calculate the time required to perform the calculation and amount of storage space.

ASSESSMENT OF COMPUTATIONAL COMPLEXITY OF THE ALGORITHM 3,5 The number of operations needed to calculate ranges n , where n - number of words in the dictionary. Mathematicians usually deal with natural problems, which have short and simple descriptions, such as the well-known NP-complete problems, the factorization problem, discrete logarithm problem, etc. So, at this point do not know any natural problem whose solution was have found a polynomial algorithm for a high degree, and this degree would not yield to decrease. Typical values of the exponent for natural problems from 1 to 4. THAT SOLVES THE PROBLEM P=NP The theory of computational complexity is closely related to many areas of human activity. Here are a few of them, in which the author believes may occur significant changes in terms of efficiency. Firstly, it is the problem associated with the theory of scheduling, such as the optimal way to plan production in all industries, transportation, and make schedules for the schools. The second order, rather than by value a breakthrough in pharmacology in terms of developing new highly effective drugs, gene-and bioengineering. The ability to receive high-precision weather forecasting, earthquake and other natural phenomena. In the financial sector to construct forecasts of the market situation, the stock market, foreign exchange rates. Cheaper and more effective electronic design, as well as to seize the quality of the product itself. Also we can produce products that are currently not possible to produce essentially due to high computational complexity, but the demand is there. For example cracked RSA encryption for confront terrorists. LINKS: 1. Gary M. D. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness: Year of Publication: 1979, W. H. Freeman & Co. New York, NY, USA. 2. wikipedia.org: http://en.wikipedia.org/wiki/P_vs_np 3. The Millennium Prize Problems. P vs NP Problem. http://www.claymath.org/millennium/P_vs_NP/

Vous aimerez peut-être aussi