A go at the Clay Millennium problem NP=P Abstract The problem posed is whether Non Computational time (Non deterministic Polynomial time-NP) Algorithm produce Polynomial time (deterministic polynomial time-P) algorithm results, that is whether they are equal. That is NP=P. A six City traverse of the of a traveling Sales man is considered . There exists a starting city and an ending city. The problem is to converge into a minimal cost tour from the starting city to the destination city without traversing a city twice. An algorithm is developed which employs Bubble Sort(BS) as component which is proved NP complete. The same Algorithm when Quick Sort(QS) is employed instead of BS turns out to be P type. They produce the same minimal cost, proving NP=P. The Halting problem remain resolved. Contents Non deterministic polynomial time NP algorithms can be either General case which are all algorithms that have algorithms but donâ€™t halt in legitimate time which will go on beyond legitimate time to halt or has to be â€˜Drop Dead Haltedâ€™ and Special case where the symbol sequences are gibberish in nature and are made to halt with drop dead halts. For the general case an N-City Travelling Sales Mans Problem (TSP) is chosen to prove the phenomenon NP=P. We are required to find out the minimal cost incurred by him when touring all these selected cities on a sales tour starting from a selected city to a destination city not stepping into one city twice in the tour. Here a 5-city tour is demonstrated as a representative example of the N-city tour with the costs marked in the graph (Figure 1, pp2). It is bidirectional graph and the costs are identical for forward and backward traverse. Representative costs based on distance between cities tend to produce converging results for the Algorithm in the cities chosen. For the sake of this problem it is sufficient to take costs same for both directions. Those who want to check out different weights are urged to do so but it is clear that it will produce appropriate result without change in the resulting proof. Table 1 gives the outgoing and incoming costs for different cities. The cities chosen are the Indian cities of Cochin (C )-Madras(M)-Bangalore(B)Hydrabad(H)-Pune(P). The Algorithm for generating the minimal cost tour is as follows. 1. Arrange the costs from each city in fields. Sort it in the Ascending order. 2. At starting city find the minimal cost out of all the costs from that city, to other cities. Mark the city header with * and write the minimal cost beside it. (Since the list is sorted the minimal costs will remain at the beginning of the list) . Underline also, the selected cost. 3. At the next city where the previous city lead to find the minimal cost to the next whichever city. If this city is already traversed and is the destination city choose the next minimal cost. Add it to the previous cost. Place a * at the header and write the total cost till then against it. Underline the selected cost. 4. Repeat 3 till the destination city is reached. 5. The number appearing before the final city is the minimal cost required, (since this is a forward looking algorithm). 6. You do this for all transitions from the starting city and the minimal is cost is the least cost arrived. Table 1 on last page (pp 11) gives the rundown of this Algorithm.

1

2

Bubble Sort In the example traverse of six-city TSP algorithm use Bubble Sort (BS-Figure 2, pp 4) to sort the field in the ascending ( step1 of algorithm). In BS the bottom number is compared with the one above number. If it is smaller they are exchanged. The above number got is compared with the previous number on top of it and exchanged if the above number is smaller than the previous. This goes on till the least number reaches the top. In a similar fashion second least number is also found out. This goes on till all the field is sorted.

Algorithm Complexity analysis is done by ascertaining, in the number of comparisons in the value of components n In a general case of BS used in the first step of the Algorithm provided, for N-city TSP, The number of comparisons = n + (n-1)+…+1 x n n n = n x n2 – n( 1+2+…..+n) n From this we see that the algorithm grows faster than a n2 and is of complexity o(n2) n 1 2 3 and so on.

nn 1 4 9

en log n 1 4 9

The table above shows that nn = e n log n, where log n is the upper bound and o(n logn). This shows that the n-city tour and it’s subsidiary the 5-city tour algorithm turns to be of exponential time complexity and hence NP complete when Bubble Sort is employed. This is like Exhaustive search. The minimal cost of the traverse is found from Table 1 to be 2100 from all traverses with Cochin(C) as starting city and Pune(P) as the destination. Quick Sort Now Quick Sort (QS-Figure 3, pp 5) is used instead of Bubble Sort in the first step of the minimal traverse algorithm given above. QS is faster algorithm but it has its problem which is overcome when it is done like that of sorting a Telephone Directory for faster convergence. The numbers should be arranged in close ranges before the sort like that of a Telephone directory. QS consists of marking the top and bottom elements and choosing a Pivot element which is the mid point element of the array elements. Thus the elements are divided into two parts top part and bottom part (Caveat: The elements to the top of the pivot should be smaller than the elements to the bottom of the pivot. This is a standard practice when using Quick Sort to make it effective for faster convergence.). Now take the top part exchange the top and pivot if pivot is smaller than the top. Again divide the top part into two parts by finding the midpoint of the top part. Of this top part exchange the top and midpoint if midpoint is smaller than the top. If there is no more elements then come to the bottom part of this and exchange the midpoint element and the pivot if pivot is smaller than the midpoint element. If there are more

3

4

5

elements then before exchanging the bottom part the new top part got is divided again into two parts and the top and bottom of it is sorted as above before sorting the bottom part of the first division. Thus after sorting the top part of initial division in a similar way the bottom part of the initial division is also sorted. To put it simply the sorting is carried out by dividing and exchanging which is nested deep as the number of elements increase. As for Bubble Sort the algorithm complexity for Quick Sort is found to be, nn = n n since there are n comparisons in each field and there are n such fields. See table 1 for reference. See table below.

n n log n 1 0 2 1.3 3 3.2 and so on. This shows that Quick sort has complexity O(n) O (n log n). The algorithm grow faster than (n log n) this being the lower bound being the information mass. Table above shows that (n log n) gives the actual comparisons in Quick Sort. For example for list of 1 city,- 0 comparison, for 2 cities 1 comparison, for 3 cities 3 comparisons and so forth given by (n log n). Algorithm with O(n log n) complexity is P type algorithm since n log n is a polynomial.. The resulting minimal cost using the minimal cost algorithm which turns out to be P type O(n log n), when Quick Sort is used instead of Bubble Sort with starting city as Cochin(C) and destination Pune(P), turns out again to be 2100 from all the possible traverses . It can be proved that, Let K be the Largest bit pattern NP or P possible. k

Number of such patterns =

!

=2

Taking n bit cluster out of all this possible clusters, Probability is taken for each stream of bit NP or P to give it a unique identity. k *

Probability of 1such n-bit cluster =

1/(

! )

=2

Bounds start at 2 since that is the least number required to form a combination., moreover more than 1 bit is always required. Probability of 1 bit out of the n bits in the cluster is, Taking Joint Probabilities, k

k

(0.5+ 1/n - 0.5 x 1/n)(1/( !) - (0.5+ 1/n - 0.5 x 1/n)( 1/( !) =2

=2

6

0.5(n-1) n

, for Large n this converges.

The proof starts with description of a theoretical Computer. Let be a language. Then L be a language in x L halts for the Computer, then x {{x}} L halts in Polynomial time. Let y halts in Polynomial time or P only if y {{x}} or has counterparts which are {{x}} in which case it is Non deterministic Polynomial time or NP OR it has delimiter or language K which may or may not be L. Let PS , * And NPK, * is delimiter for S’s and delimiter for K’s, S and K are sets of symbol sequences. Usually an Automaton is defined as a 5-tuple, but here for simplicity I choose a 2-tuple. MNP E(h) , NP H(h) Where, NP E(h) = Exception Halts or Dead Drop Halts NP H(h) = Normal Halts which may be dead drop halted. NP NP (NP/P) P(NP/P) P(P) = P(P) NP NP P(NP/P) P(P), all being Halts Taking Bayesian Probabilities P(PNP) = P(NP/P)P(P) = P(X) space iff P( NP/P) P(P) P(NP) P(NP/P) = P(P/NP)P(NP) P(P) If 1/β is the probability of occurrence of NP and P then the above two equations becomes 1/β proving P(PNP) = P(NP/P) (P/NP) = (NP/P) Also, both NP and P occurs at a probability 1/(2п.√(1+x2)) Additionally functional equality can be proved between NP and P, Problem(P), Bubble sort(B), Quick sort(Q), sorted table(T), result(R)and Search(S) Now, B S Q S P => T => R and P => T => R Here, S(B(P) )= S(Q(P)) = R ie; Q(P) = B(P) where, B(P) is NP and Q(P)=P which are proved to be functionally equivalent through their producing the same sort results. ie; (P/NP) = (NP/P) . This is true since the speed of the Computer should not be taken as a constraint to their equality. This not only proves that all NP’s belong to P but also that we can find P solutions that can be determined on the Computer. This proves the results of the Bayesian equation. It can be uniquely identified by log n in P(X) which later on is the empirical process to verify the proof. n is the numerical value of the P stress. H is Halt

7

X = log n and B(X)=Binary(X) Then, H=NP/P=B(X) PHP reflexive P H NP/P = NP/P H P symmetric (P H X) (X H NP/P) P H NP/P transitive where, P and NP/P B binary numbers and XI or R or N or B binary numbers which can be uniquely identified by the numerical value log n as explained earlier. Here, their existence is not required in the same class of numbers considering the unique nature of the phenomenon and problem. Also in the TSP problem solved NP and P produce the same result 2100 and so this can be taken as the representative case for all NP, P problems, where NP/P and P halts for smaller n. Where all NP/P = NP It is noticed that the relation between P(NP/P) and P(P) is an equivalence relation, HHalt being the Relation. We also see that P(NP/P) is one to one and onto P(P) making it an Equivalence Class. So that MP(H) instead of MNP E(h) , NP H(h) as assumed earlier. Note: Let be a Language and * in it NP. Let w be a Language in y* and xw then, from above, y wk where k y < max w2 The double brazes convention is forfeited here to comply with the description of the problem given on www.claymath.org. Let # be a relational operator As per the above results, y # x where # may or may not be a part of This shows all possible combinations of 0’s and 1’s are P NP = P Refer to Figure 4 for visualization of the phenomenon. It can be empirically verified as follows. If n is the numerical value of the bit pattern then, Log n gives the individual identification of the bit pattern out of all the bit patterns where n . This is also the growth rate from a single bit from numerical 0. So when P(NP) is associated with P(P) it is identified as Log n. Also, P(P){P} P(NP){P} P(NP/P){P} The proof given above shows that {P(NP/P)} {P(P)} With Exception Halts or Dead drop Halts taken into consideration {P(NP)} {P(P)} NP=P NP = P In the example of TSP we proved NP result =2100 and P results = 2100 so that NP = P, like when x =a and y=a then x = y. Also, both NP and Pare Polynomials.

8

Also both NP and P There cannot be a contradiction in this because always a Brute force method is available to solve NPâ€™s which are P itself as per the proof by Baysein but the speed of the Computers may be a limiting factor, until new Computers based on new material for speed is manufactured in future.

Conclusion Contention shows us that Algorithm which turns into either P type or NP type according to the choice of the sort algorithm employed produces the same resulting costs 2100, proving the general case of NP =P. The special case is always dead drop halted. Since both the general and special case of NP halts, and the Turing Machine comes to halt by

9

doing so all NP’s has to be subset of P type algorithms. All NP type Algorithms thus formed are thus part of the P type or is partnered through a Relational operator # which may or may not be part of P. The problem description directs us only to prove that y x 2 *. The Bayesian proves that all NP occurring at P is a subset of all P itself proving the above requirement(Italics in the proof). P=NP numerically(probability and result), functionally an relationally. Clay Millennium problem remain resolved

NP = P

in all the cases

Turing’s Halting problem stipulates either a Turing machine that halts or run indefinitely without halting for a given set of symbols. Here we proved that all symbols stops the Turing Machine. Turing’s Halting Problem remains resolved. To find P type of Algorithms for all NP type Algorithms not yet found out can be worth the while. Exception Halts are of no consequence.

10

C*533

H *2100

B *864

M *1552

CB533

HP548

BM331

MB331

P

PH548

CM681

HB562

BC533

MC681

PB835

CH1095

HM688

BH562

MH688

PM1166

CP1221

HC1095

BP835

MP1166

Table 1

11

PC1221

Acknowledgment: Late Dr. K.R. Ramakrishna and my Colleagues there, EE Dept., IISC, Bangalore for giving me opportunity to work with computers, Claude Shannon for his Information Theory works. Prof. Thathachar V.L of IISc, Bangalore and his Ph.D students for leading me into Algorithm complexity analysis when I attended their departmental seminar on the same subject in 1982. Gregory Chaitin for his article ‘The limits of reason’ in Scientific American, Indian Edition of March 2006, which ultimately made me aware of Clay Maths problems and all my colleagues, friends and Professors who supported me in my endeavor in understanding philosophies of my multiple professions. S.E Goodman and S.T Hedetniemi for their book ‘Introduction to the design and analysis of Algorithm’ published by McGraw Hill, for introducing me to the fundamentals and possibilities and impossibilities. Last but not the lease the Google search sight linux.Wku for a quick review of Sorts after a leave of probably 20 odd years when Mr. Chaitin’s article led me back into it again one more time.

12

Mathew Cherian B.E, M.B.A(Western Michigan.) 1-B7 Penta Queen, B1 Block Padivattom, Cochin 682024, Kerala, India. Email: imag94@yahoo.com

13

14