Sunday, February 17, 2008

Return to trace a method

Returning to trace a method is 1 kind to choose excellent search a method, press to choose an excellent condition to search forward to attain a target.But while investigating a some one step, discover to at first choose not excellent or could not reach a target, send back an one step to re- choose, this kind of walk the impassability sends back to walk again of in order to return to trace a method, the technique also satisfies back to trace order of conditional certain appearance to be called "return to trace a point".1, return to general description of trace the methodCan use back to trace the problem P that the method solve, usually have to express for:For an appearance space E constituted to°from the n dollar set(x 1, x 2, …, xn) had already know={(x 1, x 2, …, xn)∣xi ∈ Si, i=1, 2, …, n}, give to settle concerning an a stipulation of weight in the n dollar set to gather D, request in the E satisfy D all stipulations all conditional n dollar sets.Among them, the Si is the definition area of weight xi, andSi limited, i=1, 2, …, n.We call to satisfy the D the conditional any n dollar set of all stipulations as a solution of problem P in the E.The most simple method which solves problem P is that raises a method, namely one by one examine whether it satisfies D all stipulationses, if satisfy or not to all n dollar sets in the E, then is a solution of problem P.But obviously, it the amount of calculation be very big.Our detection, for many problems, give settle of the stipulation gather D to have complete, namely i dollar set(x 1, x 2, …, xi) satisfy only involve x in the D 1, x 2, …, xi all stipulationses mean a j(j& lt;i) dollar the set(x 1, x 2, …, xj) must also satisfy to only involve x in the D 1, x 2, …, xj all stipulations, i=1, 2, …, n.In other words, as long as exist 0 ≤ j ≤ n-1s, make(x 1, x 2, …, xj) to breach to only involve x in the D 1, x 2, …, one of the control of xjs, then with(x 1, x 2, …, xj) must also breach to only involve x in the D for any n dollar set(x 1, x 2, …, xj, xj+1, …, xn) of ex- Zhui 1, x 2, …, xi a stipulation, the i& gt of n ≥ ;j.Therefore gather the problem P that the D has complete to the stipulation, once the examination breaks to settle a certain j dollar set(x 1, x 2, …, xj) to breach to only involve x in the D 1, x 2, …, xj a stipulation, can affirm to all will not be the solution of problem P for any n dollar sets(x 1, x 2, …, xj, xj+1, …, xn) of ex- Zhui(x 1, x 2, …, xj), as a result need not search them and examine them.Return to trace a method is to aim at this problem, make use of the above-mentioned property of this problem but put forward come of raise the method efficiency higher calculate way than.Return to trace a method first the n dollar set of problem P of the appearance space E mean into a Gao to have the preface tree the T for the take of n power, beg all solution conversions of problem P in the E for search all solutions of problem P in the T.The tree T is similar in inspectional tree, it can construct so: Establish Si in of the chemical element can line up into xi(1), xi(2), …, xi(mi-1), Si=mi, i=1, 2, …, n.Start from the root, let T each crunodes of I layer contain a son.This son arrives the side of their parents and press from left arrive right order of sequence, take power xi respectively+1(1), xi+1(2), …, xi+1(mi), i=0, 1, 2, …, n-1.Shine on this kind of structure method, a n dollar set(x 1, x 2, …, xn) in the E to should at a leaf crunode in the T, the T root goes to the top of the path of this leaf crunode one by one in order of the power of n side is a x respectively 1, x 2, …, xn, vice versa.Moreover, for aleatoric of 0 ≤ i ≤ n-1s, n dollar set(x 1, x 2, …, xn) in E of one the Zhui I dollar set(x 1, x 2, …, xi) before to should at a non- leaf crunode in the T, the T root goes to the top of the path of this non- leaf crunode one by one in order of the power of I side is a x respectively 1, x 2, …, xi, vice versa.Specially, the unprecedented Zhui() of arbitrarily a n dollar set in the E, to should be at the T root. As a result, look for a solution etc. price of problem P in the E in search a leaf crunode in the T, the root which requests from the T goes to top in the path of that leaf crunode one by one in order of the n side correspond to take of n power x 1, x 2, …, the xn satisfies all stipulations that the stipulation gathers D.Search the leaf crunode request in the T, very a kind of method of nature sets out from the root, the strategy which presses the depth to have the initiative is gradually thorough, then one by one in order search to satisfy control conditional of ex- Zhui a dollar set(x 1 i), ex- Zhui 2 dollars set(x 1, x 2), …, ex- Zhui I dollar set(x 1, x 2, …, xi), …, until i=n. In return trace the method, it is above-mentioned to lead to go into of the tree is called the appearance space of problem P a tree;Tree T's taking a post an idea a crunode is called the appearance crunode of problem P;Arbitrarily a leaf crunode of tree T is called 1 of problem P to solve an appearance crunode;Satisfy all arbitrarily a leaf crunodes of stipulations that the stipulation gathers D on the tree T is called 1 of problem P to answer an appearance crunode, it to should be at a solution of problem P

No comments: