Let be the set of Boolean variables occurring in or the initial query , and put . Represent a current query by a subset : the Boolean literals in this set are the outstanding obligations. The initial state is , and the goal test is .
An action chooses a Horn clause with positive Boolean literal , provided . Its search transition model is precisely the given resolution inference rule:
Thus it removes the obligation and inserts all negative Boolean literals of . Repeated Boolean literals merge because queries are sets. A Horn clause without a positive Boolean literal supplies no action under the rule specified in this paper; it must not be treated as an additional way of finishing the query.
Give every action unit cost. A graph path with actions gives a proof containing queries, so minimizing either quantity gives the same shortest proof. Uniform-cost search orders the search frontier by the number of actions already taken and applies the goal test when removing a search node for expansion. Recording parent actions reconstructs the proof.
There are at most two choices, present or absent, for each of the negative Boolean literals. Therefore
This bounds the state space, including the empty query, rather than the possibly infinite search tree of action histories.[ref]
A-star search is best-first search with priority
Here is a search node, is its state, is its accumulated path cost, and is the minimum remaining cost to any goal state, interpreted as if no goal is reachable. The inequality defines an admissible heuristic. Thus is a lower bound on the cost of any solution extending that particular action history.
Initialize the search frontier with the root. Repeatedly remove a search node of least , apply the goal test, and, if it is not a goal, insert its applicable-action children with their updated and . In tree search, different action histories remain distinct search nodes even when they reach the same state; there is no global visited-state set.
For the finite branching factor and unit costs here, an admissible heuristic ensures that any first goal removed is optimal. If a cheaper solution existed, the search frontier would contain an unexpanded prefix of it with at most that cheaper cost, contradicting selection of the more expensive goal. Nonnegative also means only finitely many search nodes can have below any fixed finite cost, so a finite solution will eventually be reached. This does not guarantee termination when no proof exists.
Termination is not guaranteed. Take
Both members of are valid Horn clauses with distinct underlying Boolean variables. The only possible continuation alternates
The empty query is unreachable. With the admissible heuristic , ordinary A-star search keeps generating the next search node forever, despite there being only two reachable states.
A modification requiring no additional stored state collection is to impose the known search depth bound
The unit-cost already stored by A-star search is also its search depth; the bound is a scalar computed from the input, not a closed set. Apply the goal test before refusing expansion at the bound.
To prove completeness of this modification, remove any segment between two equal states in a successful proof. The successor choices after the later occurrence are available at the earlier occurrence because the search transition model depends only on the current query. Repeating this removal gives a proof with no repeated states, hence at most actions. In particular, a shortest proof never needs a repeated state, since every removed segment has positive cost. The depth restriction therefore preserves a shortest proof whenever one exists.
The restricted search tree has finite depth and finite branching factor, so it is finite. A-star search must then either remove a goal or exhaust the search frontier and report failure. Its existing search frontier may still be large; the modification saves a separate visited-state collection, not all storage used by tree search.
Yes: is an admissible heuristic. One application of the resolution inference rule removes just one current negative Boolean literal. It may add other negative Boolean literals, and some of those may already occur, but it cannot remove any other current obligation. Consequently
If actions lead from to , applying this inequality at every step gives . Thus
It is also a consistent heuristic, since and . In particular, merging duplicate obligations cannot invalidate the lower bound: removing several duplicates from the representation never counts as removing several distinct members of a set.
Use the shortest path distances in the directed dependency graph to define
The additional counts the final use of a positive unit Horn clause, which corresponds to a fact rather than an edge of .
To justify the new lower bound, consider any complete proof from and fix . At some step this obligation must be removed using a Horn clause with head . If that Horn clause is the fact , we have already found a dependency graph path of length zero ending at a fact. Otherwise select one negative body Boolean literal . Immediately after the step it belongs to the query, whether newly inserted or merged with an existing obligation. It must subsequently be removed. Record the edge and repeat this argument at its later removal.
The selected removal times strictly increase. Since the proof is finite and ends with no obligations, this chain eventually uses a fact. A proof of actions therefore produces a dependency walk of at most edges from to a fact. Removing any cycles from that walk gives . Hence for every initial obligation. If , no such proof exists. Combining this bound with the admissible heuristic by taking their maximum preserves admissibility.
For a strict improvement, use
Here , so while . The three successive obligations are , followed by the empty query, so the improved bound is exact.
Do not sum all the values without an additional argument: different obligations may share work. For example, with , the query takes three actions, while that sum would be four.
When the values of several admissible heuristics are already available, choose their maximum:
Every , so their maximum is still an admissible heuristic. It has heuristic dominance over their minimum and their arithmetic average, which are also admissible heuristics but give no larger lower bound. Thus the maximum supplies the most informative generally valid choice among these alternatives.
Their sum can overestimate by counting the same remaining action repeatedly. If two heuristic functions both give the exact value at a state one action from the goal, their sum gives . A valid sum requires extra structure such as dividing each action's cost between the component estimates; admissibility of the components alone does not provide that structure.
Larger admissible values reduce the region that A-star search must expand before an optimal solution of cost can be removed. This is a statement about heuristic dominance, not a strict claim about running time under every tie-breaking rule or evaluation cost.
Index the coins so that is smallest and largest. Choose as the initial stack and as the destination, assuming . The static predicate facts describing size are
No size comparison with is needed: moving onto empty ground will have a separate action schema. The initial STRIPS state is
Under the closed-world assumption, all other ground ground atoms are false. In particular, the initial state contains just one predicate fact naming the top of each stack. The predicate names the immediate support, not every coin farther below.
An explicit positive conjunctive goal is the following set of required ground atoms:
A state succeeds when it contains . The static predicate facts in persist automatically. Starting from , the planning state invariants proved below make this goal exactly the desired completed stack on with all other stacks empty. If any new stack is acceptable, the choice of loses no generality because the initially empty stacks are interchangeable.
Use two STRIPS action schemas, for a destination topped by a coin and for an empty destination. In both, is a coin, are distinct stack constants, and is either a different coin or . In the first, is a coin distinct from and, when is a coin, also distinct from . These are restrictions on action grounding, so no new type or inequality predicates are needed.
For , use
For , use
The last cases are a compact notation for two ordinary action schemas, one with a coin and one with . In the second case, already holds and is left unchanged: the same ground object represents the base of every stack. Its stack identity is carried by , so moving a singleton stack to an empty location still changes two top markers even though its support remains .
Each ground action applies only if and updates the STRIPS state by
The preconditions require the moved coin to be exposed and the destination to be either exposed or empty. A coin destination additionally requires the moved coin to be smaller. The delete list removes its old support relation when that support changes, removes its old source-top marker, and removes the destination's old top marker. The add list exposes its former support and installs it as the destination top.
To prove that no incorrect plans arise, induct on the action history. Initially every coin has exactly one support; the stacks are disjoint decreasing chains ending at ; and each stack has exactly one correct top marker. An applicable action removes just the top coin from one such chain and attaches it to a different chain, or creates a singleton chain. The size precondition preserves decreasing order; distinct stack parameters prevent moving onto one's own stack; and updating both top markers preserves their accuracy. The unchanged chain segments retain their support relations. These planning state invariants therefore hold after every action. Only the named stacks can be used, enforcing the stack limit.
Conversely, every legal physical move has a source top , a uniquely determined former support , and either an empty target or a target top larger than . The corresponding ground action has exactly these preconditions and effects. Thus the encoding permits all legal moves and preserves physical legality from the initial state.[ref]
Move the three coins as follows, with smallest:
StepCoinSourceDestination
1
2
3
4
5
Every moved coin is exposed, and the last two moves put a smaller coin on a larger one. Thus
Five is also optimal here: before the first move of , both smaller coins must leave . Neither can make its only move directly to the final destination and remain there, because it would obstruct the eventual arrival of . Each smaller coin therefore needs at least two moves. Those four small-coin moves and at least one move of give the matching lower bound.
In terms of minimum plan length, allowing more stacks can only help:
Every legal plan using at most stacks remains legal with available: simply ignore the new stack. The inequality need not be strict. For , one move suffices for every .
With , put each of the smaller coins on its own spare stack, move the largest coin to the destination, and then place the smaller coins on it in decreasing size order. This uses moves. Every smaller coin must leave the initial stack before the largest coin's first move. It cannot move just once directly to the final stack and stay there, since that would block the largest coin's eventual arrival. Thus each smaller coin requires at least two moves, while the largest coin requires at least one. Hence
Compared with the three-stack value , the physical task can therefore become substantially easier.
The difficulty of finding an optimal plan is a different issue. Each legal state is determined by assigning every coin to one of the labelled stacks, whose size order is then forced. There are such assignments, so the state space and possible branching factor grow with . An uninformed search algorithm can therefore face more alternatives even when the optimal plan becomes shorter. Likewise, a simple recursive strategy for three stacks need not immediately supply the best strategy with more stacks. The defensible answer is that the required number of moves never increases, while computational search effort need not decrease.
Two general constructions are delete-relaxation heuristics and abstraction heuristics. Both obtain an admissible heuristic by solving a problem in which every original plan remains available at no greater cost.
For a delete-relaxation heuristic, remove every STRIPS delete effect and compute the shortest relaxed plan length . A relaxed action never makes a true fact false. Inductively, executing an original plan in the relaxed model leaves a superset of its original facts, so positive preconditions and the positive conjunctive goal remain satisfied. Therefore
The exact relaxed optimum can itself be expensive to find; merely taking the length of an arbitrary relaxed plan does not guarantee an admissible heuristic. One can instead use a proven lower bound on the relaxed optimum.
For this coin encoding, removing delete effects loses the requirement to free an occupied stack and the requirement to destroy and later rebuild support relations. From the initial state, relaxed moves can successively move from to using the empty-destination action: is never deleted, and exposing each next source coin is still allowed. The original support-chain goal facts are never deleted either. After these actions, and also hold, so the entire goal from part (a) holds. Thus , showing why this relaxation misses much of the exponential work needed with three stacks.
For an abstraction heuristic, project states onto selected information and project each action onto its effect on that information. Forgetting a selected collection of planning fluents, and their preconditions and goals, gives one general construction for STRIPS. Define the abstract transition relation to include every projected original transition, with cost at most the original cost. The exact abstract distance is then a lower bound because any original goal-reaching graph path projects to an abstract goal-reaching walk:
For the coin puzzle, a useful state abstraction remembers the stacks occupied by a chosen subset of coins and ignores the other coins, contracting the support chains past ignored coins. Moving an ignored coin leaves the abstract state unchanged; moving a retained coin is a legal move in the smaller Tower of Hanoi instance. Precomputing exact abstract goal distances gives a pattern database. This can retain stacking and spare-stack restrictions that the delete-relaxation heuristic loses. Larger retained subsets give potentially stronger information but require more storage and preprocessing. Maxima of these admissible heuristics remain safe; unqualified sums can double-count moves.
Use one variable for each cell, with . An empty cell has constraint domain ; a clue containing has singleton constraint domain . Thus all clues are retained automatically.
For every row impose , and for every column impose . For each impose an all-different constraint on
These are the nine prescribed boxes. There are 27 all-different constraints altogether. Nine pairwise distinct values chosen from a set of nine values must use every value exactly once, so these restrictions are precisely the Sudoku requirements. Equivalently, expand each all-different constraint into pairwise binary constraints for cells sharing a row, column, or box.
Choose the distinct values of and call them . There are choices. Constraint (5), on , immediately forces .
Constraints (2) and (3) require and , respectively. Since the constraint domain has exactly three values, . Constraint (2) now forces , and constraint (3) forces . Finally, constraint (4) permits or .
Every choice just described satisfies all five all-different constraints, and the forced-value argument shows there are no other possibilities. Hence
In the order , the two forms are
where ranges over the six permutations of .
The constraint hypergraph has one vertex for each of and one hypergraph edge for each constraint scope:
Here abbreviates . These five scopes follow the corrected source.[ref] The diagram uses the incidence representation: round nodes are the original variables, square nodes represent hypergraph edges, and a joining line means that the variable belongs to that constraint scope. The square nodes are not extra variables of .
Figure 1.
Incidence drawing of the five constraint scopes in Question 3(b)
. Details.
In particular, the central pattern involving forms a cycle through three constraint scopes; the scopes cannot themselves simply be joined into a valid tree decomposition without an additional bag.
Use the ordinary treewidth of the primal graph of the constraint hypergraph: two variables are adjacent whenever they occur together in an all-different constraint. Equivalently, a tree decomposition of this constraint hypergraph has a bag containing every constraint scope, together with the running-intersection requirement for each variable. This is distinct from taking the treewidth of its incidence drawing.
Introduce a central bag and the five scope bags
Join to each of , join to , and join to :
Figure 1.
A minimum-width tree decomposition with central bag containing variables 2, 4, and 5
. Details.
Every constraint scope is contained in its own bag, and every variable occurs. The nontrivial running-intersection checks are: occurs along ; along the connected branches ; along ; along ; and along . Each of the other variables occurs in just one bag. This is therefore a valid tree decomposition of width .
Conversely, any of the original three-variable constraint scopes forms a clique of size three in the primal graph. Such a clique must be contained in one bag of every tree decomposition, forcing width at least two. The upper and lower bounds agree:
Always true. An all-different constraint of arity requires distinct values. If , the pigeonhole principle makes even one such constraint impossible. Since , at least one is present, and consequently
True in some cases and false in others: the two numerical inequalities do not guarantee a solution.
For an unsatisfiable example satisfying both inequalities, take six variables, a constraint domain with five values, and , , with all-different constraints on
Any pair of the six variables occurs together in at least one of these scopes: view the variables as the three pairs , and each scope as the union of two pairs. All six values must therefore be distinct. This is impossible with five available values, even though and .
For a satisfiable example with the same , take three disjoint groups of four variables and impose one all-different constraint on each group. Assign values separately in every group. All three constraints hold with .
These examples concern the intended cases in which the antecedent holds; they do not rely on vacuous truth of an implication.
True in some cases and false in others. Equality of the constraint domain size and treewidth does not decide satisfiability.
For an unsatisfiable example, let and impose the three binary all-different constraints , , and . The primal graph is a triangle, with treewidth two. It needs three different values, so no solution exists despite .
For a satisfiable example, take four variables with the same constraint domain and constraints
Its primal graph is a four-cycle of treewidth two: bags and give width two, while width one would require a forest. The assignment satisfies all constraints.
Always true. Replace every all-different constraint by the pairwise inequalities on its scope. Then solutions are precisely the proper graph colourings of the primal graph using values from as colours. Put .
A graph of treewidth has a proper graph colouring with at most colours. Here is a constructive proof. In a width- tree decomposition, remove any leaf bag contained in its neighbor. If more than one bag remains, a leaf bag has a vertex absent from its neighbor. The running-intersection property means that vertex occurs only in the leaf bag, so every neighbor of the vertex belongs to that bag. It has at most neighbors. If only one bag remains, it has at most vertices and the same degree bound holds.
Remove the chosen vertex and repeat; deleting vertices cannot increase the width of the restricted tree decomposition. Now colour in reverse removal order. At most already coloured neighbors forbid colours, so one of colours is always available. Since the integer inequality gives , this produces a satisfying assignment:
The common unrestricted constraint domain and the exclusively all-different constraints are essential: arbitrary constraint relations do not reduce to graph colouring in this way.
Always true for a nonempty finite constraint domain, as conventionally assumed. Write and identify its values with . For each satisfying assignment , simultaneously replace every value by
This permutation of the common constraint domain preserves every equality and inequality, hence every all-different constraint. The resulting assignments are distinct: equality of even one coordinate before and after a shift forces . There is at least one variable, since and .
The cyclic group of shifts therefore partitions the solution set into disjoint orbits of size . It follows that
The conclusion includes an unsatisfiable instance, whose solution count is zero. Full permutation group orbits need not have size , because unused values can be permuted without changing an assignment; the cyclic-shift argument avoids that mistake.
If an empty constraint domain is permitted, there are zero assignments here, but the wording “divisible by ” then asks about divisibility by zero, which is ordinarily left undefined. The asserted divisibility uses the standard nonempty-domain convention, and the no-solution conclusion still holds for that degenerate input.

Articles by others on the same topic (0)

There are currently no matching articles.