Connection of Optimal Stopping Time to s-t Cut Problems on Trees

We present a method to transform any optimal stopping time problem with an underlying tree structure into an s-t min-cut problem on the same tree but with modified capacities, the details of which are lacking in existing optimal stopping time research. We also show that any s-t min/max-cut problem on a tree has an equivalent optimal stopping problem formulation. We provide a dynamic programming algorithm to solve this problem and also perform a sensitivity analysis on it. Our results imply that the s-t max-cut problem on a tree can be solved using an algorithm with runtime that is linear in the tree size.


I. INTRODUCTION
O PTIMAL stopping has seen many applications in the set- ting of pricing American stock options.However, exact solutions of these problems using Dynamic Programming (DP) result in runtimes which are exponential in the time-horizon, leading instead to efforts on developing approximate solutions; see, for example, [1], [2], [3], [4].
We now briefly introduce terminology regarding some graph problems.The s-t max-flow problem is a network flow problem with the goal of sending the maximal flow from a node s to a node t in a graph.The s-t min/max-cut problems consist of partitioning a graph's nodes into two sets such that the weights of the edges across the sets is minimized/maximized.We provide more detailed definitions in Section II-A.
Chen and Goldberg [4] proposed the equivalence of the s-t max-flow/min-cut problem on trees to the minimization optimal stopping time problem inf τ E[c τ ], where c t is some non-negative random process.They note that a maximization problem can be converted to the minimization problem via Yijin Wang is with the Electrical and Computer Engineering Department, University of Illinois Urbana-Champaign, Urbana, IL 61801 USA (e-mail: yijinw3@illinois.edu).
Roy Dong is with the Industrial Engineering Department, University of Illinois Urbana-Champaign, Urbana, IL 61801 USA (e-mail: roydong@illinois.edu).
Digital Object Identifier 10.1109/LCSYS.2023.3342562 where c is a uniform upper-bound on c t .Although this is a valid transformation of the optimization problem, a similar straightforward transformation of the capacities of the graph of an s-t max-flow/min-cut problem does not result in an equivalent s-t max-flow/min-cut solution.In this letter, we introduce a method to convert maximization or minimization optimal stopping time problems with objective functions of any sign into a min-cut problem via a O(|V|) procedure, where |V| is the number of nodes in the underlying tree.Chen and Goldberg [4] also remarked that while max-flow on trees can be solved via a fast DP algorithm, from the optimal stopping time perspective, the runtime would generally be exponential in the time horizon.Nevertheless, we exploit the equivalence between the optimal stopping time and s-t mincut problems to show some useful results.We also provide a DP algorithm and perform a sensitivity analysis on its solution in response to incremental changes in the tree capacities.
Furthermore, we show that any s-t min/max-cut problem on a tree can be transformed into an optimal stopping problem.This then provides a method for transforming an s-t max-cut problem on a tree into an equivalent s-t min-cut problem on a modified version of the tree.This means that s-t max-cut on trees can be solved exactly using a greedy algorithm.The s-t max-cut problem on general graphs is an NP-hard problem, although there are approximation algorithms; see [5], [6].

II. NOTATION AND TERMINOLOGY
We denote 1 n to be the vector in R n of ones.For a set A, 2 A denotes the power set of A. For a collection of sets C, we let σ (C) denote the σ -algebra generated by C.

A. s-t Network Flow and Cut Problems
For a weighted graph, in which each edge has a non-negative capacity, a maximum s-t flow is the maximum flow from a "source" node s to a "sink" node t such that the flow through each edge does not exceed the edge's capacity.The min s-t cut is a partition of the graph's nodes into two sets S and T such that s ∈ S, t ∈ T, and the sum of the capacities of edges from S to T, i.e., the "cut", is minimal.The Max-flow Min-cut Duality Theorem states that the max s-t flow is equal to the min s-t cut; see, for example, [7].
In this letter, we refer to s-t max-flow and min/max-cut problem on trees with a designated root.We trivally convert a tree T rooted at s into a tree with a sink t by connecting  all leaves of T to t. See Figure 1 for an illustration.For the weighted max-flow/min-cut problem on a tree, c = ∞.Definition 1 (s-t Weighted Max-Cut): Let G be a graph with source s, sink t, and non-negative edge weights.Let S and T be partitions of the nodes of G such that s ∈ S, t ∈ T. The s-t max-cut on G is the choice of S and T such that the sum of the weights of the edges from S to T is maximal.
The transformation in Figure 1 for the s-t max-cut problem on a tree is obtained by setting c = −∞.
In general, max-flow and min/max-cut problems assume edge weights.However, in the stopping time setting, each node corresponds to a stopping option with a corresponding cost/reward, so we assume nodal weights.One problem setting can trivially be converted into the other without changing the optimal solution, as we show in Section IV.

III. OPTIMAL STOPPING TIME PROBLEM
Let T be the finite time-horizon and let T = {t} T t=0 be the set of time-indices.Let = {ω i } k−1 i=0 be a finite sample space and let F = (F t ) T t=0 be a filtration on .Suppose without loss of generality that F 0 = {∅, } and F T = 2 .Let P be a probability measure on , defined at least on F T .
Definition 2 (Stopping Time): For a filtration F on , a stopping time τ is a T-valued random variable such that {ω ∈ |τ (ω) = t} ∈ F t , ∀t ∈ T. We say that τ is "adapted to" F. Note that there is an abuse of terminology here, as τ is not a random process, but a random variable.
Definition 3 (Optimal Stopping Time): Let S be the set of all stopping times adapted to F. Let c = (c t ) T t=0 be a random cost process adapted to F. Let c τ be the random variable such that c τ (ω) = c τ (ω) (ω), ∀ω ∈ , ∀τ ∈ S.An optimal stopping time τ * ∈ S is such that (1)

A. Representing Filtrations as Trees
In this section, we represent filtrations as trees, a special case of representing partially ordered sets (posets) as trees.See, for example, [8] for a set representation of trees, with applications to Game Theory.
Definition 4: For a σ -algebra A on , a measurable set A ∈ A is an atomic set if A = ∅ and has no proper subset which is non-empty and measurable.Intuitively, atomic sets are the smallest non-empty measurable sets in a σ -algebra.
The sequence of σ -algebras are successive refinements, i.e., F 0 ⊆ • • • ⊆ F T , so we can represent F as a tree of depth T whose elements are its atomic sets.Any σ -algebra partitions into equivalence classes.Definition 5: The tree representation of F, denoted (V, E), is the tree with vertex set V and edge set E, where The root node is (0, ), and for all other nodes (t, A), its parent is the unique node Since F T = 2 , Each ω ∈ corresponds to a leaf node in V. Define the maximal path corresponding to ω to be the unique path from the root (0, ) to the leaf (T, {ω}).
Finally, for any random process X adapted to F, we can assign the weight X t (ω) to the node (t, A), where ω ∈ A, ∀t ∈ T. Since X is adapted, it does not matter which ω ∈ A is chosen; hence we will use X t (A) to refer to X t (ω), ∀ω ∈ A, ∀t ∈ T. In particular, this applies to the cost process c, an example of which is shown in Figure 2.

B. Tree Representation of the Optimal Stopping Problem
Proposition 1: Consider a discrete-time, finite-horizon optimal stopping time problem characterized by ( , F, c, P).
Let (V, E) denote the tree representation of F. For each (t, A) ∈ V, we associate the cost L(t, A) = P(A)c t (A).
Then, the optimal stopping time problem is equivalent to finding a set B ⊆ V that minimizes (t,A)∈B L(t, A), subject to each maximal path having exactly one node in B.
Proof: A stopping time τ adapted to F can be represented as a subset of nodes M ⊆ V at which to stop: Conversely, if M ⊆ V contains exactly one node along each maximal path, then M defines a stopping time: each ω ∈ corresponds to a maximal path, and there is exactly one (t, A) ∈ M s.t.ω ∈ A. Thus, we can define the corresponding stopping time τ : if (t, A) ∈ M, τ (ω) = t, ∀ω ∈ A. The tree structure forces τ to be adapted to F. Thus, any optimal stopping time τ * will yield an optimal subset of nodes M * = {(t, A) ∈ V|τ * (ω) = t, ω ∈ A} ⊆ V, and any optimal set M * ⊆ V will yield an optimal stopping time τ * , where τ It is worth noting that the cost associated with node (t, A) ∈ V is not just the realized value c t (A), but rather c t (A) weighted by P(A).The tree representation of an optimal stopping time problem is shown in Figure 3.

C. The Secretary Problem: an Example
An example of the optimal stopping time problem is the Secretary Problem (see, for example, [9]): a manager can only hire one out of n secretaries.The manager interviews the secretaries in a random order, and must make the decision to reject or hire each secretary right after the interview.Decisions are final, and if the manager hires a secretary, the remaining candidates will no longer be considered.The objective is to maximize the probability of choosing the best secretary.
After each interview, the manager gains more information about the relative rankings of the secretaries (assuming no ties).The time horizon is T = n − 1.Each time t corresponds to depth t in the filtration tree.Let the "reward" of node v be the probability of hiring the best secretary if stopping at v, weighted by P({ω ∈ v}).Let a < b mean that secretary a ranks lower than secretary b.At t = 0 is the root, or the singleton ranking of secretary 1, with reward 1 n • 1 (this node represents , and secretary 1 is ranked first in (n − 1)! rankings).At t = 1, there are two nodes, or scenarios: 1 < 2 with reward 2 n • 1 2 = 1 n and 2 < 1 with reward 0, and so on.is the set of all rankings of the n secretaries, so the number of leaves is | | = n!.The size of the filtration tree is n i=1 i!.

IV. OPTIMAL STOPPING TIME AS A MIN-CUT PROBLEM
In this section, we show that the optimal stopping problem is equivalent to an s-t min-cut problem and frame it as a mixed-integer linear program (MILP), whose structure reveals some properties of s-t cut problems, which we will explore in Section V. Chen and Goldberg [4] showed the equivalence of the optimal stopping problem to the max-flow problem on a tree; here, we directly show equivalence to the min-cut problem on a tree, which is the dual of the max-flow problem.
Proposition 2 (Optimal Stopping is Equivalent to Min-Cut): Consider the node selection problem in Proposition 1.We add a source node s 0 and sink node s 1 to (V, E) as follows: The node selection problem is equivalent to the min-cut problem on a tree ( Ṽ, Ẽ) with capacities L. Proof: Note that maximal paths of (V, E) correspond to s 0s 1 paths in ( Ṽ, Ẽ), and a min-cut will choose exactly one edge on each maximal path, giving a bijection between feasible sets with the same costs.Furthermore, no edge ending in s 1 will be chosen, and the desired result follows.
The node selection problem in Proposition 1 naturally lends itself to a MILP with |V| binary variables, each of which represents whether a node is included.However, we will formulate this problem with some redundant variables; this has a nicer interpretation from a probability space perspective.
Since is finite, we can represent random variables on as elements of R | | = R k , and denote the inner product X, Y = E P [XY] for random variables X and Y on the same probability space.In particular, Furthermore, each σ -algebra A can be equivalently viewed as the subspace of all A-measurable random variables, so that the conditional expectation E[ • |A] is simply the projection onto this subspace with respect to the aforementioned inner product.For our filtration F, we will represent these projections as the linear operators P t , where Proposition 3 (MILP Reformulation of the Optimal Stopping Problem): The stopping time τ * is a solution to the optimal stopping problem in (1) if and only if the corresponding binary matrix S * is an optimizer of the following MILP: Proof: A stopping time τ can be represented as binary matrix S ∈ {0, 1} k×(T+1) , with the interpretation that τ (ω) = t if and only if S t (ω) = 1.Here, we let S t (ω) denote the entry in the ω th row and t th column.For a binary matrix S to represent a valid stopping time, we have two constraints: 1) Each row of S has exactly one non-zero entry; i.e., for each ω ∈ , exactly one time index in T is chosen.2) P t S t = S t , ∀t ∈ T, representing that S is adapted to F; this is equivalent to These constraints and objective are incorporated into (2).Figure 3 shows an example of the matrix S.
Additionally, the linear program (LP) relaxation of this problem is exact, for the same reasons that min-cut programs can be solved as LPs.In the LP relaxation of (2), the constraint on S to be a binary matrix is replaced by S ∈ [0, 1] k×(T+1) .We will not give the full proof of the equivalence here, but at a high-level, unimodularity of the constraint matrices is sufficient for exactness of the LP relaxation of an MILP, and the constraints arising from a min-cut problem satisfy the unimodularity property.See, for example, [7] for details.

V. EQUIVALENT TRANSFORMATIONS FOR MIN-CUT
We show through the particular structure of the MILP formulation (2) that an optimal stopping time problem with either a minimization or maximization objective and objective costs with arbitrary signs can be formulated into a min-cut problem on the same underlying tree structure.
A max-cut problem (corresponding to a maximization objective with non-negative rewards) on a tree can be transformed into an equivalent min-cut problem (corresponding to a minimization objective with non-negative costs) in O(|V|) time, where |V| is the number of nodes in the tree.In fact, we show that the min/max-cut problem on any tree can be formulated as an optimal stopping time problem, and so any s-t max-cut problem on a tree can be solved in linear time.In Section VI, we provide a O(|V|) min-cut algorithm.

A. Transformation of Tree Capacities
We now find an equivalent formulation to (2).Define Proposition 4: Let ∈ R k be a vector of increments s.t.C+ 1 T T+1 ≥ 0. In the underlying tree of (2), P(ω i ) i is added to the capacity of the leaf u corresponding to ω i ∈ , as well as to those of u's ancestors.Replacing the objective of (2) with D(C + 1 T T+1 ), S F results in an equivalent problem, where •, • F is the Frobenius inner product. Proof: where the last equality is due to the constraint Hence, the objective function of ( 2) is shifted by a constant, so the solution to (2) is unchanged.Figure 4 shows an example of an Optimal Stopping Time tree, with original capacities displayed inside the nodes.
Let us see how to transform the capacities of this tree: The horizontal and vertical lines in the capacity matrix form regions, each of which corresponds to a node in Figure 4.The capacity of each node is the sum of the capacities in its corresponding region in the matrix.The capacities inside the nodes correspond to entries of DC and the labels next to the nodes correspond to the entries of D 1 T T+1 in (5).We can generalize from the above example.First, we define some methods: Definition 6: Let T , T be two trees over the same vertex and edge set, with root s.The nodal capacities may differ.
subtree(v): the tree rooted at node v. subtree(v) ⊆ T .leaves(v): the set of leaves in subtree(v).For a leaf u, leaves(u) = {u}.leaves(s) is simply the set of leaves of T .cap(v): the capacity of node v in T .cap (v): the capacity of node v in T .For our setting, T is the underlying tree of a minimization optimal stopping time problem (a maximization problem would flip the signs of the capacities).For any v ∈ T , cap(v) is possibly negative, and includes the probabilities of the nodes in leaves(v), as given by DC from (3) and (4).
Procedure 1: Let T be a tree rooted at s with vertex set V. Let v ∈ R be such that cap (v) = cap(v)+ v .The following sequence of steps transforms a min/max-cut problem on T into an equivalent min-cut problem on T : 1) ∀u ∈ leaves(s), let cap (u) = cap(u) + u .
2) Iteratively process all children of a node before processing the node: for v ∈ V, let p be v's parent, and let p be initialized to 0. Update p = p + v .After processing each v ∈ V, cap (v) = cap(v) + u∈leaves(v) u .For a valid min-cut formulation on T , u , ∀u ∈ leaves(s) must be such that cap (v) ≥ 0, ∀v ∈ V. Procedure 1 is a O(|V|) DP algorithm, as each node is processed exactly once.

B. Generalization to s-t Min/Max-Cut on Any Rooted Tree
We will use Definition 6 in addition to the following: Definition 7: Let T be a tree rooted at s. Let node v ∈ T .path(v): the path from s to v. Let |path(v)| be the number of nodes in path(v).In particular, |path(s)| = 1.
Proposition 5: Let T be a tree rooted at s.There is an O(|V|) algorithm which can transform an s-t max-cut problem on T to an equivalent s-t min-cut problem.
Proof: Let S u ∈ {0, 1} |path(u)| , ∀u ∈ leaves(s) be the vector indicating where on path(u) the min-cut is.The entries in

Fig. 1 .
Fig.1.Converting a tree rooted at s into one with sink t, by adding edges from the leaves to t (dashed).The labels are the edge capacities.For s-t min-cut and max-cut problems, c = ∞ and −∞, respectively.

Fig. 4 .
Fig.4.An Optimal Stopping Time tree with the original capacities in each node.The leaves correspond to elements of .The label next to each node corresponds to a modification of the node's capacity which altogether result in an equivalent min-cut problem as long as the (•) are chosen so that the transformed capacities are all non-negative.
c 2023 The Authors.This work is licensed under a Creative Commons Attribution 4.0 License.
For more information, see https://creativecommons.org/licenses/by/4.0/Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.