View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Juelich Shared Electronic Resources Monte Carlo Search for Very Hard KSAT Realizations for Use in Quantum Annealing 4 1 T.Neuhausa 0 2 aJülichSupercomputingCentre,ForschungszentrumJülich,D-52425Jülich,Germany c e D 7 1 Abstract ] Using powerful Multicanonical EnsembleMonte Carlo methods from statistical physics we h explore the realization space of random K satisfiability (KSAT) in search for computational c e hard problems, most likely the ’hardest problems’. We search for realizations with unique m satisfying assignments (USA) at ratio of clause to spin number α = M/N that is minimal. - t USA realizations are found for α-values that approach α = 1 from above with increasing a t number of spins N. We consider small spin numbers in 2 ≤ N ≤ 18. The ensemble s . mean exhibits very special properties. We find that the density of states of the first excited t a state with energy one Ω = g(E = 1) is consistent with an exponential divergence in N: m 1 Ω ∝ exp[+rN]. The rate constants for K = 2,3,4,5 and K = 6 of KSAT with USA - 1 d realizations at α = 1 are determined numerically to be in the interval r = 0.348 at K = 2 n o and r = 0.680 at K = 6. These approach the unstructured search value ln2 with increasing c K. Our ensemble of hard problems is expected to provide a test bed for studies of quantum [ searches withHamiltoniansthathavetheform ofgeneral Isingmodels. 1 v Keywords: SpinGlass, MonteCarlo, QuantumAdiabaticComputation 1 6 3 5 1. Introduction . 2 1 Randomsatisfiabilityproblemslikethreesatisfiability(3SAT)anditsgeneralizationKSAT 4 form a corner stone of complexity theory, a very active research branch in formal logic and 1 : computer science. In these theories one is concerned with logical forms F(X) defined on v some bit space X and one discusses the question whether or not there exists an assignment i X X that turns the value of the logical form F(X ) into “true”. The decision problem of 0 0 ar KSAT and its accompanying function problem: the actual calculation of X at given F(X) 0 for K ≥ 3 belong to the class of NP complete theories [1], which for all practical purposes implies computational intractability. In these theories it is very common that worst case re- alizationensemblesofforms F(X)exhibitan algorithmdependent complexityC, thatrises exponentially C ∝ exp[+rN] with the number of bits N. The rate constants r are smaller thantheunstructuredsearchvaluer = ln2butatthesametimecantakevaluesthatarefinite fractionsofln2. Thisimplies,thatthereexistproblemswhicharenotsolvableevenforsmall PreprintsubmittedtoElsevier December18,2014 numbers of bits like N = 100, neither by analytic nor numeric methods, even usung brute computationalforce. It is the privilege of statistical physics to turn the abstract notion of satisfiability into studies of Hamiltonian systems upon mapping the bit degrees of freedom X = 0,1 via i s = 2X − 1 for i = 1,...,N to Ising degrees of freedom s ± 1, and upon introducing a i i i suitable Hamiltonian H whose ground-states at energy E = 0 map one by one to the KSAT satisfyingassignmentsofF(X). Onemay eitherconsiderclassicalstatisticalphysicswhere the theory is supplied by artificial thermal fluctuations at inverse temperature β = T−1 within the framework of the canonical partition function Z = exp[−βH ] or C PConf. KSAT alternatively, consider the quantum statistical theory of Pauli spins Sx,Sy and Sz with the i i i quantumpartitionfunction ZQ = Tr < Ψ | exp[−β[(1−λ)XSix +λHKSAT(Siz)]] | Ψ >, (1.1) i where quantum fluctuations at low T ≈ 0 are tuned via an external parameter λ. For both cases the mathematical intractability is encoded into physical theories and it is an exciting research topicto study itsconsequences i.e., phase transitionsand correlations from various points of view. For the classical theory it was shown, that computational intractability is related to a phase transition - the SAT transition - along the principal parameter direction α = M/N of random KSAT theories [2], the ratio α hereby denoting the ratio of clause M to spin N numbers. In a later effort complexity related observables were determined ana- lytically within the framework of replica symmetry breaking theory for random 3SAT [3], and also numerically in large scale simulations [4]. In particular the critical point of the 3SAT transition was determined to be α = 4.267... analytically. For the quantum theory, S and within quantum information theory it was conjectured that adiabatic quantum compu- tations (AQC) based on the properties of Z could possibly obtain ground states of H Q KSAT in polynomial physical time [5, 6]. For hard 3SAT realizations it turned out however, that early findings on polynomialground state search times had to be corrected to exponentially large ones [7] for the simplest case of AQC making use of a transversemagneticfield and a linearλ-parameter schedule. A similarfinding wasmaderecently foraanothersatisfiability theory: ExactCover[8]. Within the current work we execute a very use-full exercise prior to the actual studies of complexity related observables in physical theories. We restrict the admissible set of all KSAT Hamiltonians, namely random KSAT realizations with ensemble mean < ... > , to a much smaller ’hard’ set < ... > of Hη Hamiltonian’s RANDOMKSAT HARD KSAT with corresponding ensemble mean. The index η denotes the ensemble members which for reasonsofcomputertimelimitationshavefinitenumberη = 1,...,1000throughoutthepaper. As far as ground-state searches are concerned our problem set is targeted at hard problems - most likely the ’hardest problems’ - which otherwise and within < ... > are RANDOMKSAT exponentiallyrare. Ourproblemsare constructedunderspecificconstraints: • Theground-statetoanyHη isunique,whichifgη(E)denotesthedensityofstates KSAT 2 3SAT N=16 12 16 ln(2) 10 8 E) g( 6 n l 4 2 0 0 2 4 6 8 10 E Figure 1: We display an example for Logarithmic scale density of states functions gη(E) for η = 1,...,10 realizationsforthetheory3SATatN =16spins. Densityofstatesfunctionshavefinitesupportintegervalues butforopticalreconnaissancereasonsareconnectedwithpolygons. Somefunctionalvaluesareidentifiedby circlesandtriangles. Itisremarkable: thedensityofstatesjumpsfromg(E = 0) = 1(USA)toalargevalue Ω = g(E = 1) ≈ e9.3 ≈ 11000. Asfarasground-statesearchesareconcerned: anystochasticground-state 1 searchcaneasilyreachtheE = 1surface. BeyondthatandinfrontofE = 0thesearchhastoenumeratean exponentiallargenumberofpossibilities. function (DOS) implies gη(E = 0) = 1. Such problem realizations possess unique satisfyingassignment’s(USA). • For a givennumber ofspins N and for realizations with g(E = 0) = 1 the numberof clauses M is minimal. The parameterα is then minimaltoo α = α . E.g. : we find min that USA realizationsin 3SATforα followα = (N +4)/N. min min • The set of problem realizations < ... > is drawn with unique probability from HARD theset of< ... > realizations. RANDOMKSAT Similarrealizationshavelatelybeenconsideredfor3SATinRef. [9]withaweakerconstraint onthevalueα,whichhadthevalueα = 3. TheminimalKSATvalueswithinthisworkturn outtoapproach α = 1fromaboveindependentofK withincreasingN. Inshort: weare min constructingUSA realizationsin KSAT at α = 1 asymptotically. At the heart of our numerical calculations is a Markov Chain Monte Carlo study of the partitionfunction Γ(µ) = N−1 X δ(1)[µ−g(E = 0)], (1.2) Random KSAT whichpartitionstherealizationspace ofrandom KSAT withinrespect to µ,theground-state multiplicity. Once the Markov Chain Monte Carlo visits the µ = 1 sector (USA) corre- spondingproblems are collected on the disk of a computer. Similarflat histogram sampling 3 methods, like Wang-Landau [10] and Multicanonical [11] simulations have recently been used in complexity theory in an attempt to sample the density of states function g(E) in 3SAT for spin numbers N that prohibit exact enumeration [12]. The final part of the paper classifiesmeasures ofcomplexitywithintypicalproblemrealizationsin < ... > . HARD Today’sunderstandingontheoriginonthecomplexityofthephysicalsearchinfrustrated and disordered systems pictures a free energy landscape in which as a function of the value N, a finite number of solutionclusters is accompanied by an exponentially large number of almostsolutionclustersatenergy nearbutabovetheground-state. Allclustersareseparated by finite free energy barriers. The situation resembles the search for a needle - or several needles-inahaystack. Asimplifiedmechanismoperateswithinourhardproblemensemble < ... > . Wefind,thatthephasespacevolumeΩ atE = 1isexponentiallylargeinthe HARD 1 numberofdegrees offreedom N, see theexamplesof g(E) displayedin Fig.(1). Thus first: for all of the considered KSAT theories with K = 2 up to K = 6 we encounter the generic situation: a single needle is searched in a haystack of exponential large size 1. Second: we findnumericevidencethatactualvaluesofΩ areextremali.e.,maximalunderthecondition 1 ofminimalα,whichin turnjustifiesthenotionofmostlikelythe’hardest problems’. 2. Theory, HardProblems and MonteCarlo Simulation 2.1. TheoryandObservables InKSAT oneconsiderslogicalformsF -afunction-whosetruthvaluecaneitherbetrue or false and which are defined on a space of N Boolean degrees of freedom - bits - X with i i = 1,...,N. In the satisfiability problem one asks for the existences of assignment’s i.e., bits X that would evaluate the function F at the value true. Solving the function problem 0 impliestheexplicitcalculationofasinglesatisfyingassignmentor,ofalldifferentsatisfying assignmentsifthereareseveralofthose. ThelogicalformF istheconjunctivenormalform ofM clauses{C ,...,C }: F = C ∧C ∧...∧C ,whichonlyevaluatestrueifallclauses 1 M 1 2 M C with α = 1,...,M evaluatetrue simultaneously. Any of theM clauses is thedisjunction α ofintegerK literalsL withK ≥ 2 and j = 1,...,K: α,j C = L ∨L ∨...∨L . (2.1) α α,1 α,2 α,K A clause is true, if at least one of its literals evaluates true. For example, in 3SAT there are 7 configurations of literals on the clause which evaluate true and just one with truth value false. In addition,aliteral is eithera bitX orits negationX and, theactual identificationof a literal with a specific bit - or its negation - is controlled by a map (α,j) → i : i = i[α,j], thatassociatesclausesandclause-positionsα,j totheindexsetiofbits. Themapi = i[α,j] andthepossibilityof2KM negationsattheliteralpositionsarefreeparametersofthetheory. 1The theories at K ≥ 3 are NP-complete while at K = 2 there exist mathematical polynomial time algorithmsthatfindtheground-stateeventhoughΩ isexponentiallylarge. 1 4 1.2 α (K=2) α (K=3) α (K=4) s s s 1 0.8 T A NS 0.6 4SAT U P 3SAT 0.4 0.2 2SAT 0 0 2 4 6 8 10 12 14 16 α Figure 2: Probability P of un-satisfiable formulas within < ... > for K = 2,3 and UNSAT RANDOMKSAT K = 4alsafunctionofα. ExactandnumericalvaluesfortheSATtoUNSATthresholdα (K)areindicated s byarrows. ThenumericaldataareobtainedfromthepartitionfunctionΓ(µ)ofeq.(2.15)viaeq.(2.18). In an Hamiltonian theory they can be used to introduce ensembles with mean < ... > over random disorder as well as random frustration, a possibility that is heavily exploited in this work. It is implicitlyunderstood,that tautologiesi.e., contradictingpairs withinclauses like X X as well as redundancies i.e., duplicate literals like X X or X X are not admitted to i i i i i i thetheory. The physical degrees of freedom are classical Ising spins s = ±1 with i = 1,...,N and i without loss of generality, true on each bit X is identified with spin up s = +1. Let us i i introduce functions h in an attempt to write the Hamiltonian H as a sum of M terms: α KSAT H = h , where each term corresponds to a clause and, where the ground-states of KSAT Pα α H at energy E = 0 can be identified one by one with the satisfying assignments of F. KSAT ForthispurposewenotethatK spinss ,...,s oftheclauseC = X ∨X ∨...∨X addup 1 K 1 2 K tothesumΣ = K s ,whichtakesK+1differentvaluesΣ = −K,−K+2,...,K−2,K. Pi=1 i Consequentlythepolynomialh = h(s ,...,s ) 1 K (−1)K K N h = 2KK! Y(Xsi +K −2m) (2.2) m=1 i=1 hasthevalueh = 0forallspinconfigurationsexceptone,ifonlyallspinsaredown: s = −1 i withi = 1,...,N. Forthelattercaseh = 1, whichimpliesan energy-gap ofvalueunity. For K ≥ 2 the function h is a linear combination of the spins n-point functions Γ0, Γ1, ... , ΓK with a maximum n of value n = K. For purposes of illustration we present the 2SAT max and3SAT cases. For2SAT weobtaintheanti-ferromagnetat finitefield 1 h = [s s −(s +s )+1], (2.3) 2SAT 1 2 1 2 4 5 10 2SAT N=14: 3SAT N=12: 8 4SAT N=12: 6 4 > 2 µ < n 0 l -2 -4 -6 -8 0 5 10 15 α Figure3: MonteCarlodataforln<µ>ofrandomKSATinaccordwitheq.(2.16)forselectedN valuesasa functionofαandforK = 2,3andK = 4. ThestraightlinesmatchtheMonteCarlodataandcorrespondto theexactresultofeq.(2.17). whilein3SAT 1 h = [s s s +(s s +s s +s s )+(s +s +s )−1]. (2.4) 3SAT 1 2 3 1 2 1 3 2 3 1 2 3 8 The necessary frustrations are encoded in a matrix array ǫ = ±1 which for each clause α,j α and position j with j = 1,...,K follows the pattern of negations within F, a negation induces an ǫ = −1 while otherwise ǫ = +1. We mention that in random KSAT, which we denote by the ensemble mean < ... > , values of ǫ are drawn with equal RANDOMKSAT probability p(ǫ = +1) = p(ǫ = −1) = 1. The final form of the KSAT Ising Hamiltonian 2 H is KSAT M HKSAT = XhKSAT(ǫα,1si[α,1],ǫα,2si[α,2],...,ǫα,K−1si[α,K−1],ǫα,Ksi[α,K]), (2.5) α=1 andisthebasisofourstudies. ItsprincipalparametersforK aretheratioofclausenumbers M overN namelyα = M/N,andtheparticularassignmentsofspinstoclausesviathemap i[α,j], as well as the settings within the frustration matrix ǫ = ±1. We denote a specific α,j settingofthelattermapandmatrixarealizationandstudyensemblemeanexpectationvalues ofobservablesat fixed α throughoutthepaper. OncetheHamiltonianisgivenweformallydefinethecanonicalpartitionfunctionZ(β) = e−βH which at temperatureT = β−1 allowsthedefinitionofphysicalobservablesas PConf. there are the internal energy U = ∂ lnZ, or the specific heat C = β2∂ U. The canonical β V β partitionfunctionhas thespectral representation Z(β) = Xg(E)e−βE, (2.6) E 6 0.8 2SAT N=14 3SAT N=12 0.7 ln2 0.6 0.5 N >/ µ 0.4 n < l 0.3 α (K=3) s 0.2 α (K=2) s 0.1 0 0 1 2 3 4 5 6 α Figure4: Groundstate entropydensity s = 1 < lnµ > | for randomKSAT at K = 2 and K = 3 as 0 N µ>0 a functionofα. Thearrowsdenoteexactpositionsof the SAT to UNSATthresholdatα . Thedata sets are s superimposedbyseriesexpansionresultsfors forα-valuesbelowα . Thecurveslieontopofthedata. 0 s whereg(E)denotesthedensityofstates(DOS): g(E) = X δ(1)(H −E). (2.7) Conf. For KSAT theories g(E) is integer valued, has finite support on the integer values of the compact interval 0 ≤ E ≤ M and an integral g(E) = 2N. A satisfiable Boolean form PE induces g(E = 0) > 0, while g(E = 0) = 1 corresponds to an F that only has one unique satisfying assignment (USA). Boolean forms, that cannot be satisfied have g(E = 0) = 0. The quantity g(E = 1) also is denoted the microcanonic phase space volume Ω of the 1 energy oneenergy surface. Our knowledgeof the statisticalproperties of K satisfiablity stems from extensiveanalyt- ical [3] and numerical studies [2] of random KSAT, which have demonstrated the existence of a transition, possibly a phase transition at values α (K). The SAT to UNSAT transition s separates at low α < α a phase where formulas F are satisfied in the mean, from a phase s at large α > α where formulas F can not be satisfied. Numerical data for the probability s 0 ≤ P ≤ 1 of un-satisfiableformulas within themean of random KSAT are displayed UNSAT in Fig.(2) and illustrate the statement. The data are of similar quality as the data obtained by Selman and Kickpatrick in 1996 [2]. The consensus is that probable realizations within randomKSATare ’hardest’,i.e. computationalmostintractable,at and inthevicinityofthe transition point α ≈ α . However, this does not exclude the existence of still ’harder’ i.e., s worstcase realizationswhich at arbitrary α are hidden inthetails ofprobabilitydistribution functionsforcomplexityrelated observableswithsmall,possiblyverysmallprobabilities. 7 2.2. SearchforHard Problems The starting point of our search for ’hard’ realizations are observationsthat concern real- izations with USA. If one considers USA realizations in 3SAT for the smallestspin number N = 3 and clausenumberM oneinevitablyarrivesat theM = 7 = 3+4realization F (N = 3) = ( 1 ∨ 2 ∨ 3 ) ∧ USA ( 1 ∨ 2 ∨ 3 ) ∧ ( 1 ∨ 2 ∨ 3 ) ∧ ( 1 ∨ 2 ∨ 3 ) ∧ (2.8) ( 1 ∨ 2 ∨ 3 ) ∧ ( 1 ∨ 2 ∨ 3 ) ∧ ( 1 ∨ 2 ∨ 3 ) , which encodes the unique ground state s = s = s = +1. This particular example is one 1 2 3 of eight that all encode USA’s for N = 3, and is turned in a readable form upon permuting clauseand literal indices. Ithas interestingspecificproperties: • FOR N = 3 F is the minimal form with a USA. For N = 3 and M = 6 there are USA no USA realizationsin 3SAT. • The density of states g(E) only has two values g(E = 0) = 1 and g(E = 1) = 7. All spin flips acting on the ground-state lift the E = 0 energy surface by just one unit to E = 1. The states with E = 1 have dis-proportional large multiplicity and therefore E = 0 is hidden. This suggeststhat still’minimal’but larger forms F at USA values N > 3 could inherit a similar property. These must exist at α = (N + 4)/N as one can introduce additional spins and clauses one by one. For example, if we introduce a fourth spin and extend F by one clause to an (N,M) = (4,8) form USA withcomparableproperty,then F (N = 4) = F (N = 3) ∧ ( 4 ∨ 1 ∨ 2 ). (2.9) USA USA The latter form encodes the unique ground state s = s = s = s = +1 and has 1 2 3 4 the density of states g(E = 0) = 1 and g(E = 1) = 15 respectively. Again E = 1 configurationshavelargemultiplicity. • Within F of eq.(2.8) there are exactly m = 3 clauses - those with two negations USA 1 - which inthe uniquesolutionare solvedby justone trueliteral. There are inaddition m = 3 clauseswhich aresolvedbytwoliteralsand m = 1clauses whicharesolved 2 3 by three literals. Also, there exists a polynomial transformation of 3SAT to maximal independent set(MIS) [13]. It is easy toshow,thata uniqueground-stateofthe3SAT problemtransformsintoadegenerateground-stateinthecorrespondingMISproblem. Theground-statemultiplicityMIS, Ω , hasthevalue 0,MIS Ω = 2m23m3 = 24 (3SAT,N = 3,M = 7), (2.10) 0,MIS 8 3SAT 0 N=08 N=10 -5 N=12 αs(K=3) α=(N+4)/N -10 0 -5 -15 -10 A S -15 PU -20 USA --2250 P -30 -25 -35 -40 -45 -30 2 4 6 8 10 12 14 16 N -35 1 2 3 4 5 6 α Figure 5: Probability P of eq.(2.19) for the occurrence of problem realizations with unique satisfying USA assignment(USA)in3SATasafunctionofα = M/N. SpinnumbersareN = 8,10andN = 12. Theinset ofthefiguredisplaysthedecreaseofP forα ,seeeq.(2.12)asafunctionofN. USA HARD on F . We notethat m of F (N = 4) turns out to be m = 4 while m and m USA 1 USA 1 2 3 remain having values m = 3 and m = 1, and thus also F (N = 4) is constant at 2 3 USA Ω = 24. It is suggested that ’minimal’ but larger (N > 3) forms F can have 0,MIS USA indices m that are of magnitude O(N), which in turn limits the volume Ω to 1 0,MIS finite values. Finite values imply vanishing ground state entropy density lnΩ /N 0,MIS underthepolynomialtransformationfrom 3SAT toMIS. Theexistenceofexampleswithinterestingpropertiesguidesourexpectations. Thequestion israised whetherUSA and3SAT realizationsat theratioofclauseto spinnumbers N +4 α = (2.11) HARD N exist for arbitrary N ≥ 3 and what their properties are ? In absence of useful mathematical methods we use Monte Carlo simulations in order to actually construct members of the en- sembleatα ,andinalatermeasurementstepwedeterminetheirproperties. Inparticular HARD we calculate Ω , the multiplicity of the energy one surface. It is then necessary to employ 1 biasedMonteCarlosamplingtechniques,asinthevicinityofα = 1USArealizationswithin random 3SAT have exponentially small probability. Finally it is easy to generalize our ar- gumentsto arbitrary K. For KSAT with K ≥ 2 we expect USA realizations with minimum clausenumberat N +2K −K −1 α (K) = , (2.12) HARD N undertheconditionthat N ≥ K. 9 2.3. MonteCarlo SearchandChecks TheMonteCarlosimulationperformsastochasticestimateofthebiasedpartitionfunction Γ(µ,WMUCA) = N−1 X e+WMUCA(µ)δ(1)[µ−g(E = 0)], (2.13) RANDOMKSAT which for 0 ≤ µ ≤ 2N is evaluated on the phase space of all possible random KSAT real- izations for a given KSAT Hamiltonian eq.(2.5). The bias, as expressed by the Boltzmann factor exp[+W (µ)], is introduced along the lines of Multicanonical Ensemble simu- MUCA lations [11] and serves the purpose to lift the probabilities of rare µ configurations in the Markov chain. The Monte Carlo is expected to perform a random walk in µ and whenever the µ = 1 sector is visited an ensemble member of < ... > is stored on the disk of a HARD computer. OurMonteCarlo is quiteun-conventionalandessentialremarks are inorder: • TheMarkovchainofconfigurationsconsistsofrealizationsas specified bytheirmaps i[α,j] and frustration matrix ǫ . Each problem realization is attached to a Hamilto- α,j niantheorywithdensityofstatesg(E)thatcanbeevaluatedatE = 0,µ = g(E = 0). The calculation of µ for a given configuration unfortunately takes O(2N) computa- tional steps. Our Monte Carlo simulation therefore is limited to small numbers of spins. We studied KSAT theories for K = 2,3,4,5 and K = 6. We were able to generate ensembles of 1000 statistical independent members each for maximum spin numbers N = 18,16,14,12 and N = 10 respectively. Minimum spin numbers max max always are N = K.. min • Configurations are updated with Metropolis updates [14]. The initial problem real- ization at µ is subject to a trial-update which targets µ . The Markov chain accept I F probabilityforthemoveis P = min[1,e+WMUCA(µF)−WMUCA(µI)], (2.14) ACC and as usual, iftheupdateis rejected theinitialconfigurationstayswithintheMarkov Chain. • Trialupdatesare generated randomlyon thespaceofrandomKSAT realizations. One choosesarandomclauseα andclausepositionj andat(α ,j )trialvaluesi and 0 0 0 0 Trial ǫ , which are uniformly distributed on the measure of the theory. The absence of Trial redundancies and tautologies constrains the admissiblemoveset. The typical number ofMonteCarlomovesforthesimulationofΓ(µ)is109. ForthelargerN valuesitwas necessary to repeat the simulationswith different random number sequences possibly 10, up to several 10 times. The numerical data, as presented in the paper, consumed onemonthofcomputertimeona 256processorworkstationcluster. 10
Description: