1: \documentstyle[12pt]{article}
2: \title{A Framework for Searching AND/OR Graphs with Cycles \thanks{Supported by
3: AICTE Research
4: Project
5: on AI and Expert Systems, Work Order No. 1410/AICTE:AIES.}}
6: \author{Ambuj Mahanti, Supriyo Ghose and Samir K. Sadhukhan \\
7: Indian Institute of Management Calcutta \\
8: D. H. Road, Joka, Kolkata 700 104, India.\\
9: email: {am@iimcal.ac.in, supriyo@iimcal.ac.in, samir@iimcal.ac.in}}
10:
11:
12: %\newtheorem{theorem}{Theorem}[section]
13: \newtheorem{th}{Theorem}[section]
14: \newtheorem{cor}{Corolary}[section]
15: \newtheorem{lem}{Lemma}[section]%2nd arg
16: %\newtheorem{definition}{Definition}[section]
17: \newtheorem{defi}{Definition}[section]
18: \newtheorem{rem}{Remark}[section]
19:
20: \setcounter{secnumdepth}{4}
21: \setcounter{tocdepth}{1}
22: \setcounter{th}{0}
23: %\setcounter{Lemma}{0}
24:
25: \newcounter{S1ct1}
26: \newcounter{S1ct2}
27: \newcounter{S1ct3}
28: \newcounter{S2ctr1}
29: \newcounter{S2ctr2}
30: \newcounter{S2ctr3}
31: \newcounter{S2ctr4}
32: \newcounter{defctr1}
33: \newcounter{defctr2}
34: \newcounter{defctr3}
35: \newcounter{defctr4}
36: \newcounter{defctr6}
37: \newcounter{defctr7}
38: \newcounter{defctr8}
39: \newcounter{defctr9}
40: \newcounter{lemctr01}
41: \newcounter{lemctr02}
42: \newcounter{proof_ct1}
43: \newcounter{proof_ct2}
44: \newcounter{proof_ct3}
45: \newcounter{definition_counter}
46:
47:
48: \newcommand{\qed}{\hfill $\Box$ }
49: \newcommand{\tab}{\mbox{\hspace{.5in}}}
50:
51: \addtolength{\oddsidemargin}{-.75in}
52: \addtolength{\evensidemargin}{-.75in}
53: \addtolength{\textwidth}{1.5in}
54:
55: \addtolength{\topmargin}{-1.5in}
56: \addtolength{\textheight}{3in}
57:
58: %\renewcommand{\baselinestretch}{2}
59: \begin{document}
60: \pagenumbering{arabic}
61: %\vskip -0.50in
62:
63: \maketitle
64:
65: \begin{abstract}
66:
67: Search in cyclic AND/OR graphs was traditionally known to be an unsolved problem. In the recent past several important studies have been reported in this domain. In this paper,
68: we have taken a fresh look at the
69: problem. First, a new and comprehensive theoretical framework for cyclic AND/OR graphs has been
70: presented, which was found missing in the recent literature. Based on
71: this framework, two best-first search algorithms, S1 and S2, have been developed.
72: S1 does uninformed search and is a simple modification of the Bottom-up
73: algorithm by Martelli and Montanari. S2 performs a heuristically guided search and replicates the modification in Bottom-up's
74: successors, namely HS and $\mbox{AO}^{*}$. Both S1 and S2 solve
75: the problem of searching AND/OR graphs in presence of cycles. We then present a detailed analysis for the correctness and complexity results of S1 and S2, using the proposed framework. We have observed through experiments that S1 and S2 output correct results in all cases.
76:
77:
78: \end{abstract}
79:
80:
81:
82: \section {Introduction}
83:
84: AND/OR graphs [Chang and Slagle 1971; Martelli and Montanari 1973, 1978; Levi and Sirovich 1976; Nilsson 1980; Bagchi and Mahanti 1983; Pearl 1984; Mahanti and Bagchi 1985; Kumar 1991] are generalizations of directed graphs used in the problem-decomposition approach in artificial intelligence. In an AND/OR graph, a node represents a problem to be solved which can be decomposed into several smaller subproblems, which, in turn, may be broken down into even smaller subproblems and so on. The basic objective in searching an AND/OR graph is to find a {\em solution graph} of {\em least cost} following a cost criterion defined suitably.
85:
86: Till date, the most famous among AND/OR graph algorithms is $\mbox{AO}^{*}$ [Nilsson 1980], which follows the principle of {\em best-first} search and uses an {\em admissible} or lower bound heuristic. There has also been work on other issues, such as searching in the presence of inadmissible heuristics [Mahanti and Bagchi 1985; Chakrabarti, Ghosh and DeSarkar 1988] and searching in limited memory [Chakrabarti, Ghosh, Acharya and DeSarkar 1990]. However, a critical assumption in all of these work is that, {\em the underlying AND/OR graph must be acyclic.} Without this assumption - i.e. in the presence of cycles - the AND/OR graph search becomes much more complicated. There is an initial difficulty in defining a solution graph in a cyclic AND/OR graph. There are other problems in using an algorithm like $\mbox{AO}^{*}$ which is based on the technique of arc-marking, such as it may end up marking a cycle. These difficulties had led to the assumption of acyclicity, which permeated the whole of AND/OR graph literature and was re-emphasized in [Nilsson 1980].
87:
88: It can be easily observed that the assumption of acyclicity is not always acceptable in real life problems. For instance, in logic programming every logical equivalence represents a cycle in the corresponding AND/OR graph. There are several other applications where cyclic AND/OR graph formulations are useful, such as in assembly/disassembly sequences [DeMello and Sanderson 1991; Jim$\acute{e}$nez and Torras 2000] and robotic task plans [Cao and Sanderson 1998]. This problem of searching AND/OR graphs in the presence of cycles has attracted the attention of researchers for a long time, and in recent times several algorithms have been reported [Chakrabarti 1994; Hvalica 1996; Jim$\acute{e}$nez and Torras 2000] that solve AND/OR graphs containing cycles. However a common issue with all of these studies is that, they do not provide a theoretical framework for cyclic AND/OR graphs. They are based mostly on the existing framework for acyclic AND/OR graphs, which makes it difficult to actually prove any of the properties of the algorithms.
89:
90: The major contributions of this paper are as follows: \footnote {Our study involves the search for solution graphs that {\em do not} contain cycles. This is the conventional direction of AND/OR graph work, as orthogonal to a recent study [Hansen and Zilberstein 1998] in which the authors work on a variation of the conventional model that allows cycles in the solution graphs.}
91:
92: \begin{enumerate}
93:
94: \item We provide a new theoretical framework for cyclic AND/OR graphs, which subsumes the existing framework for acyclic graphs. This framework redefines all the basic concepts such as solution graph, cost of solution and admissible heuristics taking into consideration the presence of cycles.
95:
96: \item We present two algorithms, S1 and S2, for searching AND/OR graphs with cycles. Algorithm S1 searches the implicit graph without constructing an explicit graph, while S2 is an $\mbox{AO}^{*}$-style algorithm that, at each stage, calls an explicit-graph-growing outer loop and a cost-computing inner loop. S2 uses heuristic estimates of nodes to guide the search intelligently, which S1 does not. S1 and S2 are easy to understand and are designed using the well-known principle of best-first search.
97:
98: \item We discuss in detail the theoretical properties of S1 and S2. These theoretical properties are proved using the proposed AND/OR graph framework mentioned above.
99:
100: \item Finally, the experimental results presented in this paper shed some light on the performance of the various algorithms both in acyclic and cyclic cases, and provide further insights into the development of algorithms for AND/OR graphs.
101:
102: \end{enumerate}
103:
104: \section {Definitions and Previous Work}
105:
106: In this section, we make a brief survey of the existing literature on AND/OR graphs. \footnote{Any term used here but not explicitly defined will follow the meaning as given in [Nilsson 1980].}
107:
108: \subsection{Definitions}
109:
110: An AND/OR graph $G$ is a directed graph where a node represents a problem to be
111: solved, and its immediate successor nodes represent the subproblems into which
112: the parent problem can be transformed or decomposed. $G$ contains a special node, the {\em start node},
113: that represents the initial (root) problem to be solved. $G$ also contains a set of {\em leaf
114: nodes}, which are of two types: terminal and nonterminal. While the {\em terminal leaf nodes} represent
115: subproblems with known solutions, the {\em nonterminal leaf nodes} represent subproblems
116: which are not solvable. Each node has finitely many children. Any node can be either an AND node or an OR node. An OR node can be solved by solving any of its children, while an AND node can be solved by solving all of its children. Without any loss of generality we assume that all leaf nodes are OR nodes. (It is
117: important to note that these definitions of AND and OR nodes are in line with
118: [Pearl 1984] and [Martelli and Montanari 1973, 1978], but not same as in [Nilsson 1980], which uses the concept of {\em k-connectors}.)
119:
120: We represent the start node by $s$, the terminal leaves by $t$, $t_1$, $t_2$, ...
121: and all other nodes by $m$, $n$, $p$, $q$, $r$,.... For the sake of completeness,
122: we allow the start node $s$ to be either a terminal leaf, or a nonterminal leaf, or any internal node
123: of $G$. The set of terminal leaves is denoted by $T$, and the set of nonterminal leaves by $NT$. Thus $T \bigcup NT$ is the set of all leaf nodes in $G$.
124:
125: Each arc in $G$ represents the application of a production rule. Generally a cost is associated per rule application - thus each arc $(m,n)$ of $G$ has a cost $c(m,n) \geq \delta > 0$ associated with it, where $\delta$ is a small positive number.
126:
127: Let $G$ be an acyclic AND/OR graph and $m$ be a node in $G$. A {\em solution graph} $D(m)$ rooted at or below $m$ is a finite subgraph of $G$ that represents a complete solution to $m$. It is defined as follows:
128:
129: \begin{enumerate}
130:
131: \item $m \in D(m)$;
132: \item if $n$ is an OR node in $G$ and $n$ is in $D(m)$, then exactly one of its immediate successors in $G$ is in $D(m)$;
133: \item if $n$ is an AND node in $G$ and $n$ is in $D(m)$, then all of its immediate successors in $G$ are in $D(m)$;
134: \item every maximal directed path in $D(m)$ ends in a terminal leaf node.
135:
136: \end{enumerate}
137:
138: Note that there may be multiple solution graphs rooted at a node, and each solution graph satisfies the definition of an AND/OR graph. A function $h(n,D(m))$ assigns a cost value to each of the nodes $n$ in $D(m)$ as follows:
139:
140: \begin{enumerate}
141: \item $h(n,D(m)) = 0$ if $n$ is a terminal leaf node;
142: \item $h(n,D(m)) = c(n,n^{\prime}) + h(n^{\prime},D(m))$ if $n$ is an OR node and $n^{\prime}$ is its immediate successor in $D(m)$;
143: \item $h(n,D(m)) = \sum_{i=1}^{k} [c(n,n_i) + h(n_i,D(m))]$ if $n$ is an AND node with immediate successors $n_1,..,n_k$ in $D(m)$.
144: \end{enumerate}
145:
146: Thus, $h(m,D(m))$ is the cost of a solution graph $D(m)$ below $m$. If $m$ has one or more solution graphs below it, then the cost of a minimal-cost solution graph is denoted by $h^{*}(m)$. If $m$ has no solution graph below it, $h^{*}(m)$ is taken to be $\infty$.
147: Thus $h^{*}(s)$ is the cost of a minimal cost solution graph below $s$. A search algorithm is required to output a solution graph below $s$ with minimal cost. The definition of cost used here represents the {\em sum-cost criterion}; there is another alternative, called the {\em max-cost criterion} which differs in the way that the cost of an AND node $n$ is evaluated as the maximum of $c(n,n_i) + h(n_i,D(m))$, evaluated over all its children $n_i$.
148:
149: As described above, an AND/OR graph is implicitly defined by the root node $s$,
150: set of production rules and their costs, a heuristic function, and a set of terminal
151: and nonterminal leaf nodes. This is called the {\em implicit graph}, $G$, and a search
152: algorithm usually works by constructing a subgraph of the implicit graph,
153: called the {\em explicit graph} $G^{\prime}$. Initially only the root node $s$ belongs to the explicit graph $G^{\prime}$. Once $s$ is expanded, its children and all their connecting arcs are added to $G^{\prime}$. $G^{\prime}$ grows as more and more nodes are expanded and new nodes and arcs are added to it. At any instant the nodes of $G^{\prime}$ which have no children are called {tip nodes}.
154:
155: In the study of acyclic AND/OR graphs, the notion of a {\em potential solution graph (psg)} of an explicit graph is very similar to the notion of a solution graph of an implicit AND/OR graph. A psg $D^{\prime}(m)$ below a node $m$ in $G^{\prime}$ is a finite subgraph of $G^{\prime}$ with the following properties:
156:
157: \begin{enumerate}
158:
159: \item $m \in D^{\prime}(m)$;
160: \item For every node $n \in D^{\prime}(m)$ which is not a tip node of $G^{\prime}$:
161:
162: \begin{enumerate}
163: \item exactly one of the immediate successors of $n$ in $G^{\prime}$ is in $D^{\prime}(m)$ when $n$ is an OR node;
164:
165: \item all of its immediate successors in $G^{\prime}$ are in $D^{\prime}(m)$ when $n$ is an AND node;
166:
167: \end{enumerate}
168:
169: \item every maximal directed path in $D^{\prime}(m)$ ends in a tip node of $G^{\prime}$.
170:
171: \end{enumerate}
172:
173: Occasionally a non-negative heuristic function $\hat{h}(n)$ is defined for each node $n$ in $G$. The value of this heuristic function is an estimate of the cost of solving that node, and is used in search algorithms to guide the search process towards least-costly solution graphs. A heuristic function is called {\em admissible} if $\hat{h}(n) \le h^{*}(n) \forall n \in G.$ The heuristic estimate is $0$ for a terminal leaf node and $\infty$ for a nonterminal leaf node.
174:
175: The cost of a node $n$ in a psg $D^{\prime}(m)$, denoted as $h(n,D^{\prime}(m))$, is defined in an identical manner as the cost of $n$ in a solution graph $D(m)$, with the first condition being replaced by $h(n,D^{\prime}(m)) = \hat{h}(n)$ if $n$ is a tip node in $G^{\prime}$. The cost of a minimal-cost psg below node $n$ in $G^{\prime}$ is denoted as $h^{\prime}(n)$.
176:
177: \subsection{Algorithms for Acyclic AND/OR Graphs}
178:
179: One of the early algorithms on AND/OR graphs was the Bottom-up algorithm [Martelli and Montanari 1973]. This algorithm, which is an extension of the shortest-path algorithm [Dijkstra 1959], operates on the (entire) implicit AND/OR graph
180: and evaluates the nodes according to a dynamic schedule determined by the
181: cost-dominance of nodes. It was followed by an improved algorithm, HS [Martelli and Montanari 1978], that takes heuristic information into account and works by creating an explicit graph. HS is a top-down iterative method that first constructs an explicit graph $G^{\prime}$ with only node $s$. In each iteration, HS chooses a tip node of $G^{\prime}$ (initially the start node $s$) for expansion, and adds its children with their connecting arcs to $G^{\prime}$. Then a bottom-up cost revision process is performed, whereby at each OR node one of its least-costly children is chosen and the corresponding arc is marked; at each AND node all the children are chosen and their arcs are marked. At the end of this process, below every node $n$ in $G^{\prime}$, a complete psg $D^{\prime}(n)$ is marked. This marked psg $D^{\prime}(n)$ is also a least costly psg below $n$. In this manner the iterations continue, until it is found that the marked psg below $s$ is a solution graph which is then outputted by HS, or the marked psg contains a nonterminal leaf node when failure termination is reported. Algorithm HS was modified by introducing the concept of $k$-connectors and renamed as algorithm $\mbox{AO}^{*}$ [Nilsson 1980]. $\mbox{AO}^{*}$ has been traditionally used to find minimal-cost solutions to AND/OR graphs.
182:
183: It was proved by [Martelli and Montanari 1978] that HS outputs minimal-cost solutions
184: if the heuristic function satisfies the {\em monotone restriction}. [Bagchi and Mahanti 1983] generalized this result and showed that HS output
185: minimal-cost solutions even if the heuristic function merely satisfies the weaker condition of {\em admissibility}. This generalization easily carries over to $\mbox{AO}^{*}$ also.
186:
187: However, as has been widely documented, $\mbox{AO}^{*}$ can fail if the AND/OR graph
188: contains cycles, which we illustrate in Figures \ref{fig10}(a) and \ref{fig10}(b). In both figures, $t$ is a terminal leaf node and marked arcs are
189: crossed by a line.
190:
191: \unitlength=0.42mm
192: \special{em:linewidth 0.4pt}
193: \linethickness{0.4pt}
194: \begin{figure}
195: \centering
196: \caption{Problems with $\mbox{AO}^{*}$ in case of cycles}
197: \label{fig10}
198: \begin{picture}(210.00,100.00)
199: \put(56.00,59.00){\circle{10.20}}
200: \put(12.00,59.00){\makebox(0,0)[cc]{$p$}}
201: \put(34.00,26.00){\makebox(0,0)[cc]{$r$}}
202: \put(34.00,88.00){\makebox(0,0)[cc]{$s$}}
203: \put(56.00,59.00){\makebox(0,0)[cc]{$q$}}
204: \put(19.00,40.00){\makebox(0,0)[cc]{5}}
205: \put(49.00,40.00){\makebox(0,0)[lc]{5}}
206: \put(156.00,86.00){\vector(-2,-3){14.67}}
207: \put(156.00,86.00){\vector(3,-4){16.67}}
208: \put(142.00,60.00){\makebox(0,0)[cc]{$p$}}
209: \put(171.00,78.00){\makebox(0,0)[cc]{3}}
210: \put(142.00,78.00){\makebox(0,0)[cc]{1}}
211: \put(159.00,56.00){\makebox(0,0)[cc]{1}}
212: \put(156.00,92.00){\makebox(0,0)[cc]{s}}
213: \put(34.00,26.00){\circle{10.00}}
214: \put(12.00,59.00){\circle{10.00}}
215: \put(34.00,88.00){\circle{10.00}}
216: \put(156.00,91.00){\circle{10.00}}
217: \put(141.00,59.00){\circle{10.00}}
218: \bezier{296}(139.00,54.00)(174.00,40.00)(145.00,62.00)
219: \put(151.00,57.00){\vector(-1,1){6.00}}
220: \bezier{164}(17.00,61.00)(34.00,72.00)(52.00,61.00)
221: \bezier{172}(16.00,56.00)(34.00,44.00)(52.00,56.00)
222: \put(48.00,53.00){\vector(1,1){3.00}}
223: \put(39.00,26.00){\vector(1,0){20.00}}
224: \put(49.00,23.00){\makebox(0,0)[ct]{1}}
225: \put(32.00,52.00){\makebox(0,0)[cb]{1}}
226: \put(34.00,83.00){\vector(-1,-1){20.00}}
227: \put(34.00,83.00){\vector(1,-1){19.00}}
228: \put(56.00,54.00){\vector(-3,-4){18.00}}
229: \put(12.00,54.00){\vector(3,-4){18.00}}
230: \put(28.00,77.00){\line(1,0){12.00}}
231: \put(22.00,74.00){\makebox(0,0)[cb]{1}}
232: \put(46.00,74.00){\makebox(0,0)[lb]{1}}
233: \put(37.00,64.00){\makebox(0,0)[ct]{1}}
234: \put(21.00,63.00){\vector(-2,-1){4.00}}
235: \put(0.00,0.00){\framebox(110.00,100.00)[cc]{}}
236: \put(11.00,48.00){\line(1,0){10.00}}
237: \put(46.00,48.00){\line(1,0){11.00}}
238: \put(44.00,30.00){\line(0,-1){8.00}}
239: \put(17.00,71.00){\line(1,0){11.00}}
240: \put(41.00,71.00){\line(1,0){10.00}}
241: \put(1.00,7.00){\makebox(0,0)[lc]{(a) $\mbox{AO}^{*}$ gets stuck}}
242: \put(110.00,0.00){\framebox(100.00,100.00)[cc]{}}
243: \put(147.00,80.00){\line(1,0){9.00}}
244: \put(146.00,46.00){\line(0,1){9.00}}
245: \put(152.00,19.00){\makebox(0,0)[cc]{(b)$\mbox{AO}^{*}$ enters into}}
246: \put(150.00,5.00){\makebox(0,0)[cc]{an infinite loop}}
247: \put(64.00,26.00){\circle{10.00}}
248: \put(64.00,26.00){\makebox(0,0)[cc]{$t$}}
249: \put(172.00,59.00){\circle{10.20}}
250: \put(172.00,59.00){\makebox(0,0)[cc]{$t$}}
251: \end{picture}
252: \end{figure}
253:
254:
255: In the explicit graph shown in Figure \ref{fig10}(a), $\mbox{AO}^{*}$ expands nodes $s$, $p$ and $q$ in the first three iterations and then expands $r$. Now during the bottom-up computation, it gets stuck with nodes $p$ and $q$. The bottom-up computation uses a list $Z$ [Nilsson 1980, pp 104, Step 10] to ensure that the nodes being evaluated are selected in a topological order. However in this example, after expansion of $r$ both $p$ and $q$ will be present in $Z$ and none can be selected for evaluation as it is the predecessor of the other. Hence $\mbox{AO}^{*}$ gets stuck,
256: even though there is a solution graph of cost 14 below $s$.
257:
258: In the explicit graph shown in Figure \ref{fig10}(b), on the other hand, $\mbox{AO}^{*}$ first expands the root node
259: $s$ and marks the arc ($s$,$p$) since $p$ is the least-costly child below $s$. Then, after expanding the node $p$, it marks the arc ($p$,$p$). Now, during the bottom-up cost revision process it tries to go upward following all marked arcs above $p$, thereby entering into an infinite
260: self-loop. However, there exists a solution graph from $s$ to the terminal leaf $t$ with a cost of 3.
261:
262: These examples clearly show that in the presence of cycles,
263: $\mbox{AO}^{*}$ may never even
264: terminate, let alone find a minimal-cost solution.
265:
266:
267: \subsection{Algorithms for Cyclic AND/OR Graphs}
268:
269: The first attempt in searching cyclic AND/OR graphs was made in 1994 when two algorithms, Iterative\_revise and $\mbox{REV}^{*}$ were presented [Chakrabarti 1994]. While Iterative\_revise is a top-down recursive algorithm for searching AND/OR graphs, $\mbox{REV}^{*}$ is a strictly bottom-up algorithm that uses parent-pointers and has a better performance than Iterative-Revise. Its operation is briefly described below.
270:
271: $\mbox{REV}^{*}$ starts searching the AND/OR graph by putting all its leaf nodes in a list called OPEN and assigning heuristic values to them. It then does the following work iteratively: takes out a least-costly node from OPEN, assigns cost values to its {\em parent} nodes by using parent-pointers and goes up the graph as long as the siblings of the current level node have all been evaluated. When it gets stuck in this upward phase, it again selects a node from OPEN and starts another upward phase to evaluate nodes. In this way $\mbox{REV}^{*}$ continues until the start node has been evaluated. Cycles get eliminated due to the cost dominance rule, and $\mbox{REV}^{*}$ outputs a correct solution cost whenever there is a solution graph.
272:
273: $\mbox{REV}^{*}$ is a simple algorithm that solves the long-standing problem of searching explicit AND/OR graphs in the presence of cycles. Recently, it has been shown [Jim$\acute{e}$nez and Torras 2000] that it is possible to improve the efficiency of $\mbox{REV}^{*}$ significantly by making some modifications. These modifications derive partly from an earlier work in the {\em acyclic} domain to improve the efficiency of $\mbox{AO}^{*}$ namely, algorithm CF [Mahanti and Bagchi 1985]. CF's control structure for node expansion has been utilized in [Jim$\acute{e}$nez and Torras 2000] in their algorithm INT. As the authors observe, INT's "top-down search strategy is based on Mahanti and Bagchi's CF, whereas its bottom-up cost revision process is inspired in Chakrabarti's $\mbox{REV}^{*}$." The bottom-up cost-revision process of INT is primarily based on $\mbox{REV}^{*}$; but in the process, it also employs the superior cost-updation strategy of CF. This makes INT a feasible alternative for searching cyclic AND/OR graphs. However, it still
274: has the inefficiency that nodes are considered for cost-revision even when they are not likely to be affected as a result of the current node-expansion. As it is well-known in $\mbox{AO}^{*}$ and CF-like algorithms, it is sufficient and economical to visit only nodes whose costs, arc markings or solved status change as a result of the expansion of a new node. This observation has been implemented in their next algorithm $CFC_{REV^*}$ by creating the OPEN list with only a subset of the leaf nodes. As the OPEN list ultimately decides which nodes are going to be visited in the cost-revision phase of the algorithm, this strategy significantly cuts down the number of nodes evaluated, particularly when the percentage of AND nodes is high. $CFC_{REV^*}$ has been implemented and found to be very efficient compared to its predecessor $\mbox{REV}^{*}$. However, the $CFC_{REV^*}$ algorithm is unwieldy and non-intuitive.
275:
276: Along with the work on $\mbox{REV}^{*}$ and $CFC_{REV^*}$, one other attempt [Hvalica 1996] has been made to solve cyclic AND/OR graphs. In Hvalica's algorithm, a special technique is used for loop avoidance. When a node is expanded a dummy node $x_f$ is attached to it with a high heuristic value. If expansion of the current node creates a cycle, the dummy node $x_f$ offers an alternative route to come out of it. The exit from the cycle occurs when the cost of the expanded node, computed through its children, exceeds the high cost of the dummy child $x_f$. This method, although quite interesting, may become inefficient in practice.
277:
278: \unitlength=0.40mm
279: \special{em:linewidth 0.4pt}
280: \linethickness{0.4pt}
281: \begin{figure}
282: \centering
283: \caption{Does $p$ have a solution?}
284: \label{fig20}
285: \begin{picture}(88.00,80.00)
286: \put(43.00,59.00){\vector(-3,-4){17.33}}
287: \put(43.00,59.00){\vector(3,-4){17.33}}
288: \put(37.00,61.00){\vector(1,0){2.00}}
289: \put(32.00,49.00){\makebox(0,0)[rc]{1}}
290: \put(53.00,50.00){\makebox(0,0)[lc]{1}}
291: \put(14.00,55.00){\makebox(0,0)[rc]{1}}
292: \put(43.00,66.00){\makebox(0,0)[cc]{$s$}}
293: \put(26.00,30.00){\makebox(0,0)[cc]{$p$}}
294: \put(60.00,30.00){\makebox(0,0)[cc]{$t$}}
295: \put(5.00,10.00){\makebox(0,0)[lc]{Implicit graph $G$}}
296: \put(0.00,0.00){\framebox(90.00,80.00)[cc]{}}
297: \put(26.00,31.00){\circle{12.00}}
298: \put(43.00,66.00){\circle{12.00}}
299: \bezier{232}(19.00,32.00)(9.00,60.00)(37.00,61.00)
300: \put(60.00,31.00){\circle{12.00}}
301: \end{picture}
302: \end{figure}
303:
304: \subsection{Motivation for current work}
305:
306: Although the recent algorithms on cyclic AND/OR graphs as discussed in the preceding subsection are claimed to be correct,
307: their correctness proofs stand on a weak theoretical base. This is due to the reason that the theoretical constructs such as solution graph, potential solution graph, cost of solution etc. which are fundamental to the AND/OR graph algorithms and their properties, have never been properly re-established in the context of cycles. For instance, if we look at Figure \ref{fig20}, we find this interesting question: does node $p$ have a solution graph below it? Looking from the top (i.e. from start node $s$) it would appear not (as that would create a cycle with predecessor $s$); however looking from the node $p$ itself there is a solution graph below it passing through node $s$. So how do we construct a solution graph in the presence of cycles? How do we define the cost function appropriately? These questions have never been adequately addressed in the literature. The recent papers on cyclic AND/OR graphs [Chakrabarti 1994; Hvalica 1996; Jim$\acute{e}$nez and Torras 2000] seem to have completely ignored this issue and worked with cyclical constructs. \footnote{Examples of such cyclical definitions are presented in the Appendix for the purpose of review.}
308:
309: \unitlength=0.42mm
310: \special{em:linewidth 0.4pt}
311: \linethickness{0.4pt}
312: \begin{figure}
313: \centering
314: \caption{Combining solution graphs may lead to cycles}
315: \label{fig25}
316: \begin{picture}(240.00,120.00)
317: \put(56.00,79.00){\circle{10.20}}
318: \put(12.00,79.00){\makebox(0,0)[cc]{$p$}}
319: \put(34.00,46.00){\makebox(0,0)[cc]{$r$}}
320: \put(56.00,79.00){\makebox(0,0)[cc]{$q$}}
321: \put(49.00,60.00){\makebox(0,0)[lc]{5}}
322: \put(34.00,46.00){\circle{10.00}}
323: \put(12.00,79.00){\circle{10.00}}
324: \bezier{172}(16.00,76.00)(34.00,64.00)(52.00,76.00)
325: \put(48.00,73.00){\vector(1,1){3.00}}
326: \put(39.00,46.00){\vector(1,0){20.00}}
327: \put(49.00,43.00){\makebox(0,0)[ct]{1}}
328: \put(32.00,72.00){\makebox(0,0)[cb]{1}}
329: \put(56.00,74.00){\vector(-3,-4){18.00}}
330: \put(1.00,27.00){\makebox(0,0)[lc]{(a)Solution graph}}
331: \put(64.00,46.00){\circle{10.00}}
332: \put(64.00,46.00){\makebox(0,0)[cc]{$t$}}
333: \put(136.00,79.00){\circle{10.20}}
334: \put(92.00,79.00){\makebox(0,0)[cc]{$p$}}
335: \put(114.00,46.00){\makebox(0,0)[cc]{$r$}}
336: \put(136.00,79.00){\makebox(0,0)[cc]{$q$}}
337: \put(99.00,60.00){\makebox(0,0)[cc]{5}}
338: \put(114.00,46.00){\circle{10.00}}
339: \put(92.00,79.00){\circle{10.00}}
340: \bezier{164}(97.00,81.00)(114.00,92.00)(132.00,81.00)
341: \put(119.00,46.00){\vector(1,0){20.00}}
342: \put(129.00,43.00){\makebox(0,0)[ct]{1}}
343: \put(92.00,74.00){\vector(3,-4){18.00}}
344: \put(117.00,84.00){\makebox(0,0)[ct]{1}}
345: \put(101.00,83.00){\vector(-2,-1){4.00}}
346: \put(82.00,27.00){\makebox(0,0)[lc]{(b)Solution graph}}
347: \put(144.00,46.00){\circle{10.00}}
348: \put(144.00,46.00){\makebox(0,0)[cc]{$t$}}
349: \put(216.00,79.00){\circle{10.20}}
350: \put(172.00,79.00){\makebox(0,0)[cc]{$p$}}
351: \put(194.00,46.00){\makebox(0,0)[cc]{$r$}}
352: \put(194.00,108.00){\makebox(0,0)[cc]{$s$}}
353: \put(216.00,79.00){\makebox(0,0)[cc]{$q$}}
354: \put(179.00,60.00){\makebox(0,0)[cc]{5}}
355: \put(209.00,60.00){\makebox(0,0)[lc]{5}}
356: \put(194.00,46.00){\circle{10.00}}
357: \put(172.00,79.00){\circle{10.00}}
358: \put(194.00,108.00){\circle{10.00}}
359: \bezier{164}(177.00,81.00)(194.00,92.00)(212.00,81.00)
360: \bezier{172}(176.00,76.00)(194.00,64.00)(212.00,76.00)
361: \put(208.00,73.00){\vector(1,1){3.00}}
362: \put(199.00,46.00){\vector(1,0){20.00}}
363: \put(209.00,43.00){\makebox(0,0)[ct]{1}}
364: \put(192.00,72.00){\makebox(0,0)[cb]{1}}
365: \put(194.00,103.00){\vector(-1,-1){20.00}}
366: \put(194.00,103.00){\vector(1,-1){19.00}}
367: \put(216.00,74.00){\vector(-3,-4){18.00}}
368: \put(172.00,74.00){\vector(3,-4){18.00}}
369: \put(188.00,97.00){\line(1,0){12.00}}
370: \put(182.00,94.00){\makebox(0,0)[cb]{1}}
371: \put(206.00,94.00){\makebox(0,0)[lb]{1}}
372: \put(197.00,84.00){\makebox(0,0)[ct]{1}}
373: \put(181.00,83.00){\vector(-2,-1){4.00}}
374: \put(161.00,27.00){\makebox(0,0)[lc]{(c)Combination}}
375: \put(224.00,46.00){\circle{10.00}}
376: \put(224.00,46.00){\makebox(0,0)[cc]{$t$}}
377: \put(0.00,0.00){\framebox(80.00,120.00)[cc]{}}
378: \put(32.00,12.00){\makebox(0,0)[cc]{below $p$}}
379: \put(80.00,0.00){\framebox(80.00,120.00)[cc]{}}
380: \put(115.00,12.00){\makebox(0,0)[cc]{below $q$}}
381: \put(190.00,12.00){\makebox(0,0)[cc]{below $s$}}
382: \put(160.00,0.00){\framebox(80.00,120.00)[cc]{}}
383: \end{picture}
384: \end{figure}
385:
386: The graphs in Figure \ref{fig25} give another example of the necessity of theoretical support for cyclic AND/OR graph algorithms. The graphs in Figure \ref{fig25}(a) and \ref{fig25}(b) are solution graphs below $p$ and $q$ respectively, in the implicit graph of Figure \ref{fig10}(a); however if they are combined below $s$ as in Figure \ref{fig25}(c), they clearly do not form a solution graph below $s$. What is more fatal is that they create a cycle. The question then arises: can such solution graphs be at all combined (in an appropriate way) to form a solution graph below the parent? We delve deep into these issues in this paper.
387:
388: We first provide a theoretical framework for cyclic AND/OR graphs, which forms the conceptual basis for our algorithms. We then present two algorithms, S1 and S2, which are based on the time-tested principle of best-first search (the previous algorithms do not seem to have adhered to this principle). The analysis of S1 and S2 have been done in detail using our theoretical framework. We conclude the paper with some comments on the results of our detailed experiments.
389:
390:
391: \section{Framework for Cyclic AND/OR Graphs}
392:
393: In this section we generalize the existing AND/OR graph search framework
394: for graphs containing cycles. In the proposed new framework, the concept of Maximal Extendable Subgraph (MES) plays a pivotal role.
395:
396: An MES below a node is constructed in a top-down manner as explained below. During the construction, at an OR node $x$ we take one child and include it if it does not form a cycle with the part of the MES constructed so far. If $x$ has no child, or if the selected child forms a cycle, the construction ceases to proceed below $x$. When $x$ is an AND
397: node, construction continues below $x$ only if no child of $x$ forms a cycle with the part of the MES constructed so far.
398:
399: \subsection{MESs in an Implicit AND/OR Graph}
400:
401: \begin{defi} \label{def00} For any AND/OR graph $\mathcal{G}$ (implicit, explicit or other) we define the following:
402:
403: \begin{list}{\roman{defctr2})}{\usecounter{defctr2}}
404: \item For any node $p$ in $\mathcal{G}$,
405: the child\_set is $\Gamma(p, \mathcal{G})$ = \{$q \mid q$ is a child of $p$ in $\mathcal{G}$\}.
406: \item The set of all nodes of $\mathcal{G}$ which have no children is $Z_{\mathcal{G}} = \{x \mid x \in \mathcal{G} \bigwedge$$ \Gamma(x,\mathcal{G}) = \phi \}.$
407: \end{list}
408: \end{defi}
409:
410: For example, a leaf node, say $x$, of an implicit graph $G$ is one
411: for which $\Gamma(x,G) = \phi$.
412: Again, in $G$, $Z_{G} = T \bigcup NT$ = set of all terminal and nonterminal leaf nodes.
413:
414: \begin{defi} Let $G$ be an implicit AND/OR graph and $n$ be a node in $G$. A Maximal Extendable Subgraph (MES) $M(n,G)$, rooted at or below $n$, is defined as follows:
415:
416: \begin{list}{\roman{defctr2})}{\usecounter{defctr2}}
417: \item $n \in M(n,G)$
418: \item For every node $x \in M(n,G)$ which is an internal node in $G$:
419: \newline
420: Let $y_1$, $y_2$,...,$y_k$ be the children of $x$ in $G$. Now,
421: \begin{list}{\alph{defctr7})}{\usecounter{defctr7}}
422: \item If $x$ is an OR node, then select any one child $y_i$, $1 \leq i \leq k$. Include $y_i$ in $M(n,G)$ if it is not same as $x$ or any predecessor of $x$ in $M(n,G)$. Otherwise the construction ceases to proceed below $x$.
423: \item If $x$ is an AND node, then include all $y_i$, $1 \leq i \leq k$, if none of them is same as $x$ or any predecessor of $x$ in $M(n,G)$. Otherwise the construction ceases to proceed below $x$.
424: \end{list}
425: \end{list}
426: \end{defi}
427:
428: For any node $n \in G$, the MESs below it are enumerated as
429: $M_1(n,G), M_2(n,G), \ldots$. On the other hand, occasionally we may write $M(n,G)$ as $M(n)$ or just as $M$, when the parameters are clear from context.
430:
431: \begin{rem}
432: \end{rem}
433: \begin{description}
434: \item[({\em i})] If $G$ contains paths of infinite length, then it is clear from the
435: construction that there may be MESs with infinitely many nodes and arcs.
436: \item[({\em ii})] From the definition, it is clear that MESs cannot contain cycles.
437: \item[({\em iii})] There must exist at least one MES below every node in $G$.
438: \end{description}
439:
440: An AND/OR graph $G$ and all of its MESs are shown in Figure \ref{fig26}. It is interesting to note that some MESs may appear to be duplicate - for instance, the MESs $M_3(s,G)$ and $M_5(s,G)$ may appear to be the same even though they are actually different. This happens due to the presence of cycles, as is illustrated in Figure \ref{fig27}. In this figure, the dotted arrows represent the different children that these MESs selected at node $n$. But in either case, the selected child created a cycle and the MES was terminated at node $n$. Thus even though these two MESs appear to be same, they attempted to include different children below a node and hence are distinct. It may also be noted that an MES may appear to be a subgraph of another MES. Thus, $M_3(s,G)$ appears to be a subgraph of $M_4(s,G)$ in Figure \ref{fig26}. This is also explained by the presence of cycles. $M_3(s,G)$ and $M_4(s,G)$ have chosen different children, namely $n$ and $r$, below node $n$ - the former leading to a self-loop (and hence terminating the MES) and the latter continuing to node $r$. Thus the two MESs are distinct and none is a subgraph of the other.
441:
442: \begin{figure}
443: \centering
444: \caption{An Implicit Graph and its MESs}
445: \label{fig26}
446: \special{em:linewidth 0.4pt}
447: \linethickness{0.4pt}
448: \unitlength=0.45mm
449: \begin{picture}(390.00,140.00)
450: \put(21.00,90.00){\circle{10.20}}
451: \put(21.00,90.00){\makebox(0,0)[cc]{$s$}}
452: \put(24.00,18.00){\makebox(0,0)[cc]{(a) Implicit}}
453: \put(24.00,8.00){\makebox(0,0)[cc]{Graph $G$}}
454: \put(21.00,60.00){\circle{10.00}}
455: \put(21.00,30.00){\circle{10.00}}
456: \put(21.00,85.00){\vector(0,-1){20.00}}
457: \put(21.00,55.00){\vector(0,-1){20.00}}
458: \put(52.00,60.00){\circle{10.20}}
459: \put(21.00,85.00){\vector(3,-2){29.00}}
460: \bezier{240}(21.00,55.00)(48.00,43.00)(25.00,63.00)
461: \put(29.00,60.00){\vector(-3,2){3.00}}
462: \put(14.00,87.00){\vector(1,1){2.00}}
463: \put(21.00,60.00){\makebox(0,0)[cc]{$n$}}
464: \put(52.00,60.00){\makebox(0,0)[cc]{$t$}}
465: \put(21.00,30.00){\makebox(0,0)[cc]{$r$}}
466: \bezier{272}(22.00,85.00)(56.00,77.00)(26.00,92.00)
467: \put(28.00,91.00){\vector(-2,1){2.00}}
468: \put(83.00,105.00){\circle{10.00}}
469: \put(83.00,105.00){\makebox(0,0)[cc]{$s$}}
470: \put(88.00,81.00){\makebox(0,0)[cc]{(b)$M_1(s,G)$}}
471: \put(138.00,125.00){\circle{10.00}}
472: \put(149.00,104.00){\circle{10.00}}
473: \put(138.00,120.00){\vector(1,-1){10.00}}
474: \put(139.00,81.00){\makebox(0,0)[cc]{(c)$M_2(s,G)$}}
475: \put(138.00,125.00){\makebox(0,0)[cc]{$s$}}
476: \put(149.00,104.00){\makebox(0,0)[cc]{$t$}}
477: \put(190.00,127.00){\circle{10.00}}
478: \put(190.00,106.00){\circle{10.00}}
479: \put(190.00,127.00){\makebox(0,0)[cc]{$s$}}
480: \put(190.00,106.00){\makebox(0,0)[cc]{$n$}}
481: \put(190.00,122.00){\vector(0,-1){11.00}}
482: \put(190.00,81.00){\makebox(0,0)[cc]{(d)$M_3(s,G)$}}
483: \put(295.00,123.00){\circle{10.00}}
484: \put(295.00,102.00){\circle{10.00}}
485: \put(295.00,123.00){\makebox(0,0)[cc]{$s$}}
486: \put(295.00,102.00){\makebox(0,0)[cc]{$n$}}
487: \put(295.00,118.00){\vector(0,-1){11.00}}
488: \put(297.00,81.00){\makebox(0,0)[cc]{(f)$M_5(s,G)$}}
489: \put(238.00,60.00){\circle{10.00}}
490: \put(238.00,38.00){\circle{10.00}}
491: \put(238.00,18.00){\circle{10.00}}
492: \put(238.00,55.00){\vector(0,-1){12.00}}
493: \put(238.00,33.00){\vector(0,-1){10.00}}
494: \put(238.00,18.00){\makebox(0,0)[cc]{$t$}}
495: \put(238.00,38.00){\makebox(0,0)[cc]{$s$}}
496: \put(238.00,60.00){\makebox(0,0)[cc]{$n$}}
497: \put(88.00,6.00){\makebox(0,0)[cc]{(h)$M_1(n,G)$}}
498: \put(81.00,42.00){\circle{10.00}}
499: \put(80.00,41.00){\makebox(0,0)[cc]{$n$}}
500: \put(242.00,6.00){\makebox(0,0)[cc]{(k)$M_4(n,G)$}}
501: \put(136.00,45.00){\circle{10.00}}
502: \put(136.00,24.00){\circle{10.00}}
503: \put(136.00,45.00){\makebox(0,0)[cc]{$n$}}
504: \put(136.00,24.00){\makebox(0,0)[cc]{$r$}}
505: \put(136.00,40.00){\vector(0,-1){11.00}}
506: \put(139.00,6.00){\makebox(0,0)[cc]{(i)$M_2(n,G)$}}
507: \put(191.00,47.00){\circle{10.00}}
508: \put(191.00,26.00){\circle{10.00}}
509: \put(191.00,47.00){\makebox(0,0)[cc]{$n$}}
510: \put(191.00,26.00){\makebox(0,0)[cc]{$s$}}
511: \put(191.00,42.00){\vector(0,-1){11.00}}
512: \put(190.00,6.00){\makebox(0,0)[cc]{(j)$M_3(n,G)$}}
513: \put(296.00,37.00){\circle{10.00}}
514: \put(296.00,19.00){\circle{10.00}}
515: \put(296.00,37.00){\makebox(0,0)[cc]{$n$}}
516: \put(296.00,19.00){\makebox(0,0)[cc]{$s$}}
517: \put(298.00,6.00){\makebox(0,0)[cc]{(l)$M_5(n,G)$}}
518: \put(238.00,130.00){\circle{10.00}}
519: \put(238.00,112.00){\circle{10.00}}
520: \put(238.00,130.00){\makebox(0,0)[cc]{$s$}}
521: \put(238.00,112.00){\makebox(0,0)[cc]{$n$}}
522: \put(238.00,125.00){\vector(0,-1){8.00}}
523: \put(238.00,92.00){\circle{10.00}}
524: \put(238.00,107.00){\vector(0,-1){10.00}}
525: \put(238.00,92.00){\makebox(0,0)[cc]{$r$}}
526: \put(242.00,81.00){\makebox(0,0)[cc]{(e)$M_4(s,G)$}}
527: \put(361.00,121.00){\circle{10.00}}
528: \put(361.00,121.00){\makebox(0,0)[cc]{$t$}}
529: \put(361.00,81.00){\makebox(0,0)[cc]{(g) $M_1(t,G)$}}
530: \put(360.00,37.00){\circle{10.00}}
531: \put(360.00,37.00){\makebox(0,0)[cc]{$r$}}
532: \put(383.00,6.00){\makebox(0,0)[rc]{(m) $M_1(r,G)$}}
533: \put(296.00,32.00){\vector(0,-1){8.00}}
534: \bezier{148}(16.00,59.00)(3.00,71.00)(14.00,87.00)
535: \put(115.00,140.00){\vector(0,0){0.00}}
536: \put(115.00,140.00){\vector(0,0){0.00}}
537: \put(115.00,140.00){\vector(0,0){0.00}}
538: \put(115.00,140.00){\vector(0,0){0.00}}
539: \put(0.00,140.00){\line(1,0){154.00}}
540: \put(114.00,0.00){\line(0,1){140.00}}
541: \put(0.00,140.00){\line(0,-1){139.00}}
542: \put(0.00,1.00){\line(0,-1){1.00}}
543: \put(0.00,0.00){\line(1,0){155.00}}
544: \put(152.00,140.00){\line(1,0){157.00}}
545: \put(155.00,0.00){\line(1,0){152.00}}
546: \put(309.00,140.00){\line(1,0){81.00}}
547: \put(390.00,140.00){\line(0,-1){140.00}}
548: \put(390.00,0.00){\line(-1,0){87.00}}
549: \put(62.00,0.00){\line(0,1){140.00}}
550: \put(62.00,70.00){\line(1,0){94.00}}
551: \put(155.00,70.00){\line(1,0){146.00}}
552: \put(301.00,70.00){\line(1,0){89.00}}
553: \put(165.00,140.00){\line(0,-1){140.00}}
554: \put(215.00,140.00){\line(0,-1){140.00}}
555: \put(329.00,140.00){\line(0,-1){140.00}}
556: \put(270.00,140.00){\line(0,-1){140.00}}
557: \end{picture}
558: \end{figure}
559:
560: \unitlength=0.45mm
561: \begin{figure}
562: \centering
563: \caption{Duplicate MESs below a node}
564: \label{fig27}
565: \linethickness{0.4pt}
566: \begin{picture}(133.00,82.00)
567: \put(24.00,70.00){\circle{10.20}}
568: \put(24.00,35.00){\circle{10.00}}
569: \put(24.00,35.00){\makebox(0,0)[cc]{$n$}}
570: \put(35.00,6.00){\makebox(0,0)[cc]{(a) $M_3(s,G)$}}
571: \put(0.00,0.00){\framebox(64.00,82.00)[cc]{}}
572: \put(24.00,70.00){\makebox(0,0)[cc]{$s$}}
573: \put(95.00,20.00){\line(-1,1){8.00}}
574: \put(86.00,30.00){\line(-2,5){3.67}}
575: \put(81.00,42.00){\line(0,1){7.00}}
576: \put(82.00,53.00){\line(3,5){5.00}}
577: \put(24.00,65.00){\vector(0,-1){25.00}}
578: \put(34.00,40.00){\line(1,0){5.00}}
579: \put(43.00,40.00){\line(3,-2){8.00}}
580: \put(51.00,32.00){\line(0,-1){6.00}}
581: \put(51.00,24.00){\line(-5,-3){8.00}}
582: \put(40.00,19.00){\line(-1,0){7.00}}
583: \put(64.00,0.00){\framebox(69.00,82.00)[cc]{}}
584: \put(90.00,7.00){\makebox(0,0)[cc]{(b) $M_5(s,G)$}}
585: \put(100.00,73.00){\circle{10.20}}
586: \put(100.00,20.00){\circle{10.00}}
587: \put(100.00,20.00){\makebox(0,0)[cc]{$n$}}
588: \put(100.00,73.00){\makebox(0,0)[cc]{$s$}}
589: \put(90.00,65.00){\vector(3,4){4.67}}
590: \put(100.00,68.00){\vector(0,-1){43.00}}
591: \put(34.00,39.00){\vector(-3,-2){5.00}}
592: \put(24.00,30.00){\line(4,-5){6.67}}
593: \end{picture}
594: \end{figure}
595:
596:
597: The question naturally arises: what can be the upper bound of MESs in a graph containing $N$ nodes? It may be easily verified that the number of MESs will be maximum if (a) the graph contains only OR nodes, thereby providing more choices at every node, and (b) the graph is structured as in Figure \ref{fig27a} (this graph is the particular instance for $N = 3$). Here, the number of MESs with $k$ nodes, $1 \leq k \leq N$, is $k \times \hspace{6pt} P^{\hspace{-0.55cm}N}_{k}$\hspace{0.1cm}, and the total number of MESs is $\sum_{k=1}^{N}k \times \hspace{6pt} P^{\hspace{-0.55cm}N}_{k}$.
598:
599: \unitlength=0.45mm
600: \begin{figure}
601: \centering
602: \caption{Maximum number of MESs}
603: \label{fig27a}
604: \linethickness{0.4pt}
605: \special{em:linewidth 0.4pt}
606: \linethickness{0.4pt}
607: \begin{picture}(113.00,110.00)
608: \put(60.00,100.00){\circle{10.20}}
609: \put(60.00,65.00){\circle{10.00}}
610: \put(60.00,30.00){\circle{10.00}}
611: \put(60.00,95.00){\vector(0,-1){25.00}}
612: \put(60.00,60.00){\vector(0,-1){25.00}}
613: \bezier{172}(55.00,65.00)(41.00,81.00)(56.00,97.00)
614: \bezier{156}(56.00,33.00)(43.00,48.00)(56.00,62.00)
615: \bezier{180}(63.00,96.00)(85.00,101.00)(63.00,104.00)
616: \bezier{212}(63.00,61.00)(89.00,65.00)(63.00,69.00)
617: \bezier{228}(63.00,26.00)(91.00,30.00)(63.00,34.00)
618: \bezier{480}(61.00,95.00)(113.00,66.00)(61.00,35.00)
619: \bezier{468}(55.00,30.00)(8.00,65.00)(55.00,100.00)
620: \put(54.00,95.00){\vector(1,2){1.00}}
621: \put(54.00,60.00){\vector(1,2){1.00}}
622: \put(66.00,68.50){\vector(-2,1){3.00}}
623: \put(65.00,34.00){\vector(-1,0){1.00}}
624: \put(63.00,36.00){\vector(-1,-1){1.00}}
625: \put(65.00,104.00){\vector(-1,0){2.00}}
626: \put(53.00,99.00){\vector(2,1){2.00}}
627: \put(0.00,0.00){\framebox(120.00,110.00)[cc]{}}
628: \put(60.00,9.00){\makebox(0,0)[cc]{Graph with only OR nodes}}
629: \put(60.00,100.00){\makebox(0,0)[cc]{$s$}}
630: \put(60.00,65.00){\makebox(0,0)[cc]{$n$}}
631: \put(60.00,30.00){\makebox(0,0)[cc]{$p$}}
632: \end{picture}
633: \end{figure}
634:
635:
636: \begin{defi} Let $M$ be an MES below a node $n$ in $G$. Then below every node $x \in M$ we define a sub-MES $\xi(x,M)$ of $M$ identically as $M$ is defined in $G$, by replacing $M$ with $\xi$ and $G$ with $M$ everywhere.
637: \end{defi}
638:
639: An AND/OR graph $G$ and some of its MESs and their sub-MESs are shown in Figure \ref{fig28}.
640:
641: \begin{figure}
642: \centering
643: \caption{An Implicit Graph and its MESs and Sub-MESs}
644: \label{fig28}
645: \unitlength=0.45mm
646: \special{em:linewidth 0.4pt}
647: \linethickness{0.4pt}
648: \begin{picture}(310.00,225.00)
649: \put(135.00,80.00){\circle{10.00}}
650: \put(135.00,80.00){\makebox(0,0)[cc]{$n$}}
651: \put(155.00,50.00){\circle{10.00}}
652: \put(155.00,50.00){\makebox(0,0)[cc]{$q$}}
653: \put(135.00,20.00){\circle{10.00}}
654: \put(135.00,20.00){\makebox(0,0)[cc]{$t$}}
655: \put(135.00,75.00){\vector(1,-1){20.00}}
656: \put(155.00,45.00){\vector(-1,-1){20.00}}
657: \put(135.00,8.00){\makebox(0,0)[cc]{(e) MES $M_1(n,G)$ }}
658: \put(95.00,0.00){\framebox(95.00,95.00)[cc]{}}
659: \put(250.00,20.00){\makebox(0,0)[cc]{(f) Sub-MES $\xi(n,M_1(n,G))$,}}
660: \put(243.00,8.00){\makebox(0,0)[cc]{also an MES in $G$}}
661: \put(45.00,101.00){\makebox(0,0)[cc]{(a) Implicit Graph $G$}}
662: \put(26.00,120.00){\circle{10.00}}
663: \put(51.00,120.00){\circle{10.20}}
664: \put(76.00,120.00){\circle{10.00}}
665: \put(36.00,150.00){\circle{10.00}}
666: \put(64.00,150.00){\circle{10.00}}
667: \put(51.00,185.00){\circle{10.00}}
668: \put(51.00,215.00){\circle{10.00}}
669: \put(51.00,210.00){\vector(0,-1){20.00}}
670: \put(52.00,180.00){\vector(-2,-3){16.67}}
671: \put(52.00,180.00){\vector(1,-2){12.67}}
672: \put(36.00,145.00){\vector(-1,-2){10.00}}
673: \put(36.00,145.00){\vector(2,-3){13.33}}
674: \put(64.00,145.00){\vector(-1,-2){10.67}}
675: \put(64.00,145.00){\vector(1,-2){10.00}}
676: \put(33.00,139.00){\line(1,0){7.00}}
677: \bezier{224}(64.00,145.00)(39.00,134.00)(60.00,153.00)
678: \put(57.00,150.00){\vector(1,1){3.00}}
679: \bezier{480}(21.00,119.00)(-10.00,174.00)(46.00,183.00)
680: \put(43.00,182.00){\vector(3,1){3.00}}
681: \put(0.00,95.00){\framebox(95.00,130.00)[cc]{}}
682: \put(51.00,215.00){\makebox(0,0)[cc]{$s$}}
683: \put(51.00,185.00){\makebox(0,0)[cc]{$n$}}
684: \put(36.00,150.00){\makebox(0,0)[cc]{$p$}}
685: \put(64.00,150.00){\makebox(0,0)[cc]{$q$}}
686: \put(26.00,120.00){\makebox(0,0)[cc]{$x$}}
687: \put(51.00,120.00){\makebox(0,0)[cc]{$t$}}
688: \put(76.00,120.00){\makebox(0,0)[cc]{$r$}}
689: \put(140.00,101.00){\makebox(0,0)[cc]{(b) MES $M_1(s,G)$}}
690: \put(135.00,120.00){\circle{10.00}}
691: \put(160.00,120.00){\circle{10.20}}
692: \put(145.00,150.00){\circle{10.00}}
693: \put(160.00,185.00){\circle{10.00}}
694: \put(160.00,215.00){\circle{10.00}}
695: \put(160.00,210.00){\vector(0,-1){20.00}}
696: \put(161.00,180.00){\vector(-2,-3){16.67}}
697: \put(145.00,145.00){\vector(-1,-2){10.00}}
698: \put(145.00,145.00){\vector(2,-3){13.33}}
699: \put(142.00,139.00){\line(1,0){7.00}}
700: \put(160.00,215.00){\makebox(0,0)[cc]{$s$}}
701: \put(160.00,185.00){\makebox(0,0)[cc]{$n$}}
702: \put(145.00,150.00){\makebox(0,0)[cc]{$p$}}
703: \put(135.00,120.00){\makebox(0,0)[cc]{$x$}}
704: \put(160.00,120.00){\makebox(0,0)[cc]{$t$}}
705: \put(250.00,110.00){\makebox(0,0)[cc]{(c) Sub-MES $\xi(p,M_1(s,G))$,}}
706: \put(230.00,155.00){\circle{10.00}}
707: \put(255.00,155.00){\circle{10.20}}
708: \put(240.00,185.00){\circle{10.00}}
709: \put(240.00,180.00){\vector(-1,-2){10.00}}
710: \put(240.00,180.00){\vector(2,-3){13.33}}
711: \put(237.00,174.00){\line(1,0){7.00}}
712: \put(240.00,185.00){\makebox(0,0)[cc]{$p$}}
713: \put(230.00,155.00){\makebox(0,0)[cc]{$x$}}
714: \put(255.00,155.00){\makebox(0,0)[cc]{$t$}}
715: \put(240.00,100.00){\makebox(0,0)[cc]{not an MES in $G$}}
716: \put(225.00,34.00){\circle{10.00}}
717: \put(225.00,34.00){\makebox(0,0)[cc]{$t$}}
718: \put(26.00,20.00){\circle{10.00}}
719: \put(51.00,20.00){\circle{10.20}}
720: \put(36.00,50.00){\circle{10.00}}
721: \put(51.00,85.00){\circle{10.00}}
722: \put(36.00,45.00){\vector(-1,-2){10.00}}
723: \put(36.00,45.00){\vector(2,-3){13.33}}
724: \put(33.00,39.00){\line(1,0){7.00}}
725: \bezier{480}(21.00,19.00)(-10.00,74.00)(46.00,83.00)
726: \put(43.00,82.00){\vector(3,1){3.00}}
727: \put(51.00,85.00){\makebox(0,0)[cc]{$n$}}
728: \put(36.00,50.00){\makebox(0,0)[cc]{$p$}}
729: \put(26.00,20.00){\makebox(0,0)[cc]{$x$}}
730: \put(51.00,20.00){\makebox(0,0)[cc]{$t$}}
731: \put(45.00,6.00){\makebox(0,0)[cc]{(d) MES $M_1(p,G)$}}
732: \put(95.00,95.00){\framebox(95.00,130.00)[cc]{}}
733: \put(190.00,95.00){\framebox(120.00,130.00)[cc]{}}
734: \put(190.00,0.00){\framebox(120.00,95.00)[cc]{}}
735: \put(0.00,0.00){\framebox(95.00,95.00)[cc]{}}
736: \put(225.00,85.00){\circle{10.00}}
737: \put(225.00,85.00){\makebox(0,0)[cc]{$n$}}
738: \put(253.00,60.00){\circle{10.00}}
739: \put(253.00,60.00){\makebox(0,0)[cc]{$q$}}
740: \put(225.00,80.00){\vector(3,-2){24.00}}
741: \put(253.00,55.00){\vector(-3,-2){25.00}}
742: \end{picture}
743: \end{figure}
744:
745: \begin{rem} \label{submes}
746: \end{rem}
747: \begin{description}
748: \item[({\em i})] A sub-MES may or may not be an MES itself. This is shown in Figure \ref{fig28}. The sub-MES $\xi(p,M_1(s,G))$, coming from $M_1(s,G)$, is not an MES in $G$ (it would have been an MES if the arc ($x$,$n$) was present, as in $M_1(p,G)$). However, the sub-MES $\xi(n,M_1(n,G))$, coming from $M_1(n,G)$ is an MES in $G$. In general, if a sub-MES is rooted at the same node where the MES is rooted, the sub-MES will be an MES in $G$. Sub-MESs rooted at other nodes in the MES may or may not be MESs themselves in $G$.
749:
750: \item[({\em ii})] There is exactly one sub-MES below every node in an MES.
751: \end{description}
752:
753:
754: \subsubsection{Classification of MESs in Implicit Graphs}
755:
756: Depending upon the types of node (i.e. terminal leaf, nonterminal leaf, or other)
757: that the maximal paths of an MES terminate in, it is classified into
758: different types as follows. Note that, for any MES $M$, $Z_M$ represents the set of all nodes which have no children in $M$.
759:
760: \begin{defi}
761: An MES $M(n,G)$ below a node $n \in G$ is said to be a
762:
763: \begin{list}{\roman{defctr4})}{\usecounter{defctr4}}
764:
765: \item {\bf type-I MES} (or, a {\bf solution graph}), if $Z_{M(n,G)} \subseteq T$;
766:
767: \item {\bf type-II MES}, if
768: \begin{list}{\alph{defctr9})}{\usecounter{defctr9}}
769: \item $Z_{M(n,G)} \subseteq Z_{G},$ and
770: \item $Z_{M(n,G)} \bigcap NT \not= \phi$;
771: \end{list}
772: \item {\bf type-III MES}, if $Z_{M(n,G)} \not \subseteq Z_{G}$.
773:
774: \end{list}
775: \end{defi}
776:
777: The different types of MESs capture the information
778: whether all the paths end in terminal leaf nodes, or some end in nonterminal leaf nodes, or some paths even get stuck in cycles on the way. The type numbers I, II and III
779: are a shorthand way of depicting the nature of an MES.
780:
781: For example, for the implicit graph $G$ given in Figure \ref{fig30}(a), four MESs below $n$ are shown in Figure \ref{fig30}(b)-\ref{fig30}(e). These MESs are of types I, II, III and III respectively. In Figure \ref{fig30}(f), $M_1(p,G)$ is a type-I MES below $p$ that passes through $n$. It is interesting to note that $n$ is a predecessor of $p$ in $G$. In Figure \ref{fig30}(g), $M_1(q,G)$ is a type-III MES due to the self-loop at $q$. In Figure \ref{fig30}(h), the subgraph is not an MES, nor is it a sub-MES of $M_3(n,G)$.
782:
783:
784: \begin{figure}
785: \centering
786: \caption{An implicit graph with some MESs}
787: \label{fig30}
788: \unitlength=0.45mm
789: \special{em:linewidth 0.4pt}
790: \linethickness{0.4pt}
791: \begin{picture}(360.00,230.00)
792: \put(46.00,205.00){\circle{8.00}}
793: \put(26.00,170.00){\circle{8.25}}
794: \put(66.00,170.00){\circle{8.00}}
795: \put(26.00,135.00){\circle{8.00}}
796: \put(51.00,135.00){\circle{8.00}}
797: \put(81.00,135.00){\circle{8.25}}
798: \put(46.00,201.00){\vector(-2,-3){18.00}}
799: \put(46.00,201.00){\vector(2,-3){18.00}}
800: \put(26.00,166.00){\vector(0,-1){27.00}}
801: \put(26.00,166.00){\vector(3,-4){21.00}}
802: \put(66.00,166.00){\vector(-1,-2){13.67}}
803: \put(66.00,166.00){\vector(1,-2){13.67}}
804: \bezier{224}(66.00,166.00)(41.00,153.00)(62.00,172.00)
805: \bezier{484}(22.00,135.00)(-14.00,185.00)(42.00,205.00)
806: \put(39.00,204.00){\vector(3,1){3.00}}
807: \put(26.00,160.00){\line(1,0){4.00}}
808: \put(46.00,205.00){\makebox(0,0)[cc]{$n$}}
809: \put(66.00,170.00){\makebox(0,0)[cc]{$q$}}
810: \put(26.00,170.00){\makebox(0,0)[cc]{$p$}}
811: \put(26.00,135.00){\makebox(0,0)[cc]{$x$}}
812: \put(51.00,135.00){\makebox(0,0)[cc]{$t$}}
813: \put(81.00,135.00){\makebox(0,0)[cc]{$r$}}
814: \put(45.00,121.00){\makebox(0,0)[cc]{(a) Implicit Graph $G$}}
815: \put(0.00,115.00){\framebox(90.00,115.00)[cc]{}}
816: \put(135.00,107.00){\circle{8.00}}
817: \put(115.00,72.00){\circle{8.25}}
818: \put(155.00,72.00){\circle{8.00}}
819: \put(115.00,37.00){\circle{8.00}}
820: \put(140.00,37.00){\circle{8.00}}
821: \put(135.00,103.00){\vector(2,-3){18.00}}
822: \put(115.00,68.00){\vector(0,-1){27.00}}
823: \put(115.00,68.00){\vector(3,-4){21.00}}
824: \put(155.00,68.00){\vector(-1,-2){13.67}}
825: \bezier{484}(111.00,37.00)(75.00,87.00)(131.00,107.00)
826: \put(128.00,106.00){\vector(3,1){3.00}}
827: \put(115.00,62.00){\line(1,0){4.00}}
828: \put(135.00,107.00){\makebox(0,0)[cc]{$n$}}
829: \put(155.00,72.00){\makebox(0,0)[cc]{$q$}}
830: \put(115.00,72.00){\makebox(0,0)[cc]{$p$}}
831: \put(115.00,37.00){\makebox(0,0)[cc]{$x$}}
832: \put(140.00,37.00){\makebox(0,0)[cc]{$t$}}
833: \put(127.00,22.00){\makebox(0,0)[cc]{(f) type-I MES}}
834: \put(90.00,0.00){\framebox(90.00,115.00)[cc]{}}
835: \put(127.00,8.00){\makebox(0,0)[cc]{$M_1(p,G)$ below $p$}}
836: \put(225.00,222.00){\circle{8.00}}
837: \put(245.00,187.00){\circle{8.00}}
838: \put(260.00,152.00){\circle{8.25}}
839: \put(225.00,218.00){\vector(2,-3){18.00}}
840: \put(245.00,183.00){\vector(1,-2){13.67}}
841: \put(225.00,222.00){\makebox(0,0)[cc]{$n$}}
842: \put(245.00,187.00){\makebox(0,0)[cc]{$q$}}
843: \put(260.00,152.00){\makebox(0,0)[cc]{$r$}}
844: \put(217.00,137.00){\makebox(0,0)[cc]{(c) type-II MES}}
845: \put(180.00,115.00){\framebox(90.00,115.00)[cc]{}}
846: \put(217.00,123.00){\makebox(0,0)[cc]{$M_2(n,G)$ below $n$}}
847: \put(0.00,0.00){\framebox(90.00,115.00)[cc]{}}
848: \put(135.00,222.00){\circle{8.00}}
849: \put(155.00,187.00){\circle{8.00}}
850: \put(140.00,152.00){\circle{8.00}}
851: \put(135.00,218.00){\vector(2,-3){18.00}}
852: \put(155.00,183.00){\vector(-1,-2){13.67}}
853: \put(135.00,222.00){\makebox(0,0)[cc]{$n$}}
854: \put(155.00,187.00){\makebox(0,0)[cc]{$q$}}
855: \put(140.00,152.00){\makebox(0,0)[cc]{$t$}}
856: \put(127.00,137.00){\makebox(0,0)[cc]{(b) type-I MES}}
857: \put(90.00,115.00){\framebox(90.00,115.00)[cc]{}}
858: \put(127.00,122.00){\makebox(0,0)[cc]{$M_1(n,G)$ below $n$}}
859: \put(180.00,0.00){\framebox(90.00,115.00)[cc]{}}
860: \put(46.00,224.00){\circle{8.00}}
861: \put(46.00,220.00){\vector(0,-1){11.00}}
862: \put(46.00,224.00){\makebox(0,0)[cc]{$s$}}
863: \put(60.00,170.00){\vector(1,1){2.00}}
864: \put(305.00,222.00){\circle{8.00}}
865: \put(285.00,187.00){\circle{8.25}}
866: \put(285.00,152.00){\circle{8.00}}
867: \put(310.00,152.00){\circle{8.00}}
868: \put(305.00,218.00){\vector(-2,-3){18.00}}
869: \put(285.00,183.00){\vector(0,-1){27.00}}
870: \put(285.00,183.00){\vector(3,-4){21.00}}
871: \put(285.00,177.00){\line(1,0){4.00}}
872: \put(305.00,222.00){\makebox(0,0)[cc]{$n$}}
873: \put(285.00,187.00){\makebox(0,0)[cc]{$p$}}
874: \put(285.00,152.00){\makebox(0,0)[cc]{$x$}}
875: \put(310.00,152.00){\makebox(0,0)[cc]{$t$}}
876: \put(308.00,137.00){\makebox(0,0)[cc]{(d) type-III MES}}
877: \put(308.00,125.00){\makebox(0,0)[cc]{$M_3(n,G)$ below $n$}}
878: \put(270.00,115.00){\framebox(90.00,115.00)[cc]{}}
879: \put(224.00,72.00){\circle{8.00}}
880: \put(224.00,72.00){\makebox(0,0)[cc]{$q$}}
881: \put(224.00,22.00){\makebox(0,0)[cc]{(g) type-III MES}}
882: \put(224.00,11.00){\makebox(0,0)[cc]{$M_1(q,G)$ below $q$}}
883: \put(315.00,100.00){\circle{8.00}}
884: \put(288.00,60.00){\circle{8.00}}
885: \put(315.00,96.00){\vector(-3,-4){24.67}}
886: \put(315.00,23.00){\makebox(0,0)[cc]{(h) A subgraph which}}
887: \put(315.00,12.00){\makebox(0,0)[cc]{is not an MES}}
888: \put(315.00,100.00){\makebox(0,0)[cc]{$n$}}
889: \put(288.00,60.00){\makebox(0,0)[cc]{$p$}}
890: \put(270.00,0.00){\framebox(90.00,115.00)[cc]{}}
891: \put(46.00,100.00){\circle{8.00}}
892: \put(66.00,65.00){\circle{8.00}}
893: \put(46.00,96.00){\vector(2,-3){18.00}}
894: \put(46.00,100.00){\makebox(0,0)[cc]{$n$}}
895: \put(66.00,65.00){\makebox(0,0)[cc]{$q$}}
896: \put(45.00,22.00){\makebox(0,0)[cc]{(e) type-III MES }}
897: \put(45.00,10.00){\makebox(0,0)[cc]{$M_4(n,G)$ below $n$}}
898: \end{picture}
899: \end{figure}
900:
901: \subsubsection{Classification of Nodes in Implicit Graphs}
902:
903: A node in an implicit graph is classified into different types,
904: depending on the type of MESs below it.
905:
906: \begin{defi} \label{def60}
907: A node $n$ in $G$ is said to be of
908: \newcounter{rom_ctr0}
909: \begin{list}{\roman{rom_ctr0})}{\usecounter{rom_ctr0}}
910: \item {\bf type-I}, if there is a type-I MES
911: below $n$ in $G$.
912: \item {\bf type-II}, if there is no MES of type-I,
913: but at least one MES of type-II below $n$ in $G$.
914: \item {\bf type-III}, if there is no MES of type-I or type-II below $n$ in $G$.
915: \end{list}
916:
917: \end{defi}
918:
919: \begin{rem}
920: \end{rem}
921: \begin{description}
922: \item[({\em i})] We classify the nodes as above to highlight the information
923: contained in them about their solvability, or the reasons for not being
924: solvable. A type-I node is a solvable one (i.e. it contains a solution graph
925: below it), a type-II node is not solvable as each of its MESs contains one or more
926: nonterminal leaves which are known to be unsolvable, and a type-III node is
927: not solvable as each of its MESs gets stuck at some internal node(s) of $G$ due to cycles. Thus there is a distinct difference between a type-II
928: node and a type-III node in $G$.
929: \item[({\em ii})] If the graph $G$ is acyclic, there cannot be any type-III nodes in $G$. However, even if the graph is cyclic, there may not be any type-III nodes in it, as is evident from Figures \ref{fig50}(a) and \ref{fig50}(b).
930: \end{description}
931:
932: For example, in Figures \ref{fig50}(a) to \ref{fig50}(c) we show three implicit graphs $G_1$, $G_2$ and $G_3$ and label each node with its type (I, II or III). Observe that, changes from $G_1$ to $G_2$ happen because $x$ has been made an AND node, and changes from $G_2$ to $G_3$ happen because $p$ has also been made an AND node.
933:
934: \unitlength=0.45mm
935: \special{em:linewidth 0.4pt}
936: \linethickness{0.4pt}
937: \begin{figure}
938: \centering
939: \caption{Three implicit graphs and their node types}
940: \label{fig50}
941: \begin{picture}(315.00,125.00)
942: \put(46.00,112.00){\circle{10.00}}
943: \put(21.00,87.00){\circle{10.20}}
944: \put(71.00,87.00){\circle{10.00}}
945: \put(46.00,87.00){\circle{10.00}}
946: \put(46.00,57.00){\circle{10.00}}
947: \put(96.00,57.00){\circle{10.00}}
948: \put(46.00,27.00){\circle{10.00}}
949: \put(96.00,27.00){\circle{10.20}}
950: \put(46.00,107.00){\vector(-4,-3){21.00}}
951: \put(25.00,91.33){\vector(0,0){0.00}}
952: \put(46.00,107.00){\vector(4,-3){21.00}}
953: \put(26.00,87.00){\vector(1,0){15.00}}
954: \put(71.00,82.00){\vector(-1,-1){21.00}}
955: \put(71.00,82.00){\vector(1,-1){22.00}}
956: \put(46.00,52.00){\vector(0,-1){20.00}}
957: \put(96.00,52.00){\vector(0,-1){20.00}}
958: \put(96.00,52.00){\vector(-2,-1){45.00}}
959: \put(39.00,102.00){\line(1,0){14.00}}
960: \put(46.00,112.00){\makebox(0,0)[cc]{$s$}}
961: \put(56.00,112.00){\makebox(0,0)[cc]{I}}
962: \put(21.00,87.00){\makebox(0,0)[cc]{$p$}}
963: \put(46.00,87.00){\makebox(0,0)[cc]{$t_1$}}
964: \put(12.00,85.00){\makebox(0,0)[cc]{I}}
965: \put(56.00,86.00){\makebox(0,0)[cc]{I}}
966: \put(71.00,87.00){\makebox(0,0)[cc]{$q$}}
967: \put(84.00,86.00){\makebox(0,0)[cc]{I}}
968: \put(46.00,57.00){\makebox(0,0)[cc]{$r$}}
969: \put(54.00,58.00){\makebox(0,0)[cc]{I}}
970: \put(96.00,57.00){\makebox(0,0)[cc]{$x$}}
971: \put(46.00,27.00){\makebox(0,0)[cc]{$t_2$}}
972: \put(96.00,27.00){\makebox(0,0)[cc]{$y$}}
973: \put(87.00,57.00){\makebox(0,0)[cc]{I}}
974: \put(37.00,27.00){\makebox(0,0)[cc]{I}}
975: \put(87.00,27.00){\makebox(0,0)[cc]{II}}
976: \put(46.00,9.00){\makebox(0,0)[cc]{(a) Implicit Graph $G_1$}}
977: \bezier{688}(44.00,52.00)(-37.00,91.00)(42.00,115.00)
978: \bezier{156}(41.00,55.00)(22.00,64.00)(20.00,82.00)
979: \put(22.00,82.00){\vector(1,-1){21.00}}
980: \put(20.00,80.00){\vector(0,1){0.00}}
981: \put(39.00,114.00){\vector(2,1){2.00}}
982: \put(0.00,0.00){\framebox(105.00,125.00)[cc]{}}
983: \put(36.00,58.00){\line(3,-4){10.67}}
984: \put(151.00,112.00){\circle{10.00}}
985: \put(126.00,87.00){\circle{10.20}}
986: \put(176.00,87.00){\circle{10.00}}
987: \put(151.00,87.00){\circle{10.00}}
988: \put(151.00,57.00){\circle{10.00}}
989: \put(201.00,57.00){\circle{10.00}}
990: \put(151.00,27.00){\circle{10.00}}
991: \put(201.00,27.00){\circle{10.20}}
992: \put(151.00,107.00){\vector(-4,-3){21.00}}
993: \put(130.00,91.33){\vector(0,0){0.00}}
994: \put(151.00,107.00){\vector(4,-3){21.00}}
995: \put(131.00,87.00){\vector(1,0){15.00}}
996: \put(176.00,82.00){\vector(-1,-1){21.00}}
997: \put(176.00,82.00){\vector(1,-1){22.00}}
998: \put(151.00,52.00){\vector(0,-1){20.00}}
999: \put(201.00,52.00){\vector(0,-1){20.00}}
1000: \put(201.00,52.00){\vector(-2,-1){45.00}}
1001: \put(144.00,102.00){\line(1,0){14.00}}
1002: \put(151.00,112.00){\makebox(0,0)[cc]{$s$}}
1003: \put(161.00,112.00){\makebox(0,0)[cc]{II}}
1004: \put(126.00,87.00){\makebox(0,0)[cc]{$p$}}
1005: \put(151.00,87.00){\makebox(0,0)[cc]{$t_1$}}
1006: \put(117.00,85.00){\makebox(0,0)[cc]{I}}
1007: \put(161.00,86.00){\makebox(0,0)[cc]{I}}
1008: \put(176.00,87.00){\makebox(0,0)[cc]{$q$}}
1009: \put(189.00,86.00){\makebox(0,0)[cc]{II}}
1010: \put(151.00,57.00){\makebox(0,0)[cc]{$r$}}
1011: \put(161.00,58.00){\makebox(0,0)[cc]{II}}
1012: \put(201.00,57.00){\makebox(0,0)[cc]{$x$}}
1013: \put(151.00,27.00){\makebox(0,0)[cc]{$t_2$}}
1014: \put(201.00,27.00){\makebox(0,0)[cc]{$y$}}
1015: \put(190.00,57.00){\makebox(0,0)[cc]{II}}
1016: \put(142.00,27.00){\makebox(0,0)[cc]{I}}
1017: \put(190.00,27.00){\makebox(0,0)[cc]{II}}
1018: \put(155.00,9.00){\makebox(0,0)[cc]{(b) Implicit Graph $G_2$}}
1019: \bezier{688}(149.00,52.00)(68.00,91.00)(147.00,115.00)
1020: \bezier{156}(146.00,55.00)(127.00,64.00)(125.00,82.00)
1021: \put(127.00,82.00){\vector(1,-1){21.00}}
1022: \put(125.00,80.00){\vector(0,1){0.00}}
1023: \put(144.00,114.00){\vector(2,1){2.00}}
1024: \put(105.00,0.00){\framebox(105.00,125.00)[cc]{}}
1025: \put(141.00,58.00){\line(3,-4){10.67}}
1026: \put(193.00,48.00){\line(1,0){8.00}}
1027: \put(256.00,112.00){\circle{10.00}}
1028: \put(231.00,87.00){\circle{10.20}}
1029: \put(281.00,87.00){\circle{10.00}}
1030: \put(256.00,87.00){\circle{10.00}}
1031: \put(256.00,57.00){\circle{10.00}}
1032: \put(306.00,57.00){\circle{10.00}}
1033: \put(256.00,27.00){\circle{10.00}}
1034: \put(306.00,27.00){\circle{10.20}}
1035: \put(256.00,107.00){\vector(-4,-3){21.00}}
1036: \put(235.00,91.33){\vector(0,0){0.00}}
1037: \put(256.00,107.00){\vector(4,-3){21.00}}
1038: \put(236.00,87.00){\vector(1,0){15.00}}
1039: \put(281.00,82.00){\vector(-1,-1){21.00}}
1040: \put(281.00,82.00){\vector(1,-1){22.00}}
1041: \put(256.00,52.00){\vector(0,-1){20.00}}
1042: \put(306.00,52.00){\vector(0,-1){20.00}}
1043: \put(306.00,52.00){\vector(-2,-1){45.00}}
1044: \put(249.00,102.00){\line(1,0){14.00}}
1045: \put(256.00,112.00){\makebox(0,0)[cc]{$s$}}
1046: \put(266.00,112.00){\makebox(0,0)[cc]{III}}
1047: \put(231.00,87.00){\makebox(0,0)[cc]{$p$}}
1048: \put(256.00,87.00){\makebox(0,0)[cc]{$t_1$}}
1049: \put(220.00,87.00){\makebox(0,0)[cc]{III}}
1050: \put(266.00,86.00){\makebox(0,0)[cc]{I}}
1051: \put(281.00,87.00){\makebox(0,0)[cc]{$q$}}
1052: \put(294.00,86.00){\makebox(0,0)[cc]{II}}
1053: \put(256.00,57.00){\makebox(0,0)[cc]{$r$}}
1054: \put(268.00,58.00){\makebox(0,0)[cc]{III}}
1055: \put(306.00,57.00){\makebox(0,0)[cc]{$x$}}
1056: \put(256.00,27.00){\makebox(0,0)[cc]{$t_2$}}
1057: \put(306.00,27.00){\makebox(0,0)[cc]{$y$}}
1058: \put(295.00,57.00){\makebox(0,0)[cc]{II}}
1059: \put(247.00,27.00){\makebox(0,0)[cc]{I}}
1060: \put(295.00,27.00){\makebox(0,0)[cc]{II}}
1061: \put(256.00,9.00){\makebox(0,0)[cc]{(c) Implicit Graph $G_3$}}
1062: \bezier{688}(254.00,52.00)(173.00,91.00)(252.00,115.00)
1063: \bezier{156}(251.00,55.00)(232.00,64.00)(230.00,82.00)
1064: \put(232.00,82.00){\vector(1,-1){21.00}}
1065: \put(230.00,80.00){\vector(0,1){0.00}}
1066: \put(249.00,114.00){\vector(2,1){2.00}}
1067: \put(210.00,0.00){\framebox(105.00,125.00)[cc]{}}
1068: \put(246.00,58.00){\line(3,-4){10.67}}
1069: \put(298.00,48.00){\line(1,0){8.00}}
1070: \put(240.00,87.00){\line(-2,-5){3.67}}
1071: \end{picture}
1072: \end{figure}
1073:
1074:
1075: \subsubsection {Properties of MESs}
1076:
1077: Now we discuss the inter-relationships between the
1078: different types of nodes and different types of MESs. These
1079: results are the important building blocks in this proposed new framework for cyclic AND/OR graphs.
1080:
1081: \begin{lem} \label{lem01}
1082:
1083: For any MES $M(n,G)$:
1084:
1085: \newcounter{rom_ctr30}
1086: \begin{list}{\roman{rom_ctr30})}{\usecounter{rom_ctr30}}
1087:
1088: \item If $M(n,G)$ is of type-I, then for every $p \in M(n,G)$ the sub-MES $\xi(p,M(n,G))$ is also an MES, and it is of type-I.
1089:
1090: \item If $M(n,G)$ is of type-II, then for every $p \in M(n,G)$ the sub-MES $\xi(p,M(n,G))$ is also an MES, and it is of type-I or type-II.
1091: \end{list}
1092: \end{lem}
1093:
1094: {\bf Proof.} Clear. \qed
1095:
1096: \begin{lem} \label{lem02}
1097:
1098: Let $M$ be an MES below a node $n \in G$ and $p$ be any node in $M$.
1099: Now,
1100: \newcounter{rom_ctr31}
1101: \begin{list}{\roman{rom_ctr31})}{\usecounter{rom_ctr31}}
1102:
1103: \item If $M$ is of type-I then $p$ must be of type-I.
1104: \item If $M$ is of type-II then $p$ must be of either type-I or type-II, and at least one such $p$ is of type-II.
1105: \item If $M$ is of type-III then $p$ may be of type-I or type-II or type-III.
1106: \end{list}
1107: \end{lem}
1108:
1109: {\bf Proof.} Clear. \qed
1110:
1111: As an example of Lemma \ref{lem02}(\textit{iii}), we refer to Figure \ref{fig51}. Even though the MES $M_1(s,G_1)$ in Figure \ref{fig51}(b) is of type-III, all of its nodes $s$ and $n$ are of type-I in $G_1$ in Figure \ref{fig51}(a). Again, MES $M_1(s,G_2)$ in Figure \ref{fig51}(d) is of type-III, but all of its nodes $s$ and $n$ are of type-II in $G_2$ in Figure \ref{fig51}(c). It should be noted that the type of a node is defined globally based on all the MESs below it, but the type of an MES $M$ is based on the nodes of $Z_M$ - whether they are terminal, nonterminal of internal nodes of $G$.
1112:
1113: \unitlength=0.45mm
1114: \special{em:linewidth 0.4pt}
1115: \linethickness{0.4pt}
1116: \begin{figure}
1117: \centering
1118: \caption{Illustration of Lemma \ref{lem02}(\textit{iii})}
1119: \label{fig51}
1120: \begin{picture}(322.00,100.00)
1121: \put(30.00,91.00){\circle{10.00}}
1122: \put(30.00,56.00){\circle{10.20}}
1123: \put(30.00,33.00){\circle{10.00}}
1124: \put(65.00,56.00){\circle{10.00}}
1125: \put(30.00,86.00){\vector(0,-1){25.00}}
1126: \put(30.00,86.00){\vector(4,-3){33.00}}
1127: \put(30.00,91.00){\makebox(0,0)[cc]{$s$}}
1128: \put(30.00,56.00){\makebox(0,0)[cc]{$n$}}
1129: \put(65.00,56.00){\makebox(0,0)[cc]{$t$}}
1130: \put(30.00,32.00){\makebox(0,0)[cc]{$x$}}
1131: \put(114.00,84.00){\circle{10.00}}
1132: \put(114.00,49.00){\circle{10.20}}
1133: \put(114.00,79.00){\vector(0,-1){25.00}}
1134: \put(114.00,84.00){\makebox(0,0)[cc]{$s$}}
1135: \put(114.00,49.00){\makebox(0,0)[cc]{$n$}}
1136: \put(81.00,0.00){\framebox(80.00,100.00)[cc]{}}
1137: \put(40.00,18.00){\makebox(0,0)[cc]{(a) Implicit }}
1138: \put(45.00,5.00){\makebox(0,0)[cc]{Graph $G_1$}}
1139: \put(120.00,18.00){\makebox(0,0)[cc]{(b) Type-III MES}}
1140: \bezier{256}(25.00,56.00)(-2.00,73.00)(25.00,90.00)
1141: \put(22.00,88.00){\vector(3,2){3.00}}
1142: \put(120.00,6.00){\makebox(0,0)[cc]{$M_1(s,G_1)$ below $s$}}
1143: \put(38.00,91.00){\makebox(0,0)[cc]{I}}
1144: \put(38.00,57.00){\makebox(0,0)[cc]{I}}
1145: \put(41.00,33.00){\makebox(0,0)[cc]{II}}
1146: \put(56.00,56.00){\makebox(0,0)[cc]{I}}
1147: \put(0.00,0.00){\framebox(81.00,100.00)[cc]{}}
1148: \put(205.00,91.00){\circle{10.00}}
1149: \put(205.00,56.00){\circle{10.20}}
1150: \put(205.00,34.00){\circle{10.00}}
1151: \put(205.00,86.00){\vector(0,-1){25.00}}
1152: \put(205.00,91.00){\makebox(0,0)[cc]{$s$}}
1153: \put(205.00,56.00){\makebox(0,0)[cc]{$n$}}
1154: \put(205.00,33.00){\makebox(0,0)[cc]{$x$}}
1155: \put(195.00,18.00){\makebox(0,0)[cc]{(c) Implicit}}
1156: \put(200.00,5.00){\makebox(0,0)[cc]{Graph $G_2$}}
1157: \put(197.00,88.00){\vector(3,2){3.00}}
1158: \put(216.00,91.00){\makebox(0,0)[cc]{II}}
1159: \put(216.00,57.00){\makebox(0,0)[cc]{II}}
1160: \put(216.00,34.00){\makebox(0,0)[cc]{II}}
1161: \put(161.00,0.00){\framebox(81.00,100.00)[cc]{}}
1162: \bezier{248}(200.00,56.00)(174.00,74.00)(200.00,90.00)
1163: \put(275.00,84.00){\circle{10.00}}
1164: \put(275.00,49.00){\circle{10.20}}
1165: \put(275.00,79.00){\vector(0,-1){25.00}}
1166: \put(275.00,84.00){\makebox(0,0)[cc]{$s$}}
1167: \put(275.00,49.00){\makebox(0,0)[cc]{$n$}}
1168: \put(242.00,0.00){\framebox(80.00,100.00)[cc]{}}
1169: \put(281.00,18.00){\makebox(0,0)[cc]{(d) Type-III MES}}
1170: \put(281.00,6.00){\makebox(0,0)[cc]{$M_1(s,G_2)$ below $s$}}
1171: \put(30.00,51.00){\vector(0,-1){13.00}}
1172: \put(205.00,51.00){\vector(0,-1){12.00}}
1173: \end{picture}
1174: \end{figure}
1175:
1176: \begin{th} \label{thm20} {\bf Sub-problem Composition Theorem for Implicit Graphs.} Let $G$ be an implicit
1177: AND/OR graph and n be any internal node in $G$. Now, \\
1178: \newcounter{rom_ctr7}
1179: \begin{list}{\roman{rom_ctr7})}{\usecounter{rom_ctr7}}
1180: \item If $n$ is an OR node, then:
1181:
1182: (a) $n$ is of type-I iff at least one child of $n$ is of type-I;
1183:
1184: (b) $n$ is of type-II iff no child of $n$ is of type-I but at least one child is of type-II
1185:
1186: (c) $n$ is of type-III iff all children of $n$ are of type-III.
1187: \item If $n$ is an AND node, then:
1188:
1189: (a) $n$ is of type-I iff every child of $n$ is of type-I;
1190:
1191: (b) $n$ is of type-II iff at least one child of $n$ is of type-II and no child is of type-III;
1192:
1193: (c) $n$ is of type-III iff at least one child of $n$ is of type-III.
1194: \end{list}
1195: \end{th}
1196:
1197: Proof. Similar to the proof of Theorem \ref{thm25} on Explicit Graphs, presented later. \qed\\
1198:
1199:
1200: \subsubsection{Costs of MESs in Implicit Graphs}
1201:
1202: Finally we come to the notion of costs. For AND/OR graphs with cycles, we define the cost with respect to an MES.
1203:
1204: The definitions in this section will be illustrated using the graphs shown in Figures \ref{fig70} and \ref{fig80}. These graphs show the arc-costs beside each arc and the heuristic values in parenthesis beside each node. The heuristic values of terminal leaf nodes are assumed to be zero. These heuristic values will be useful in later discussions on explicit graphs, where the same figures will be referred.
1205:
1206: \special{em:linewidth 0.4pt}
1207: \linethickness{0.4pt}
1208: \begin{figure}
1209: \centering
1210: \caption{Two implicit graphs}
1211: \label{fig70}
1212: \begin{picture}(213.00,128.00)
1213: \put(46.00,-0.33){\line(0,1){0.33}}
1214: \put(48.00,118.00){\circle{10.00}}
1215: \put(22.00,90.00){\circle{10.00}}
1216: \put(78.00,90.00){\circle{10.00}}
1217: \put(48.00,59.00){\circle{10.00}}
1218: \put(78.00,59.00){\circle{10.00}}
1219: \put(78.00,54.00){\vector(0,-1){17.00}}
1220: \put(78.00,54.00){\vector(-1,-1){26.00}}
1221: \put(48.00,54.00){\vector(0,-1){23.00}}
1222: \put(24.00,86.00){\vector(3,-4){18.67}}
1223: \put(78.00,85.00){\vector(0,-1){21.00}}
1224: \put(78.00,85.00){\vector(-1,-1){25.00}}
1225: \put(27.00,90.00){\vector(1,0){16.00}}
1226: \put(48.00,113.00){\vector(-3,-2){26.00}}
1227: \put(48.00,113.00){\vector(3,-2){28.00}}
1228: \bezier{236}(45.00,55.00)(15.00,57.00)(19.00,86.00)
1229: \put(19.00,80.00){\vector(0,1){6.00}}
1230: \put(81.00,44.00){\makebox(0,0)[cc]{1}}
1231: \put(63.00,44.00){\makebox(0,0)[cc]{1}}
1232: \put(42.00,44.00){\makebox(0,0)[cc]{10}}
1233: \put(48.00,59.00){\makebox(0,0)[cc]{$r$}}
1234: \put(78.00,59.00){\makebox(0,0)[cc]{$x$}}
1235: \put(81.00,74.00){\makebox(0,0)[cc]{1}}
1236: \put(94.00,62.00){\makebox(0,0)[cc]{(100)}}
1237: \put(78.00,90.00){\makebox(0,0)[cc]{$q$}}
1238: \put(61.00,75.00){\makebox(0,0)[cc]{1}}
1239: \put(48.00,68.00){\makebox(0,0)[cc]{(2)}}
1240: \put(37.00,76.00){\makebox(0,0)[cc]{1}}
1241: \put(21.00,60.00){\makebox(0,0)[cc]{1}}
1242: \put(22.00,90.00){\makebox(0,0)[cc]{$p$}}
1243: \put(10.00,90.00){\makebox(0,0)[cc]{(5)}}
1244: \put(35.00,95.00){\makebox(0,0)[cc]{5}}
1245: \put(48.00,90.00){\makebox(0,0)[cc]{$t_{1}$}}
1246: \put(31.00,107.00){\makebox(0,0)[cc]{1}}
1247: \put(65.00,107.00){\makebox(0,0)[cc]{1}}
1248: \put(48.00,118.00){\makebox(0,0)[cc]{$s$}}
1249: \put(61.00,121.00){\makebox(0,0)[cc]{(0)}}
1250: \put(92.00,90.00){\makebox(0,0)[cc]{(5)}}
1251: \put(92.00,32.00){\makebox(0,0)[cc]{($\infty$)}}
1252: \put(152.00,119.00){\circle{10.00}}
1253: \put(126.00,91.00){\circle{10.00}}
1254: \put(182.00,91.00){\circle{10.00}}
1255: \put(152.00,60.00){\circle{10.00}}
1256: \put(182.00,60.00){\circle{10.00}}
1257: \put(182.00,55.00){\vector(0,-1){17.00}}
1258: \put(182.00,55.00){\vector(-1,-1){26.00}}
1259: \put(152.00,55.00){\vector(0,-1){23.00}}
1260: \put(128.00,87.00){\vector(3,-4){18.67}}
1261: \put(182.00,86.00){\vector(0,-1){21.00}}
1262: \put(182.00,86.00){\vector(-1,-1){25.00}}
1263: \put(131.00,91.00){\vector(1,0){16.00}}
1264: \put(152.00,114.00){\vector(-3,-2){26.00}}
1265: \put(152.00,114.00){\vector(3,-2){28.00}}
1266: \bezier{236}(149.00,56.00)(119.00,58.00)(123.00,87.00)
1267: \put(123.00,81.00){\vector(0,1){6.00}}
1268: \put(185.00,45.00){\makebox(0,0)[cc]{1}}
1269: \put(167.00,45.00){\makebox(0,0)[cc]{1}}
1270: \put(146.00,43.00){\makebox(0,0)[cc]{10}}
1271: \put(152.00,60.00){\makebox(0,0)[cc]{$r$}}
1272: \put(182.00,60.00){\makebox(0,0)[cc]{$x$}}
1273: \put(185.00,75.00){\makebox(0,0)[cc]{1}}
1274: \put(198.00,60.00){\makebox(0,0)[cc]{(100)}}
1275: \put(182.00,91.00){\makebox(0,0)[cc]{$q$}}
1276: \put(165.00,76.00){\makebox(0,0)[cc]{1}}
1277: \put(152.00,69.00){\makebox(0,0)[cc]{(2)}}
1278: \put(141.00,77.00){\makebox(0,0)[cc]{1}}
1279: \put(125.00,61.00){\makebox(0,0)[cc]{1}}
1280: \put(126.00,91.00){\makebox(0,0)[cc]{$p$}}
1281: \put(114.00,91.00){\makebox(0,0)[cc]{(5)}}
1282: \put(139.00,96.00){\makebox(0,0)[cc]{5}}
1283: \put(152.00,91.00){\makebox(0,0)[cc]{$t_{1}$}}
1284: \put(135.00,108.00){\makebox(0,0)[cc]{1}}
1285: \put(169.00,108.00){\makebox(0,0)[cc]{1}}
1286: \put(152.00,119.00){\makebox(0,0)[cc]{$s$}}
1287: \put(165.00,122.00){\makebox(0,0)[cc]{(0)}}
1288: \put(195.00,35.00){\makebox(0,0)[cc]{($\infty$)}}
1289: \put(48.00,7.00){\makebox(0,0)[cc]{(a) Implicit Graph $G_{1}$}}
1290: \put(152.00,7.00){\makebox(0,0)[cc]{(b) Implicit Graph $G_{2}$}}
1291: \put(42.00,109.00){\line(1,0){12.00}}
1292: \put(71.00,47.00){\line(1,0){7.00}}
1293: \put(146.00,110.00){\line(1,0){12.00}}
1294: \put(136.00,91.00){\line(-1,-4){2.67}}
1295: \put(175.00,48.00){\line(1,0){7.00}}
1296: \put(195.00,92.00){\makebox(0,0)[cc]{(5)}}
1297: \put(44.00,22.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
1298: \put(74.00,28.00){\framebox(8.00,8.00)[cc]{$y$}}
1299: \put(147.00,23.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
1300: \put(178.00,29.00){\framebox(8.00,8.00)[cc]{$y$}}
1301: \put(43.00,86.00){\framebox(10.00,8.00)[cc]{}}
1302: \put(147.00,86.00){\framebox(10.00,9.00)[cc]{}}
1303: \put(152.00,48.00){\line(-1,1){9.00}}
1304: \put(0.00,0.00){\framebox(105.00,128.00)[cc]{}}
1305: \put(105.00,0.00){\framebox(108.00,128.00)[cc]{}}
1306: \end{picture}
1307: \end{figure}
1308:
1309:
1310: \begin{defi} \label{beta} Given any implicit graph $G$, for any MES $M(n,G)$, we denote the cost of a node $u$ in $M(n,G)$ by
1311: $\beta(u,M(n,G))$. We define this cost function $\beta(u,M(n,G))$ as follows:
1312:
1313: \begin{tabbing}
1314: aaaaaaaaaaaa\=aaa\= \kill
1315: $\beta(u,M(n,G))$ \\
1316: = $0$ if $u \in T$; \\
1317: = $\infty$ if $u \in NT$; \\
1318: = $c(u,w) + \beta(w,M(n,G))$, if $u$ is an OR node and $w$ is the child of $u$ in $M(n,G)$ \\
1319: = $\sum_{w \in \Gamma(u,M(n,G))} \{c(u,w) + \beta(w,M(n,G)) \}$ if $u$ is an AND node.\\
1320:
1321: \\
1322: $\beta(u,M(n,G))$ is undefined if $u \in Z_M \setminus \{T \bigcup NT \}$.
1323: \end{tabbing}
1324:
1325:
1326: \end{defi}
1327:
1328: In Figure \ref{fig80}(a),
1329: $\beta(t_{1},M_{1}(s,G_{1})) = 0$, $\beta(p,M_{1}(s,G_{1})) = 5$, $\beta(r,M_{1}(s,G_{1})) = 6$, $\beta(q,M_{1}(s,G_{1})) = 7$ and
1330: $\beta(s,M_{1}(s,G_{1})) = 14$. Similarly $\beta(t_2,M_{2}(q,G_{2})) = 0$, $\beta(y,M_{2}(q,G_{2})) = \infty$ (since $y \in NT$), $\beta(x,M_{2}(q,G_{2})) = \infty$ and $\beta(q,M_{2}(q,G_{2})) = \infty$. In $M_1(s,G_2)$, $\beta(t_1,M_{1}(s,G_{2})) = 0$. But since $\beta(r,M_{1}(s,G_{2}))$ is undefined, the $\beta$-values of $p$, $q$ and $s$ are also undefined.
1331:
1332: \linethickness{0.4pt}
1333: \unitlength=0.45mm
1334: \begin{figure}
1335: \centering
1336: \caption{MESs from the implicit graphs of Figure \ref{fig70}}
1337: \label{fig80}
1338: \begin{picture}(222.00,117.00)
1339: \put(46.00,-0.33){\line(0,1){0.33}}
1340: \put(40.00,99.00){\circle{10.00}}
1341: \put(14.00,71.00){\circle{10.00}}
1342: \put(70.00,71.00){\circle{10.00}}
1343: \put(40.00,40.00){\circle{10.00}}
1344: \put(70.00,66.00){\vector(-1,-1){25.00}}
1345: \put(19.00,71.00){\vector(1,0){16.00}}
1346: \put(40.00,94.00){\vector(-3,-2){26.00}}
1347: \put(40.00,94.00){\vector(3,-2){28.00}}
1348: \bezier{236}(37.00,36.00)(7.00,38.00)(11.00,67.00)
1349: \put(11.00,61.00){\vector(0,1){6.00}}
1350: \put(40.00,40.00){\makebox(0,0)[cc]{$r$}}
1351: \put(70.00,71.00){\makebox(0,0)[cc]{$q$}}
1352: \put(53.00,56.00){\makebox(0,0)[cc]{1}}
1353: \put(13.00,41.00){\makebox(0,0)[cc]{1}}
1354: \put(14.00,71.00){\makebox(0,0)[cc]{$p$}}
1355: \put(27.00,76.00){\makebox(0,0)[cc]{5}}
1356: \put(40.00,71.00){\makebox(0,0)[cc]{$t_{1}$}}
1357: \put(23.00,88.00){\makebox(0,0)[cc]{1}}
1358: \put(57.00,88.00){\makebox(0,0)[cc]{1}}
1359: \put(40.00,99.00){\makebox(0,0)[cc]{$s$}}
1360: \put(117.00,105.00){\circle{10.00}}
1361: \put(117.00,74.00){\circle{10.00}}
1362: \put(117.00,69.00){\vector(0,-1){17.00}}
1363: \put(117.00,69.00){\vector(-1,-1){26.00}}
1364: \put(117.00,100.00){\vector(0,-1){21.00}}
1365: \put(120.00,59.00){\makebox(0,0)[cc]{1}}
1366: \put(102.00,59.00){\makebox(0,0)[cc]{1}}
1367: \put(117.00,74.00){\makebox(0,0)[cc]{$x$}}
1368: \put(120.00,89.00){\makebox(0,0)[cc]{1}}
1369: \put(117.00,105.00){\makebox(0,0)[cc]{$q$}}
1370: \put(105.00,22.00){\makebox(0,0)[cc]{(b) $M_{2}(q,G_{2})$}}
1371: \put(34.00,90.00){\line(1,0){12.00}}
1372: \put(110.00,62.00){\line(1,0){7.00}}
1373: \put(82.00,37.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
1374: \put(113.00,43.00){\framebox(8.00,8.00)[cc]{$y$}}
1375: \put(35.00,67.00){\framebox(10.00,8.00)[cc]{}}
1376: \put(32.00,22.00){\makebox(0,0)[cc]{(a) $M_{1}(s,G_{1})$}}
1377: \put(182.00,96.00){\circle{10.00}}
1378: \put(156.00,68.00){\circle{10.00}}
1379: \put(212.00,68.00){\circle{10.00}}
1380: \put(182.00,37.00){\circle{10.00}}
1381: \put(158.00,64.00){\vector(3,-4){18.67}}
1382: \put(212.00,63.00){\vector(-1,-1){25.00}}
1383: \put(161.00,68.00){\vector(1,0){16.00}}
1384: \put(182.00,91.00){\vector(-3,-2){26.00}}
1385: \put(182.00,91.00){\vector(3,-2){28.00}}
1386: \put(182.00,37.00){\makebox(0,0)[cc]{$r$}}
1387: \put(212.00,68.00){\makebox(0,0)[cc]{$q$}}
1388: \put(195.00,53.00){\makebox(0,0)[cc]{1}}
1389: \put(171.00,54.00){\makebox(0,0)[cc]{1}}
1390: \put(156.00,68.00){\makebox(0,0)[cc]{$p$}}
1391: \put(169.00,73.00){\makebox(0,0)[cc]{5}}
1392: \put(182.00,68.00){\makebox(0,0)[cc]{$t_{1}$}}
1393: \put(165.00,85.00){\makebox(0,0)[cc]{1}}
1394: \put(199.00,85.00){\makebox(0,0)[cc]{1}}
1395: \put(182.00,96.00){\makebox(0,0)[cc]{$s$}}
1396: \put(185.00,22.00){\makebox(0,0)[cc]{(c) $M_{1}(s,G_{2})$}}
1397: \put(176.00,87.00){\line(1,0){12.00}}
1398: \put(166.00,68.00){\line(-1,-4){2.67}}
1399: \put(177.00,63.00){\framebox(10.00,9.00)[cc]{}}
1400: \put(34.00,8.00){\makebox(0,0)[cc]{(type-I)}}
1401: \put(111.00,8.00){\makebox(0,0)[cc]{(type-II)}}
1402: \put(185.00,8.00){\makebox(0,0)[cc]{(type-III)}}
1403: \put(0.00,0.00){\framebox(78.00,117.00)[cc]{}}
1404: \put(78.00,0.00){\framebox(66.00,117.00)[cc]{}}
1405: \put(144.00,0.00){\framebox(78.00,117.00)[cc]{}}
1406: \end{picture}
1407: \end{figure}
1408:
1409:
1410: \begin{defi} Given any implicit graph $G$, let $M_1(n,G)$, $M_2(n,G)$, $\ldots$,
1411: be the all possible type-I or type-II MESs below $n$. Then $h^{*}(n)$, the cost of a minimal-cost MES below $n$ = $glb_{i \geq 1} \{\beta(n,M_i(n,G))\}$;
1412: if no type-I or type-II MES exists below $n$, $h^{*}(n)$ is undefined.
1413: \end{defi}
1414:
1415: It may be easily verified that in Figure \ref{fig70}(a),
1416: $h^{*}(s) = 14$, and the only minimal-cost MES is $M_{1}(s,G_{1})$.
1417: In Figure \ref{fig70}(b) $h^{*}(s)$ is undefined, while $h^{*}(q) = \infty$.
1418:
1419: \begin{rem}
1420: For any node $n$ in an implicit graph $G$,
1421: \end{rem}
1422: \begin{description}
1423: \item[({\em i})] if $n$ is of type-I, then $h^{*}(n) < \infty$;
1424: \item[({\em ii})] if $n$ is of type-II, then $h^{*}(n) = \infty$;
1425: \item[({\em iii})] if $n$ is of type-III, then $h^{*}(n)$ is undefined.
1426: \end{description}
1427:
1428: \begin{lem} \label{lem02.5}
1429: Let $M(n)$ be a minimal-cost MES below a type-I or type-II node $n$ in $G$. Then for every node $x \in M(n)$, the sub-MES $\xi(x,M(n))$ is also a minimal-cost MES below $x$.
1430: \end{lem}
1431:
1432: Proof. Clear. \qed.
1433:
1434:
1435: \subsection{MESs in an Explicit AND/OR Graph}
1436:
1437:
1438: The concepts of MES and sub-MES, and the costs and properties of an MES, have been discussed in detail for an implicit AND/OR graph. Now in the context of an explicit AND/OR graph, we present similar concepts.
1439:
1440: In an explicit graph $G^{\prime}$, the child\_set is defined identically as in Definition \ref{def00}. $Z_{G^{\prime}}$ represents the set of all tip nodes in $G^{\prime}$, i.e.
1441: $Z_{G^{\prime}} = \{x \mid x \in G^{\prime} \bigwedge (\Gamma(x, G^{\prime}) = \phi) \}$.
1442:
1443: \begin{defi} An MES $M(n,G^{\prime})$ in an explicit graph $G^{\prime}$ is defined
1444: similarly as
1445: in the implicit graph $G$, with $G$ replaced by $G^{\prime}$ throughout.
1446: \end{defi}
1447:
1448: As in the case for implicit graph, multiple MESs below a node $n \in G^{\prime}$
1449: are named as $M_1(n, G^{\prime})$, $M_2(n, G^{\prime})$ \ldots.
1450:
1451: \begin{defi} A sub-MES $\xi(p,M(n,G^{\prime}))$ below a node $p$ in an MES $M(n,G^{\prime})$ is defined similarly as a sub-MES below a node $p$ in an MES $M(n,G)$.
1452: \end{defi}
1453:
1454: \begin{rem}
1455: \end{rem}
1456:
1457: As explained in Remark \ref{submes} using Figure \ref{fig28} for implicit graphs, in case of explicit graphs as well a sub-MES may not itself be an MES. In this context, we may consider the entire implicit graph in Figure \ref{fig28}(a) as an explicit graph. Then the sub-MES $\xi(p,M_1(s,G^{\prime}))$, obtained from $M_1(s,G^{\prime})$ will not be an MES in $G^{\prime}$.
1458:
1459: \subsubsection{Classification of MESs in Explicit Graphs}
1460:
1461: In case of an implicit graph, the MESs could be distinguished into type-I, type-II and
1462: type-III, as they are fully extended up to the leaf nodes of $G$, or immediately prior to the formation of a cycle. In an explicit graph, those MESs which have encountered cycles are labelled as type-III. On the other hand, those MESs which are yet to encounter cycles cannot be labelled as type-I or type-II. This is because, such MESs may not be fully extended up to the leaf nodes of $G$ yet. All such MESs are collectively labelled as non-type-III.
1463: A non-type-III MES is identical to a potential solution graph (psg) defined in the context of an acyclic AND/OR graph. In this paper, we shall use these two terms interchangeably.
1464:
1465: \begin{defi}
1466: In an explicit graph $G^{\prime}$,
1467: an
1468: MES $M(n,G^{\prime})$ is said to be a:
1469: \begin{list}{\roman{defctr6})}{\usecounter{defctr6}}
1470: \item {\bf non-type-III MES} (or a {\bf potential solution graph} or {\bf psg}), if $Z_{M(n,G^{\prime})} \subseteq
1471: Z_{G^{\prime}}$;
1472: \item {\bf type-III MES}, if $Z_{M(n,G^{\prime})} \not\subseteq Z_{G^{\prime}}$.
1473: \end{list}
1474: \end{defi}
1475:
1476: For example, consider the explicit graph $G_{1}^{\prime}$ in Figure \ref{fig40}(a),
1477: obtained by expanding nodes $s$, $n$ and $p$ from $G$ in Figure \ref{fig30}(a). We show a psg,
1478: $M_1(n,G_1^{\prime})$ below $n$ in Figure \ref{fig40}(b).
1479: When the explicit graph is augmented by expanding node $x$ to form $G_2^{\prime}$, the corresponding MES $M_1(n,G_2^{\prime})$, however, becomes type-III (shown in Figure \ref{fig40}(d)). Note that $M_1(n,G_1^{\prime})$ and $M_1(n,G_2^{\prime})$ look quite similar although they are actually different. In $M_1(n,G_1^{\prime})$ $x$ is a tip node, while in $M_1(n,G_2^{\prime})$ $x$ is an expanded node.
1480:
1481:
1482: \unitlength=0.45mm
1483: \special{em:linewidth 0.4pt}
1484: \linethickness{0.4pt}
1485: \begin{figure}
1486: \centering
1487: \caption{Two explicit graphs and their MESs}
1488: \label{fig40}
1489: \begin{picture}(200.00,230.00)
1490: \put(46.00,205.00){\circle{8.00}}
1491: \put(26.00,170.00){\circle{8.25}}
1492: \put(66.00,170.00){\circle{8.00}}
1493: \put(26.00,135.00){\circle{8.00}}
1494: \put(51.00,135.00){\circle{8.00}}
1495: \put(46.00,201.00){\vector(-2,-3){18.00}}
1496: \put(46.00,201.00){\vector(2,-3){18.00}}
1497: \put(26.00,166.00){\vector(0,-1){27.00}}
1498: \put(26.00,166.00){\vector(3,-4){21.00}}
1499: \put(26.00,160.00){\line(1,0){4.00}}
1500: \put(46.00,205.00){\makebox(0,0)[cc]{$n$}}
1501: \put(66.00,170.00){\makebox(0,0)[cc]{$q$}}
1502: \put(26.00,170.00){\makebox(0,0)[cc]{$p$}}
1503: \put(26.00,135.00){\makebox(0,0)[cc]{$x$}}
1504: \put(51.00,135.00){\makebox(0,0)[cc]{$t$}}
1505: \put(55.00,121.00){\makebox(0,0)[cc]{(a) Explicit Graph $G_1^{\prime}$}}
1506: \put(155.00,22.00){\makebox(0,0)[cc]{(d) A type-III MES}}
1507: \put(160.00,8.00){\makebox(0,0)[cc]{$M_1(n,G_2^{\prime})$ below $n$}}
1508: \put(46.00,224.00){\circle{8.00}}
1509: \put(46.00,220.00){\vector(0,-1){11.00}}
1510: \put(46.00,224.00){\makebox(0,0)[cc]{$s$}}
1511: \put(177.00,221.00){\circle{8.00}}
1512: \put(157.00,186.00){\circle{8.25}}
1513: \put(157.00,151.00){\circle{8.00}}
1514: \put(182.00,151.00){\circle{8.00}}
1515: \put(177.00,217.00){\vector(-2,-3){18.00}}
1516: \put(157.00,182.00){\vector(0,-1){27.00}}
1517: \put(157.00,182.00){\vector(3,-4){21.00}}
1518: \put(157.00,176.00){\line(1,0){4.00}}
1519: \put(177.00,221.00){\makebox(0,0)[cc]{$n$}}
1520: \put(157.00,186.00){\makebox(0,0)[cc]{$p$}}
1521: \put(157.00,151.00){\makebox(0,0)[cc]{$x$}}
1522: \put(182.00,151.00){\makebox(0,0)[cc]{$t$}}
1523: \put(162.00,135.00){\makebox(0,0)[cc]{(b) A non-type-III MES}}
1524: \put(46.00,90.00){\circle{8.00}}
1525: \put(26.00,55.00){\circle{8.25}}
1526: \put(66.00,55.00){\circle{8.00}}
1527: \put(26.00,20.00){\circle{8.00}}
1528: \put(51.00,20.00){\circle{8.00}}
1529: \put(46.00,86.00){\vector(-2,-3){18.00}}
1530: \put(46.00,86.00){\vector(2,-3){18.00}}
1531: \put(26.00,51.00){\vector(0,-1){27.00}}
1532: \put(26.00,51.00){\vector(3,-4){21.00}}
1533: \put(26.00,45.00){\line(1,0){4.00}}
1534: \put(46.00,90.00){\makebox(0,0)[cc]{$n$}}
1535: \put(66.00,55.00){\makebox(0,0)[cc]{$q$}}
1536: \put(26.00,55.00){\makebox(0,0)[cc]{$p$}}
1537: \put(26.00,20.00){\makebox(0,0)[cc]{$x$}}
1538: \put(51.00,20.00){\makebox(0,0)[cc]{$t$}}
1539: \put(55.00,6.00){\makebox(0,0)[cc]{(c) Explicit Graph $G_2^{\prime}$}}
1540: \put(46.00,109.00){\circle{8.00}}
1541: \put(46.00,105.00){\vector(0,-1){11.00}}
1542: \put(46.00,109.00){\makebox(0,0)[cc]{$s$}}
1543: \bezier{484}(22.00,20.00)(-14.00,70.00)(42.00,90.00)
1544: \put(39.00,89.00){\vector(3,1){3.00}}
1545: \put(176.00,106.00){\circle{8.00}}
1546: \put(156.00,71.00){\circle{8.25}}
1547: \put(156.00,36.00){\circle{8.00}}
1548: \put(181.00,36.00){\circle{8.00}}
1549: \put(176.00,102.00){\vector(-2,-3){18.00}}
1550: \put(156.00,67.00){\vector(0,-1){27.00}}
1551: \put(156.00,67.00){\vector(3,-4){21.00}}
1552: \put(156.00,61.00){\line(1,0){4.00}}
1553: \put(176.00,106.00){\makebox(0,0)[cc]{$n$}}
1554: \put(156.00,71.00){\makebox(0,0)[cc]{$p$}}
1555: \put(156.00,36.00){\makebox(0,0)[cc]{$x$}}
1556: \put(181.00,36.00){\makebox(0,0)[cc]{$t$}}
1557: \put(160.00,122.00){\makebox(0,0)[cc]{$M_1(n,G_1^{\prime})$ below $n$}}
1558: \put(112.00,0.00){\framebox(100.00,115.00)[cc]{}}
1559: \put(0.00,0.00){\framebox(112.00,115.00)[cc]{}}
1560: \put(112.00,115.00){\framebox(100.00,115.00)[cc]{}}
1561: \put(0.00,115.00){\framebox(112.00,115.00)[cc]{}}
1562: \end{picture}
1563: \end{figure}
1564:
1565:
1566: \subsubsection{Classification of Nodes in Explicit Graphs}
1567:
1568: The nodes in an explicit graph are classified into two types depending on the type of MESs below them.
1569:
1570: \begin{defi}
1571: In $G^{\prime}$, a node is called non-type-III if it has a
1572: non-type-III MES (or psg) below it, otherwise it is called type-III.
1573: \end{defi}
1574:
1575: For example, in Figures \ref{fig40}(a) and \ref{fig40}(c), both $p$ and $n$ remain non-type-III before and after expansion of $x$. In both $G_1^{\prime}$ and $G_2^{\prime}$, $n$ has a non-type-III MES through $q$, while $p$ has a non-type-III MES through $\{x,t\}$ in $G_1^{\prime}$ and through $\{x,t,n,p\}$ in $G_2^{\prime}$.
1576:
1577:
1578: \subsubsection {Properties of MESs in Explicit Graphs}
1579:
1580: The MESs in an explicit graph follow the similar properties as do MESs in an implicit graph.
1581:
1582: \begin{lem} \label{lem03} If $M(n,G^{\prime})$ is of non-type-III, then for every $p \in M(n,G^{\prime})$, the sub-MES $\xi(p,M(n,G^{\prime}))$ is also an MES and it is of non-type-III.
1583: \end{lem}
1584:
1585: {\bf Proof.} Clear. \qed
1586:
1587: \begin{lem} \label{lem04} Let $M$ be any MES below a node
1588: $n \in G^{\prime}$. Now if $M$ is of non-type-III, then every $p \in M$ is of non-type-III.
1589: \end{lem}
1590:
1591: {\bf Proof.} Clear from Lemma \ref{lem03}. \qed
1592:
1593:
1594: \begin{lem} \label{lem05} Let $\chi_1$ and $\chi_2$ be two acyclic AND/OR graphs
1595: with node and edge sets $V(\chi_1)$, $E(\chi_1)$ and $V(\chi_2)$, $E(\chi_2)$ respectively. Let $V(\chi_1) \cap V(\chi_2) = \phi$. Now, if edges \{$e_1$, $e_2$, \ldots , $e_n$\} are added from nodes in
1596: $V(\chi_1)$ to nodes in $V(\chi_2)$, then the resulting graph with
1597: $V = V(\chi_1) \cup V(\chi_2)$, $E = E(\chi_1) \cup E(\chi_2)
1598: \cup \{e_1, e_2, \ldots ,e_n\}$ is acyclic. \\
1599: \end{lem}
1600:
1601: Proof. Clear. \qed\\
1602:
1603: \begin{th} \label{thm25} {\bf Sub-problem Composition Theorem for Explicit Graphs.} Let $G^{\prime}$ be an explicit
1604: AND/OR graph and n be any internal node in $G^{\prime}$. Now, \\
1605: \newcounter{rom_ctr13}
1606: \begin{list}{\roman{rom_ctr13})}{\usecounter{rom_ctr13}}
1607: \item If $n$ is an OR node, then:
1608:
1609: (a) $n$ is of non-type-III iff at least one child of $n$ is of non-type-III;
1610:
1611: (b) $n$ is of type-III iff no child of $n$ is of non-type-III.
1612:
1613: \item If $n$ is an AND node, then:
1614:
1615: (a)$n$ is of non-type-III iff every child of $n$ is of non-type-III
1616:
1617: (b) $n$ is of type-III iff at least one child of $n$ is of type-III.
1618: \end{list}
1619: \end{th}
1620:
1621:
1622: {\bf Proof.}
1623: \newcounter{rom_ctr71}
1624: \begin{list}{\roman{rom_ctr71})}{\usecounter{rom_ctr71}}
1625:
1626: \item ({\it a})
1627:
1628: $\Longrightarrow$\\
1629: Let $p$ be a child of $n$ in $G^{\prime}$. We assume $p$ is of non-type-III, and
1630: $M(p)$ is a non-type-III MES below $p$. We will show that $n$ is of non-type-III.\\
1631: \underline{Case I: $n \notin M(p)$:} Let $M(n)$ be the MES, created by joining the arc $(n,p)$ to $M(p)$.
1632: Then $Z_{M(n)} = Z_{M(p)} \subseteq Z_{G^{\prime}}$.
1633: Then $n$ is also of non-type-III. \\
1634: \underline{Case II: $n \in M(p)$:} Since $M(p)$ is of non-type-III, by Lemma \ref{lem04} $n$ must be of non-type-III.
1635: \\
1636: $\Longleftarrow$\\
1637: Since it is given that $n$ is of non-type-III, there must be a non-type-III
1638: MES $M(n)$ below $n$. Let $p$ be the child of $n$ which belongs to $M(n)$.
1639: Clearly $p$ is of non-type-III (by Lemma \ref{lem04}).
1640:
1641: ({\it b}) Clear from ({\it a}).
1642:
1643: \item ({\it a})
1644:
1645: $\Longrightarrow$\\
1646:
1647: Every child of $n$ is of non-type-III. We have to show that $n$ is of non-type-III.
1648:
1649: Let $p_1, p_2, ... , p_k, k \ge 2$, be the children of $n$. Let
1650: $M(p_j)$ be a non-type-III MES below $p_j$. Clearly, $n \notin M(p_j) \forall j$, otherwise $M(p_j)$ would contain a cycle (since $n$ is an AND node and must include its child $p_j$ in any MES), thereby violating the acyclicity property of an MES.\\
1651:
1652: Now, for proving that $n$ is of non-type-III, it is sufficient to construct a
1653: non-type-III MES $M(n)$ from the given non-type-III MESs $M(p_j)$ and the arcs ($n$,$p_j$), $1 \leq j \leq k$.\\
1654:
1655: We construct $M(n)$ by first taking the nodes and arcs of $M(p_j)$s as follows. First, the MES $M(p_1)$ is taken in its entirety. We call this $Q_1$. Next, we augment $Q_1$ with nodes and arcs from $M(p_2)$. The selection of nodes and arcs from $M(p_2)$ is a recursive process that starts at $p_2$. If $p_2 \in Q_1$, we stop there and there is nothing to select from $M(p_2)$. Otherwise, we traverse the MES $M(p_2)$ in a depth-first manner, selecting nodes and arcs on the way, until we arrive either at a tip node of $M(p_2)$ or at a node $q$ in $Q_1$. In the former case, the selection process stops by selecting the tip node of $M(p_2)$; in the latter case, it stops at the node $q$ in $Q_1$. The nodes and arcs that are selected from $M(p_2)$ are added with $Q_1$, to form an augmented graph $Q_2$. Next, we take $Q_2$ and add nodes and arcs from $M(p_3)$ in a similar manner, to form $Q_3$. The process goes on like this, until we have considered each of the $M(p_j)$s and come up with a graph $Q_k$. We now present the procedure for the said construction of $Q_k$. In this construction, $V$ denotes the set of all nodes, and $E$ the set of all
1656: directed arcs of an AND/OR graph.
1657:
1658: \begin{tabbing}
1659:
1660: tex\=mor\=stilltex\= \kill
1661:
1662: {\bf Procedure Construct\_Qk} \\
1663:
1664: 1. Set $Q_1 = M(p_1)$ (i.e. $V(Q_1) = V(M(p_1))$ and $E(Q_1) = E(M(p_1))$); \\
1665:
1666: 2. For $j$ = 2 to $k$, construct $Q_j$ as follows:\\
1667: \>Initialize: $V(Q_j) = V(Q_{j-1})$ and $E(Q_j) = E(Q_{j-1})$;\\
1668: \>Call Add($p_j$);\\ \\
1669:
1670: {\bf Procedure Add($x$)} \\
1671:
1672: If $x \notin V(Q_j)$ \\
1673: \> $V(Q_j) = V(Q_j) \cup \{x\}$; \\
1674: \> If $x$ has no children in $M(p_j)$ \\
1675: \>\> Return; \\
1676: \> Else \\
1677: \> For every child $y$ of $x$ in $M(p_j)$ \\
1678: \> Begin \\
1679: \>\> $E(Q_j) = E(Q_j) \cup (x,y)$; \\
1680: \>\> Call Add($y$); \\
1681: \> End \\
1682: Return; \\
1683:
1684: \end{tabbing}
1685:
1686: Finally, we add the node $n$, and each of the arcs ($n$,$p_j$), $1 \leq j \leq k$, to $Q_k$, which gives us a structure called $M(n)$. We claim that $M(n)$ is a non-type-III MES below $n$. This is proved through the following three propositions.
1687:
1688: \vspace{10pt}
1689:
1690: \underline{{\bf Proposition 1.}} $Q_j$ is acyclic, $1 \leq j \leq k$.
1691:
1692: The proof is by induction on $j$. For $j=1$, we have $Q_1 = M(p_1)$ which is an MES and must be acyclic.
1693:
1694: Let us assume that all the graphs up to $Q_{j-1}$ are acyclic. Now $Q_j$ is constructed from $Q_{j-1}$ and $M(p_j)$ which are both acyclic; moreover we do not include any arc from a node in $V(Q_{j-1})$ to a node in $V(M(p_j)) \setminus V(Q_{j-1})$. Thus it follows from Lemma \ref{lem05} that $Q_j$ is acyclic.
1695:
1696: Hence $Q_k$ is acyclic.
1697:
1698: \vspace{10pt}
1699:
1700: \underline{{\bf Proposition 2.}} For every node $m$ in $Q_k$, $Q_k$ contains a non-type-III MES below $m$.
1701:
1702: The proof is by double induction, first on $j$ and then on the nodes of $Q_j$.
1703:
1704: For $j=1$, the proposition holds for all nodes of $Q_1$, by Lemma \ref{lem03}.
1705:
1706: Next we assume that the proposition holds up to $Q_{j-1}$. We show that it also holds for $Q_j$.
1707:
1708: Let $V^{\prime} = V(Q_j) \setminus V(Q_{j-1})$. Let $m_1, m_2, \ldots, m_l=p_j$ be the nodes of $V^{\prime}$, sorted topologically.
1709:
1710: \underline{$m_1$ is a tip node:} Then the MES below $m_1$ is $m_1$ itself and is clearly of non-type-III.
1711:
1712: \underline{$m_1$ is not a tip node:} The children of $m_1$ in $M(p_j)$ (1 child if $m_1$ is OR node, all children if $m_1$ is AND node) must belong to $Q_{j-1}$. Since by hypothesis, every node in $Q_{j-1}$ has a non-type-III MES below it, and $Q_j$ is acyclic, it is clear that $m_1$ will have a non-type-III MES below it via its children in $Q_{j-1}$.
1713:
1714: Thus the proposition holds for $m_1$. Let us assume that it holds for $m_i$, $i \geq 1$. We would show that it holds for $m_{i+1}$.
1715:
1716: \underline{$m_{i+1}$ is a tip node:} Clear.
1717:
1718: \underline{$m_{i+1}$ is not a tip node:} Since by hypothesis, every child of $m_{i+1}$ in $Q_j$ has a non-type-III MES below it, and $Q_j$ is acyclic, it is clear that $m_{i+1}$ will have a non-type-III MES below it via its children in $Q_j$.
1719:
1720: Thus the proposition holds for every node in $Q_j$.
1721:
1722: \vspace{10pt}
1723:
1724: \underline{{\bf Proposition 3.}} $M(n)$ is a non-type-III MES.
1725:
1726: Observe that, $M(n)$ has been obtained by using the last $Q_j$, i.e. $Q_k$ and adding the node $n$ to it via the arcs ($n$,$p_j$), $1 \leq j \leq k$. Clearly, as $n \notin M(P_j) \forall j$, this resulting structure is acyclic. Thus $n$ will have a non-type-III MES through its children $p_1, p_2, \ldots, p_k$.
1727:
1728: This proves that $n$ is a non-type-III node.\\
1729:
1730: $\Longleftarrow$\\
1731: $n$ is a non-type-III node. Let $M(n)$ be a non-type-III MES below it, and $p_1, p_2, \ldots, p_k$ be the children of $n$. Then by Lemma \ref{lem03}, the sub-MES below every $p_j$ is a non-type-III MES, and every $p_j$ must be of non-type-III.
1732:
1733: ({\it b}) Clear from ({\it a}). \qed\\
1734:
1735: \end{list}
1736:
1737:
1738: The importance of the Sub-problem Composition Theorems lies in the fact that they express
1739: the general notion of obtaining the solution graph at a node by using the solution graphs
1740: of its children; the fact that this can be done at all, even in the presence of cycles as proved in the theorems above, will be used in our correctness proofs of the algorithms S1 and S2. Because of their fundamental importance, we illustrate the construction process used in the proof (routine Construct\_Qk) in Figure \ref{fig60} below.
1741:
1742: \unitlength=0.45mm
1743: \special{em:linewidth 0.4pt}
1744: \linethickness{0.4pt}
1745: \begin{figure}
1746: \centering
1747: \caption{Illustration of the Sub-problem Composition Theorem}
1748: \label{fig60}
1749: \begin{picture}(330.00,133.00)
1750: \put(33.00,124.00){\circle{10.00}}
1751: \put(33.00,124.00){\makebox(0,0)[cc]{$n$}}
1752: \put(7.00,95.00){\circle{10.20}}
1753: \put(57.00,95.00){\circle{10.00}}
1754: \put(57.00,95.00){\makebox(0,0)[cc]{$p_2$}}
1755: \put(7.00,95.00){\makebox(0,0)[cc]{$p_1$}}
1756: \put(7.00,60.00){\circle{10.00}}
1757: \put(57.00,60.00){\circle{10.00}}
1758: \put(32.00,67.00){\circle{10.00}}
1759: \put(33.00,20.00){\circle{10.00}}
1760: \put(7.00,90.00){\vector(0,-1){25.00}}
1761: \put(33.00,119.00){\vector(-4,-3){26.00}}
1762: \put(33.00,119.00){\vector(1,-1){21.00}}
1763: \put(28.00,115.00){\line(1,0){9.00}}
1764: \put(57.00,90.00){\vector(0,-1){25.00}}
1765: \put(57.00,90.00){\vector(-2,-1){49.00}}
1766: \put(7.00,90.00){\vector(2,-1){50.00}}
1767: \bezier{208}(53.00,56.00)(34.00,41.00)(11.00,56.00)
1768: \put(7.00,55.00){\vector(3,-4){23.33}}
1769: \put(57.00,55.00){\vector(-2,-3){20.67}}
1770: \put(7.00,60.00){\makebox(0,0)[cc]{$x$}}
1771: \put(32.00,67.00){\makebox(0,0)[cc]{$y$}}
1772: \put(57.00,60.00){\makebox(0,0)[cc]{$z$}}
1773: \put(33.00,20.00){\makebox(0,0)[cc]{$t$}}
1774: \bezier{76}(12.00,60.00)(17.00,67.00)(27.00,67.00)
1775: \put(25.00,67.00){\vector(1,0){2.00}}
1776: \put(12.00,55.00){\vector(-1,1){1.00}}
1777: \bezier{68}(37.00,67.00)(46.00,67.00)(52.00,61.00)
1778: \put(50.00,63.00){\vector(2,-1){2.00}}
1779: \put(32.00,4.00){\makebox(0,0)[cc]{(a) Part of $G^{\prime}$}}
1780: \put(72.00,95.00){\circle{10.20}}
1781: \put(72.00,95.00){\makebox(0,0)[cc]{$p_1$}}
1782: \put(72.00,60.00){\circle{10.00}}
1783: \put(122.00,60.00){\circle{10.00}}
1784: \put(98.00,20.00){\circle{10.00}}
1785: \put(72.00,90.00){\vector(2,-1){50.00}}
1786: \bezier{208}(118.00,56.00)(99.00,41.00)(76.00,56.00)
1787: \put(72.00,55.00){\vector(3,-4){23.33}}
1788: \put(72.00,60.00){\makebox(0,0)[cc]{$x$}}
1789: \put(122.00,60.00){\makebox(0,0)[cc]{$z$}}
1790: \put(98.00,20.00){\makebox(0,0)[cc]{$t$}}
1791: \put(77.00,55.00){\vector(-1,1){1.00}}
1792: \put(95.00,4.00){\makebox(0,0)[cc]{(b) $M(p_1)$}}
1793: \put(188.00,95.00){\circle{10.00}}
1794: \put(188.00,95.00){\makebox(0,0)[cc]{$p_2$}}
1795: \put(138.00,60.00){\circle{10.00}}
1796: \put(188.00,60.00){\circle{10.00}}
1797: \put(163.00,67.00){\circle{10.00}}
1798: \put(164.00,20.00){\circle{10.00}}
1799: \put(188.00,90.00){\vector(-2,-1){49.00}}
1800: \put(188.00,55.00){\vector(-2,-3){20.67}}
1801: \put(138.00,60.00){\makebox(0,0)[cc]{$x$}}
1802: \put(163.00,67.00){\makebox(0,0)[cc]{$y$}}
1803: \put(188.00,60.00){\makebox(0,0)[cc]{$z$}}
1804: \put(164.00,20.00){\makebox(0,0)[cc]{$t$}}
1805: \bezier{76}(143.00,60.00)(148.00,67.00)(158.00,67.00)
1806: \put(156.00,67.00){\vector(1,0){2.00}}
1807: \bezier{68}(168.00,67.00)(177.00,67.00)(183.00,61.00)
1808: \put(181.00,63.00){\vector(2,-1){2.00}}
1809: \put(165.00,4.00){\makebox(0,0)[cc]{(c) $M(p_2)$}}
1810: \put(208.00,94.00){\circle{10.20}}
1811: \put(258.00,94.00){\circle{10.00}}
1812: \put(258.00,94.00){\makebox(0,0)[cc]{$p_2$}}
1813: \put(208.00,94.00){\makebox(0,0)[cc]{$p_1$}}
1814: \put(208.00,59.00){\circle{10.00}}
1815: \put(258.00,59.00){\circle{10.00}}
1816: \put(234.00,19.00){\circle{10.00}}
1817: \put(258.00,89.00){\vector(-2,-1){49.00}}
1818: \put(208.00,89.00){\vector(2,-1){50.00}}
1819: \bezier{208}(254.00,55.00)(235.00,40.00)(212.00,55.00)
1820: \put(208.00,54.00){\vector(3,-4){23.33}}
1821: \put(208.00,59.00){\makebox(0,0)[cc]{$x$}}
1822: \put(258.00,59.00){\makebox(0,0)[cc]{$z$}}
1823: \put(234.00,19.00){\makebox(0,0)[cc]{$t$}}
1824: \put(213.00,54.00){\vector(-1,1){1.00}}
1825: \put(230.00,4.00){\makebox(0,0)[cc]{(d) $Q_2$}}
1826: \put(0.00,0.00){\framebox(66.00,133.00)[cc]{}}
1827: \put(66.00,0.00){\framebox(64.00,133.00)[cc]{}}
1828: \put(130.00,0.00){\framebox(70.00,133.00)[cc]{}}
1829: \put(200.00,0.00){\framebox(65.00,133.00)[cc]{}}
1830: \put(299.00,123.00){\circle{10.00}}
1831: \put(299.00,123.00){\makebox(0,0)[cc]{$n$}}
1832: \put(273.00,94.00){\circle{10.20}}
1833: \put(323.00,94.00){\circle{10.00}}
1834: \put(323.00,94.00){\makebox(0,0)[cc]{$p_2$}}
1835: \put(273.00,94.00){\makebox(0,0)[cc]{$p_1$}}
1836: \put(273.00,59.00){\circle{10.00}}
1837: \put(323.00,59.00){\circle{10.00}}
1838: \put(299.00,19.00){\circle{10.00}}
1839: \put(299.00,118.00){\vector(-4,-3){26.00}}
1840: \put(299.00,118.00){\vector(1,-1){21.00}}
1841: \put(294.00,114.00){\line(1,0){9.00}}
1842: \put(323.00,89.00){\vector(-2,-1){49.00}}
1843: \put(273.00,89.00){\vector(2,-1){50.00}}
1844: \bezier{208}(319.00,55.00)(300.00,40.00)(277.00,55.00)
1845: \put(273.00,54.00){\vector(3,-4){23.33}}
1846: \put(273.00,59.00){\makebox(0,0)[cc]{$x$}}
1847: \put(323.00,59.00){\makebox(0,0)[cc]{$z$}}
1848: \put(299.00,19.00){\makebox(0,0)[cc]{$t$}}
1849: \put(278.00,54.00){\vector(-1,1){1.00}}
1850: \put(295.00,4.00){\makebox(0,0)[cc]{(e) $M(n)$}}
1851: \put(265.00,0.00){\framebox(65.00,133.00)[cc]{}}
1852: \end{picture}
1853: \end{figure}
1854:
1855: Consider the graph shown in Figure \ref{fig60}(a). Assume that it is a part of an explicit graph $G^{\prime}$ (not shown fully) below a node $n$ in it. Now two MESs below $p_1$ and $p_2$ are shown in Figure \ref{fig60}(b) and \ref{fig60}(c) respectively. The result of combining these two MESs to form an MES below $n$ using the
1856: Construct\_Qk routine is shown in Figure \ref{fig60}(e). Note that:
1857:
1858: (\textit{i}) Although $M(p_1)$ and $M(p_2)$ taken together create a cycle, the construction of $M(n)$ is such that when $p_2$ is attempted to be included in it, the routine finds that $p_2$'s child $x$ is already there from $p_1$ in the previous construction. Hence, it retains the MES below $x$ as the MES below $p_2$ also. This strategy helps in avoiding the cycle between the MES of $p_1$ and the MES of $p_2$.
1859:
1860: (\textit{ii}) While constructing $M(n)$ from the MESs of its children $p_i$, not all nodes from an MES below a child $p_i$ need be retained in the MES below $n$. For instance, in Figure \ref{fig60}(c) $y$ is a node in MES $M(p_2)$, but $y$ does not appear in the combined MES $M(n)$. However, as we've seen in the proof of the theorem, this does not introduce any error in the construction.
1861:
1862: \subsubsection{Computation of Costs for Explicit-graph MESs}
1863:
1864: The costs of an MES in an explicit graph are defined in the same way as they are defined in the implicit graph.
1865:
1866: \begin{defi} \label{betaexpl} Given any explicit graph $G^{\prime}$, for any MES
1867: $M(n,G^{\prime})$ we denote the cost of a node $u$ in $M(n,G^{\prime})$ by
1868: $\beta(u, M(n,G^{\prime}))$. We define this cost function $\beta(u, M(n,G^{\prime}))$ as follows:
1869:
1870: \begin{tabbing}
1871: aaaaaaaaaaaa\=aaa\= \kill
1872: $\beta(u,M(n,G^{\prime}))$ \\
1873: = $0$ if $u \in T$; \\
1874: = $\infty$ if $u \in NT$; \\
1875: = $\hat{h}(u)$ if $u \in Z_{M(n,G^{\prime})} \bigwedge u \not\in (T \bigcup NT)$, $\hat{h}(u)$ being the heuristic estimate at node $u$;\\
1876: = $c(u,w) + \beta(w,M(n,G^{\prime}))$, if $u$ is an OR node and $w$ is the child of $u$ in $M(n,G^{\prime})$; \\
1877: = $\sum_{w \in \Gamma(u,M(n,G^{\prime}))} \{c(u,w) + \beta(w,M(n,G^{\prime})) \}$ if $u$ is an AND node.\\
1878:
1879: \\
1880:
1881: $\beta(u,M(n,G^{\prime}))$ is undefined if $u \in Z_{M(n,G^{\prime})} \setminus Z_{G^{\prime}}$.
1882:
1883: \end{tabbing}
1884: \end{defi}
1885:
1886: \begin{defi} Let $M_{1}(n,G^{\prime})$, $M_{2}(n,G^{\prime})$, $\ldots$,
1887: $M_{k}(n,G^{\prime})$ be the psgs below a node $n$ in an explicit graph
1888: $G^{\prime}$. Then $h^{\prime}(n)$, the cost of a minimal-cost psg below $n$ =
1889: $min_{1 \le i \le k} \{\beta(n,M_{i}(n,G^{\prime}))\}$; if there are no psgs below $n$ in $G^{\prime}$, $h^{\prime}(n)$ is undefined.
1890: \end{defi}
1891:
1892: \linethickness{0.4pt}
1893: \begin{figure}
1894: \centering
1895: \caption{Explicit graphs from $G_{2}$ (Figure \ref{fig70}(b))}
1896: \label{fig90}
1897: \begin{picture}(204.00,116.00)
1898: \put(46.00,-0.33){\line(0,1){0.33}}
1899: \put(54.00,92.00){\circle{10.00}}
1900: \put(28.00,64.00){\circle{10.00}}
1901: \put(84.00,64.00){\circle{10.00}}
1902: \put(54.00,33.00){\circle{10.00}}
1903: \put(30.00,60.00){\vector(3,-4){18.67}}
1904: \put(33.00,64.00){\vector(1,0){16.00}}
1905: \put(54.00,87.00){\vector(-3,-2){26.00}}
1906: \put(54.00,87.00){\vector(3,-2){28.00}}
1907: \put(54.00,33.00){\makebox(0,0)[cc]{$r$}}
1908: \put(84.00,64.00){\makebox(0,0)[cc]{$q$}}
1909: \put(54.00,44.00){\makebox(0,0)[cc]{(2)}}
1910: \put(43.00,50.00){\makebox(0,0)[cc]{1}}
1911: \put(28.00,64.00){\makebox(0,0)[cc]{$p$}}
1912: \put(16.00,64.00){\makebox(0,0)[cc]{(5)}}
1913: \put(41.00,69.00){\makebox(0,0)[cc]{5}}
1914: \put(54.00,64.00){\makebox(0,0)[cc]{$t_{1}$}}
1915: \put(37.00,81.00){\makebox(0,0)[cc]{1}}
1916: \put(71.00,81.00){\makebox(0,0)[cc]{1}}
1917: \put(54.00,92.00){\makebox(0,0)[cc]{$s$}}
1918: \put(67.00,95.00){\makebox(0,0)[cc]{(0)}}
1919: \put(98.00,64.00){\makebox(0,0)[cc]{(5)}}
1920: \put(155.00,108.00){\circle{10.00}}
1921: \put(129.00,80.00){\circle{10.00}}
1922: \put(185.00,80.00){\circle{10.00}}
1923: \put(155.00,49.00){\circle{10.00}}
1924: \put(155.00,44.00){\vector(0,-1){23.00}}
1925: \put(131.00,76.00){\vector(3,-4){18.67}}
1926: \put(134.00,80.00){\vector(1,0){16.00}}
1927: \put(155.00,103.00){\vector(-3,-2){26.00}}
1928: \put(155.00,103.00){\vector(3,-2){28.00}}
1929: \bezier{236}(152.00,45.00)(122.00,47.00)(126.00,76.00)
1930: \put(126.00,70.00){\vector(0,1){6.00}}
1931: \put(150.00,32.00){\makebox(0,0)[cc]{10}}
1932: \put(155.00,49.00){\makebox(0,0)[cc]{$r$}}
1933: \put(185.00,80.00){\makebox(0,0)[cc]{$q$}}
1934: \put(155.00,58.00){\makebox(0,0)[cc]{(2)}}
1935: \put(144.00,66.00){\makebox(0,0)[cc]{1}}
1936: \put(128.00,50.00){\makebox(0,0)[cc]{1}}
1937: \put(129.00,80.00){\makebox(0,0)[cc]{$p$}}
1938: \put(117.00,80.00){\makebox(0,0)[cc]{(5)}}
1939: \put(142.00,85.00){\makebox(0,0)[cc]{5}}
1940: \put(155.00,80.00){\makebox(0,0)[cc]{$t_{1}$}}
1941: \put(138.00,97.00){\makebox(0,0)[cc]{1}}
1942: \put(172.00,97.00){\makebox(0,0)[cc]{1}}
1943: \put(155.00,108.00){\makebox(0,0)[cc]{$s$}}
1944: \put(168.00,108.00){\makebox(0,0)[cc]{(0)}}
1945: \put(54.00,5.00){\makebox(0,0)[cc]{(a) $G_{1}^{\prime}$}}
1946: \put(150.00,5.00){\makebox(0,0)[cc]{(b) $G_{2}^{\prime}$}}
1947: \put(48.00,83.00){\line(1,0){12.00}}
1948: \put(149.00,99.00){\line(1,0){12.00}}
1949: \put(139.00,80.00){\line(-1,-4){2.67}}
1950: \put(196.00,84.00){\makebox(0,0)[ct]{(5)}}
1951: \put(150.00,12.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
1952: \put(155.00,37.00){\line(-5,6){7.00}}
1953: \put(151.00,76.00){\framebox(8.00,8.00)[cc]{}}
1954: \put(49.00,60.00){\framebox(9.00,8.00)[cc]{}}
1955: \put(41.00,64.00){\line(-2,-5){4.67}}
1956: \put(108.00,0.00){\framebox(96.00,116.00)[cc]{}}
1957: \put(0.00,0.00){\framebox(108.00,116.00)[cc]{}}
1958: \end{picture}
1959: \end{figure}
1960:
1961:
1962: Thus in Figure \ref{fig90}(a) $h^{\prime}(r) = 2$, $h^{\prime}(t_1) = 0$, $h^{\prime}(q) = 5$, $h^{\prime}(p) = 8$ and $h^{\prime}(s) = 15$, while in Figure \ref{fig90}(b), $h^{\prime}(r)$, $h^{\prime}(p)$ and $h^{\prime}(s)$
1963: are undefined as there are no psgs below them in $G_{2}^{\prime}$.
1964:
1965:
1966: \section{\bf Algorithm S1}
1967:
1968: We now present a best-first bottom-up algorithm, S1, that operates on the full
1969: implicit graph $G$. S1 assumes that $G$ contains
1970: only finitely many nodes and arcs. The set of terminal and nonterminal leaves of $G$,
1971: as well as the problem composition and decomposition rules, are needed as inputs to
1972: S1. It also
1973: maintains the $h$-value of a node to represent the currently known minimum cost of
1974: solving the node. S1 uses two lists OPEN and CLOSED. S1 starts by putting all the leaf nodes of $G$ in OPEN with an $h$-value of $0$ or $\infty$
1975: according as the leaf node is terminal or non-terminal. S1 then proceeds by removing a node
1976: from OPEN
1977: that has the minimum $h$-value. Whenever a node is removed from OPEN, it is put into CLOSED, and
1978: all its parents are obtained by applying inverse operators. These parents are checked for possible
1979: inclusion in OPEN and their $h$-values are updated, if
1980: necessary,
1981: in an additive manner.
1982:
1983: The point that needs
1984: special mention here is the treatment of AND nodes. An AND node may be removed
1985: from OPEN only if all of its children have already entered CLOSED. This is ensured
1986: by using a label "eligible" to identify a subset of nodes in OPEN. The nodes
1987: that are eligible are either OR nodes, or AND nodes with all their children in
1988: CLOSED.
1989:
1990: S1 continues in this manner until the start node is
1991: removed from
1992: OPEN or it is evident that the start node is of type-III. If the start node is not of type-III then $h(s)$ equals the cost of a minimal-cost solution graph and is outputted by S1. Note that, by appropriately maintaining pointers, S1 can trace the solution graph whose cost is outputted by it. For
1993: simplicity, those
1994: details have been left out in this paper.
1995:
1996:
1997: \subsection{\bf Algorithm S1}
1998:
1999: \begin{list}%
2000: {{\bf S1.\arabic{S1ct1}}}{\usecounter{S1ct1}}
2001:
2002: \item Create a list, OPEN, and set $OPEN = Z_{G}$ (leaf nodes of $G$).
2003: For each $n$ in OPEN, label $n$ as "eligible". Now,
2004: if $n$ is a terminal node, set $h(n) = 0$; else set $h(n) = \infty$.
2005:
2006: \item Create a list, CLOSED, that is initially empty.
2007: \item While (OPEN contains an eligible node) do
2008:
2009: { \begin{list}%
2010: {{\bf S1.\arabic{S1ct1}.\arabic{S1ct2}}}{\usecounter{S1ct2}}
2011:
2012: \item Find an eligible node $n$ from OPEN which has the minimum $h$-value.
2013: (Resolve ties arbitrarily, but always in favour of the start node $s$.)
2014: Put $n$ in CLOSED.
2015: \item If $n = s$ then
2016: if $h(s) = \infty$, terminate with FAILURE;
2017: else output $h(s)$ and terminate with SUCCESS.
2018: \item Let $p_{1},p_{2},\ldots,p_{k}$ be the immediate predecessors of $n$ in $G$.
2019: For each $p_{i}$, $1 \le i \le k$, do the following:
2020:
2021: \underline{{\bf Case I:} $p_{i}$ is an OR node}
2022:
2023: If $p_{i}$ is not already in OPEN or CLOSED, set $h(p_{i}) = h(n) +
2024: c(p_{i},n)$.
2025: Put $p_{i}$ in OPEN and label $p_{i}$ as "eligible";
2026: elseif $p_{i}$ is already in OPEN with $h(p_{i}) > h(n) + c(p_{i},n)$ then set
2027: $h(p_{i}) = h(n) + c(p_{i},n)$.
2028:
2029: \underline{{\bf Case II:} $p_{i}$ is an AND node}
2030:
2031: If $p_{i}$ is not already present in OPEN, put it in OPEN
2032: and set $h(p_{i}) = c(p_{i},n) + h(n)$;
2033: else set $h(p_{i}) = h(p_{i}) + c(p_{i},n) + h(n)$.
2034:
2035: If all children of $p_{i}$ are in CLOSED, label $p_{i}$ as "eligible".
2036:
2037: \end{list}
2038: }
2039: \item Terminate with FAILURE. $\Box$
2040: \end{list}
2041:
2042:
2043: \subsection{\bf Working of S1}
2044:
2045: We now illustrate the working of algorithm S1. S1 is an uninformed search algorithm. Its working is shown on the implicit graph $G$
2046: of Figure \ref{fig70}(a). In the figure, the arcs are labelled with their costs and the heuristic values of nodes are
2047: shown in parenthesis. However, these heuristic values are not for use by S1. They are to be used by algorithm S2 which is presented later.
2048: The iteration-by-iteration
2049: working of S1 is presented in Table 1. Nodes in CLOSED are shown inside a square box. Among the nodes in OPEN, the non-underlined nodes are those which are marked eligible, and underlined nodes are those which are yet to become eligible. The $h$-value of each node is superscripted. The node
2050: $n$ shown in the second column is the node selected by S1 from OPEN
2051: in each iteration.
2052:
2053: In step S1.1, OPEN is created with nodes $t_1$, $t_2$ and $y$ having $h$-values $0$, $0$ and $\infty$ respectively. All these nodes are marked "eligible" in OPEN. Then
2054: in the first iteration $t_{1}$ is selected from OPEN and put in CLOSED with $h(t_1) = 0$, and
2055: its parent $p$ is inserted into OPEN with $h(p) = 5$. The snapshots of OPEN and CLOSED at the end of iteration 1 are shown in the
2056: first row with $t_{1}$ inside a square box.
2057: In subsequent iterations $t_2$, $p$, $r$, $q$ and $s$ are selected from OPEN, one in each iteration, and put into CLOSED.
2058: Finally, S1
2059: terminates by finding a minimal-cost solution
2060: of cost 14 of the solution graph $s, p, q, r, t_{1}$.
2061:
2062:
2063: \renewcommand{\arraystretch}{1.6}
2064: \setlength\fboxsep{0.05cm}
2065:
2066: \begin{table}
2067: \begin{centering}
2068: \begin{tabular}{||l|l|l||} \hline
2069: Itn. & $n$ & Nodes in OPEN and CLOSED \\
2070: No. & & format $n^{h(n)}$ \\ \hline
2071:
2072: 1. & $t_{1}$ & \fbox{$t_{1}^{0}$}, $t_{2}^{0}$, $y^{\infty}$, $p^{5}$ \\ \hline
2073: 2. & $t_{2}$ & \fbox{$t_{1}^{0}$}, \fbox{$t_{2}^{0}$}, $p^{5}$, $y^{\infty}$, $r^{10}$, \underline{$x^{1}$} \\ \hline
2074: 3. & $p$ & \fbox{$t_{1}^{0}$}, \fbox{$t_{2}^{0}$}, \fbox{$p^{5}$}, $r^{6}$,
2075: $\underline{x^{1}}$, $y^{\infty}$, \underline{$s^{6}$} \\ \hline
2076: 4. & $r$ & \fbox{$t_{1}^{0}$}, \fbox{$t_{2}^{0}$}, \fbox{$p^{5}$}, \fbox{$r^{6}$},
2077: $y^{\infty}$, $\underline{x^{1}}$, $\underline{s^{6}}$, $q^{7}$ \\ \hline
2078: 5. & $q$ & \fbox{$t_{1}^{0}$}, \fbox{$t_{2}^{0}$}, \fbox{$p^{5}$}, \fbox{$r^{6}$},
2079: \fbox{$q^{7}$}, $y^{\infty}$, $\underline{x^{1}}$, $s^{14}$ \\ \hline
2080: 6. & $s$ & \fbox{$t_{1}^{0}$}, \fbox{$t_{2}^{0}$}, \fbox{$p^{5}$}, \fbox{$r^{6}$},
2081: \fbox{$q^{7}$}, \fbox{$s^{14}$}, $y^{\infty}$, $\underline{x^{1}}$ \\ \hline
2082: \end{tabular}
2083: \caption{Working of S1 on the graph of Figure \ref{fig70}(a)}
2084: \end{centering}
2085: \end{table}
2086:
2087:
2088: \subsection{Analysis of S1}
2089: The following definitions will be used in proving some of the properties of S1.
2090:
2091:
2092: \begin{defi} By an {\bf iteration} of S1, we mean one complete execution
2093: of step S1.3, i.e.\ of substeps S1.3.1, S1.3.2 and S1.3.3 (unless S1 terminates at
2094: S1.3.2, in which case the iteration consists of steps S1.3.1 and S1.3.2 only).
2095: \end{defi}
2096:
2097: \begin{defi} By an {\bf instant}, we mean the time point when
2098: step S1.3 is about to be executed. Thus at instant $j$, S1.3 is executed for the
2099: $j^{th}$ time.
2100: \end{defi}
2101:
2102:
2103: \begin{defi} Let $p$ be a node in $G$,
2104: and $M(p)$ be a type-I or type-II MES below $p$. At any instant during the
2105: execution of S1, a node $n \in M(p)$ is a {\bf leading node} of $M(p)$ if
2106: ({\em i}) $n$ is in OPEN \underline{\bf and} ({\em ii}) all its successors in $M(p)$, if any, are
2107: in CLOSED.
2108: \end{defi}
2109:
2110:
2111: \begin{lem} \label{lem08} If $M(p)$ is a type-I or
2112: type-II MES below a
2113: node $p \in G$, then at any instant during the execution of S1, the following must
2114: hold:
2115:
2116: (a) If $q$ is a leading node in $M(p)$, then $q$ must be eligible in OPEN;
2117:
2118: (b) If $p \not\in CLOSED$ then there must exist
2119: at least one leading node of $M(p)$.
2120:
2121: \end{lem}
2122:
2123: {\bf Proof.}
2124: ({\em a}) Clearly, $q$ must be in OPEN, with all its successors from $M(p)$ in CLOSED
2125: (by the definition of a leading node). This makes it eligible irrespective of whether
2126: it is an AND node or an OR node.
2127:
2128:
2129: ({\em b}) We sort the nodes of $M(p)$ in topological
2130: order, based on their height values $H$ in $M(p)$
2131: (Such a topological sorting of nodes of $M(p)$ is possible, since it is
2132: an MES which is acyclic by definition).
2133: For any node $y \in M(p)$, its height
2134: $H(y)$ in $M(p)$ is defined as follows:
2135: \begin{tabbing}
2136: aaaa\=aaa\= \kill
2137: $H(y)$ \>= 0 if $y$ is a leaf node; \\
2138: \>= $\max_{1 \le i \le k} \{1 + H(y_{i}) \}$, where $y_{1}, y_{2}, ..., y_{k}$
2139: are children of $y$ in $M(p)$.
2140: \end{tabbing}
2141:
2142: Let the sorted list, in descending order of $H$-values,
2143: be called $L$, and let a
2144: sublist of $L$ be $L^{\prime} = L \setminus CLOSED$,
2145: and let $x$ be the rightmost node
2146: in $L^{\prime}$.
2147:
2148: If $x$ is a leaf node, it is clearly a leading node of $M(p)$.
2149:
2150: If $x$ is an internal node in $M(p)$, all its successors are in CLOSED
2151: (otherwise
2152: $x$ could not be the rightmost node in $L^{\prime}$).
2153: Also, $x$ must be in OPEN, as
2154: ({\em i}) $x \not\in CLOSED$, and
2155: ({\em ii}) all successors of $x$ in $M(p)$ are in CLOSED.
2156: Hence $x$ must be a leading node of $M(p)$. \qed\\
2157:
2158: \begin{rem}
2159: \end{rem}
2160: If $q \in M(p)$ is eligible in OPEN then $q$ need not be a leading node of $M(p)$.
2161: This can clearly be illustrated from the following example.
2162: For the implicit graph $G$ shown
2163: in Figure \ref{fig100}(a), we consider the MES shown in Figure \ref{fig100}(b).
2164: After the first two instants of S1, $t_{2}$ and $t_{1}$
2165: have travelled to CLOSED. However,
2166: although $q \in M(p)$ is eligible, it is not a leading node
2167: in $M(p)$. Here $x$ and $r$
2168: are leading nodes in $M(p)$.
2169:
2170: \linethickness{0.4pt}
2171: \begin{figure}
2172: \centering
2173: \caption{Illustration of Leading node}
2174: \label{fig100}
2175: \begin{picture}(168.00,112.00)
2176: \put(53.00,104.00){\circle{8.00}}
2177: \put(13.00,58.00){\circle{8.00}}
2178: \put(46.00,58.00){\circle{8.00}}
2179: \put(32.00,35.00){\circle{8.00}}
2180: \put(30.00,31.00){\vector(-3,-2){14.00}}
2181: \put(27.00,22.00){\makebox(0,0)[cc]{10}}
2182: \put(13.00,54.00){\vector(0,-1){31.00}}
2183: \put(32.00,35.00){\makebox(0,0)[cc]{$x$}}
2184: \put(19.00,38.00){\makebox(0,0)[cc]{10}}
2185: \put(13.00,58.00){\makebox(0,0)[cc]{$r$}}
2186: \put(31.00,88.00){\circle{8.00}}
2187: \put(31.00,84.00){\vector(-2,-3){15.33}}
2188: \put(31.00,84.00){\vector(1,-2){11.00}}
2189: \put(21.00,73.00){\makebox(0,0)[cc]{1}}
2190: \put(31.00,88.00){\makebox(0,0)[cc]{$p$}}
2191: \put(39.00,73.00){\makebox(0,0)[cc]{1}}
2192: \put(46.00,58.00){\makebox(0,0)[cc]{$q$}}
2193: \put(46.00,54.00){\vector(-2,-3){10.67}}
2194: \put(46.00,54.00){\vector(2,-3){10.67}}
2195: \put(55.00,46.00){\makebox(0,0)[cc]{1}}
2196: \put(38.00,46.00){\makebox(0,0)[cc]{1}}
2197: \put(53.00,104.00){\makebox(0,0)[cc]{$s$}}
2198: \put(53.00,100.00){\vector(-2,-1){19.00}}
2199: \bezier{44}(27.00,78.00)(31.00,74.00)(34.00,78.00)
2200: \put(45.00,4.00){\makebox(0,0)[cc]{(a) Implicit Graph $G$}}
2201: \put(41.00,98.00){\makebox(0,0)[cc]{1}}
2202: \put(126.00,59.00){\circle{8.00}}
2203: \put(159.00,59.00){\circle{8.00}}
2204: \put(145.00,36.00){\circle{8.00}}
2205: \put(143.00,32.00){\vector(-3,-2){14.00}}
2206: \put(140.00,23.00){\makebox(0,0)[cc]{10}}
2207: \put(126.00,55.00){\vector(0,-1){31.00}}
2208: \put(145.00,36.00){\makebox(0,0)[cc]{$x$}}
2209: \put(132.00,39.00){\makebox(0,0)[cc]{10}}
2210: \put(126.00,59.00){\makebox(0,0)[cc]{$r$}}
2211: \put(144.00,89.00){\circle{8.00}}
2212: \put(144.00,85.00){\vector(-2,-3){15.33}}
2213: \put(144.00,85.00){\vector(1,-2){11.00}}
2214: \put(134.00,74.00){\makebox(0,0)[cc]{1}}
2215: \put(144.00,89.00){\makebox(0,0)[cc]{$p$}}
2216: \put(152.00,74.00){\makebox(0,0)[cc]{1}}
2217: \put(159.00,59.00){\makebox(0,0)[cc]{$q$}}
2218: \put(159.00,55.00){\vector(-2,-3){10.67}}
2219: \put(151.00,47.00){\makebox(0,0)[cc]{1}}
2220: \bezier{44}(140.00,79.00)(144.00,75.00)(147.00,79.00)
2221: \put(137.00,5.00){\makebox(0,0)[cc]{(b) MES $M(p)$}}
2222: \put(7.00,14.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
2223: \put(120.00,15.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
2224: \put(53.00,29.00){\framebox(8.00,8.00)[cc]{$t_{1}$}}
2225: \put(100.00,0.00){\framebox(68.00,112.00)[cc]{}}
2226: \put(0.00,0.00){\framebox(100.00,112.00)[cc]{}}
2227: \end{picture}
2228: \end{figure}
2229:
2230:
2231: \begin{lem} \label{lem10} When S1 runs on a finite AND/OR graph $G$,
2232: at any instant $i$, no type-III node ever enters CLOSED. \end{lem}
2233:
2234: {\bf Proof.} This may be easily seen from the following statements.
2235:
2236: (a) Only eligible nodes from OPEN can enter CLOSED.
2237:
2238: (b) No eligible node can ever be of type-III.
2239:
2240: Statement (a) is clear from Step S1.3.1 of algorithm S1 ;
2241: the proof of (b) follows. The proof is by induction on the instant $i$ of S1.
2242:
2243: \underline {For $i = 1$:} The only eligible nodes
2244: are leaf nodes, which are of type-I or type-II.
2245:
2246: \underline {Up to $i = k$:} We assume that no node that has
2247: become eligible is of type-III.
2248:
2249: \underline {$i = k+1$ :}
2250: Let $n$ be the node selected from OPEN and sent to CLOSED at
2251: instant $k$ and let $p$ be a parent of $n$.
2252: Now if $p$ becomes eligible in OPEN at instant $k+1$,
2253: we show that $p$ can not be of type-III.
2254:
2255: \underline {Case I:} $p$ is an OR node. Since, by assumption, $n$ is of type-I or type-II,
2256: $p$ would also be of type-I or type-II (by the Sub-problem Composition Theorem for Implicit Graphs).
2257:
2258: \underline {Case II:} $p$ is an AND node.
2259: Since $p$ is now becoming eligible (by assumption), all the children
2260: $p_1,p_2,\ldots,p_l$ of $p$ must now be in
2261: CLOSED, i.e.\ they must have
2262: been eligible at some instant prior to instant $k+1$.
2263: By hypothesis, none of these children of $p$ can be of
2264: type-III. Therefore, by the Sub-problem Composition Theorem for Implicit Graphs, $p$ cannot be of type-III, either. \qed\\
2265:
2266:
2267: \begin{lem} \label{lem20} When S1 sends a node n to CLOSED, $h(n) = h^{*}(n)$.
2268: \end{lem}
2269:
2270: {\bf Proof:}
2271: Let $n_{i}$ be the node travelling to CLOSED at instant $i$, $i = 1,2,\ldots$.
2272: We prove the lemma by induction on $i$.
2273:
2274: This lemma is applicable when a node travels to CLOSED. At instant 1, $n_{1}$ is
2275: clearly a leaf node with its $h$-value set
2276: to $h^{*}$ (0 or $\infty$ according as $n_{i}$ is terminal or nonterminal).
2277: We assume that
2278: algorithm S1 has put nodes $n_{1}, n_{2},\ldots ,n_{k}$ in
2279: CLOSED with $h(n_{i}) = h^{*}(n_{i}), 1 \leq i \leq k$. We need to show that $n_{k+1}$ goes to CLOSED with
2280: $h(n_{k+1}) = h^*(n_{k+1})$. Clearly, by Lemma \ref{lem10}, $n_{k+1}$ must be
2281: either of type-I or type-II.\\
2282:
2283: \underline {Case I :} $n_{k+1}$ is a leaf node. Trivially true. \\
2284:
2285: \underline {Case II :} $n_{k+1}$ is an AND node. Clearly, since $n_{k+1}$ is now eligible,
2286: all its children must have been
2287: previously put into CLOSED with their $h$-values = $h^{*}$ values (by hypothesis).
2288: Now, since S1 computes the $h$-value of an AND node by successively
2289: adding the $h$-values of its children when each of them is selected from OPEN,
2290: then $h(n_{k+1}) = h^{*}(n_{k+1})$ for the AND node $n_{k+1}$. \\
2291:
2292: \underline {Case III:} $n_{k+1}$ is an OR node. Let $p$ be the child through which $n_{k+1}$ had
2293: last received its $h$-value prior to getting selected from OPEN, i.e. $h(n_{k+1}) = c(n_{k+1},p) + h(p)$.
2294: If $h(n_{k+1}) \not= h^{*}(n_{k+1})$, let $q$ be the child of $n_{k+1}$ in a minimal-cost MES $M$ below $n_{k+1}$, i.e. $h^{*}(n_{k+1}) = c(n_{k+1},q) + h^{*}(q)$. And, it must be the case
2295: that $q$ has not travelled to CLOSED yet. We shall show that this leads to a contradiction.
2296:
2297: Let $\xi(q,M(n_{k+1}))$ be the sub-MES below $q$ in $M(n_{k+1})$.
2298: By Lemma \ref{lem01}, $\xi(q,M(n_{k+1}))$ must be of type-I or type-II as $M$ is of type-I or type-II.
2299: Moreover, by Lemma \ref{lem08}, as $q$ has not entered CLOSED,
2300: $\xi(q,M(n_{k+1}))$ must have leading node(s) at instant $k+1$.
2301:
2302: Let $q_{1}, q_{2},\ldots ,q_{m} (m \geq 1)$ be the leading nodes of $\xi(q,M(n_{k+1}))$ at instant
2303: $k+1$.
2304:
2305: Now, from the definition of a leading node, each $q_{j}$
2306: must have all its children from $\xi(q,M(n_{k+1}))$ in CLOSED.
2307: Clearly, by the induction hypothesis, each of these children must
2308: have its $h = h^{*}$.
2309:
2310:
2311: Further, $\xi(q,M(n_{k+1}))$ is a minimal-cost MES below $q$, and all
2312: the children
2313: of $q_j$ from $\xi(q,M(n_{k+1}))$ have already travelled to CLOSED
2314: and updated the $h(q_j)$ value, if needed. Thus $h(q_j) = h^{*}(q_j)$, $1 \leq j \leq m$.
2315:
2316: Therefore, when $n_{k+1}$ is selected from OPEN at instant $k+1$, every $q_{j},
2317: 1 \leq j \leq m,$ has,
2318:
2319: \begin{tabbing}
2320: aaaaa\=aaaa\= \kill
2321: $h(q_{j})$ \> = $h^{*}(q_{j})$ \\
2322: \> $ < h^{*}(n_{k+1})$ \\
2323: \> $< c(n_{k+1},p) + h^{*}(p)$, as $p$ is $n_{k+1}$'s child \\
2324: \> = $c(n_{k+1},p) + h(p)$, by induction hypothesis \\
2325: \> = $h(n_{k+1})$, as assumed previously
2326: \end{tabbing}
2327: Therefore, when node $n_{k+1}$ was selected from OPEN,
2328: $q_{j}$, being a leading node, was also eligible in OPEN with $h(q_{j}) < h(n_{k+1})$.
2329: This is clearly in contradiction to the best-first node selection criterion,
2330: on the basis of minimum $h$, used by S1. \qed\\
2331:
2332:
2333: \begin{th}\label{thm28}
2334: S1, while running on a finite AND/OR graph $G$:
2335: \begin{enumerate}
2336: \item terminates with SUCCESS, outputting $h(s) = h^*(s)$ if $G$ contains at least
2337: one solution graph;
2338: \item terminates with FAILURE, otherwise.
2339: \end{enumerate}
2340: \end{th}
2341:
2342: {\bf Proof.}
2343: \begin{enumerate}
2344: \item \underline{($G$ contains a solution graph.)} As $G$ contains only finitely many nodes, no
2345: node returns to OPEN from
2346: CLOSED, and in each iteration one eligible node is removed from OPEN and put into
2347: CLOSED, S1 can continue for finitely many iterations only.
2348:
2349: Let $M$ be a minimal-cost type-I MES below $s$ in $G$. At any instant before $s$
2350: goes to CLOSED, there will always be at least one leading node $n$ from $M$, by Lemma \ref{lem08}. $n$, being a leading node of a minimal-cost type-I MES, must have $h(n) = h^{*}(n) \leq h^{*}(s)$. Note that $n$ is also
2351: eligible in OPEN. Now $n$ cannot be left in OPEN indefinitely, since S1 runs for only finitely many iterations and selects eligible nodes from OPEN on the basis of minimum $h$-value. Thus eventually $n$ is bound to be selected from OPEN and
2352: put into CLOSED. When $n = s$, the algorithm will terminate with SUCCESS, outputting
2353: $h(s) = h^*(s)$.
2354:
2355: \item \underline{($G$ does not contain a solution graph.)} If $s$ is of type-II,
2356: consider the argument in (1) above. Here also the argument follows surrounding the
2357: key concepts of a minimal-cost type-II MES $M$ below $s$, and the leading nodes of $M$.
2358: Ultimately $s$ will enter CLOSED with $h(s) = h^*(s) = \infty$, and S1 terminates
2359: with FAILURE.
2360:
2361: If $s$ is of type-III, since no type-III node enters CLOSED, the algorithm will
2362: continue as long as there are type-I and type-II nodes in $G$. Since there are only
2363: finitely many such nodes, ultimately OPEN will become empty of eligible nodes, and
2364: S1 will terminate with FAILURE. \qed\\
2365:
2366: \end{enumerate}
2367:
2368:
2369: \begin{th}\label{thm30} Let $G$ be an AND/OR graph with finitely many nodes and arcs.
2370: When
2371: S1 runs on $G$, it makes
2372: \begin{enumerate}
2373: \item exactly $N_1$ iterations, where
2374:
2375: $N_1 = 1 + \mid \{n \mid n$ is a type-I node with $h^*(n) < h^*(s)\}\mid$, if $G$
2376: contains a solution graph;
2377:
2378: \item at most $N_1$ iterations, where
2379:
2380: $N_1 = \mid \{n \mid n$ is a type-I or a type-II node $\} \mid$, if $G$ contains
2381: no solution graph.
2382: \end{enumerate}
2383: \end{th}
2384:
2385: {\bf Proof.} At each iteration of S1 before it terminates, one (new) eligible node is selected
2386: from OPEN and put into CLOSED.
2387: \begin{enumerate}
2388: \item If $G$ contains a solution graph, i.e.\ $s$ is of type-I, let $M$ be a minimal-cost
2389: type-I MES below $s$. Then, at every iteration before $s$ is selected, there will
2390: be at least one leading node $n$ of $M$, such that $n$ is eligible in OPEN with
2391: $h(n) = h^*(n) < h^*(s)$. Thus, at every iteration $i$, before $s$ is sent to CLOSED,
2392: if the node $p$ is selected from OPEN at iteration $i$, $h(p) \le h(n) = h^*(n) < h^*(s) < \infty$
2393: (since $G$ has a solution graph). Besides these iterations, one more iteration will be
2394: there with $p = n = s$ and $h(p) = h^*(p) = h^*(s)$.
2395:
2396: \item Since no type-III node enters CLOSED, the only nodes entering CLOSED are of
2397: type-I or type-II, and the lemma follows easily.\qed\\
2398: \end{enumerate}
2399:
2400:
2401:
2402: \begin{defi} By a {\bf node evaluation} we mean a single computation of
2403: $h$-values at step S1.3.3. Similarly by a {\bf node selection}, we mean selecting an
2404: eligible node from OPEN at step S1.3.1.
2405: \end{defi} \
2406:
2407: \begin{th}\label{thm40} Given any finite AND/OR graph $G$, the following are true
2408: about the execution
2409: of S1:
2410:
2411: \begin{enumerate}
2412: \item S1 makes $O(N_1)$ node selections
2413: \item S1 makes $O(N_1K_1)$ node evaluations, where $N_1$ is as defined in Theorem \ref{thm30},
2414: and $K_1$ is the total number of nodes in $G$.
2415: \end{enumerate}
2416: \end{th}
2417: {\bf Proof.} \begin{enumerate}
2418: \item Clear, since there are $O(N_1)$ iterations and in each iteration there is
2419: exactly one node selection.
2420:
2421: \item There are $O(N_1)$ iterations of step S1.3, in each of which one node is selected
2422: and $O(K_1)$ parents of a node may get evaluated. \qed\\
2423: \end{enumerate}
2424:
2425:
2426: \section{\bf ALGORITHM S2}
2427: S2 is an improved version of the uninformed search algorithm S1. It resembles $\mbox{AO}^{*}$ and does heuristically-guided search in a top-down fashion. S2 works on an implicit
2428: AND/OR graph $G$, which is either finite, or infinite containing at least one solution graph. Thus S2 can work effectively on graphs having paths of infinite length, which is not possible by S1 due to its entirely bottom-up nature beginning from the leaf nodes.
2429:
2430: S2 contains a procedure Bottom\_Up that works in a manner identical to S1 on explicit graphs.
2431: Additionally, S2 maintains a variable, $front$, with every node. The purpose of
2432: the variable $front$ with any node $n$ is to identify one of its successors $q$ which is
2433: preferably an unsolved tip node of a least-costly psg below $n$. Thus in any iteration
2434: prior to the termination of S2, the $front$ of $s$ is an unsolved tip node of a
2435: least-costly psg below $s$, and is the candidate node to be expanded next.
2436:
2437:
2438: \subsection{\bf Algorithm S2}
2439:
2440: \begin{list}
2441: {{\bf S2.\arabic{S2ctr1}}}{\usecounter{S2ctr1}}
2442:
2443: \item Create an explicit graph $G^{\prime}$ consisting solely of the start node $s$.
2444: Set $front(s) = s$. If $s$ is a terminal leaf set $h(s) = 0$; else if $s$ is
2445: a nonterminal leaf set $h(s) = \infty$.
2446: \item While ( ($front(s)$ is not a terminal leaf) and ($h(s) \not = \infty$) ) do:
2447: \begin{list}
2448: {{\bf S2.\arabic{S2ctr1}.\arabic{S2ctr2}}}{\usecounter{S2ctr2}}
2449:
2450: \item Let $n = front(s)$. Expand $n$, generating all its children $n_{1},
2451: n_{2},\ldots,n_{k}$.
2452: Install each $n_{i}$ in $G^{\prime}$ as child of $n$, by setting the arc ($n,n_{i}$). For
2453: each newly occurring node $n_{i}$ in $G^{\prime}$ set $front(n_{i}) = n_{i}$.
2454: If $n_{i}$ is a terminal leaf set $h(n_{i}) = 0$; else if $n_{i}$ is a
2455: nonterminal leaf set $h(n_{i}) = \infty$; else set $h(n_{i}) = \hat{h}(n_{i})$.
2456:
2457: \item Set $OPEN = Z_{G^{\prime}}$. Label all the nodes in OPEN as {\bf eligible}, and
2458: {\bf initial}.
2459: \item Call Bottom\_Up(OPEN).
2460: \end{list}
2461: \item If $front(s)$ is a terminal leaf node, output $h(s)$ and terminate with SUCCESS; else
2462: terminate with
2463: FAILURE.
2464: \end{list}
2465:
2466: PROCEDURE Bottom\_Up (List OPEN)
2467: \begin{list}
2468: {{\bf B\arabic{S2ctr3}}}{\usecounter{S2ctr3}}
2469:
2470: \item Initialize a list, CLOSED, to nil.
2471:
2472: \item While (OPEN contains an eligible node and $s \not\in CLOSED$) do:
2473: \begin{list}{{\bf B\arabic{S2ctr3}.\arabic{S2ctr4}}}{\usecounter{S2ctr4}}
2474: \item Select an eligible node $q$ from OPEN that has minimum $h$-value. (Resolve
2475: ties arbitrarily, but always in favour of $s$).
2476: \item If $q$ is not an initial node, then do the following:
2477:
2478: Let $q_{1}, q_{2}, \ldots, q_{r}$ be the children of $q$ in $G^{\prime}$
2479: which are in CLOSED.
2480:
2481: \underline{{\bf Case I:}} $q$ is an OR node.
2482:
2483: Let $\tau = min_{1 \leq i \leq r} \{c(q,q_{i}) + h(q_{i})\}$ occur for $i=j$
2484: (resolve ties arbitrarily, but in favour of a node whose front
2485: is a terminal leaf). Set $front(q) = front(q_{j})$.
2486:
2487: \underline{{\bf Case II:}} $q$ is an AND node.
2488:
2489: Let $q_{j}$ be the leftmost child of $q$ whose front is not a terminal leaf.
2490: If no such $q_{j}$ exists (i.e. every child of $q$ has a terminal leaf as its
2491: front) set $front(q) = front(q_{1})$; else set $front(q) = front(q_{j})$.
2492:
2493: \item Put $q$ in CLOSED. Let $p_{1}, p_{2},\ldots, p_{k}$ be the parents of $q$ in
2494: $G^{\prime}$.
2495: For each $p_{i}$ do:
2496:
2497: \underline{{\bf Case I:}} $p_{i}$ is an OR node.
2498:
2499: If $p_{i}$ is not already present in OPEN or CLOSED, set $h(p_{i}) = h(q) +
2500: c(p_{i},q)$. Put $p_{i}$ in OPEN and
2501: mark it eligible; elseif $p_{i}$ is already present in OPEN with $h(p_{i}) > h(q) +
2502: c(p_{i},q)$, set $h(p_{i}) =
2503: h(q) + c(p_{i},q)$.
2504:
2505: \underline{{\bf Case II:}} $p_{i}$ is an AND node.
2506:
2507: If $p_{i}$ is not already present in OPEN, put it in OPEN and set $h(p_{i}) = h(q) +
2508: c(p_{i},q)$; else set $h(p_{i})
2509: = h(p_{i}) + c(p_{i},q) + h(q)$. If all children of $p_{i}$ are in CLOSED, mark $p_{i}$
2510: as eligible.
2511:
2512: \end{list}
2513: \item Remove any remaining nodes from OPEN.
2514:
2515: \item If $s \not \in CLOSED$ set $h(s) = \infty$. $\Box$
2516: \end{list}
2517:
2518: \subsection{\bf Working of S2}
2519:
2520: In Tables 2 and 3, we present the working of S2 on the graphs of Figures \ref{fig70}(a) and \ref{fig70}(b).
2521: Each iteration of S2 is quite similar to the working of S1 as presented in Table 1. Here, $n$ is the node which is expanded in each iteration. With each node, an additional variable "front"' is added. Tip nodes have themselves as their $front$s; other (internal)
2522: nodes initially have their $front$s "carried over" from the previous iteration,
2523: and later the $front$s are decided when these internal nodes enter CLOSED.
2524: In each iteration, the first row of column three shows the tip nodes of the explicit graph, that are initially put in OPEN and labeled as "eligible" and "initial". Nodes that are not eligible are underlined. CLOSED nodes are put in rectangular boxes. The $h$ and $front$ values of a node are superscripted above it.
2525: S2 makes use of heuristic values and runs in the top-down fashion.
2526: For the graph $G_1$ in Figure \ref{fig70}(a), S2 outputs
2527: $h^{*}(s) = 14$, i.e.\ the cost of a minimal-cost solution graph. For the graph $G_2$ in Figure \ref{fig70}(b), S2 terminates with FAILURE as there is no solution graph below $s$.
2528:
2529: \renewcommand{\arraystretch}{1.6}
2530:
2531: \setlength\fboxsep{0.05cm}
2532:
2533: %\vspace{2in}
2534: \begin{table}
2535: \begin{centering}
2536: \begin{tabular}{||l|l|l|c||} \hline
2537: $Itn$ & Exp. & Nodes in OPEN and CLOSED & Explicit graph after each iteration \\
2538: & node & in Bottom\_Up computation & \\
2539: & $n$ & format $m^{h(m),front(m)}$ & \\ \hline
2540:
2541: 1. & $s$ & $p^{5,p}$, $q^{5,q}$ (Initial OPEN) & \\ \cline{3-3}
2542: & & \fbox{$p^{5,p}$}, $q^{5,q}$, $\underline{s}^{6,s}$ & \\ \cline{3-3}
2543: & & \fbox{$p^{5,p}$}, \fbox{$q^{5,q}$}, $s^{12,s}$ & \\ \cline{3-3}
2544:
2545: & & \fbox{$p^{5,p}$}, \fbox{$q^{5,q}$}, \fbox{$s^{12,p}$}
2546: &
2547: \raisebox{0pt}[0pt]{
2548: \linethickness{0.4pt}
2549: \begin{picture}(84.00,36.00)
2550: \put(46.00,-0.33){\line(0,1){0.33}}
2551: \put(40.00,31.00){\circle{10.00}}
2552: \put(14.00,3.00){\circle{10.00}}
2553: \put(70.00,3.00){\circle{10.00}}
2554: \put(40.00,26.00){\vector(-3,-2){26.00}}
2555: \put(40.00,26.00){\vector(3,-2){28.00}}
2556: \put(70.00,3.00){\makebox(0,0)[cc]{$q$}}
2557: \put(14.00,3.00){\makebox(0,0)[cc]{$p$}}
2558: \put(2.00,3.00){\makebox(0,0)[cc]{5,$p$}}
2559: \put(23.00,20.00){\makebox(0,0)[cc]{1}}
2560: \put(57.00,20.00){\makebox(0,0)[cc]{1}}
2561: \put(40.00,31.00){\makebox(0,0)[cc]{$s$}}
2562: \put(53.00,30.00){\makebox(0,0)[cc]{12,$p$}}
2563: \put(84.00,3.00){\makebox(0,0)[cc]{5,$q$}}
2564: \put(34.00,22.00){\line(1,0){12.00}}
2565: \end{picture}
2566: }
2567:
2568: \\ \cline{1-4}
2569:
2570: 2. & $p$ & $t_{1}^{0,t_{1}}$, $r^{2,r}$, $q^{5,q}$ (Initial OPEN) & \\ \cline{3-3}
2571: & & \fbox{$t_{1}^{0,t_{1}}$}, $r^{2,r}$, $q^{5,q}$, $p^{5,p}$ & \\ \cline{3-3}
2572: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, $q^{5,q}$, $p^{3,p}$ & \\ \cline{3-3}
2573: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, $q^{5,q}$, \fbox{$p^{3,r}$}, $\underline{s}^{4,p}$ & \\ \cline{3-3}
2574: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, \fbox{$q^{5,q}$}, \fbox{$p^{3,r}$}, $s^{10,p}$ & \\ \cline{3-3}
2575: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, \fbox{$q^{5,q}$}, \fbox{$p^{3,r}$}, \fbox{$s^{10,r}$} &
2576: \raisebox{0pt}[0pt]{
2577: \linethickness{0.4pt}
2578: \begin{picture}(84.00,68.00)
2579: \put(46.00,-0.33){\line(0,1){0.33}}
2580: \put(40.00,63.00){\circle{10.00}}
2581: \put(14.00,35.00){\circle{10.00}}
2582: \put(70.00,35.00){\circle{10.00}}
2583: \put(40.00,4.00){\circle{10.00}}
2584: \put(16.00,31.00){\vector(3,-4){18.67}}
2585: \put(40.00,58.00){\vector(-3,-2){26.00}}
2586: \put(40.00,58.00){\vector(3,-2){28.00}}
2587: \put(40.00,4.00){\makebox(0,0)[cc]{$r$}}
2588: \put(70.00,35.00){\makebox(0,0)[cc]{$q$}}
2589: \put(40.00,13.00){\makebox(0,0)[cc]{2,$r$}}
2590: \put(29.00,21.00){\makebox(0,0)[cc]{1}}
2591: \put(14.00,35.00){\makebox(0,0)[cc]{$p$}}
2592: \put(2.00,35.00){\makebox(0,0)[cc]{3,$r$}}
2593: \put(24.00,40.00){\makebox(0,0)[cc]{5}}
2594: \put(36.00,35.00){\makebox(0,0)[cc]{$t_{1}$}}
2595: \put(23.00,52.00){\makebox(0,0)[cc]{1}}
2596: \put(57.00,52.00){\makebox(0,0)[cc]{1}}
2597: \put(40.00,63.00){\makebox(0,0)[cc]{$s$}}
2598: \put(53.00,62.00){\makebox(0,0)[cc]{10,$r$}}
2599: \put(84.00,35.00){\makebox(0,0)[cc]{5,$q$}}
2600: \put(34.00,54.00){\line(1,0){12.00}}
2601: \put(31.00,31.00){\framebox(10.00,8.00)[cc]{}}
2602: \put(43.00,35.00){\makebox(0,0)[lc]{0,$t_1$}}
2603: \put(19.00,35.00){\vector(1,0){12.00}}
2604: \end{picture}
2605:
2606: }
2607: \\ \cline{1-4}
2608:
2609:
2610: 3. & $r$ & $t_{1}^{0,t_{1}}$, $t_{2}^{0,t_{2}}$, $q^{5,q}$ (Initial OPEN) & \\ \cline{3-3}
2611: & & \fbox{$t_{1}^{0,t_{1}}$}, $t_{2}^{0,t_{2}}$, $q^{5,q}$, $p^{5,r}$ & \\ \cline{3-3}
2612: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $q^{5,q}$, $p^{5,r}$, $r^{10,r}$ & \\ \cline{3-3}
2613: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, \fbox{$q^{5,q}$}, $p^{5,r}$, $r^{10,r}$, $\underline{s}^{6,r}$ & \\ \cline{3-3}
2614: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, \fbox{$q^{5,q}$}, \fbox{$p^{5,t_{1}}$}, $r^{6,r}$, $s^{12,r}$ & \\ \cline{3-3}
2615: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, \fbox{$q^{5,q}$}, \fbox{$p^{5,t_{1}}$}, \fbox{$r^{6,t_{1}}$}, $s^{12,r}$ & \\ \cline{3-3}
2616: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, \fbox{$q^{5,q}$}, \fbox{$p^{5,t_{1}}$}, \fbox{$r^{6,t_{1}}$}, \fbox{$s^{12,q}$} & \\
2617: & & &
2618:
2619: \raisebox{0pt}[0pt]{
2620: \linethickness{0.4pt}
2621: \begin{picture}(84.00,95.00)
2622: \put(46.00,-0.33){\line(0,1){0.33}}
2623: \put(40.00,90.00){\circle{10.00}}
2624: \put(14.00,62.00){\circle{10.00}}
2625: \put(70.00,62.00){\circle{10.00}}
2626: \put(40.00,31.00){\circle{10.00}}
2627: \put(16.00,58.00){\vector(3,-4){18.67}}
2628: \put(40.00,85.00){\vector(-3,-2){26.00}}
2629: \put(40.00,85.00){\vector(3,-2){28.00}}
2630: \bezier{236}(37.00,27.00)(7.00,29.00)(11.00,58.00)
2631: \put(11.00,52.00){\vector(0,1){6.00}}
2632: \put(34.00,19.00){\makebox(0,0)[cc]{10}}
2633: \put(40.00,31.00){\makebox(0,0)[cc]{$r$}}
2634: \put(70.00,62.00){\makebox(0,0)[cc]{$q$}}
2635: \put(40.00,40.00){\makebox(0,0)[cc]{6,$t_1$}}
2636: \put(29.00,48.00){\makebox(0,0)[cc]{1}}
2637: \put(13.00,32.00){\makebox(0,0)[cc]{1}}
2638: \put(14.00,62.00){\makebox(0,0)[cc]{$p$}}
2639: \put(2.00,62.00){\makebox(0,0)[cc]{5,$t_1$}}
2640: \put(24.00,67.00){\makebox(0,0)[cc]{5}}
2641: \put(36.00,62.00){\makebox(0,0)[cc]{$t_{1}$}}
2642: \put(23.00,79.00){\makebox(0,0)[cc]{1}}
2643: \put(57.00,79.00){\makebox(0,0)[cc]{1}}
2644: \put(40.00,90.00){\makebox(0,0)[cc]{$s$}}
2645: \put(53.00,89.00){\makebox(0,0)[cc]{12,$q$}}
2646: \put(84.00,62.00){\makebox(0,0)[cc]{5,$q$}}
2647: \put(47.00,6.00){\makebox(0,0)[lc]{0,$t_2$}}
2648: \put(34.00,81.00){\line(1,0){12.00}}
2649: \put(36.00,2.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
2650: \put(31.00,58.00){\framebox(10.00,8.00)[cc]{}}
2651: \put(43.00,62.00){\makebox(0,0)[lc]{0,$t_1$}}
2652: \put(19.00,62.00){\vector(1,0){12.00}}
2653: \put(40.00,26.00){\vector(0,-1){16.00}}
2654: \end{picture}
2655: }
2656: \\ \cline{1-4}
2657:
2658: 4. & $q$ & $t_{1}^{0,t_{1}}$, $t_{2}^{0,t_{2}}$, $x^{100,x}$ (Initial OPEN) & \\ \cline{3-3}
2659: & & \fbox{$t_{1}^{0,t_{1}}$}, $t_{2}^{0,t_{2}}$, $x^{100,x}$, $p^{5,t_{1}}$ & \\ \cline{3-3}
2660: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $x^{100,x}$, $p^{5,t_{1}}$, $r^{10,t_{1}}$ & \\ \cline{3-3}
2661: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $x^{100,x}$, \fbox{$p^{5,t_{1}}$}, $r^{6,t_{1}}$, $\underline{s}^{6,q}$ & \\ \cline{3-3}
2662: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $x^{100,x}$, \fbox{$p^{5,t_{1}}$}, \fbox{$r^{6,t_{1}}$}, \underline{$s^{6,q}$}, $q^{7,q}$ & \\ \cline{3-3}
2663: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $x^{100,x}$, \fbox{$p^{5,t_{1}}$}, \fbox{$r^{6,t_{1}}$}, $s^{14,q}$, \fbox{$q^{7,t_1}$} & \\ \cline{3-3}
2664: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $x^{100,x}$, \fbox{$p^{5,t_{1}}$}, \fbox{$r^{6,t_{1}}$}, \fbox{$s^{14,t_{1}}$}, \fbox{$q^{7,t_1}$} & \\ %\cline{3-3}
2665: & & &
2666:
2667: \raisebox{0pt}[0pt]{
2668: \linethickness{0.4pt}
2669: \begin{picture}(86.00,95.00)
2670: \put(46.00,-0.33){\line(0,1){0.33}}
2671: \put(40.00,90.00){\circle{10.00}}
2672: \put(14.00,62.00){\circle{10.00}}
2673: \put(70.00,62.00){\circle{10.00}}
2674: \put(40.00,31.00){\circle{10.00}}
2675: \put(70.00,31.00){\circle{10.00}}
2676: \put(16.00,58.00){\vector(3,-4){18.67}}
2677: \put(70.00,57.00){\vector(0,-1){21.00}}
2678: \put(70.00,57.00){\vector(-1,-1){25.00}}
2679: \put(40.00,85.00){\vector(-3,-2){26.00}}
2680: \put(40.00,85.00){\vector(3,-2){28.00}}
2681: \bezier{236}(37.00,27.00)(7.00,29.00)(11.00,58.00)
2682: \put(11.00,52.00){\vector(0,1){6.00}}
2683: \put(34.00,19.00){\makebox(0,0)[cc]{10}}
2684: \put(40.00,31.00){\makebox(0,0)[cc]{$r$}}
2685: \put(70.00,31.00){\makebox(0,0)[cc]{$x$}}
2686: \put(73.00,46.00){\makebox(0,0)[cc]{1}}
2687: \put(86.00,34.00){\makebox(0,0)[cc]{100,$x$}}
2688: \put(70.00,62.00){\makebox(0,0)[cc]{$q$}}
2689: \put(53.00,47.00){\makebox(0,0)[cc]{1}}
2690: \put(40.00,40.00){\makebox(0,0)[cc]{6,$t_1$}}
2691: \put(29.00,48.00){\makebox(0,0)[cc]{1}}
2692: \put(13.00,32.00){\makebox(0,0)[cc]{1}}
2693: \put(14.00,62.00){\makebox(0,0)[cc]{$p$}}
2694: \put(2.00,62.00){\makebox(0,0)[cc]{5,$t_1$}}
2695: \put(24.00,67.00){\makebox(0,0)[cc]{5}}
2696: \put(36.00,62.00){\makebox(0,0)[cc]{$t_{1}$}}
2697: \put(23.00,79.00){\makebox(0,0)[cc]{1}}
2698: \put(57.00,79.00){\makebox(0,0)[cc]{1}}
2699: \put(40.00,90.00){\makebox(0,0)[cc]{$s$}}
2700: \put(53.00,89.00){\makebox(0,0)[cc]{14,$t_1$}}
2701: \put(84.00,62.00){\makebox(0,0)[cc]{7,$t_1$}}
2702: \put(47.00,6.00){\makebox(0,0)[lc]{0,$t_2$}}
2703: \put(34.00,81.00){\line(1,0){12.00}}
2704: \put(36.00,2.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
2705: \put(31.00,58.00){\framebox(10.00,8.00)[cc]{}}
2706: \put(43.00,62.00){\makebox(0,0)[lc]{0,$t_1$}}
2707: \put(19.00,62.00){\vector(1,0){12.00}}
2708: \put(40.00,26.00){\vector(0,-1){16.00}}
2709: \end{picture}
2710:
2711: }
2712: \\ \cline{1-4}
2713: \end{tabular}
2714: \caption{Working of S2 on the graph of Figure \ref{fig70}(a)}
2715: \end{centering}
2716: \end{table}
2717:
2718:
2719:
2720: \renewcommand{\arraystretch}{1.6}
2721:
2722: \setlength\fboxsep{0.05cm}
2723:
2724: %\vspace{2in}
2725: \begin{table}
2726: \begin{centering}
2727: \begin{tabular}{||l|l|l|l||} \hline
2728: $Itn$ & Exp. & Nodes in OPEN and CLOSED & Explicit graph after each iteration \\
2729: & node & in Bottom\_Up computation & \\
2730: & $n$ & format $m^{h(m),front(m)}$ & \\ \hline
2731:
2732: 1. & $s$ & $p^{5,p}$, $q^{5,q}$ (Initial OPEN) & \\ \cline{3-3}
2733: & & \fbox{$p^{5,p}$}, $q^{5,q}$, $\underline{s}^{6,s}$ & \\ \cline{3-3}
2734: & & \fbox{$p^{5,p}$}, \fbox{$q^{5,q}$}, $s^{12,s}$ & \\ \cline{3-3}
2735: & & \fbox{$p^{5,p}$}, \fbox{$q^{5,q}$}, \fbox{$s^{12,p}$} &
2736:
2737: \raisebox{0pt}[0pt]{
2738: \linethickness{0.4pt}
2739: \begin{picture}(84.00,36.00)
2740: \put(46.00,-0.33){\line(0,1){0.33}}
2741: \put(40.00,31.00){\circle{10.00}}
2742: \put(14.00,3.00){\circle{10.00}}
2743: \put(70.00,3.00){\circle{10.00}}
2744: \put(40.00,26.00){\vector(-3,-2){26.00}}
2745: \put(40.00,26.00){\vector(3,-2){28.00}}
2746: \put(70.00,3.00){\makebox(0,0)[cc]{$q$}}
2747: \put(14.00,3.00){\makebox(0,0)[cc]{$p$}}
2748: \put(2.00,3.00){\makebox(0,0)[cc]{5,$p$}}
2749: \put(23.00,20.00){\makebox(0,0)[cc]{1}}
2750: \put(57.00,20.00){\makebox(0,0)[cc]{1}}
2751: \put(40.00,31.00){\makebox(0,0)[cc]{$s$}}
2752: \put(53.00,30.00){\makebox(0,0)[cc]{12,$p$}}
2753: \put(84.00,3.00){\makebox(0,0)[cc]{5,$q$}}
2754: \put(34.00,22.00){\line(1,0){12.00}}
2755: \end{picture}
2756: }
2757: \\ \cline{1-4}
2758:
2759:
2760: 2. & $p$ & $t_{1}^{0,t_{1}}$, $r^{2,r}$, $q^{5,q}$ (Initial OPEN) & \\ \cline{3-3}
2761: & & \fbox{$t_{1}^{0,t_{1}}$}, $r^{2,r}$, $q^{5,q}$, $\underline{p}^{5,p}$ & \\ \cline{3-3}
2762: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, $q^{5,q}$, $p^{8,p}$ & \\ \cline{3-3}
2763: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, \fbox{$q^{5,q}$}, $p^{8,p}$, $\underline{s}^{6,p}$ & \\ \cline{3-3}
2764: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, \fbox{$q^{5,q}$}, \fbox{$p^{8,r}$}, $s^{15,p}$ & \\ \cline{3-3}
2765: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$r^{2,r}$}, \fbox{$q^{5,q}$}, \fbox{$p^{8,r}$}, \fbox{$s^{15,r}$} &
2766:
2767: \raisebox{0pt}[0pt]{
2768: \linethickness{0.4pt}
2769: \begin{picture}(84.00,68.00)
2770: \put(46.00,-0.33){\line(0,1){0.33}}
2771: \put(40.00,63.00){\circle{10.00}}
2772: \put(14.00,35.00){\circle{10.00}}
2773: \put(70.00,35.00){\circle{10.00}}
2774: \put(40.00,4.00){\circle{10.00}}
2775: \put(16.00,31.00){\vector(3,-4){18.67}}
2776: \put(40.00,58.00){\vector(-3,-2){26.00}}
2777: \put(40.00,58.00){\vector(3,-2){28.00}}
2778: \put(40.00,4.00){\makebox(0,0)[cc]{$r$}}
2779: \put(70.00,35.00){\makebox(0,0)[cc]{$q$}}
2780: \put(40.00,13.00){\makebox(0,0)[cc]{2,$r$}}
2781: \put(29.00,21.00){\makebox(0,0)[cc]{1}}
2782: \put(14.00,35.00){\makebox(0,0)[cc]{$p$}}
2783: \put(2.00,35.00){\makebox(0,0)[cc]{8,$r$}}
2784: \put(24.00,40.00){\makebox(0,0)[cc]{5}}
2785: \put(36.00,35.00){\makebox(0,0)[cc]{$t_{1}$}}
2786: \put(23.00,52.00){\makebox(0,0)[cc]{1}}
2787: \put(57.00,52.00){\makebox(0,0)[cc]{1}}
2788: \put(40.00,63.00){\makebox(0,0)[cc]{$s$}}
2789: \put(53.00,62.00){\makebox(0,0)[cc]{15,$r$}}
2790: \put(84.00,35.00){\makebox(0,0)[cc]{5,$q$}}
2791: \put(34.00,54.00){\line(1,0){12.00}}
2792: \put(31.00,31.00){\framebox(10.00,8.00)[cc]{}}
2793: \put(43.00,35.00){\makebox(0,0)[lc]{0,$t_1$}}
2794: \put(19.00,35.00){\vector(1,0){12.00}}
2795: \put(23.00,35.00){\line(-1,-2){4.00}}
2796: \end{picture}
2797: }
2798: \\ \cline{1-4}
2799:
2800:
2801: 3. & $r$ & $t_{1}^{0,t_{1}}$, $t_{2}^{0,t_{2}}$, $q^{5,q}$ (Initial OPEN) & \\ \cline{3-3}
2802: & & \fbox{$t_{1}^{0,t_{1}}$}, $t_{2}^{0,t_{2}}$, $q^{5,q}$, $\underline{p}^{5,r}$ & \\ \cline{3-3}
2803: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, $q^{5,q}$, $\underline{p}^{5,r}$, $\underline{r}^{10,r}$ & \\ \cline{3-3}
2804: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, \fbox{$q^{5,q}$}, $\underline{p}^{5,r}$, $\underline{r}^{10,r}$, $\underline{s}^{6,r}$ & \\ \cline{3-3}
2805: & & \fbox{$t_{1}^{0,t_{1}}$}, \fbox{$t_{2}^{0,t_{2}}$}, \fbox{$q^{5,q}$} (all nodes which are not eligible are & \\
2806: & & removed from OPEN and $h(s)$ is set to $\infty$ ) & \\
2807: & & &
2808: \raisebox{0pt}[0pt]{
2809: \linethickness{0.4pt}
2810: \begin{picture}(84.00,84.00)
2811: \put(46.00,-0.33){\line(0,1){0.33}}
2812: \put(40.00,79.00){\circle{10.00}}
2813: \put(14.00,56.00){\circle{10.00}}
2814: \put(70.00,56.00){\circle{10.00}}
2815: \put(40.00,25.00){\circle{10.00}}
2816: \put(16.00,52.00){\vector(3,-4){18.67}}
2817: \bezier{236}(37.00,21.00)(7.00,23.00)(11.00,52.00)
2818: \put(11.00,46.00){\vector(0,1){6.00}}
2819: \put(40.00,13.00){\makebox(0,0)[lc]{10}}
2820: \put(40.00,25.00){\makebox(0,0)[cc]{$r$}}
2821: \put(70.00,56.00){\makebox(0,0)[cc]{$q$}}
2822: \put(40.00,34.00){\makebox(0,0)[cc]{10,$r$}}
2823: \put(29.00,42.00){\makebox(0,0)[cc]{1}}
2824: \put(13.00,26.00){\makebox(0,0)[cc]{1}}
2825: \put(14.00,56.00){\makebox(0,0)[cc]{$p$}}
2826: \put(2.00,56.00){\makebox(0,0)[cc]{5,$r$}}
2827: \put(24.00,61.00){\makebox(0,0)[cc]{5}}
2828: \put(36.00,56.00){\makebox(0,0)[cc]{$t_{1}$}}
2829: \put(20.00,68.00){\makebox(0,0)[cc]{1}}
2830: \put(60.00,68.00){\makebox(0,0)[cc]{1}}
2831: \put(40.00,79.00){\makebox(0,0)[cc]{$s$}}
2832: \put(53.00,78.00){\makebox(0,0)[cc]{$\infty$,$r$}}
2833: \put(84.00,56.00){\makebox(0,0)[cc]{5,$q$}}
2834: \put(47.00,2.00){\makebox(0,0)[lc]{0,$t_2$}}
2835: \put(36.00,-2.00){\framebox(8.00,8.00)[cc]{$t_{2}$}}
2836: \put(31.00,52.00){\framebox(10.00,8.00)[cc]{}}
2837: \put(43.00,56.00){\makebox(0,0)[lc]{0,$t_1$}}
2838: \put(19.00,56.00){\vector(1,0){12.00}}
2839: \put(23.00,56.00){\line(-1,-2){4.00}}
2840: \put(31.00,22.00){\line(6,-5){9.00}}
2841: \put(40.00,74.00){\vector(-2,-1){25.00}}
2842: \put(40.00,74.00){\vector(2,-1){27.00}}
2843: \put(32.00,70.00){\line(1,0){16.00}}
2844: \put(40.00,20.00){\vector(0,-1){14.00}}
2845: \end{picture}
2846:
2847: }
2848: \\ \cline{1-4}
2849: \end{tabular}
2850: \caption{Working of S2 on the graph of Figure \ref{fig70}(b)}
2851: \end{centering}
2852: \end{table}
2853:
2854:
2855: \subsection{\bf Analysis of S2}
2856: The results on the correctness and complexity of S2 are presented below. In this discussion,
2857: by a "Bottom-Up computation" we shall mean a call to the Bottom-Up procedure during an iteration of S2.
2858:
2859: \begin{defi} \label{admheur} A heuristic function $\hat{h} \geq 0$ defined on the nodes of $G$ is said to
2860: be
2861: {\bf admissible} if $\hat{h}(n) \leq h^{*}(n)$ for all type-I or type-II nodes in $G$.
2862: \end{defi}
2863:
2864: \begin{defi} An execution of S2.2 (i.e.\ substeps S2.2.1, S2.2.2 and S2.2.3) is called
2865: an {\bf iteration} of the algorithm S2.
2866: \end{defi}
2867:
2868: \begin{defi} Given any iteration of S2, by an {\bf instant} within it we refer to the time point when substep B2 of step S2.2.3 is about to be executed.
2869: \end{defi}
2870:
2871: Thus at instant $j$ of an iteration, the substep B2 is executed for the $j$th time.
2872:
2873: \begin{rem}
2874: \end{rem}
2875: An iteration of S1 contains exactly one instant, while an iteration of S2 will have many instants within it.
2876:
2877: \begin{defi}
2878: Let $p$ be a node in $G^{\prime}$, and $M(p)$ be a psg below $p$ in $G^{\prime}$. During any iteration of S2, a node $n \in M(p)$ is a leading node of $M(p)$ at instant $j$ if (i) $n$ is in OPEN and (ii) all its successors in $M(p)$, if any, are in CLOSED at that instant $j$.
2879: \end{defi}
2880:
2881: \begin{lem} \label{lem30}
2882: During an iteration of S2, let $M(p)$ be a psg below a
2883: node $p \in G^{\prime}$. Then at any instant of that iteration, the following must
2884: hold:
2885:
2886: (a) If $q$ be a leading node in $M(p)$, then $q$ is eligible in OPEN;
2887: (b) Conversely, if $p \not\in CLOSED$, there will exist at least one leading node of $M(p)$.
2888:
2889: \end{lem}
2890:
2891: {\bf Proof.}
2892: Similar to the proof of Lemma \ref{lem08}.
2893: \qed\\
2894:
2895:
2896: \begin{lem} \label{lem40}
2897: In any iteration of S2, when a node $n$ is sent to CLOSED during
2898: the bottom-up computation, the followings hold:
2899: \begin{enumerate}
2900: \item $h(n) = h^{\prime}(n)$.
2901: \item $front(n)$ = a tip node of a minimal-cost psg below $n$.
2902: \end{enumerate}
2903: \end{lem}
2904:
2905: {\bf Proof.}
2906: \begin{enumerate}
2907: \item By double induction. First on iteration $i$, and then on the nodes
2908: of the explicit graph which are sent to CLOSED in that iteration.
2909:
2910: \underline{\bf Induction Basis.} At iteration $i = 1$, $s$ is expanded. Let $n_1, n_2, \ldots,
2911: n_k$, be those children of $s$
2912: which are tip nodes and are put in OPEN.
2913:
2914: Now for each $n_j$, $1 \le j \le k$, $h(n_j)$ equals $0, \infty$ or $\hat{h}(n_j)$
2915: according as $n_j$ is a terminal leaf node, a nonterminal leaf node or an internal
2916: node of $G$. Since each $n_j$ is a tip node, whichever psg they may belong to,
2917: $h(n_j) = h^{\prime}(n_j)$, $1 \le j \le k$ (from the definition of $h^{\prime}$). Whenever any of these nodes travels to CLOSED, it will have $h = h^{\prime}$.
2918:
2919: Now we show that the result holds for $s$.
2920:
2921: \underline{If $s$ is an AND node}
2922:
2923: \underline{Case I: $s$ did not enter CLOSED} Clearly, by step B2 of the algorithm,
2924: $s$ was not eligible. Then, among the children of $s$, at least one did not
2925: enter CLOSED. Since this is the first iteration and $s$ is the only expanded node, this case is possible only if there is a self-loop at $s$, implying that
2926: $s$ is of type-III. Thus $s$ did not enter CLOSED, and the lemma holds trivially.
2927:
2928: \underline{Case II: $s$ entered CLOSED}. Since $s$ is
2929: an AND node, all its children must have been sent to CLOSED prior to $s$ becoming eligible. Now, S2 sends each child of $s$, $n_j$, to CLOSED with $h(n_j) = h^{\prime}(n_j)$ (as
2930: $n_j$ is a tip node). Hence
2931: from the definition of $h^{\prime}$, clearly, $h(s) = h^{\prime}(s)$ when $s$ is sent to CLOSED.
2932:
2933: \underline{If $s$ is an OR node}
2934:
2935: \underline{Case I: $s$ did not enter CLOSED.} Then the lemma is vacuously true.
2936: (Note that, since $s$ is an OR node, if any of its children had entered OPEN, eventually $s$
2937: would
2938: also have entered OPEN, and then, CLOSED. Then it must be that no child of $s$ even
2939: entered OPEN. This is possible only if $s$ is a type-III node and there is just
2940: a self-loop from $s$.)
2941:
2942: \underline{Case II: $s$ entered CLOSED.} Then some child(ren) of $s$, prior to
2943: $s$ itself, must have entered OPEN, and then CLOSED. Let $M$ be a minimal-cost psg
2944: below $s$ in the explicit graph of iteration 1. Let $Z_M = \{n_p\}$. Let us assume
2945: that $s$ entered CLOSED with its $h$-value defined by some child $n_q \not= n_p$
2946: and $h(s) > h^{\prime}(s)$. Then $h(s) > h^{\prime}(s) = c(s,n_p) + h^{\prime}(n_p) >
2947: h^{\prime}(n_p) = h(n_p)$
2948: (since $n_p \in Z_M$). Then clearly, $n_p$ remained in OPEN when $s$ got selected
2949: and sent to CLOSED. This is in contradiction to the criterion of node
2950: selection from OPEN on the basis of minimum $h$-value.
2951:
2952: Thus the lemma holds for all nodes entering CLOSED in iteration 1.
2953:
2954: \underline{\bf Induction Hypothesis.} Let the lemma be true up to iteration $i = l$.
2955:
2956: \underline{\bf Induction Step:} $i = l + 1$. Let the nodes that enter CLOSED be $n_1, n_2,
2957: \ldots $.
2958: Clearly, the first node, $n_1$, that enters CLOSED from OPEN must be a tip node
2959: of the explicit graph at instant $l + 1$, for which $h(n_1) = 0, \infty,$ or $\hat{h}(n_1)$
2960: according as $n_1$ is a terminal leaf, a nonterminal leaf, or an internal node of $G$.
2961: Thus $h(n_1) = h^{\prime}(n_1)$ for the tip node $n_1$.
2962:
2963: Let us assume that the lemma holds up to the $k$th node at instant $l+1$, i.e.\ nodes
2964: $n_1, \ldots n_k$ enter CLOSED with $h(n_j) = h^{\prime}(n_j), 1 \le j \le k$.
2965:
2966: We need to show that $n_{k+1}$ goes to CLOSED with
2967: $h(n_{k+1}) = h^{\prime}(n_{k+1})$.
2968:
2969: \underline {Case I:} $n_{k+1}$ is a tip node. Trivially true.
2970:
2971: \underline{Case II:} $n_{k+1}$ is an internal node. There can be two subcases within this.
2972:
2973: \underline {Case II(a):} $n_{k+1}$ is an AND node. Clearly, $n_{k+1}$ must be eligible and all the children
2974: of
2975: $n_{k+1}$ must have been
2976: previously put into CLOSED, otherwise $n_{k+1}$ could not have become eligible. Hence
2977: $n_{k+1}$'s
2978: children must occur among $n_{1},\ldots ,n_{k}$ and have $h$-values = $h^{\prime}$,
2979: according
2980: to
2981: the induction hypothesis. Now, since S2 computes the $h$-value of an AND node by
2982: successively
2983: adding the $h$-values of its children when each of them is selected from OPEN, it is clear
2984: that $h(n_{k+1}) = h^{\prime}(n_{k+1})$ for the AND node $n_{k+1}$.
2985:
2986: \underline {Case II(b):} $n_{k+1}$ is an OR node. Let $p$ be the child through which $n_{k+1}$ had
2987: last received its $h$-value prior to its getting selected from OPEN, i.e. $h(n_{k+1}) = c(n_{k+1},p) + h(p)$.
2988: If $h(n_{k+1}) \not= h^{\prime}(n_{k+1})$, let $q$ be the child of $n_{k+1}$ in a minimal-cost psg $M$ below $n_{k+1}$,
2989: i.e. $h^{\prime}(n_{k+1}) = c(n_{k+1},q) + h^{\prime}(q)$.
2990: We shall show that this leads to a contradiction.
2991:
2992: Since $q$ has not yet entered CLOSED, the MES $M(n_{k+1},G^{\prime})$ that contains $q$ must have leading nodes, by Lemma \ref{lem30}. Let the leading nodes of $M(n_{k+1},G^{\prime})$ be $q_1, q_2, \ldots, q_m$ ($m \geq 1$). Since $M(n_{k+1},G^{\prime})$ is a minimal-cost MES, we have $h(q_j) = h^{\prime}(q_j)$, $1 \leq j \leq m$.
2993:
2994: Thus every $q_{j}, 1 \leq j \leq m,$ has, when $n_{k+1}$ is selected from OPEN,
2995: \begin{tabbing}
2996: aaaaa\=aaaa\= \kill
2997: $h(q_{j})$ \> = $h^{\prime}(q_{j})$ \\
2998: \> $< h^{\prime}(n_{k+1})$ \\
2999: \> $< c(n_{k+1},p) + h^{\prime}(p)$, as p is $n_{k+1}$'s child \\
3000: \> = $c(n_{k+1},p) + h(p)$, by induction hypothesis \\
3001: \> = $h(n_{k+1})$, as assumed previously
3002: \end{tabbing}
3003: Therefore, when node $n_{k+1}$ was selected from OPEN,
3004: $q_{j}$, being a leading node, was also eligible in OPEN with $h(q_{j}) < h(n_{k+1})$.
3005: This is clearly in contradiction to the best-first node selection criterion,
3006: on the basis of minimum $h$, used by S2. Hence the result.
3007:
3008: \item As in (1), the proof is by double induction, first on the iteration and then on the nodes of $G^{\prime}$ entering CLOSED in that iteration. We simply give an outline of the proof below.
3009:
3010: If a tip node $n$ enters CLOSED, $n$ has itself as its front, and the lemma
3011: is trivially true, as $n$ is the only node in a minimal-cost psg below it.
3012:
3013: When an internal node $n$ goes to CLOSED, $h(n)$ is set to $h^{\prime}(n)$,
3014: (the cost of a minimal-cost psg below $n$), as proved in part (1) above. Now, when $n$ enters CLOSED, its $front$ is decided in step B2.2. If $n$ is an OR node, $front(n)$ is set to the $front$ of one of its children which, in turn, defines $h^{\prime}(n)$. Note that $h^{\prime}(n)$ is the cost of a minimal-cost psg below $n$. Thus $front(n)$ becomes a tip node of a minimal-cost psg below $n$. If $n$ is an AND node, its $h^{\prime}(n)$-value is computed by adding the $h^{\prime}$-values of all the children and the costs of the arcs connecting them with $n$. Now, $front(n)$ is set to the $front$ of one of the children of $n$, which in turn, is a tip node of a minimal-cost psg below it. \qed\\
3015: \end{enumerate}
3016:
3017:
3018: \begin{lem} \label{lem50} If $s$ is not of type-III, then at the end of every Bottom-up
3019: computation,
3020: it must enter CLOSED.
3021: \end{lem}
3022:
3023: {\bf Proof.} In any iteration, given the explicit graph, if $s$ is not of type-III, there will exist psgs below $s$ in $G^{\prime}$.
3024: Let $M_1, M_2, \ldots, M_k$ be the all possible psgs rooted at $s$. Let
3025: $M_j, 1 \le j \le k$, be a minimal-cost psg below $s$ with cost $h^{\prime}(s)$.
3026: Now it is easy to show that eventually $s$ must enter CLOSED.
3027: At each instant, (i.e. execution of step B2 of Bottom-Up computation), a distinct node is selected from OPEN and put into CLOSED. Once a node enters CLOSED, it never returns to OPEN. Since in any iteration, there are only finitely many nodes in $G^{\prime}$, it is clear that the Bottom-Up computation cannot continue indefinitely. On the other hand, the Bottom-Up computation cannot get stuck since there must exist a leading node from $M_j$ which is eligible (Lemma \ref{lem30}), prior to sending $s$ to CLOSED. Thus it is clear that,
3028: after finitely many instants
3029: of a Bottom-Up computation, $s$ will become the leading node of $M_j$ and will
3030: eventually be sent from OPEN to CLOSED.\qed\\
3031:
3032: \begin{lem} \label{lem60} Under admissible heuristics, at the end of Bottom-Up
3033: computation of every iteration of S2,
3034: we have $h^{\prime}(n) \le h^{*}(n)$, where $n$ is a type-I or type-II node in $G$ and is currently included in $G^{\prime}$.
3035: \end{lem}
3036:
3037: {\bf Proof.} Let $M$ be a minimal-cost MES below $n$ in $G$, and let
3038: $M^{\prime}$ be the portion of $M$ contained in $G^{\prime}$. Thus, $M^{\prime}$ is a psg below $n$ in $G^{\prime}$.
3039: Now clearly the following observations will hold:
3040:
3041: ({\em a}) From the definition of $h^{\prime}$, $h^{\prime}(n) \le \beta(n,M^{\prime})$,
3042: since $M^{\prime}$ is just one of the psgs below $n$ and $M^{\prime}$ need not
3043: define $h^{\prime}(n)$, {\em and}
3044: ({\em b}) $\beta(n,M^{\prime}) \le \beta(n,M) = h^{*}(n)$, by the definition of
3045: $\beta$ (Definition \ref{betaexpl}) and the admissibility of the heuristic function (Definition \ref{admheur}).
3046:
3047: Now combining ({\em a}) and ({\em b}), the lemma follows. \qed\\
3048:
3049:
3050: \begin{lem} \label{lem70} In any iteration of S2, during the Bottom\_Up computation, no type-III
3051: node in $G^{\prime}$ ever enters CLOSED.
3052: \end{lem}
3053:
3054: {\bf Proof.} The proof is similar to that of Lemma \ref{lem10} for S1. Note that the Sub-problem Composition Theorem for Explicit Graphs (i.e. Theorem \ref{thm25}) is used in place of the Sub-problem Composition Theorem for Implicit Graphs (Theorem \ref{thm20}). \qed\\
3055:
3056:
3057: \begin{th}\label{thm50} If the implicit graph $G$ has at least one solution graph, then S2 running with admissible heuristics terminates with SUCCESS by outputting $h(s) = h^{*}(s)$.
3058: \end{th}
3059:
3060: {\bf Proof.} Let $G$ be any AND/OR graph containing at least one solution graph.
3061: Since node branching factor is finite, there are only finitely many psgs $M$ below $s$
3062: which are subgraphs of $G$, having costs $\beta(s,M) \le h^*(s)$. Now, combining Lemmas
3063: \ref{lem40}
3064: and \ref{lem60}, $h(s) = h^{\prime}(s) \le h^*(s)$ ($s$ being a type-I node, as it has a
3065: solution graph below it) at the end of each iteration of S2. Now by Lemma \ref{lem40}, at the
3066: end of each iteration, $front(s)$ is set to a tip node of a minimal-cost psg below
3067: $s$, and this $front(s)$ is expanded in the next iteration. Since every $front(s)$ is unique and arc-costs are positive, after finitely many iterations there will be no more psgs having costs $\leq h^*(s)$. Thus unless S2 terminates, it has to continue
3068: the search with psgs having costs $> h^*(s)$, which is in contradiction to the
3069: Lemma \ref{lem60}.
3070: Thus S2 must terminate after finitely many iterations.
3071:
3072: Again, as $s$ is of type-I, $h^*(s) < \infty$, implying that at the end of each iteration
3073: $h(s) < \infty$. Hence S2 cannot terminate with FAILURE.
3074:
3075: Hence the alternative termination condition namely, $front(s)$ is a terminal leaf,
3076: must hold. Let $M$ be the psg below $s$ that sets $front(s)$ to be a terminal leaf.
3077: Then $Z_M$ cannot contain a non-leaf tip node (otherwise $front(s)$ could not be a
3078: terminal leaf, from the step B2.2 of S2). Now $Z_M$ cannot contain any nonterminal
3079: leaf either, as it would otherwise violate the fact that $s$ is a type-I node and $front(s)$
3080: is a tip node of a minimal-cost psg below $s$.
3081:
3082: Therefore, $M$ must be a solution graph, and $h(s) = \beta(s,M) \ge h^*(s)$.
3083:
3084: Combining this with $h(s) = h^{\prime}(s) \leq h^{*}(s)$ at the end of every iteration (Lemma \ref{lem40} and Lemma \ref{lem60}), we have $h(s) = h^*(s)$ at termination of S2. \qed\\
3085:
3086: \begin{th}\label{thm60} S2 terminates with FAILURE on a finite AND/OR graph $G$
3087: that does not contain a solution graph.
3088: \end{th}
3089:
3090: {\bf Proof.} Let $G$ be a finite AND/OR graph that does not contain a solution graph. While S2 runs on $G$, in its every iteration a node called $front(s)$ is expanded. But in every iteration, $front(s)$ is a distinct node, i.e. a tip node of a minimal-cost psg below $s$. Since $G$ is finite, S2 can run for finitely many iterations.
3091:
3092: The termination of S2 can happen either when $front(s)$ is a terminal leaf or when $h(s) = \infty$. Now, if $front(s)$ is a terminal leaf, S2 must have obtained a solution graph below $s$. This contradicts the fact that $G$ does not contain a solution graph. Hence, the other condition for termination namely, $h(s) = \infty$ must hold, implying that S2 terminates with FAILURE. (This FAILURE termination can happen in either of two ways. $s$ could be a type-II node in $G$, in which case $h(s)$ is set to $\infty$ in step B2.3. Alternatively, $s$ could be a type-III node in $G$, in which case it does not travel to CLOSED at the end of a Bottom-Up computation and has its $h$-value set to $\infty$ at step B4. In either case S2 terminates with FAILURE.) \qed\\
3093:
3094:
3095: \subsection{Complexity Analysis of S2}
3096:
3097: In this section, we present the complexity analysis of S2.
3098:
3099: \begin{defi} \label{defcompl}
3100:
3101: (i) Let $G$ be an AND/OR graph. We define a set of nodes $V$ as follows:
3102: \begin{enumerate}
3103:
3104: \item If $G$ has at least one solution graph, then:
3105:
3106: \begin{enumerate}
3107: \item $s$ is in $V$ if $s$ is not a terminal or nonterminal leaf node;
3108: \item a node $n$ is in $V$ if $n$ is not a terminal leaf node,
3109: \underline{and} if there exists a psg $M$ below $s$
3110: in some explicit graph $G^{\prime}$ for $G$ such that $n$ is a tip node
3111: in $M$ and $\beta(s,M) \leq h^{*}(s)$.
3112: \end{enumerate}
3113:
3114: \item If $G$ has no solution graph, but it is finite, then every non-leaf node $n \in G$ will belong to $V$.
3115: \end{enumerate}
3116:
3117: (ii) Let $N_2 = \mid V \mid$.
3118:
3119: \end{defi}
3120:
3121:
3122: \begin{th}\label{thm70} Let $G$ be an implicitly defined AND/OR graph, such that: (a) $G$
3123: contains at least one solution graph or (b) $G$ is finite. Now
3124: when S2 runs on $G$ with an admissible heuristic, the followings are true:
3125: \begin{enumerate}
3126: \item S2 requires $O(K_2) = O(N_2)$ storage;
3127: \item S2 makes at most $N_2+1$ iterations;
3128: \item S2 runs in $O(N_2K_2^{2}) = O(N_2^{3})$ time;
3129: \end{enumerate}
3130: where $N_2$ is as in Definition \ref{defcompl}, and $K_2$ is the total number of nodes in the explicit graph $G^{\prime}$ in the last iteration of
3131: S2 ($K_2 \le b*N_2$, where $b$ is the maximum branching factor of a node, which is
3132: finite).
3133: \end{th}
3134:
3135: {\bf Proof.}
3136: \begin{enumerate}
3137: \item S2 stores the entire explicit graph having $K_2$ nodes, with $O(b)$
3138: information at each node. As $b$ is finite, the result follows.
3139:
3140: \item
3141:
3142: (a) If $s$ is a terminal leaf node, S2 will terminate in the first iteration.
3143: Otherwise, S2 continues the search by expanding $front(s)$ in every iteration. Thus, as long as S2 does not terminate, it must be the case
3144: that $front(s)$ is neither a terminal node, nor is it a nonterminal node. Moreover, $front(s)$ will be assigned to a distinct node in every iteration of S2.
3145:
3146: Thus at each iteration prior to termination, S2 expands a distinct node, say $n$.
3147: Now, from Lemma \ref{lem40}(2), $n$ is a tip node of a minimal-cost psg $M$ below $s$.
3148: Such a psg will have cost $\beta(s,M) = h^{\prime}(s) \le h^{*}(s)$ (Lemma \ref{lem60}).
3149: Thus the expanded node $n$ (= $front(s)$) will be one of the nodes of $V$. Thus prior to termination, S2 makes at most $N_2$ node expansions in as many iterations, plus one more iteration for termination.
3150:
3151: (b) If $s$ is a nonterminal leaf node, S2 will terminate in the first iteration. Otherwise, it continues the search by expanding a distinct node as assigned to $front(s)$ in every iteration. Since there are $N_2$ internal nodes in $G$, S2 can make at most $N_2$ expansions in $N_2$ iterations before terminating in the ($N_2 + 1$)th iteration.
3152:
3153: \item S2 makes $N_2+1$ iterations, from (2) above. In each iteration (prior to the terminating one),
3154: it does the
3155: followings:
3156: \begin{enumerate}
3157: \item (Step S2.2) \underline{Checks} for termination, in $O(1)$ time;
3158: \item (Step S2.2.1) \underline{Expands} a node and generates its children, in $O(b)$ time
3159: (where
3160: $b$ is the maximum branching factor of a node, which is finite);
3161: \item (Step S2.2.2) \underline{Creates} OPEN, in $O(K_2)$ time, since there are $K_2$
3162: nodes in $G^{\prime}$;
3163: \item (Step S2.2.3) \underline{Calls} Bottom-Up; in each call, it:
3164: \begin{enumerate}
3165: \item (Step B1) \underline{Creates} CLOSED, in $O(1)$ time;
3166: \item (Step B2) \underline{Checks} conditions, in $O(1)$ time, and makes $O(K_2)$
3167: iterations of the following steps:
3168: \begin{enumerate}
3169: \item (Step B2.1) \underline{Selects} an eligible node from OPEN, in $O(K_2)$ time;
3170: \item (Step B2.2) \underline{Decides} front, in $O(b)$ time;
3171: \item (Step B2.3) \underline{Evaluates} the parents of the selected node, in $O(K_2)$ time;
3172: \end{enumerate}
3173: \item (Step B3) \underline{Clears} OPEN, in $O(1)$ time;
3174: \item (Step B4) \underline{Checks} whether $s \in CLOSED$, in $O(1)$ time.
3175: \end{enumerate}
3176: \end{enumerate}
3177:
3178: Thus the overall time complexity of S2 is
3179:
3180: $O(N_2(1+b+K_2+(1+1+K_2(K_2+b+K_2)+1+1)))$ = $O(N_2K_2^{2}) =O(b^{2}N_2^{3}) = O(N_2^{3})$.
3181: \end{enumerate} \qed\\
3182:
3183:
3184: \section{Experimental Results}
3185:
3186:
3187: The algorithms S1, $\mbox{REV}^{*}$, S2, $CFC_{REV^*}$ and $\mbox{AO}^{*}$ have been empirically compared on a DEC-Alpha workstation. All algorithms except $CFC_{REV^*}$ were programmed in C++. For $CFC_{REV^*}$, the C-code was obtained from the website mentioned in [Jim$\acute{e}$nez and Torras 2000]. The experimental results obtained are now discussed.
3188:
3189: First the AND/OR graphs (problem instances) are generated using the following parameters: the total number of nodes in the implicit graph, the percentage of AND nodes, and whether the graph is cyclic or acyclic. For every combination of these parameters, the relevant algorithms are run over a set of one hundred randomly generated graphs. The average time of execution and the average number of nodes evaluated in each case (i.e. over 100 problems) are noted in tables 4 and 5. The time is mentioned in CPU Clock Ticks, where 1 Clock Tick = $10^{-6}$ sec. The number of node evaluations is the number of times the cost of a node is computed during bottom-up phase (one bottom-up phase for S1 and $\mbox{REV}^{*}$, multiple bottom-up phases for S2, $CFC_{REV^*}$ and $\mbox{AO}^{*}$.) The tables 4 and 5 show a snapshot of the experimental results. As it was found that variations in heuristic estimate or node branching factor do not reveal any new information, the heuristic estimate was kept at 90\% to 100\% of the solution cost for each node and the node branching factor was kept fixed at 3.
3190:
3191: One characteristic of the graphs we used in our experiments is that, the start node is always type-I - i.e. it is not of type-II or type-III. The reason for choosing this is that if the start node is of type-II or type-III, it is assigned a very high heuristic value by our heuristic computation program. In that case, heuristic search algorithms like S2 or $CFC_{REV^*}$ find the $h$-value of start node to be $\infty$ (in the first iteration itself) and exit from the problem almost immediately, making a fair comparison with S1 or
3192: $\mbox{REV}^{*}$ impossible. For this reason, the graphs that do not have a solution graph below $s$ are discarded from our set of hundred problems in each case.
3193:
3194: %\renewcommand{\arraystretch}{1.6}
3195: %\setlength\fboxsep{0.05cm}
3196:
3197: \begin{table}
3198: \begin{centering}
3199: \begin{tabular}{|c|c|c|c|c|c|c|} \hline
3200: \% & Nodes & S1 & $\mbox{REV}^{*}$ & S2 & $CFC_{REV^*}$ & $\mbox{AO}^{*}$ \\ \cline{3-7}
3201: AND & in $G$ & Time & Time & Time & Time & Time \\
3202: & & Node & Node & Node & Node & Node \\ \hline
3203:
3204: 30 & 1000 & 20 & 14 & 2 & 1 & 5 \\
3205: & & 1418 & 3496 &1952 & 580 & 284 \\ \cline{2-7}
3206: & 2000 & 70 & 60 & 7 & 3 & 12 \\
3207: & & 2865 & 7297 & 4689 & 1202 & 795 \\ \cline{2-7}
3208: & 3000 & 148 & 139 & 14 & 6 & 20 \\
3209: & & 4305 & 11170 & 7418 & 1771 & 1324 \\ \hline
3210: 50 & 1000 & 20 & 14 & 376 & 88 & 32 \\
3211: & & 1632 & 3489 & 61711 & 6698 & 3848 \\ \cline{2-7}
3212: & 2000 & 66 & 60 & 1023 & 374 & 105 \\
3213: & & 3108 & 7297 & 113778 & 18779 & 9023 \\ \cline{2-7}
3214: & 3000 & 137 & 140 & 1296 & 698 & 180 \\
3215: & & 4496 & 11169 & 134432 & 28185 & 13804 \\ \hline
3216:
3217: \end{tabular}
3218: \caption{Performance of Algorithms on Acyclic Graphs}
3219: \end{centering}
3220: \end{table}
3221:
3222: \begin{table}
3223: \begin{centering}
3224: \begin{tabular}{|c|c|c|c|c|c|} \hline
3225: \% & Nodes & S1 & $\mbox{REV}^{*}$ & S2 & $CFC_{REV^*}$ \\ \cline{3-6}
3226: AND & in $G$ & Time & Time & Time & Time \\
3227: & & Node & Node & Node & Node \\ \hline
3228:
3229: 30 & 1000 & 21 & 14 & 2 & 1 \\
3230: & & 1415 & 3312 & 2052 & 849 \\ \cline{2-6}
3231: & 2000 & 73 & 62 & 9 & 3 \\
3232: & & 2919 & 6949 & 4946 & 1576 \\ \cline{2-6}
3233: & 3000 & 157 & 144 & 20 & 7 \\
3234: & & 4460 & 10732 & 8602 & 2461 \\ \hline
3235: 50 & 1000 & 17 & 9 & 12 & 7 \\
3236: & & 1115 & 2110 & 5811 & 2365 \\ \cline{2-6}
3237: & 2000 & 54 & 35 & 25 & 17 \\
3238: & & 2215 & 4110 & 10319 & 5022 \\ \cline{2-6}
3239: & 3000 & 112 & 82 & 42 & 35 \\
3240: & & 3326 & 6296 & 13912 & 7497 \\ \hline
3241:
3242: \end{tabular}
3243: \caption{Performance of Algorithms on Cyclic Graphs}
3244: \end{centering}
3245: \end{table}
3246:
3247:
3248: From the tables, the following observations can be made:
3249:
3250: \begin{enumerate}
3251: \item the smallest execution time is taken by $\mbox{REV}^{*}$ among uninformed algorithms and by $CFC_{REV^*}$ among heuristic search algorithms;
3252:
3253: \item S1 makes less node evaluations than $\mbox{REV}^{*}$. This is expected, as S1 is designed to work in a best-first manner. But the same effect is not observed between S2 and $CFC_{REV^*}$ - actually, S2 makes more node evaluations than $CFC_{REV^*}$. While this may appear to be contradictory, the reason is that $CFC_{REV^*}$ operates on a much smaller size of OPEN (compared to S2) in each iteration. Ultimately, this effect dominates over the best-first nature of S2. It is interesting that $\mbox{AO}^{*}$ makes even less node evaluations (than $CFC_{REV^*}$) on acyclic graphs. This is because, $\mbox{AO}^{*}$ employs the best-first principle along with a smaller set of initial nodes (in Z-list) and thereby gains in node evaluations over both S2 and $CFC_{REV^*}$.
3254:
3255: \item In spite of evaluating less nodes than $CFC_{REV^*}$, $\mbox{AO}^{*}$ takes more time to execute. This is because, the time taken for predecessor-checking during the bottom-up computation in $\mbox{AO}^{*}$ is quite high and dominates over the time for node evaluations;
3256:
3257: \item S2 makes more node evaluations compared to $CFC_{REV^*}$, but takes much less time per node than $CFC_{REV^*}$. Thus S2 does less work per node compared to $CFC_{REV^*}$, which is also clear from the design of the algorithms.
3258:
3259: \item It was observed that under identical tie-resolution strategy, S2, $\mbox{AO}^{*}$ and $CFC_{REV^*}$ expand the same number of nodes while running on acyclic graphs. The same is true about S2 and $CFC_{REV^*}$ on cyclic graphs. The data has been omitted from this presentation.
3260:
3261: \end{enumerate}
3262:
3263:
3264: \section{Summary and Future Work}
3265:
3266: Best-first search in cyclic AND/OR graphs had been a long-unresolved problem
3267: of artificial intelligence. Over the last few years, a number of studies have been reported on this topic. However, all of these studies lacked an unified theoretical framework for both cyclic and acyclic AND/OR graphs, and this led to a lacuna in the theoretical proofs of those algorithms. In this paper, we have taken a fresh look at the problem. First, a new and comprehensive framework for cyclic AND/OR graphs has been
3268: presented, which should be of use to future researchers as well. Then two best-first algorithms, S1 and S2, have been developed for searching AND/OR graphs in the presence of cycles. The new theoretical framework has been useful in establishing the correctness and complexity results of S1 and S2 in detail.
3269:
3270: S1 and S2 have been implemented on a DEC-Alpha
3271: Workstation, and a large number of experiments on
3272: randomly-generated graphs have yielded correct results in all cases.
3273: However, computational times show that the execution time of S2 is not favourable compared to that of $CFC_{REV^*}$ (on the same set of random graphs and heuristic distribution). Again, the node evaluations of $CFC_{REV^*}$ is not favourable compared to that of $\mbox{AO}^{*}$ (on acyclic graphs). Clearly, the design of an algorithm that has the best-first nature of S2, the time performance of $CFC_{REV^*}$ and the node performance of $\mbox{AO}^{*}$ remains a research challenge for the future.
3274:
3275:
3276: \section[*]{Acknowledgements}
3277:
3278: The authors would like to express their acknowledgements to a number of individuals. P. P. Chakrabarti has been very helpful in discussing his work on the topic while on a trip to the authors' Institute. D. Hvalica has corresponded with the authors and has sent his earlier work in this topic, which was a great help. P. Jim$\acute{e}$nez and C. Torras have provided the code of their $CFC_{REV^*}$ algorithm and also explained the method of running it, which was very useful in the experimental part of the work.
3279:
3280: \begin{thebibliography}{99}
3281:
3282: \bibitem{ba2} Bagchi, A. and Mahanti, A. 1983. Admissible
3283: Heuristic Search in AND/OR Graphs. {\em Theoretical Computer Science} 24(2):207-219.
3284:
3285: \bibitem{Cao} Cao, T. and Sanderson, A.C. 1998. AND/OR Net Representation for Robotic Task Sequence Planning. {\em IEEE Transactions on Systems Man and Cybernetics - Part C: Applications and Reviews.} 28(2):204-218.
3286:
3287: \bibitem{Chak0} Chakrabarti, P.P., Ghose, S. and De Sarkar, S.C. 1988. Admissibility of $\mbox{AO}^{*}$ When Heuristics Overestimate. {\em Artificial Intelligence} 34:97-113.
3288:
3289: \bibitem{Chak1} Chakrabarti, P.P., Ghose, S., Acharya, A. and De Sarkar, S.C. 1990. Heuristic Search in Restricted Memory. {\em Artificial Intelligence} 41: 197 - 221.
3290:
3291: \bibitem{Chak} Chakrabarti, P.P 1994. Algorithms for Searching Explicit AND/OR Graphs and Their Applications to Problem Reduction Search. {\em Artificial Intelligence} 65:329-345.
3292:
3293: \bibitem{Chn} Chang, C.L. and Slagle, J.R. 1971. An Admissible and Optimal Algorithm for Searching AND/OR Graphs. {\em Artificial Intelligence} 2:117-128.
3294:
3295: \bibitem{Dem} DeMello, L.S.H. and Sanderson, A.C. 1991. A Correct and Complete Algorithm for the Generation of Mechanical Assembly Sequences. {\em IEEE Trans. Robotics and Automation} 7(2):228-240.
3296:
3297: \bibitem{Dij} Dijkstra, E. W. 1959. A Note on Two Problems in Connection with
3298: Graphs. {\em Numerische Mathematik} 1:269-271.
3299:
3300: \bibitem{Gh1} Ghose, S. and Mahanti, A. 1997. Search Algorithms for
3301: AND/OR Graphs with Cycles. {\em Working Paper WPS-295/97, Indian Institute of Management Calcutta.}
3302:
3303: \bibitem{Gh2} Ghose, S. 1998. Generalized $\mbox{A}^{*}$ for Cyclic AND/OR
3304: Graphs. {\em Student Abstract, Proceedings of the Fifteenth National Conference on Artificial Intelligence} : 1192-1192.
3305:
3306: \bibitem{Gh3} Ghose, S. 1999. Best-First Search Algorithms for
3307: AND/OR Graphs with Cycles. {\em Fellow Programme Dissertation, Indian Institute of Management Calcutta.}
3308:
3309: \bibitem{Han} Hansen, E. and Zilberstein, S., 1998. Heuristic Search in Cyclic AND/OR Graphs. {\em Proceedings of the Fifteenth National Conference on Artificial Intelligence} : 412-417.
3310:
3311: \bibitem{Hva} Hvalica, D. 1996. Best-First Search Algorithm in AND/OR Graphs with Cycles. {\em Journal of Algorithms} 21:102-110.
3312:
3313: \bibitem{Jim} Jim$\acute{e}$nez, P. and Torras, C. 2000. An Efficient Algorithm for Searching Implicit AND/OR Graphs with Cycles. {\em Artificial Intelligence} 124: 1-30.
3314:
3315: \bibitem{Kum} Kumar, V. 1991. A General Heuristic Bottom-up Procedure for Searching AND/OR Graphs. {\em Information Science} 56:39-57.
3316:
3317: \bibitem{Levi} Levi, G. and Sirovich, F. 1976. Generalized AND/OR Graphs. {\em Artificial Intelligence} 7:243-259.
3318:
3319: \bibitem{ma1} Mahanti, A. and Bagchi, A. 1985. AND/OR Graph
3320: Heuristic Search Methods. {\em Journal of the Association for Computing Machinery} 32(1) : 28-51.
3321:
3322: \bibitem{Mar} Martelli, A. and Montanari, U. 1973. Additive AND/OR
3323: Graphs. {\em Proceedings of the International Joint Conference on Artificial Intelligence.}
3324:
3325: \bibitem{Mar1} Martelli, A. and Montanari, U. 1978. Optimising Decision Trees Through Heuristically Guided Search. {\em Communications of the ACM} 21(12) : 1025-1039.
3326:
3327: \bibitem{Nils} Nilsson, N. J. 1980. {\em Principles of Artificial Intelligence.} Palo Alto: Tioga Publishing Company.
3328:
3329: \bibitem{Prl} Pearl, J. 1984. {\em Heuristics: Intelligent Search Strategies for Computer Problem Solving.} Reading, Mass.: Addison-Wesley Publishing Company.
3330:
3331: \end{thebibliography}
3332:
3333: \newpage
3334:
3335: \section{Appendix}
3336:
3337: The problem of cyclic AND/OR graph search has attracted considerable research attention
3338: in recent times [Chakrabarti 1994; Hvalica 1996; Jim$\acute{e}$nez and Torras 2000]. However all these attempts
3339: have overlooked certain important issues, which underline the fundamental nature of the problem.
3340: We briefly review these recent work in this section.
3341:
3342: \subsection{Algorithm $\mbox{REV}^{*}$ }
3343:
3344: [Chakrabarti 1994] has suggested a definitional framework and two algorithms,
3345: Iterative\_Revise and $\mbox{REV}^{*}$.
3346:
3347: \begin{center}
3348: \underline{\bf Scenario 1. Basic structure collapses}
3349: \end{center}
3350:
3351: Nilsson's statement
3352: {\em "This recursive definition is satisfactory because we are assuming acyclic
3353: graphs"} [Nilsson 1980, pp. 102] was a warning in disguise that for cyclic AND/OR graphs, it may be difficult
3354: to have a formalism based on recursive structures. [Chakrabarti 1994] defined the basic structure $opt(A,n)$ (pp. 331)
3355: which enters into an infinite recursion.
3356: [Chakrabarti 1994] used the following notation:
3357:
3358: $A$: Implicit AND/OR graph
3359:
3360: $opt(A,n)$: Cost of a minimal-cost solution graph below node $n$ in $A$
3361:
3362: $t(n)$: Non-negative cost at terminal node $n$
3363:
3364: $D(n)$: Solution graph below $n$
3365:
3366: We now reproduce the definition of $opt(A,n)$ from [Chakrabarti 1994]:
3367:
3368: For every AND/OR graph $A$, the quantity $opt(A,n)$ is defined recursively as
3369: follows:
3370:
3371: \begin{tabbing}
3372: aaaaaaaaaa\=aaa\= \kill
3373: $opt(A,n)$ \> = $t(n)$, if $n$ is a terminal node in $A$; \\
3374: \> = $\infty$, if there does not exist any solution graph $D(n)$ in $A$; \\
3375: \> = $min_{1 \le i \le k} \{opt(A,n_i) + c(n,n_i)\}$, for OR node $n$ with immediate \\
3376: \> \> successors $n_i$, $1 \le i \le k$; \\
3377: \> = $\sum_{1 \le i \le k} \{opt(A,n_i) + c(n,n_i)\}$, for AND node $n$ with immediate \\
3378: \> \> successors $n_i$, $1 \le i \le k$.
3379: \end{tabbing}
3380:
3381: \vspace{5pt}
3382:
3383: We now illustrate the severe drawback in this definition on the implicit graphs
3384: $A$ of Figure \ref{fig110}.
3385:
3386:
3387: \linethickness{0.4pt}
3388: \unitlength=0.5mm
3389: \begin{figure}
3390: \centering
3391: \caption{$opt(A,s)$ collapses}
3392: \label{fig110}
3393: \linethickness{0.4pt}
3394: \begin{picture}(158.00,73.00)
3395: \put(20.00,41.00){\makebox(0,0)[cc]{$s$}}
3396: \put(20.00,41.00){\circle{10.00}}
3397: \bezier{216}(20.00,36.00)(-1.00,21.00)(16.00,44.00)
3398: \put(12.00,38.00){\vector(2,3){3.33}}
3399: \put(37.00,4.00){\makebox(0,0)[cc]{(a)Implicit Graph $A$}}
3400: \put(20.00,36.00){\vector(2,-1){14.00}}
3401: \put(114.00,65.00){\makebox(0,0)[cc]{$s$}}
3402: \put(114.00,65.00){\circle{10.00}}
3403: \put(128.00,18.00){\makebox(0,0)[cc]{$t$}}
3404: \put(34.00,24.00){\makebox(0,0)[cc]{$t$}}
3405: \put(29.00,34.00){\makebox(0,0)[lc]{1}}
3406: \put(7.00,35.00){\makebox(0,0)[rc]{1}}
3407: \put(123.00,44.00){\makebox(0,0)[lc]{1}}
3408: \put(103.00,32.00){\circle{10.00}}
3409: \put(30.00,20.00){\framebox(8.00,8.00)[cc]{}}
3410: \put(124.00,13.00){\framebox(8.00,9.00)[cc]{}}
3411: \put(103.00,32.00){\makebox(0,0)[cc]{$p$}}
3412: \put(109.00,31.00){\makebox(0,0)[lb]{(0)}}
3413: \put(109.00,44.00){\makebox(0,0)[lc]{1}}
3414: \put(100.00,28.00){\vector(3,-1){24.00}}
3415: \put(91.00,51.00){\makebox(0,0)[rc]{1}}
3416: \bezier{496}(100.00,28.00)(54.00,12.00)(109.00,64.00)
3417: \put(114.00,60.00){\vector(-1,-2){11.67}}
3418: \put(114.00,60.00){\vector(1,-3){12.67}}
3419: \put(106.00,61.00){\vector(1,1){2.00}}
3420: \put(115.00,4.00){\makebox(0,0)[cc]{(b)Implicit Graph $A$}}
3421: \put(111.00,21.00){\makebox(0,0)[cc]{1}}
3422: \put(110.00,53.00){\line(1,0){6.00}}
3423: \put(75.00,0.00){\framebox(83.00,73.00)[cc]{}}
3424: \put(0.00,0.00){\framebox(75.00,73.00)[cc]{}}
3425: \end{picture}
3426: \end{figure}
3427:
3428:
3429:
3430: On the OR graph of Figure \ref{fig110}(a), $opt(A,s) = min \{opt(A,s) + c(s,s), opt(A,t) + c(s,t)\}$,
3431: which leads to an infinite recursion. Similarly on the
3432: AND/OR graph of Figure \ref{fig110}(b), $opt(A,s) = [\{opt(A,p) + c(s,p)\} + \{opt(A,t) + c(s,t)\}]
3433: = [\{min \{opt(A,s) + c(p,s), opt(A,t) + c(p,t)\} + c(s,p)\} +
3434: \{opt(A,t) + c(s,t)\}]$, which again leads to an infinite recursion.
3435:
3436: \begin{center}
3437: \underline{\bf Scenario 2. Best-first principle violated}
3438: \end{center}
3439:
3440: We now turn to the algorithms presented in [Chakrabarti 1994].
3441: Of the two algorithms, $\mbox{REV}^{*}$ is an improved version of
3442: the depth first algorithm Iterative\_Revise. $\mbox{REV}^{*}$
3443: performs bottom-up search by treating the implicit graph in an explicit fashion.
3444: Starting the search from the leaf nodes, $\mbox{REV}^{*}$ applies inverse
3445: operators, using a list OPEN on the way.
3446:
3447: However, when $\mbox{REV}^{*}$ selects a node $n$ from OPEN, it immediately tries to select and
3448: evaluate its predecessor nodes, without letting these predecessors to enter OPEN. {\em This
3449: causes serious violations of the best-first criterion} and as a result it ends up
3450: selecting nodes with higher (or $\infty$) costs than the minimum cost of a node
3451: in OPEN. This paradoxical phenomenon is clearly portrayed in the two examples
3452: given in Figure \ref{fig120}.
3453:
3454: \unitlength=0.45mm
3455: \begin{figure}
3456: \centering
3457: \caption{$\mbox{REV}^{*}$ selects nodes with $\infty$ cost, while $h^{*}(s) = 2$}
3458: \label{fig120}
3459: \linethickness{0.4pt}
3460: \begin{picture}(280.00,140.00)
3461: \put(19.00,109.00){\makebox(0,0)[cc]{$p$}}
3462: \put(18.00,94.00){\makebox(0,0)[cc]{1}}
3463: \put(21.00,73.00){\makebox(0,0)[cc]{$t_{1}$}}
3464: \put(46.00,73.00){\makebox(0,0)[cc]{$t_{2}$}}
3465: \put(50.00,86.00){\makebox(0,0)[cc]{5}}
3466: \put(37.00,84.00){\makebox(0,0)[cc]{(0)}}
3467: \put(73.00,73.00){\makebox(0,0)[cc]{$y$}}
3468: \put(87.00,84.00){\makebox(0,0)[cc]{($\infty$)}}
3469: \put(65.00,87.00){\makebox(0,0)[cc]{1}}
3470: \put(57.00,95.00){\makebox(0,0)[cc]{$q$}}
3471: \put(69.00,102.00){\makebox(0,0)[cc]{5}}
3472: \put(75.00,111.00){\makebox(0,0)[cc]{$z$}}
3473: \put(47.00,126.00){\vector(2,-1){23.00}}
3474: \put(62.00,122.00){\makebox(0,0)[cc]{5}}
3475: \put(33.00,122.00){\makebox(0,0)[cc]{1}}
3476: \put(47.00,131.50){\makebox(0,0)[cc]{$s$}}
3477: \put(21.00,105.00){\vector(0,-1){25.00}}
3478: \put(59.00,90.00){\vector(-1,-1){11.00}}
3479: \put(71.00,111.00){\vector(-1,-1){11.00}}
3480: \put(47.00,126.00){\vector(-2,-1){24.00}}
3481: \put(59.00,90.00){\vector(1,-1){11.00}}
3482: \put(167.00,110.00){\makebox(0,0)[cc]{$p$}}
3483: \put(167.00,94.00){\makebox(0,0)[cc]{1}}
3484: \put(170.00,73.00){\makebox(0,0)[cc]{$t_{1}$}}
3485: \put(195.00,73.00){\makebox(0,0)[cc]{$t_{2}$}}
3486: \put(199.00,86.00){\makebox(0,0)[cc]{1}}
3487: \put(222.00,73.00){\makebox(0,0)[cc]{$y$}}
3488: \put(232.00,82.00){\makebox(0,0)[cc]{($\infty$)}}
3489: \put(217.00,86.00){\makebox(0,0)[cc]{1}}
3490: \put(196.00,126.00){\vector(2,-1){23.00}}
3491: \put(211.00,122.00){\makebox(0,0)[cc]{5}}
3492: \put(182.00,122.00){\makebox(0,0)[cc]{1}}
3493: \put(196.00,131.50){\makebox(0,0)[cc]{$s$}}
3494: \put(170.00,105.00){\vector(0,-1){25.00}}
3495: \put(208.00,90.00){\vector(-1,-1){11.00}}
3496: \put(219.00,110.00){\vector(-1,-1){11.00}}
3497: \put(196.00,126.00){\vector(-2,-1){24.00}}
3498: \put(208.00,90.00){\vector(1,-1){11.00}}
3499: \bezier{56}(203.00,85.00)(208.00,80.00)(213.00,85.00)
3500: \put(47.00,131.00){\circle{10.00}}
3501: \put(75.00,111.00){\circle{10.00}}
3502: \put(57.00,95.00){\circle{10.00}}
3503: \put(19.00,109.00){\circle{10.00}}
3504: \put(196.00,131.00){\circle{10.00}}
3505: \put(224.00,112.00){\circle{10.00}}
3506: \put(205.00,94.00){\circle{10.00}}
3507: \put(167.00,110.00){\circle{10.00}}
3508: \put(224.00,112.00){\makebox(0,0)[cc]{$z$}}
3509: \put(216.00,103.00){\makebox(0,0)[lc]{5}}
3510: \put(205.00,94.00){\makebox(0,0)[cc]{$q$}}
3511: \put(5.00,50.00){\makebox(0,0)[lc]{OPEN: $\not t_{1}^{0}$, $\not t_{2}^{0}$, $y^{\infty}$,$\not s^{2}$}}
3512: \put(17.00,69.00){\framebox(8.00,10.00)[cc]{}}
3513: \put(42.00,69.00){\framebox(8.00,9.00)[cc]{}}
3514: \put(69.00,69.00){\framebox(8.00,9.00)[cc]{}}
3515: \put(165.00,69.00){\framebox(9.00,9.00)[cc]{}}
3516: \put(190.00,69.00){\framebox(9.00,9.00)[cc]{}}
3517: \put(217.00,69.00){\framebox(9.00,9.00)[cc]{}}
3518: \put(190.00,50.00){\makebox(0,0)[cc]{OPEN: $\not t_{1}^{0}$, $\not t_{2}^{0}$, $y^{\infty}$,$\not s^{2}$}}
3519: \put(5.00,36.00){\makebox(0,0)[lc]{Found: $t_{1}^{0}$, $t_{2}^{0}$, $y^{\infty}$,$p^{1}$, $q^{5}$, $z^{10}$, $s^{2}$}}
3520: \put(210.00,36.00){\makebox(0,0)[cc]{Found: $t_{1}^{0}$, $t_{2}^{0}$, $y^{\infty}$, $p^{1}$, $q^{\infty}$, $z^{\infty}$, $s^2$}}
3521: \put(60.00,8.00){\makebox(0,0)[cc]{(a) Implicit OR Graph A}}
3522: \put(210.00,8.00){\makebox(0,0)[cc]{(b) Implicit AND/OR Graph A}}
3523: \put(140.00,0.00){\framebox(140.00,140.00)[cc]{}}
3524: \put(0.00,0.00){\framebox(140.00,140.00)[cc]{}}
3525: \end{picture}
3526: \end{figure}
3527:
3528:
3529:
3530: Figure \ref{fig120}(a) presents a simple OR graph, for which a best-first search algorithm like
3531: Dijkstra's will never visit nodes $q$ with cost 5, and $z$ with cost 10. But $\mbox{REV}^{*}$
3532: works as follows: initially it puts in OPEN the "found" nodes $t_{1}$, $t_{2}$ and $y$ with
3533: costs 0,0 and
3534: $\infty$ respectively.
3535: Then, after selecting $t_{1}$, it continues its upward computation through the "found" node $p$
3536: up to $s$, and
3537: inserts $s$ with cost 2 (i.e. the cost of a minimal-cost solution graph) in OPEN. Next the node
3538: $t_{2}$ is selected. Now, although $s$
3539: awaits in OPEN with cost 2 for selection, $\mbox{REV}^{*}$ proceeds upwards from
3540: $t_{2}$, selecting "found" nodes $q$ and $z$, with costs 5 and 10, ignoring the legitimate
3541: superior candidacy of $s$ in OPEN.
3542:
3543: Figure \ref{fig120}(b) depicts a similar situation in presence of an AND node $q$. Here,
3544: nodes $q$ and $z$, with $\infty$ costs, will get preference over $s$ with cost 2
3545: in OPEN.
3546:
3547: \begin{center}
3548: \underline{\bf Scenario 3. Basic theorem fails}
3549: \end{center}
3550:
3551: The most severe fallout of $\mbox{REV}^{*}$'s violation of the best-first
3552: principle is that, the {\bf Theorem 5.3(iii) of [Chakrabarti 1994] fails},
3553: where it was claimed that "{\em algorithm $\mbox{REV}^{*}$ examines all those nodes in OPEN
3554: for which $opt(n) < opt(s)$.}" This can be readily verified from the graph of Figure \ref{fig130}.
3555: On this graph, $\mbox{REV}^{*}$ starts by putting nodes $t_1$, $x$, $t_2$ and
3556: $t_3$, with $UB$-values 0, $\infty$, 0 and 0 respectively, into OPEN. Then after
3557: removing $t_1$ and inserting $n$ with $UB(n) = 10$ into OPEN, $\mbox{REV}^{*}$
3558: removes $t_2$ and inserts $p$ with $UB(p) = 1$ in OPEN. Next, it selects $t_3$ from
3559: OPEN, but cannot declare $s$ "found" as $p$ is not yet "found". Finally, it selects
3560: $p$ from OPEN, declares $p$ as "found" and then, declares $s$ as "found", too, with
3561: $UB(s) = 102$. Then $\mbox{REV}^{*}$ terminates, {\em without selecting $n$ from OPEN
3562: which has $opt(n) = 10 < opt(s) = 102.$} This is a clear contradiction to the
3563: Theorem 5.3(iii) of [Chakrabarti 1994], according to which $\mbox{REV}^{*}$ should
3564: also have selected $n$ from OPEN, before termination.
3565:
3566:
3567: \unitlength=0.45mm
3568: \linethickness{0.4pt}
3569: \begin{figure}
3570: \centering
3571: \caption{$\mbox{REV}^{*}$ theorem fails}
3572: \label{fig130}
3573: \begin{picture}(105.00,150.00)
3574: \put(6.00,25.00){\framebox(8.00,8.00)[cc]{$t_1$}}
3575: \put(39.00,25.00){\framebox(8.00,8.00)[cc]{$x$}}
3576: \put(50.00,29.00){\makebox(0,0)[lc]{($\infty$)}}
3577: \put(36.00,52.00){\circle{10.00}}
3578: \put(20.00,82.00){\circle{10.00}}
3579: \put(43.00,107.00){\circle{10.00}}
3580: \put(20.00,77.00){\vector(-1,-4){11.00}}
3581: \put(20.00,77.00){\vector(2,-3){14.00}}
3582: \put(38.00,47.00){\vector(1,-2){7.00}}
3583: \put(64.00,78.00){\framebox(8.00,8.00)[cc]{$t_2$}}
3584: \put(66.00,132.00){\circle{10.00}}
3585: \put(82.00,103.00){\framebox(8.00,8.00)[cc]{$t_3$}}
3586: \put(66.00,127.00){\vector(-4,-3){20.00}}
3587: \put(66.00,127.00){\vector(4,-3){19.00}}
3588: \put(43.00,102.00){\vector(-4,-3){20.00}}
3589: \put(43.00,102.00){\vector(3,-2){23.00}}
3590: \put(60.00,122.00){\line(1,0){12.00}}
3591: \put(66.00,132.00){\makebox(0,0)[cc]{$s$}}
3592: \put(77.00,121.00){\makebox(0,0)[lc]{100}}
3593: \put(55.00,122.00){\makebox(0,0)[rc]{1}}
3594: \put(43.00,107.00){\makebox(0,0)[cc]{$p$}}
3595: \put(55.00,97.00){\makebox(0,0)[lc]{1}}
3596: \put(33.00,97.00){\makebox(0,0)[rc]{1}}
3597: \put(20.00,82.00){\makebox(0,0)[cc]{$n$}}
3598: \put(36.00,52.00){\makebox(0,0)[cc]{$r$}}
3599: \put(30.00,66.00){\makebox(0,0)[lc]{1}}
3600: \put(12.00,54.00){\makebox(0,0)[rc]{10}}
3601: \put(44.00,41.00){\makebox(0,0)[lc]{1}}
3602: \put(42.00,10.00){\makebox(0,0)[cc]{Implicit Graph $A$}}
3603: \put(0.00,0.00){\framebox(105.00,150.00)[cc]{}}
3604: \end{picture}
3605: \end{figure}
3606:
3607:
3608:
3609: \subsection{Hvalica's Method}
3610:
3611: In a recent paper [Hvalica 1996] has attempted to solve cyclic AND/OR graphs by attaching an arc to a new dummy node $x_{f}$, with a high heuristic value, from the node currently being expanded. This method is based on the
3612: premise that, even if expansion of the current node creates a cycle, the algorithm can come out of the cycle by looping through it a sufficient number of times (when the cost of the expanded node, computed through its children, exceeds the high cost attached to the dummy child $x_{f}$.) [pp 108, Hvalica 1996]. In the example of Figure \ref{fig140}, this method will make a large number (H) of unnecessary evaluations of node $p$, where H represents a very high value. This method clearly violates the best-first search principle. Even if a node $n$ has a solution graph below it (and a self-loop of unit cost), and a choice of $H = h^{*}(n)$ is used when expanding $n$, there will exist cases where the looping at $n$ will violate the best-first principle globally, with respect to some other less-costly node of the graph. Similarly we can construct cases where the looping, even though not violating the best-first principle, results in unnecessary computations.
3613:
3614: \unitlength=0.45mm
3615: \linethickness{0.4pt}
3616: \begin{figure}
3617: \centering
3618: \caption{Hvalica's method loops}
3619: \label{fig140}
3620: \begin{picture}(110.00,90.00)
3621: \put(48.00,75.00){\circle{10.00}}
3622: \put(19.00,50.00){\circle{10.00}}
3623: \put(52.00,50.00){\circle{10.00}}
3624: \put(48.00,70.00){\vector(-3,-2){25.00}}
3625: \put(49.00,70.00){\vector(2,-1){35.00}}
3626: \bezier{280}(23.00,47.00)(19.00,12.00)(15.00,47.00)
3627: \put(24.00,50.00){\line(1,0){3.00}}
3628: \put(29.00,50.00){\line(1,0){3.00}}
3629: \put(34.00,50.00){\line(1,0){3.00}}
3630: \put(39.00,50.00){\line(1,0){3.00}}
3631: \put(44.00,50.00){\vector(1,0){3.00}}
3632: \put(48.00,75.00){\makebox(0,0)[cc]{$s$}}
3633: \put(19.00,50.00){\makebox(0,0)[cc]{$p$}}
3634: \put(52.00,50.00){\makebox(0,0)[cc]{$x_f$}}
3635: \put(89.00,48.00){\makebox(0,0)[cc]{$t$}}
3636: \put(66.00,65.00){\makebox(0,0)[lb]{3}}
3637: \put(36.00,65.00){\makebox(0,0)[rb]{1}}
3638: \put(58.00,42.00){\makebox(0,0)[lt]{(H)}}
3639: \put(23.00,32.00){\makebox(0,0)[lc]{1}}
3640: \put(20.00,9.00){\makebox(0,0)[lc]{Implicit Graph $G$}}
3641: \put(84.00,44.00){\framebox(9.00,9.00)[cc]{}}
3642: \put(16.00,42.00){\vector(-1,4){1.00}}
3643: \put(35.00,47.00){\makebox(0,0)[ct]{1}}
3644: \put(0.00,0.00){\framebox(110.00,90.00)[cc]{}}
3645: \end{picture}
3646: \end{figure}
3647:
3648: \subsection{Algorithm $CFC_{REV^*}$}
3649:
3650: As mentioned by the authors [Jim$\acute{e}$nez and Torras 2000], the algorithm $CFC_{REV^*}$ has been designed primarily keeping the efficiency in mind. While that objective seems to have been achieved (as observed in the Experimental Results), the algorithm lacks any clear theoretical framework. The paper has used the "standard notation and definitions stated in" [Mahanti and Bagchi 1985] which, however, was written for acyclic AND/OR graphs. The problems that arise in this situation (i.e. the infinite recursion in cyclical definitions) has been discussed in detail under $\mbox{REV}^{*}$, so we refrain from repeating that here. We only observe that, given the absence of a correct theoretical framework, the correctness proofs of algorithm $CFC_{REV^*}$ stand on a weak base. Again the best-first nature of the algorithm, which was shown to be violated in the case of $\mbox{REV}^{*}$, is easily violated in the case of $CFC_{REV^*}$ as well. This is precisely the reason why $CFC_{REV^*}$ evaluates many more nodes than $\mbox{AO}^{*}$ on acyclic graphs, which is based on best-first search.
3651:
3652: \end{document}
3653:
3654:
3655:
3656: