A Pathﬁnding Problem for Fork-Join Directed Acyclic Graphs with Unknown Edge Length

: In a previous paper by the author, a pathﬁnding problem for directed trees is studied under the following situation: each edge has a nonnegative integer length, but the length is unknown in advance and should be found by a procedure whose computational cost becomes exponentially larger as the length increases. In this paper, the same problem is studied for a more general class of graphs called fork-join directed acyclic graphs. The problem for the new class of graphs contains the previous one. In addition, the optimality criterion used in this paper is stronger than that in the previous paper and is more appropriate for real applications.


Introduction
In a previous paper by the author [1], a pathfinding problem for directed trees is studied under the following situation: each edge has a nonnegative integer length, but the length is unknown in advance and should be found by a procedure whose computational cost becomes exponentially larger as the length increases. Such a situation arises in an operation synthesis problem for reconfigurable cloud computing systems [2,3]. This problem is described as follows. A typical reconfigurable cloud computing system consists of multiple physical servers interconnected via network switches. Servers may have different computing resources such as CPU, memory, and hard disk drives. Multiple virtual machines are running under the virtual machine monitor in each server, and application software runs on each virtual machine. Such an arrangement of virtual machines, operating systems, and application software on physical servers is called a configuration. Then, the problem is to find a sequence of operations that leads the system from the initial configuration to a given goal configuration. Since the problem becomes harder as the length of the operation sequence becomes longer, implementing subgoals is proposed to shorten the total computation time. The number of necessary operations between two subgoals is not known in advance and can be known by applying some search procedure. This situation is formulated as the above graph problem.
In this paper, the same problem is studied for a more general class of graphs called fork-join directed acyclic graphs. We call this problem PFJUEL (Pathfinding in an FJ-DAG with Unknown Edge Length). There is a remaining problem in the previous paper, which is the optimality criterion used for evaluating the solution method. The optimality criterion used in this paper is stronger than that in the previous paper and is more appropriate for real applications. Moreover, the argument to derive the optimality becomes clearer for this generalized class of graphs.
Solution methods to the problem involve a procedure whereby the next action to be taken is determined by the current knowledge of the target. We call this type of procedure a strategy. Such a problem has been studied as the planning problem in artificial intelligence, and there are a variety of algorithms in this area. Typical algorithms are the A * algorithm [4] and its variants such as [5][6][7]. In the research field of graph algorithms, many algorithms have been proposed for solving shortest path problem in varieties of situations. Well-known algorithms for finding a shortest path, such as Dijkstra's algorithm and the Bellman-Ford algorithm, cannot be applied because the length of each edge is unknown in advance. There exist studies on graphs with uncertainty. Algorithms to solve such problems with uncertainty include online algorithms [8]. The Canadian traveler problem [9,10] is one of these algorithms. In the Canadian traveler problem, whether each edge (v i , v j ) is available or not is known only when the vertex v i is visited. Solution methods to this problem are strategies, and the cost of a strategy is defined as the sum of the lengths of all edges traversed. Online shortest path problems for graphs with uncertainty are also studied [11], and there are many applications such as route finding in transit networks [12]. In these problems, the weight of each edge can change in an arbitrary way. Such a situation occurs in real transit networks because of traffic jams. There are several differences between PFJUEL and the existing online graph problems with uncertainty. Although most of the graph problems with uncertainty are defined in stochastic domain [8,[13][14][15], PFJUEL is defined in a fully deterministic way. Moreover, the edge length does not change (but is not known in advance). In some online shortest path problems, the existence of an agent that traverses the network is assumed. The agent makes decisions based on the information around the agent and its history. In PFJUL, no agent is assumed, and the operation can be done for any point in the graph. The evaluation method of the algorithm is also different. To evaluate the performance of online algorithms, the competitive ratio [16] is often used. This is the ratio between the performance of an online algorithm and that of an offline algorithm. From the motivated examples shown in [2,3], we assume that the computational cost of the procedure for finding the length of each edge is dominant in the total computational cost. Therefore, it suffices to consider the number of procedure calls for the evaluation. The detail of the evaluation method will be described later.
The paper is organized as follows. In Section 2, the problem studied in the paper is formally described. In Section 3, how to evaluate solution methods is presented. The current knowledge on the graph is summarized as the estimate, and the optimality of a method is evaluated by the estimate the method finally gives. In Section 4, we define a special form of estimates that gives the optimal estimate. In Section 5, a solution method to the problem is presented. The method gives an optimal solution under an assumption. For the case without the assumption, the difference between the obtained solution and the optimal one is evaluated. Section 6 presents the conclusion.

Problem Formulation
We first formally define a class of graphs called fork-join directed acyclic graphs (FJ-DAGs). An FJ-DAG is a directed acyclic graph G = (V, E), where V is the set of vertices and E ⊆ V × V is the set of edges, with two special vertices the top vertex v t ∈ V and the bottom vertex v b ∈ V. We denote G = (V, E, v t , v b ) to indicate the two special vertices. Definition 1. FJ-DAGs are recursively defined as follows: is an FJ-DAG, where v t and v b do not belong to any V i . Each G i is called a child of G; 3.
No other graphs defined as above are not FJ-DAGs.
Each edge e t i = (v t , v t i ) is called a top edge of G and each edge is called a bottom edge of G. An FJ-DAG has a nested structure. We introduce the level of an FJ-DAG G, denoted by level(G), as follows: (i) the level of a single vertex G is 0; (ii) if G i , i = 1, · · · , m are children of G, then level(G) = max i level(G i ). Any FJ-DAG contained in an FJ-DAG G as a subgraph is called a sub FJ-DAG of G. Figure 1 shows an FJ-DAG, where the level of each sub FJ-DAG is indicated. We also define the level of each edge. The level of an edge is defined as the level of a sub FJ-DAG that contains the edge as a top or bottom edge. Such a class of graphs is well studied in the research field of queuing networks since it appears in various applications such as parallel computing and flexible manufacturing systems [17]. In an FJ-DAG G = (V, E, v t , v b ), a path from v t to v b is called a goal path of G. Now, we define a graph problem, Pathfinding in an FJ-DAG with Unknown Edge Length (PFJUEL), as follows: Given given two vertices v i , v j and a nonnegative integer c, the oracle answers whether the length of edge (v i , v j ) is less than or equal to c or not. Assumption

•
Each edge has a nonnegative integer length, but the length is unknown in advance and should be found by calling the oracle.

Find
• A shortest goal path.
PFJUEL is an online problem since the length of each edge is known only by calling oracles. As we have mentioned in the introduction, any procedures that solve such an online problem should be adaptive; i.e., the next action (i.e., an oracle call) to be taken is determined by the current knowledge of the target. Such a procedure is called a strategy. Roughly speaking, the objective of PFJUEL is to find a strategy that is optimal for the total cost of oracle calls. The formal statement of an optimal strategy to PFJUEL is given after we introduce the required concepts and terminology.
We note that PFJUEL is a generalization of the problem PSTUEL studied in [1]. The targets of PSTUEL are directed trees. Given a directed tree, we can make an FJ-DAG such that the shortest goal path of the FJ-DAG contains the shortest goal path of the directed tree, where a goal path of a tree is a path from the root to a leaf. To do this, we add edges with length 0 so that the tree becomes an FJ-DAG (Figure 2).
At some step of a strategy for PFJUEL, the set of edges E is partitioned into two sets E K and E U , where the length w(v i , v j ) of each edge (v i , v j ) ∈ E K is already known, and the length of each edge in E U is unknown. An edge (v i , v j ) moves from E U to E K when its length has been found. Moreover, for each edge (v i , v j ) ∈ E U , a lower boundŵ(v i , v j ) of the edge length is obtained by previous oracle calls. The initial lower bound is 0, and if search c (v i , v j ) returns "no", then c + 1 is set toŵ(v i , v j ).

Definition 2. A strategy that does not call search c
In conservative strategies, an edge (v i , v j ) moves from E U to E K when search c (v i , v j ) returns "yes" for c = w(v i , v j ). Since calling the oracle for a large c is dominant in the total computational cost, we concentrate on conservative strategies only. In this class of strategies, calling search c (v i , v j ) for all c = 0, 1, · · · , w(v i , v j ) in this order is mandatory to know the correct edge length.

Estimate and Characteristic Vector
For conservative strategies, the current knowledge about the graph is represented by a We call such F an estimate of G. Let F denote the set of all estimates. A strategy for PFJUEL is formally defined as a mapping S from F to E U × N (this definition of strategies means that strategies are deterministic; i.e., any strategy gives the same response to the same estimate). Based on the previous results on oracle calls, strategy S gives the next edge in E U and nonnegative integer c for which the oracle is called. The current lower bound of the path length is given by the sum ofŵ(v i , v j ) for all edges (v i , v j ) on the path. We call this the estimated length of the path.
When a shortest goal path is found, the estimate has to satisfy the following requirements in order to guarantee the correctness of the result.

Definition 3.
An estimate is called terminal if the following two conditions hold: R1. All the edges on a shortest goal path π * are in E K ; R2. For any goal path other than π * , its estimated length is no less than the length of π * .
In what follows, oracle calls that return "no" are called fail calls and oracle calls that return "yes" are called success calls. Given an estimate F, we define a vector # F = [a 0 , a 1 , · · · , a s ] called the characteristic vector of F, where each a k is the number of edges withŵ F (v i , v j ) = k + 1, and s is the largest integer such that a s = 0. In conservative strategies, the number of fail calls search c (·, ·) is given by To define the optimality of strategies, we introduce a lexicographical order on the set of characteristic vectors. For two characteristic vectors # F 1 = [a 0 , a 1 , · · · , a s ] and

Definition 4.
A terminal estimate F is called optimal if for any other terminal estimate F , # F # F holds.
The characteristic vectors do not reflect the number of success calls, since the lower bound is not updated for any success call. In the conservative strategies, however, every . This means that the number of success calls search c (·, ·) is no greater than the number of fail calls search c−1 (·, ·). For this reason, the optimality defined above can be a measure of the total computational cost.
We have assumed that the cost of calling oracles is dominant in the total computation time and it becomes exponentially larger as the length c increases. Since we give no exact computational cost of oracle calls, the optimality of a strategy should be defined by the number of oracle calls. Under the assumption of the computational cost of oracle calls, the above definition is reasonable. In our previous paper, we initially intended to use the same evaluation measure as that used in this paper. However, we could not prove the optimality for it and could prove the optimality for a weaker measure in which only the number of oracle calls for the largest c is considered.
If all goal paths have the same estimated length h, then the estimate is called homogeneous with length h.

Lemma 1. Any optimal estimate is homogeneous.
Proof. Assume that there exists an optimal estimate having at least one goal path with length h > h * , where h * is the length of the shortest goal path. Choose a goal path π with length h. π has the form e t where (i) denotes the index of a sub FJ-DAG G (i) . If π does not share edges with any goal path with length h * , then we choose one edge with a nonzero estimated length (since h > h * , such an edge exists) and decrement the estimated length by one. Suppose that π shares an edge e t (i) or e b (i) with goal paths having length h * . From the structure of FJ-DAGs, edges e t (1) , · · · , e t (i) , e b (i) , · · · , e b (1) are also shared. Since π is longer than such paths with length h * , there exists an edge e t (j) or e b (j) , j > i that is not shared by such goal paths and has a nonzero estimated length. Then, we decrement the estimated length of the edge by one. As a result, the length of π can be decreased by one. The estimate is still terminal after this procedure. This contradicts to the assumption that the estimate is optimal.

Canonical Estimate
In this section, we introduce a special class of estimates, called canonical estimates, that gives optimal estimates. We first introduce some terminology.
. A cut is a subset of edges such that it contains exactly one edge on every goal path. Let F be the characteristic vector of an estimate. Then, the characteristic vector of a cut is the restriction of F to the edges in the cut. A cut is called maximum if its characteristic vector is maximum with regard to in all cuts. A cut is called unsaturated if it consists of unsaturated edges only. An unsaturated minimum cut is an unsaturated cut such that its characteristic vector is minimum with regard to in all unsaturated cuts. Figure 3 shows a maximum cut with characteristic vector [1, 1, 1] and an unsaturated minimum cut with characteristic vector [2,1].

Definition 5. (Canonical Estimate)
Let F be an estimate of an FJ-DAG G. If level(G) = 0, then F is canonical. Suppose that G has children G i (i = 1, · · · , m) as shown in Figure 4. Then, F is called canonical if it is homogeneous and the following conditions hold for all i = 1, · · · , m:   Since any canonical estimate is homogeneous, all goal paths have the same estimated length. We take a canonical estimate with length h to indicate that the estimated length is h.
By reassigning the estimated lengths of some edges, the characteristic vector of a non-canonical estimate may decrease without changing its length. We show examples. The estimate shown in Figure 5a does not satisfy C2. By the reassignment shown in Figure 5b, the characteristic vector decreases. The estimate shown in Figure 6a does not satisfy C3 because the maximum estimated length of the sub FJ-DAG is 6, which is greater than the value of 3 of the bottom edge. As shown in Figure 6b, the characteristic vector decreases by adding one to the bottom edge and removing one from every edge on the maximum cut. The estimate shown in Figure 7a does not satisfy C4 because the maximum estimated length on the unsaturated minimum cut of the sub FJ-DAG is 4, and 4 + 1 = 5 is less than the value of 6 of the bottom edge. As shown in Figure 7b, the characteristic vector decreases by removing one from the bottom edge and adding one to every edge on the unsaturated minimum cut. These operations are used to prove the optimality of canonical estimates.    Figure 4, and let F be a canonical estimate for G with length h. Then, for each i = 1, · · · , m,ŵ(e t i ) andŵ(e b i ) are unique up to their exchange.

Lemma 2. Let G be an FJ-DAG shown in
Proof. We first consider the case that level(G i ) = 0. Then,ŵ(e t i ) +ŵ(e b i ) = h holds. If both e t i and e b i are saturated, then the value assignment is unique. If both e t i and e b i are unsaturated, then by C2, |ŵ(e t i ) −ŵ(e b i )| ≤ 1 holds and the value assignment to these edges are unique up to exchange of them. Suppose that e t i is saturated and e b i is unsaturated. Then, by C2,ŵ(e t i ) ≤ŵ(e b i ) + 1 holds. Ifŵ(e t i ) <ŵ(e b i ) + 1, then this is the unique assignment to these two edges. Ifŵ(e t i ) =ŵ(e b i ) + 1, then we can obtain another assignment by decrementingŵ(e t i ) by one and incrementingŵ(e b i ) by one. No other assignments are possible. Therefore, the value assignment is unique up to their exchange. This also holds for the case that e t i is unsaturated and e b i is saturated. Next, we consider the case that level(G i ) > 0. Suppose that G i has no unsaturated cut. Then, G i has a goal path with saturated edges only. Let h i be the length of such a saturated goal path. Note that h i is uniquely determined, and all goal paths of G i have the same estimated length since F is homogeneous. Therefore,ŵ(e t i ) +ŵ(e b i ) = h − h i is also unique. By the same argument as in the case level(G i ) = 0, we can prove the lemma.
Suppose that G i has at least one unsaturated cut. Let e x (s) (x is t or b) be an unsaturated edge in G i such that it is on a minimum unsaturated cut C of G i andŵ(e x (s) ) =ŵ(G i ) ↓ . Let G (s) be the sub FJ-DAG having e x (s) as the top or bottom edge. By C3, every edge in G (s) is with an estimated length no greater thanŵ(e x (s) ). We claim that G (s) has a goal path such that all unsaturated edges on the path are with estimated lengthŵ(e x (s) ). Assume that G (s) has no such goal paths. Then, G (s) has an unsaturated cut C with a characteristic vector smaller than that of {e x (s) }. By replacing e x (s) with C in the cut C, we obtain an unsaturated cut of G i with a smaller characteristic vector than C, which is a contradiction. Since G (s) is homogeneous, any goal path in G (s) has the same estimated length, and it is uniquely determined.
Let π be a goal path that goes through e x (s) . π has the form e t (1) · · · e t (s) · · · e t (r) e b (r) · · · e b (s) · · · e b (1) where e t (1) = e t i and e b (1) = e b i . Note that subpaths e t (1) · · · e t (s) and e b (s) · · · e b (1) are uniquely identified. We consider the case that x is t. The case that x is b is similarly proved. We make the following observations: • The estimated length of the subpath in G (s) is uniquely determined; [by the fact that F gives the unique estimated length to goal paths of G (s) as shown above] [by the fact that e t (s) is on a minimum unsaturated cut of G i (This exclude that caseŵ(e t (s) ) >ŵ(e b (s) )),ŵ(e t (s) ) =ŵ(G i ) ↓ as we have assumed, and C2] [by C3] The estimate for e t (1) · · · e t (s) and e b (s) · · · e b (1) that satisfies the above properties is obtained by the following procedure.

2.
At this moment, the current estimate is the minimum estimate that satisfies all the properties. If the length of π is h, then halt; 3.
From outmost unsaturated edges e t (j) and e b (j) , increment the estimated length by one until the length of π reaches h. Figure 8 shows an estimate obtained by this procedure, where s = 5. When the procedure terminates,ŵ(e t (1) ) andŵ(e b (1) ) are unique up to their exchange. Proof. Let F be a canonical estimate for G, as shown in Figure 4. The proposition is obvious when level(G) = 0. Suppose that level(G) > 0. We can consider each i separately. By Lemma 2,ŵ(e t i ) andŵ(e b i ) are unique up to their exchange. Therefore, the length of F in G i is also the same in any canonical estimate. By the induction hypothesis, any canonical estimate for G i has the same characteristic vector, and therefore any canonical estimate for G has the same characteristic vector as well.
Lemma 3. Let F be any homogeneous estimate for G with length h. Then, there exists a canonical estimate F * with the same length h and # F * # F .
Proof. If a homogeneous estimate is not canonical, then at least one of C2, C3, and C4 is not true in some sub FJ-DAG of G. We introduce procedures to make the estimate canonical.
Violation of C2: Let G i be a sub FJ-DAG in which C2 is false. This means that e t i (e b i ) is unsaturated andŵ(e b i ) >ŵ(e t i ) + 1 (ŵ(e t i ) >ŵ(e b i ) + 1). Then, incrementŵ(e t i ) (ŵ(e b i )) by one and decrementŵ(e b i ) (ŵ(e t i )) by one (see Figure 5). The following holds:

•
The estimate is still homogeneous with the same length after the update; • By repeating this procedure, C2 eventually becomes true in G i ; • The characteristic vector decreases after the update; • If C2 is true in another sub FJ-DAG G (j) of G, then C2 is still true in G (j) after the update.
Violation of C3: We assume C2 is true in any sub FJ-DAG. Let G i be a sub FJ-DAG in which C3 is false.
. Choose a maximum cut of G i . Then, the cut contains an edge with estimated lengtĥ w(G i ) ↑ > 0. We claim that every edge on this cut has a positive estimated length. This is proved as follows. Assume that the cut has an estimated length of 0. Since the cut is maximum, there exists a sub FJ-DAG of G i with top and bottom edges in which all edges have an estimated length of 0 (the minimal case is a single vertex with top and bottom edges). Let G (k) be a maximal such sub FJ-DAG of G i . G (k) = G i since G i has an edge with a positive estimated length. Then, there exists a sub FJ-DAG of G i that shares top and bottom vertices with G (k) and has a positive length. This contradicts the assumption that F is homogeneous.
Decrement the estimated length of every edge on the cut by one. If e t i (e b i ) is saturated and e b i (e t i ) is unsaturated, then incrementŵ(e b i ) (ŵ(e t i )) by one. If both e t i and e b i are unsaturated, then incrementŵ(e t i ) orŵ(e b i ) by one ifŵ(e t i ) =ŵ(e b i ); incrementŵ(e t i ) by one ifŵ(e t i ) <ŵ(e b i ); incrementŵ(e b i ) by one ifŵ(e t i ) >ŵ(e b i ) (see Figure 6). The following holds: • The estimate is still homogeneous with the same length after the update; • By repeating this procedure, C3 eventually becomes true in G i ; • If G i has more than one children, then the characteristic vector decreases after the update. If G i has only one child, then the characteristic vector decreases or does not change after the update; • If C2 is true in a sub FJ-DAG G (j) of G, then C2 is still true in G (j) after the update. This is because the decrement is applied to edges on the maximum cut, and the increment is applied in such a way that C2 still holds; •ŵ(G (j) ) ↑ may decrease in some FJ-DAG G (j) of G. This change does not make C3 false in any sub FJ-DAG.
Violation of C4: We assume C2 and C3 are true in any sub FJ-DAG. Let G i be a sub FJ-DAG in which C4 is false. Then,ŵ(e t i ) >ŵ(G i ) ↓ + 1 orŵ(e b i ) >ŵ(G i ) ↓ + 1 holds. Choose an unsaturated minimum cut of G i . Increment every edge on the cut by one. Decrement e t i or e b i by one ifŵ(e t i ) =ŵ(e b i ); decrement e t i by one ifŵ(e t i ) >ŵ(e b i ); decrement e b i by one if w(e t i ) <ŵ(e b i ) (see Figure 7). The following holds: • The estimate is still homogeneous with the same length after the update; • By repeating this procedure, C4 eventually becomes true in G i ; • The characteristic vector decreases after the update; • If C2 is true in a sub FJ-DAG G (j) of G, then C2 is still true in G (j) after the update. This is because the increment is applied to edges on the minimum cut, and the decrement is applied in such a way that C2 still holds; •ŵ(G (j) ) ↑ may decrease in some FJ-DAG G (j) of G. This change does not make C3 false in any sub FJ-DAG; •ŵ(G (j) ) ↓ may increase in some FJ-DAG G (j) of G. This change does not make C4 false in any sub FJ-DAG; • Whenŵ(G i ) ↑ =ŵ(G i ) ↓ ,ŵ(G i ) ↑ increases and C3 may become false. We show that this does not happen. Since C3 is true in G i before the update,ŵ(e t i ) ≥ŵ( Suppose that e t i is updated. By the procedure,ŵ(e t i ) ≥ŵ(e b i ) holds before the update. If e b i is saturated, then C3 is still true after the update. Suppose that e b i is unsaturated. Then,ŵ(e t i ) ≤ŵ(e b i ) + 1 holds by C2. Sinceŵ(e t i ) >ŵ(G i ) ↓ + 1 =ŵ(G i ) ↑ + 1 before the update,ŵ(e t i ) ≥ŵ(G i ) ↑ holds after the update. Moreover,ŵ(e b i ) + 1 ≥ŵ(e t i ) >ŵ(G i ) ↑ + 1 holds before the update, and thereforeŵ(e b i ) ≥ŵ(G i ) ↑ holds after the update. Hence, C3 is still true in G i even whenŵ(G i ) ↑ is incremented by one. This also holds when e b i is updated. By applying these procedures, we eventually obtain a canonical estimate F * with the same length such that # F * # F . By Proposition 1 and Lemma 3, we have the following theorem that characterizes the optimal estimates. Theorem 1. The characteristic vector of any canonical estimate with length h is minimum with regard to in all homogeneous estimates with length h.
Using Lemma 1, we have the following corollary.

Corollary 1.
Let F is a terminal estimate for an FJ-DAG G. If F is canonical, then it is optimal.

A Solution to PFJUEL
In this section, we present a solution method to PFJUEL that gives a canonical estimate for FJ-DAGs. It is a strategy defined as follows Algorithm 1: Algorithm 1: Shortest Path Increment from Outmost Edges (SPIOE): 1: While all goal paths have at least one unsaturated edge: 2: Let S be the set of such an unsaturated edge e that 3: (i) e is on a goal path with the shortest estimated length, and 4: (ii) e is not in any sub FJ-DAG for which the current 5: estimate is terminal; 6: If |S| > 1, then let S be the set of edges in S 7.
having the estimated length minimum in S; 8: else S := S; 9: If |S | > 1, then let S be the set of edges in S 10: having the level highest in S ; 11: else S := S ; 12: Choose one edge from S and issue an oracle call to it; 13: endwhile. Remark 1. At line 12, there may be more than one edge in S . To make the strategy deterministic, we need some rule to select one edge; e.g., introducing a total order to the set of edges.
Let h * be the length of a shortest goal path. Suppose that an edge (v i , v j ) is selected in the while loop, and (v i , v j ) is on a goal path π whose estimated length already reaches h * .
, v (i+1) ) returns "no" and the estimated length of π becomes h * + 1. Such an oracle call is unnecessary for satisfying the requirement R2. We call such a fail call a waste fail call. Waste fail calls are unavoidable if the length of each edge is initially unknown.

Lemma 4.
If waste fail calls do not occur, then the estimate given by SPIOE is canonical.
Proof. If the oracle call is not a success call, then SPIOE increments the length of a goal path with the shortest estimated length by one. Since waste fail calls do not occur, the estimated length of every goal path does not exceed the length of the shortest goal path, and therefore SPIOE gives a homogeneous estimate when it terminates.
We show that the violation of C2-C4 does not occur in any sub FJ-DAG during the execution of SPIOE. This is proved by mathematical induction in the number of iterations. Initially, the estimate is canonical.
Assume that the current estimate satisfies C2-C4 in any sub FJ-DAG. Suppose that the estimated length of the upper edge e t i of a sub FJ-DAG G i has been updated; i.e., incremented by one.
We first show that C2-C4 still hold in G i after the update. C2: If e b i is saturated just before the update, then a violation of C2 does not occur. Suppose that e b i is unsaturated just before the update. Note that every goal path that contains e t i also contains e b i . Then, by line 7,ŵ(e t i ) ≤ŵ(e b i ) holds just before the update. Therefore, C2 is still true after the update.
C3: Sinceŵ(e t i ) ≥ŵ(G i ) ↑ holds just before the update, then C3 is still true after the update.
C4: Ifŵ(e t i ) <ŵ(G i ) ↓ + 1 just before the update, then C4 is still true after the update. Suppose thatŵ(e t i ) =ŵ(G i ) ↓ + 1 just before the update. Any goal path that contains e t i also contains an edge in a minimum unsaturated cut of G i . Then, the path contains an unsaturated edge with an estimated length no greater thanŵ(G i ) ↓ . By line 7, SPIOE does not choose e t i becauseŵ(e t i ) is not minimum in unsaturated edges on the path.
The case that e b i has been updated is similar. Next, we show that C2-C4 are still true in other sub FJ-DAGs after the update. Since C2 is the condition for the top and the bottom edge of each sub FJ-DAG, C2 is still true in any sub FJ-DAG after the update. In any sub FJ-DAG that does not contain e t i , C3 and C4 are still true after the update. Thus, we need to check the conditions for sub FJ-DAGs that contain e t i . Let G (j) be such a sub FJ-DAG. Then, w(G (j) ) ↑ andŵ(G (j) ) ↓ may be incremented by one. Suppose thatŵ(G (j) ) ↑ is incremented. This occurs whenŵ(e t i ) =ŵ(G (j) ) ↑ just before the update. C3 becomes false after the update only if for the top or bottom edge e x (j) of G (j) ,ŵ(e x (j) ) =ŵ(e t i ) holds just before the update. Every goal path that contains e t i also contains e x (j) because e x (j) is in a level higher that that of e t i . Therefore, SPIOE does not choose e t i by line 10, and this case does not occur. Clearly, C4 is still true whenŵ(G (j) ) ↓ is incremented. Thus, C3 and C4 are still true in other sub FJ-DAGs.
By the above arguments, C2-C4 are still true in all sub FJ-DAGs after the update. Hence, we can conclude that the obtained estimate is canonical.

Remark 2.
The condition at line 4-5 is not used in the above proof. Dropping this condition may cause waste fail calls and unnecessary success calls.
From Corollary 1 and Lemma 4, we obtain the main theorem.

Theorem 2.
If waste fail calls do not occur, then SPIOE always gives an optimal estimate.
The detailed complexity analysis of the SPIOE is omitted for the following reasons. The analysis can be done for (i) the characteristic vector of the optimal terminal estimate obtained by SPIOE and (ii) the total computational time of SPIOE. The optimal terminal estimate is characterized by Corollary 1 (i.e., canonical estimate) and is determined by the given FJ-DAG. It may be possible to give trivial lower/upper bounds of the characteristic vector, but they are meaningless. The total computational time of SPIOE is obtained by evaluating operations in each iteration and the total number of iterations. Operations in each iteration consist of maintaining shortest goal paths and finding an edge with the minimum estimated length in the highest level. They can be done in polynomial time. Furthermore, we can give an upper bound of the number of iterations, which is determined by the optimal terminal estimates. This is apparently polynomial in the size of the graph and edge length. Such detailed complexity analysis is not very valuable under the above cost assumption on calling oracles. Moreover, the goal of the paper is to develop an optimal strategy that can be applied to real problems. In this sense, the goal has been achieved.
Finally, we analyze the number of waste fail calls. Let h * be the length of the shortest goal path. We introduce a special class of strategies. Strategies that always issue oracle calls to unsaturated goal paths with the shortest estimated length are called rational. In the terminal estimate obtained by any rational strategy, the estimated length of every goal path is always less than or equal to h * + 1, and therefore the number of waste fail calls is less than the number of goal paths.

Lemma 5.
Let g be the number of goal paths. Then, g − 1 is an upper bound of the number of waste fail calls by any rational strategy.
For a strategy that is not rational, the estimated length of some goal path may become greater than h * + 1. Suppose that the estimated length of the current shortest goal path has reached h * and the strategy issues an oracle call to a goal path with length h * + 1. We can make an instance of FJ-DAGs for which the oracle call fails and the estimated length becomes h * + 2.
There exists an FJ-DAG for which any rational strategy gives g − 1 waste fail calls; i.e., g − 1 is the tight upper bound for rational strategies. Let us consider an FJ-DAG shown in Figure 9, where every edge has length 1. At each round, any rational strategy picks up one unsaturated edge on a goal path with the shortest estimated length and issues an oracle call to it. Then, we will eventually reach the following situation: all edges are saturated but are in E U . The next oracle call is issued to some edge and it succeeds. Then, we consider an instance having a length of 2 for this edge. The strategy shows the same behavior for the new instance before this oracle call, but now the oracle call fails. Since the strategy is rational, the next oracle call is issued to an edge on a goal path with an estimated length of 2. We can repeat this g − 1 times. After that, we obtain a goal path with a length of 2 such that all edges on it are in E K . When a terminal estimate is obtained, the number of waste fail calls issued so far is g − 1. Hence, we have the following result. Lemma 6. Given any rational strategy, there is an instance of FJ-DAGs for which the the number of waste fail calls is g − 1, where g is the number of goal paths.  We demonstrate the execution of strategy SPIOE. Consider an FJ-DAG in Figure 10a. The obtained terminal estimate by SPIOE is shown in Figure 10b. Bold arrows indicate that success calls occur at the edges. The shortest goal path is (1, 2, 3, 6, 7).
The execution trace is shown in Table 1, where each column indicates the estimated length of the current shortest goal path, the number c and the edge (v i , v j ) in oracle call serach c (v i , v j ), and the result. In this trace, no waste fail calls occur.

Conclusions
We have studied a pathfinding problem of FJ-DAGs with unknown edge length and have proposed a strategy that gives a shortest path. The strategy is optimal in the sense that the characteristic vector consisting of the number of fail oracle calls for each length is minimized with respect to a lexicographical order, provided that there are no waste fail calls. Theoretical upper bounds on the number of waste fail calls are also given. As a result, several technical problems that remained in the previous paper have been solved; i.e., showing optimality for a stronger criterion, which was initially intended to use in the previous paper, and making the discussion clearer.
Although PFJUEL is a purely theoretical problem, solution methods for it can contribute to reducing the cost of configuration change in reconfigurable cloud computing systems. The proposed strategy is an optimal one under a reasonable assumption; i.e., no other strategy is better than this. This is a notable result. Extending the targets to graphs with cycles remains as future work. In real applications, if the upper bound of the edge length is known, then the average computational cost may be reduced by non-conservative strategies. This issue should be also studied in the future.