A compact representation for minimizers of k -submodular functions
AA compact representation for minimizers of k -submodular functions ∗ Hiroshi Hirai and Taihei Oki
Department of Mathematical Informatics,Graduate School of Information Science and Technology,The University of Tokyo, Tokyo, 113-8656, JapanEmail: { hirai , taihei_oki } @mist.i.u-tokyo.ac.jp March 30, 2017
Abstract A k -submodular function is a generalization of submodular and bisubmodularfunctions. This paper establishes a compact representation for minimizers of a k -submodular function by a poset with inconsistent pairs (PIP). This is a general-ization of Ando–Fujishige’s signed poset representation for minimizers of a bisub-modular function. We completely characterize the class of PIPs (elementary PIPs)arising from k -submodular functions. We give algorithms to construct the ele-mentary PIP of minimizers of a k -submodular function f for three cases: (i) aminimizing oracle of f is available, (ii) f is network-representable, and (iii) f arisesfrom a Potts energy function. Furthermore, we provide an efficient enumeration al-gorithm for all maximal minimizers of a Potts k -submodular function. Our resultsare applicable to obtain all maximal persistent labelings in actual computer visionproblems. We present experimental results for real vision instances. Keywords: k -submodular function, Birkhoff representation theorem, poset withinconsistent pairs (PIP), Potts energy function Minimizers of a submodular function form a distributive lattice, and are compactly rep-resented by a poset (partially ordered set) via Birkhoff representation theorem. Thisfact reveals a useful hierarchical structure of the minimizers, and is applied to the DM-decomposition of matrices and further refined block-triangular decompositions [22].In this paper, we address such a Birkhoff-type representation for minimizers of a k -submodular function . Here k -submodular functions, introduced by Huber–Kolmogorov [14],are functions on { , , , . . . , k } n defined by submodular-type inequalities. This general-ization of (bi)submodular functions has recently gained attention for algorithm designand modeling [9, 11, 12, 17, 18]. ∗ An earlier version of this paper was presented at the 4th International Symposium on CombinatorialOptimization (ISCO 2016), Vietri sul Mare, Italy, May 16–18, 2016 [13]. a r X i v : . [ m a t h . O C ] M a r ur main result is to establish a compact representation for minimizers of a k -submodular function. This can be viewed as a generalization of the above poset rep-resentation for submodular functions and Ando–Fujishige’s signed poset representationfor bisubmodular functions [1]. A feature of our representation is to utilize a poset withinconsistent pairs (PIP) [2, 4, 23], which is a discrete structure having a stronger powerof expression than that of a signed poset. Actually a PIP is a poset endowed with anadditional binary relation ( inconsistency relation ), and is viewed as a poset reformula-tion of 2-CNF. This concept, also known as an event structure , was first introduced byNielsen–Plotkin–Winskel [23] as a model of concurrency in theoretical computer science,and was independently considered by Barthelemy–Constantin [4] to establish a Birkhoff-type representation theorem for a median semilattice —a semilattice generalization of adistributive lattice. A PIP was recently rediscovered by Ardila–Owen–Sullivant [2] torepresent nonpositively-curved cube complexes; the term “PIP” is due to them.Our results consist of structural and algorithmic ones, summarized as follows: Structural results.
We show that minimizers of a k -submodular function form a me-dian semilattice (Lemma 3). By a Birkhoff-type representation theorem [4] for mediansemilattices, the minimizer set is represented by a PIP, where minimizers are encodedinto special ideals in the PIP, called consistent ideals . PIPs arising from k -submodularfunctions are rather special. We completely characterize such PIPs (Theorem 7), whichwe call elementary . This representation is actually compact. We show that the size ofthe elementary PIP for a k -submodular function of n variables is O( kn ) (Proposition 5). Algorithmic results.
We present algorithms to construct the elementary PIP of theminimizers of a k -submodular function f under the following three situations:(i) A minimizing oracle of f is given.(ii) f is network-representable.(iii) f arises from a Potts energy function.For (i), we show that the PIP is obtained by calling the minimizing oracle O( kn ) time(Theorem 13). Notice that a polynomial time algorithm to minimize k -submodular func-tions is not known for the value-oracle model but is known for the valued-CSP model [20].Our result for (i) is applicable to such a case.For (ii) (and (iii)), we consider a class of efficiently minimizable k -submodular func-tions considered in [18], where a k -submodular function in this class is represented bythe cut function in a network of O( kn ) vertices and can be minimized by a minimum-cutcomputation. We show that the PIP is naturally obtained from the residual graph of amaximum flow in the network (Theorems 15 and 16).For (iii), we deal with a k -submodular function ˜ g : { , , , . . . , k } n → R obtained froma k -label Potts energy function g : { , , . . . , k } n → R by adding the 0-label (meaning“non-labeled”). Such a k -submodular function, called Potts k -submodular , is particularlyuseful in vision applications. Indeed, via the persistency property [9, 18], a minimizer of g (an optimal labeling) is partly recovered from a minimizer of the relaxation ˜ g . Gridchyn–Kolmogorov [9] showed that a minimizer of a Potts k -submodular function can be obtainedby O(log k ) calls of a max-flow algorithm performed on a network of O( n ) vertices. Weshow that the PIP is also obtained in the same time complexity (Theorem 17). In showing2his result, we reveal an intriguing structure of the PIP for a Potts k -submodular function(Theorem 23), and utilize results [10, 15] from undirected multiflow theory.We also discuss enumeration aspects for minimizers. Maximal minimizers, which areminimizers with a maximum number of nonzero components, are of particular interestfrom the view of partial optimal labeling. For a Potts k -submodular function, we showthat the problem of enumerating all maximal minimizers reduces to the problem of enu-merating all ideals of a single poset (Theorem 26). This enables us to use an existingfast enumeration algorithm, and leads to a practical algorithm enumerating all maximalpartial optimal labeling in actual computer vision problems. We present experimentalresults for real instances of stereo matching problems. Organization.
The rest of this paper is organized as follows. In Section 2, we givepreliminaries including a Birkhoff-type representation theorem between PIPs and mediansemilattices. In Section 3, we prove the above-mentioned structural results. In Section 4,we prove algorithmic results. Finally, in Section 5, we describe applications and presentexperimental results.
For a nonnegative integer n , we denote { , , . . . , n } by [ n ] (with [0] ·· = ∅ ). For a subset X of an ordered set, let min X denote the minimum element in X (if it exists). Let R be the set of real numbers and R ·· = R ∪ { + ∞} . For a function f from a set D to R , a minimizer of f is an element x ∈ D that satisfies f ( x ) ≤ f ( y ) for all y ∈ D . The setof minimizers of f is simply called the minimizer set of f . We assume that posets arealways finite, and assume the standard notions of lattice theory, such as join ∨ and meet ∧ . k -submodular function Let k be a positive integer. Let S k denote { , , , . . . , k } . The partial order (cid:22) on S k is defined by a (cid:22) b if and only if a ∈ { , b } for each a, b ∈ S k . Consider the n -product S kn of S k , where the partial order on S kn is defined as the direct product of (cid:22) andis also denoted by (cid:22) . In this way, S kn and its subsets are regarded as posets. For x = ( x , x , . . . , x n ) ∈ S kn , the support of x is the set of indices i ∈ [ n ] with nonzero x i ,and is denoted by supp x : supp x ·· = { i ∈ [ n ] | x i = 0 } . A k -submodular function [14] is a function f : S kn → R satisfying the followinginequalities f ( x ) + f ( y ) ≥ f ( x u y ) + f ( x t y ) (2.1)for all x, y ∈ S kn . Here the binary operation u on S kn is given by( x u y ) i ·· = min { x i , y i } ( x i and y i are comparable with respect to (cid:22) ) , x i and y i are incomparable with respect to (cid:22) ) , (2.2)3or every x, y ∈ S kn and i ∈ [ n ]. The operation t in (2.1) is defined by changing min tomax in (2.2).Besides its recent introduction, a k -submodular function seems to be recognized whenBouchet [5] introduced multimatroids . Indeed, a k -submodular function is a direct gen-eralization of the rank function of a multimatroid, and was suggested by Fujishige [8] in1995 as a multisubmodular function .It is not known whether k -submodular functions for k ≥ k -submodular functions are efficiently minimizable. For example, Kolmogorov–Thapper–Živný [20] showed that a sum of low-arity k -submodular functions can be minimized inpolynomial time, where the arity of a function is the number of variables. A nonnegativecombination of binary basic k -submodular functions , introduced by Iwata–Wahlström–Yoshida [18], can be minimized by computing a minimum ( s, t )-cut on a directed network;see Section 4.2.A nonempty subset of S kn is said to be ( u , t ) -closed if it is closed under the operations u and t . From (2.1), the following obviously holds. Lemma 1.
The minimizer set of a k -submodular function is ( u , t ) -closed. A key tool for providing a compact representation for ( u , t )-closed sets is a correspon-dence between median semilattices and PIPs, which was established by Barthélemy–Constantin [4]. A recent paper [6] also contains an exposition of this correspondence.A median semilattice [29] is a meet-semilattice L = ( L, ≤ ) satisfying the followingconditions:(MS1) Every principal ideal is a distributive lattice.(MS2) For all x, y, z ∈ L , if x ∨ y, y ∨ z and z ∨ x exist, then x ∨ y ∨ z exists in L .Note that every distributive lattice is a median semilattice. An element of L is said to be join-irreducible if it is not minimum and is not represented as a join of other elements.Let L ir denote the set of join-irreducible elements of L .Next we introduce a poset with inconsistent pairs (PIP) . A PIP [2, 4, 23] is a poset P = ( P, ≤ ) endowed with an additional symmetric relation ^ satisfying the followingconditions:(IC1) For all p, q ∈ P with p ^ q , there is no r ∈ P with p ≤ r and q ≤ r .(IC2) For all p, q, p , q ∈ P , if p ≤ p, q ≤ q and p ^ q , then p ^ q .A PIP is also denoted by a triple ( P, ≤ , ^ ). The relation ^ is called an inconsistencyrelation . Each unordered pair { p, q } of P is called inconsistent if p ^ q . Note that everyinconsistent pair of P is incomparable. An inconsistent pair { p, q } of P is said to be minimally inconsistent if p ≤ p , q ≤ q and p ^ q imply p = p and q = q for all p , q ∈ P . If { p, q } is minimally inconsistent, the p ^ q is particularly denoted by p • ^ q .We can easily check the following properties of the minimal inconsistency relation:(MIC1) For all p, q ∈ P with p • ^ q , there is no r ∈ P with p ≤ r and q ≤ r .(MIC2) For all p, q, p , q ∈ P with p ≤ p and q ≤ q , if p • ^ q and p • ^ q , then p = p and q = q . 4 qr (a) violating (IC1) pq = r (b) violating (IC1) (c) PIP p p q q (d) violating (IC2) (e) PIP Figure 1: Examples of PIPs and non-PIP structures. Solid arrows indicate the ordersbetween elements (drawn from higher elements to lowers). Dotted lines and dashed linesindicate the inconsistency relations. In (a), (b) and (d), labeled elements indicate wherethe violations of (IC1) and (IC2) are. In (c) and (e), the minimal inconsistency relationsare drawn by dashed lines.Actually, PIPs can also be defined as a triple ( P, ≤ , • ^ ), where • ^ is a binary symmetricrelation on a poset P = ( P, ≤ ) satisfying the conditions (MIC1) and (MIC2). In thisdefinition, the inconsistency relation ^ on P is obtained by p ^ q if and only if there exist p , q ∈ P with p ≤ p , q ≤ q and p • ^ q for every p, q ∈ P . Since both definitions of PIP are equivalent, we will use a convenientone.For a PIP P , an ideal of P is said to be consistent if it contains no (minimally)inconsistent pair. Let C ( P ) denote the family of consistent ideals of P . Regard C ( P )as a poset with respect to the inclusion order ⊆ . Figure 1 shows examples of PIPs andnon-PIP structures.The following theorem establishes a one-to-one correspondence between median semi-lattices and PIPs. Theorem 2 ([4, Theorem 2.16]) . (1) Let L = ( L, ≤ ) be a median semilattice and ^ asymmetric binary relation on L defined by x ^ y if and only if x ∨ y does not exist in L for every x, y ∈ L . Then ( L ir , ≤ , ^ ) forms a PIP with inconsistency relation ^ .The consistent ideal family C ( L ir ) is isomorphic to L , and an isomorphism is givenby I W x ∈ I x for I = ∅ and ∅ min L .(2) Let P be a PIP. The consistent ideal family C ( P ) forms a median semilattice. ThePIP (cid:16) C ( P ) ir , ⊆ , ^ (cid:17) obtained in the same way as (1) is isomorphic to P . The latter part of Theorem 2 (2) is implicit in [4], and follows from Theorem 2 (1)and the fact that for PIPs P and P , if C ( P ) and C ( P ) are isomorphic, then P and P are also isomorphic [4, p.57]. 5 emark 1. A PIP is an alternative expression of a satisfiable Boolean 2-CNF, whereconsistent ideals correspond to true assignments. Indeed, for a PIP ( P, ≤ , ^ ) with P =[ n ], consider the following 2-CNF of Boolean variables x , x , . . . , x n ∈ { , } : ^ i,j ∈ P : i 0) is also easily verified. ( u , t ) -closed set and elementary PIP The starting point for a compact representation for ( u , t )-closed sets is the following. Lemma 3. Every ( u , t ) -closed set is a median semilattice.Proof. Let M ⊆ S kn be a ( u , t )-closed set. Then M is a semilattice since S kn is asemilattice with minimum element ·· = (0 , , . . . , ∈ S kn , and the operator u coincideswith ∧ on S kn . We show that M satisfies the conditions (MS1) and (MS2).(MS1). Let I be the principal ideal of x ∈ M . For all y ∈ I and i ∈ [ n ], y i isequal to either 0 or x i . Therefore, for all y, z ∈ I , the join y ∨ z exists and it holds y ∨ z = y t z ∈ I . Next let ϕ : I → [ n ] be an injection defined by ϕ ( y ) ·· = supp y forevery y ∈ I . One can easily see that ϕ ( y ∧ z ) = ϕ ( y ) ∩ ϕ ( z ) and ϕ ( y ∨ z ) = ϕ ( y ) ∪ ϕ ( z )for every y, z ∈ I . In other words, ϕ is an isomorphism from ( I, (cid:22) ) to ( ϕ ( I ) , ⊆ ). Sinceany nonempty subset of 2 [ n ] closed under ∩ and ∪ is a distributive lattice ordered byinclusion, I is also distributive.(MS2). Let x, y, z ∈ M be such that the join of any two of them exists in M . Since x i , y i and z i are comparable for any i ∈ [ n ], the join x ∨ y ∨ z exists in S kn , and coincideswith x t y t z . Finally since M is closed under t , the join x ∨ y ∨ z belongs to M . (cid:3) Let ^ be a symmetric binary relation on S kn defined by x ^ y if and only if x ∨ y does not exist in S kn for every x, y ∈ S kn . Note that for every x, y ∈ M , if x ^ y then x ∨ y is equal to x t y .From Theorem 2 (1) and Lemma 3, we obtain the following. Theorem 4. Let M be a ( u , t ) -closed set. Then ( M ir , (cid:22) , ^ ) forms a PIP with incon-sistency relation ^ . The consistent ideal family C ( M ir ) is isomorphic to M , and theisomorphism is given by I W x ∈ I x for I = ∅ and ∅ min M . Figure 2 shows an example of a ( u , t )-closed set and the corresponding PIP.From Theorem 4, it will turn out that the set M ir of join-irreducible elements of every( u , t )-closed set M does not lose any information about the structure of M . That is,non-minimum elements in M can be obtained as the join of one or more join-irreducibleelements of M (notice that we cannot obtain the minimum element of M in this way).Therefore we call M ir a PIP-representation of M . Furthermore, the following proposition,which will be proved in Section 3.1, says that this representation is actually compact.6 (a) a ( u , t )-closed set on S (b) the PIP corresponding to (a) Figure 2: Example of a ( u , t )-closed set and the corresponding PIP. In (a), elementssurrounded by double-lined frames are join-irreducible. In (b), non-minimal inconsistencyrelations are not drawn. (a) violating (EP1) (b) elementary (c) violating (EP2) x ◦ y ◦ (d) elementary Figure 3: Examples of elementary PIPs and non-elementary PIPs. In all diagrams, thedrawn PIPs satisfy the condition (EP0) with n = 2. Each element is filled or not filledaccording to the corresponding part P i . Non-minimal inconsistency relations are notdrawn in each diagram. Proposition 5. Let M be a ( u , t ) -closed set on S kn . The number of join-irreducibleelements of M is at most kn . Theorem 4 states that any ( u , t )-closed set can be represented by a PIP. However,not all PIPs correspond to some ( u , t )-closed sets. A natural question then arises: Whatclass of PIPs represents ( u , t ) -closed sets? The main result (Theorem 7) of this sectionanswers this question. Definition 6. A PIP P = ( P, ≤ ) is called elementary if it satisfies the following condi-tions:(EP0) P is the disjoint union of P , P , . . . , P n such that every pair { x, y } ⊆ P ofdistinct elements is minimally inconsistent if and only if { x, y } ⊆ P i for some i ∈ [ n ].(EP1) For any distinct i, j ∈ [ n ], if | P i | ≥ P j = { y } , there is no element x ∈ P i with x < y .(EP2) For any distinct i, j ∈ [ n ], if | P i | ≥ | P j | ≥ 2, either of the following twoholds:(EP2-1) Every pair of x ∈ P i and y ∈ P j is not comparable.(EP2-2) There exist x ◦ ∈ P i and y ◦ ∈ P j such that x ◦ < y and y ◦ < x for all x ∈ P i \ { x ◦ } and y ∈ P j \ { y ◦ } .Figure 3 shows examples of elementary PIPs and non-elementary PIPs. Theorem 7. (1) For every ( u , t ) -closed set M , the PIP ( M ir , (cid:22) , ^ ) is elementary.(2) For every elementary PIP P , there is a ( u , t ) -closed set M isomorphic to C ( P ) . An elementary PIP corresponds to a ( u , t )-closed set on the product of the most“elementary” median semilattice S k , whereas general PIP can represent an arbitrarymedian semilattice (by Theorem 2). This is why we use the term “elementary.”7 − P + − P + − P + P − P + P (a) an elementary PIP with assigned signs P P P P P P ++ + − + −− − + − ++ + −−− ++ −− (b) the singed poset corresponding to (a) Figure 4: Example of an elementary PIP on S n and the corresponding signed poset. Remark 2. Consider an elementary PIP P with the property that each P i has thecardinality at most 2. Such a PIP arises from ( u , t )-closed sets on S n . If we assigna sign + , − to each element so that two nodes in P i have a different sign, then thePIP is equivalently transformed into a signed poset [26], which is a certain “acyclic andtransitive” bidirected graph and is used by Ando–Fujishige [1] for representing ( u , t )-closed sets in S n . Then ideals in the signed poset correspond to consistent ideals in theoriginal PIP. In the transformation, elements in the signed poset are nonempty membersin P , P , . . . , P n . Bidirected edges are given according to an appropriate rule; one canguess the rule from the example in Figure 4. (In this figure, we omit redundant edgesderived from the transitive closure.) In this way, one can see that the PIP-representationfor ( u , t )-closed sets on S n is equivalent to the one by Ando–Fujishige [1].The following corollary of Theorem 2 (2) and Theorem 7 (1) will be used in Section 4. Corollary 8. Let P be a PIP. If C ( P ) is isomorphic to some ( u , t ) -closed set, then P is elementary. The remaining part of this section is devoted to proving Theorem 7. To get a motiva-tion behind the properties of elementary PIPs which we prove below, readers may chooseto read Algorithm 2 in Section 4.1 first. The proof of Theorem 7 (1) is outlined as follows:1. First we define the differential of a join-irreducible element x as the differencebetween x and the unique lower cover x of x .2. Next we introduce a normalized ( u , t )-closed set, which is a ( u , t )-closed set suchthat every differential has exactly one nonzero component. We show that every( u , t )-closed set is isomorphic to some normalized ( u , t )-closed set. This set givesus a natural partition of join-irreducible elements.3. Finally we construct an elementary PIP from the partition.A ( u , t )-closed set M is said to be simple if min M = . Any ( u , t )-closed set canbe converted to a simple ( u , t )-closed set without any structural change. Definition 9. Let M ⊆ S kn be a simple ( u , t )-closed set. For x, y ∈ M , we say that y is a lower cover of x , or x covers y , if y ≺ x and there is no z ∈ M such that y ≺ z ≺ x .For a join-irreducible element x ∈ M ir , there uniquely exists y ∈ M covered by x . The differential ¯ x ∈ S kn of x is defined by ¯ x i ·· = x i if x i (cid:31) y i = 0 and ¯ x i ·· = 0 if x i = y i , foreach i ∈ [ n ]. 8 (a) a simple ( u , t )-closed set on S (b) the PIP corresponding to (a) (c) a normalized ( u , t )-closed set on S (d) the PIP corresponding to (c) Figure 5: Examples of a simple ( u , t )-closed set, a normalized set and the correspondingPIPs. In (b) and (d), the differential of each join-irreducible element is written in italics.The uniqueness of a lower cover of a join-irreducible element x ∈ M ir can be seenfrom the fact that if x has two or more lower covers, then x is obtained as the join ofthese lower covers. Figure 5 (a) and (b) show examples of a simple ( u , t )-closed set andthe corresponding PIP, respectively.We show some properties about differentials. In what follows, we denote the subset { x ∈ M | x i = α } by M i,α for i ∈ [ n ] and α ∈ [ k ]. Note that M i,α also forms a ( u , t )-closed set if M i,α = ∅ . Lemma 10. Let M ⊆ S kn be a simple ( u , t ) -closed set. The following hold:(1) For every i ∈ [ n ] and α ∈ [ k ] with M i,α = ∅ , x ·· = min M i,α is join-irreducible in M and ¯ x i = α holds.(2) For every x ∈ M ir and i ∈ [ n ] with α ·· = ¯ x i = 0 , it holds x = min M i,α .(3) For every i ∈ [ n ] and α ∈ [ k ] , there is at most one join-irreducible element x ∈ M ir such that ¯ x i = α .(4) For every x ∈ M ir , the differential ¯ x of x has at least one nonzero component.(5) The map x ¯ x is an injection from M ir to S kn .Proof. (1). Let i ∈ [ n ] , α ∈ [ k ] and x ·· = min M i,α . Suppose to the contrary that x / ∈ M ir .Then there exist y, z ∈ M such that x (cid:31) y, z and x = y ∨ z . Since α = x i = y i ∨ z i , either y i or z i is equal to α . This contradicts the assumption that x = min M i,α and x (cid:31) y, z .Hence x is join-irreducible. Moreover, from Definition 9, it holds ¯ x i = α .(2). Let x ∈ M ir and i ∈ [ n ] such that α ·· = ¯ x i = 0. Then x ∈ M i,α . Let y ∈ M be thelower cover of x and let z ∈ M i,α be the minimum element of M i,α . Suppose that x = z .Then it holds z (cid:22) y ≺ x since z ≺ x . Hence we obtain z i = y i = x i = α , which claimsthat ¯ x i = 0 by Definition 9. This contradicts the assumption. Thus x = z = min M i,α holds. 93). Suppose that M has a join-irreducible element x ∈ M ir such that ¯ x i = α . From(2), it holds x = min M i,α . This lemma follows from the uniqueness of the minimumelement of M i,α .(4). Assume that M has a join-irreducible element x such that ¯ x = . Let y ∈ M be the lower cover of x . Then x i = y i must hold for each i ∈ [ n ], which contradicts that y ≺ x .(5). Let x, y ∈ M ir such that ¯ x = ¯ y . Since ¯ x = ¯ y = from (4), there exists i ∈ [ n ]such that ¯ x i = ¯ y i = 0. Then x = y follows from (3). (cid:3) Now Proposition 5 is a consequence of Lemma 10. Proof of Proposition 5. It suffices to consider the case where M is simple. From Lem-mas 10 (3) and (4), it holds |{ ¯ x | x ∈ M ir }| ≤ kn . Furthermore, since the map x → ¯ x isinjective, we have | M ir | = |{ ¯ x | x ∈ M ir }| . Hence | M ir | is at most kn . (cid:3) A simple ( u , t )-closed set M is said to be normalized if it satisfies | supp ¯ x | = 1 forall x ∈ M ir . Examples of a normalized ( u , t )-closed set and the corresponding PIP areshown in Figure 5 (c) and (d), respectively. Lemma 11. For any ( u , t ) -closed set M , there exists a normalized ( u , t ) -closed set thatis isomorphic to M with respect to the relations (cid:22) and ^ .Proof. We can suppose that M is simple. We first show:(1) For x, y ∈ M ir , it holds that supp ¯ x = supp ¯ y or supp ¯ x ∩ supp ¯ y = ∅ .Suppose to the contrary that there exist x, y ∈ M ir such that ¯ x i = 0 = ¯ y i and ¯ x j = 0 = ¯ y j for distinct i, j ∈ [ n ]. Then it holds ¯ x i = ¯ y i from Lemma 10 (3). Hence we have x x t y since ( x t y ) i = 0. However, both x and x t y belong to M j,x j since ( x t y ) j = x j = 0,thus it holds x (cid:22) x t y from Lemma 10 (2). This is a contradiction.By (1), we can define an equivalence relation ∼ over the index set n i ∈ [ n ] (cid:12)(cid:12)(cid:12) there exists x ∈ M ir such that ¯ x i = 0 o as follows: i ∼ j if and only if there exists x ∈ M ir such that ¯ x i = 0 and ¯ x j = 0 . Then each equivalence class can be “contracted” into a single index without any structuralchange of M as follows. Let { I , I , . . . , I ˜ n } be the set of equivalence classes. For j ∈ [˜ n ], let n x j, , x j, , . . . , x j,k j o ⊆ M ir be the set of join-irreducible elements having thedifferentials of support I j . Then, by Lemma 10,(2) For every x ∈ M and j ∈ [˜ n ], either x i = 0 for all i ∈ I j or there uniquely exists α ∈ [ k j ] such that x i = ( x j,α ) i for all i ∈ I j .Let ˜ k ·· = max j ∈ [˜ n ] k j . Define ϕ : M → S ˜ k ˜ n by ϕ ( x ) j = 0 if x i = 0 for i ∈ I j , and ϕ ( x ) j = α if x i = ( x j,α ) i for i ∈ I j . It is easily verified (from Lemma 10) that the map ϕ is injectiveand preserves (cid:22) and ^ . An irreducible element of ϕ ( M ) is the image of an irreducibleelement of M , and, by construction, has the differential of a singleton support. Thus ϕ ( M ) is a normalized ( u , t )-closed set. (cid:3) Now we are ready to prove Theorem 7 (1).10 roof of Theorem 7 (1). By Lemma 11, it suffices to consider the case where M is nor-malized. For every i ∈ [ n ], let J i ·· = { x ∈ M ir | supp ¯ x = { i }} . From the definition ofnormalized ( u , t )-closed sets, { J , J , . . . , J n } forms a partition of M ir (note that J i maybe empty). We show that the PIP ( M ir , (cid:22) , ^ ) satisfies the axiom of elementary PIPswith P i = J i for every i ∈ [ n ].(EP0, “only if” part). Let { x, y } ⊆ M ir be a minimally inconsistent pair. Then thereexists i ∈ [ n ] such that 0 = x i = y i = 0. We show 0 = ¯ x i = ¯ y i = 0. Suppose that¯ x i = 0. From Definition 9, there exists x ∈ M ir such that x ≺ x and x i = x i . Now wehave x ≺ x and x ^ y , which contradict the assumption that x and y are minimallyinconsistent. Therefore ¯ x i = 0 holds, and we can show ¯ y i = 0 in the same way. Thus { x, y } ⊆ J i holds.(EP1) is an immediate consequence of the following property:( ∗ ) Let i, j ∈ [ n ] be distinct. If there exist x ∈ J i and y ∈ J j such that x ≺ y , then forall x ∈ J i \ { x } , there exists y ∈ J j \ { y } such that y ≺ x ; in particular | J j | ≥ | J i | ≥ ∗ ). Let x ∈ J i and y ∈ J j such that x ≺ y . Now it holds x i = y i = 0 and y j = 0. Let x ∈ J i \ { x } . We have y i = ( x t y ) i = 0 since 0 = x i = x i = y i = 0. Thus y (cid:22) x t y does not hold. We show that 0 = x j = y j . If not, ( x t y ) j is equal to y j , hence x t y belongs to M j,y j . Therefore it holds y (cid:22) x t y since y is the minimum element of M j,y j from Lemma 10 (2). We have a contradiction here. Let y ·· = min M j,x j . This y belongs to J j from Lemma 10 (1), and it holds y = y ≺ x .(EP2). Let i, j ∈ [ n ] be distinct indices such that | J i | ≥ | J j | ≥ 2. We canassume that (EP2-1) does not hold, i.e., there exist x ∈ J i and y ∈ J j such that x ≺ y .Consider x, z ∈ J i \ { x } . By ( ∗ ), there exist y , y ∈ J j \ { y } such that y ≺ x and y ≺ z .We show y = y . Suppose not. Since y ≺ x and y ∈ J j \ { y } , we can take x ∈ J i \ { x } such that x ≺ y by ( ∗ ) with changing the role of i and j . Now we have x ≺ y ≺ z ,which contradicts x ^ z . Therefore y and y are same elements. Consequently, therequired element y ◦ in (EP2-2) is given by y . By changing the role of i and j , we seethat x ◦ is given by x .(EP0, “if” part). Let x, y ∈ J i be distinct with i ∈ [ n ]. Now since x ^ y , there existsa minimally inconsistent pair { x , y } ⊆ M ir such that x (cid:22) x and y (cid:22) y . From the “onlyif” part of (EP0), x and y belong to J j for some j ∈ [ n ]. If i = j , then we have x, y ∈ J i , x , y ∈ J j , x ≺ x and y ≺ y , which contradict (EP2). Hence i = j and it must hold { x , y } = { x, y } . (cid:3) Let ( P, ≤ , ^ ) be an elementary PIP with partition { P , P , . . . , P n } of condition (EP0).For every i ∈ [ n ], let P i = n e i, , e i, , . . . , e i,k i o , where k i ·· = | P i | . Let k ·· = max i ∈ [ n ] k i . Fora consistent ideal I , let x ( I ) = ( x ( I ) , x ( I ) , . . . , x n ( I )) ∈ S kn be defined by x i ( I ) ·· = α ( I ∩ P i = { e i,α } ),0 ( I ∩ P i = ∅ ) ( i ∈ [ n ]) . Now x ( I ) is well-defined since every consistent ideal I of P has at most one element ineach P i by (EP0). Let M ·· = { x ( I ) | I ∈ C ( P ) } . Then C ( P ) and M are clearly isomorphic.11herefore the rest of the proof of Theorem 7 (2) is to show that M forms a ( u , t )-closedset.We define binary operations u and t on C ( P ) as I u J ·· = I ∩ J and I t J ·· = n [ i =1 { p ∈ P i | ( I ∪ J ) ∩ P i = { p }} for every I, J ∈ C ( P ). Theorem 7 (2) follows immediately from: Lemma 12. For every I, J ∈ C ( P ) , it hold I u J ∈ C ( P ) , I t J ∈ C ( P ) , x ( I u J ) = x ( I ) u x ( J ) and x ( I t J ) = x ( I ) t x ( J ) .Proof. Let I, J ∈ C ( P ). Since the consistent ideal family of a PIP is closed under theintersection, I u J also forms a consistent ideal of P . In addition, we can easily checkthat x ( I u J ) = x ( I ) u x ( J ) holds.Next we consider I t J . We show that I t J is a consistent ideal. Suppose that I t J is not an ideal of P . There exist q ∈ I t J and p ∈ P \ ( I t J ) such that p < q . Withoutloss of generality, we assume q ∈ I . Now I also contains p since I is an ideal. Let i, j ∈ [ n ]such that p ∈ P i and q ∈ P j . We can take r ∈ ( J ∩ P i ) \ { p } since p / ∈ I t J . Thus | P i | is greater than 1, and | P j | is also greater than 1 since p < q contradicts the condition(EP1) if | P j | = 1. From (EP2-2), there exists s ∈ P j \ { q } such that s < r . It holds s ∈ J since r ∈ J . Now we have q = s , q ∈ I , s ∈ J and q, s ∈ P j . This contradicts q ∈ I t J . Therefore I t J is an ideal. Finally suppose that I t J includes an inconsistentpair { p, q } . Since I t J is an ideal, it also includes the minimally inconsistent pair { p , q } with p ≤ p and q ≤ q . From (EP0), p and q belong to the same part P i of the partition.This contradicts the fact that | ( I t J ) ∩ P i | ≤ 1, and thus I t J is a consistent ideal. x ( I t J ) = x ( I ) t x ( J ) follows from the definitions of t on S kn and on C ( P ). (cid:3) In this section, we study algorithmic aspects of constructing PIP-representations for theminimizer sets of k -submodular functions. Let D min ( f ) denote the minimizer set of afunction f . Let MF( n, m ) denote the time complexity of an algorithm of a maximumflow (and a minimum cut) in a network of n vertices and m edges. We assume a standardmax-flow algorithm, such as preflow-push algorithm, and hence assume that MF( n, m )is not less than O( nm ); notice that the current fastest one is an O( nm ) algorithm byOrlin [24]. We can obtain the PIP-representation for the minimizer set of a k -submodular function f : S kn → R by using a minimizing oracle k -SFM, which returns a minimizer of f andits restrictions. Let min f be the minimum value of f . For i ∈ [ n ] and a ∈ S k , we definea new k -submodular function f i,a : S kn → R from f by f i,a ( x , . . . , x i , . . . , x n ) ·· = f ( x , . . . , i (cid:96) a, . . . , x n ) ( x ∈ S kn ) . Namely, f i,a is a function obtained by fixing the i -th variable of f to a .12 lgorithm 1 Obtain the minimum minimizer of a k -submodular function Input : A k -submodular function f : S kn → R Output: The minimum minimizer min D min ( f ) of f function GetMinimumMinimizer ( f ) x ← k -SFM ( f ) for i ∈ supp x do if min f i, = min f then x i ← return x Algorithm 2 Collect all join-irreducible minimizers of a k -submodular function Input : A k -submodular function f : S kn → R Output: The set D min ( f ) ir of all join-irreducible minimizers of f function GetJoinIrreducibleMinimizers ( f ) x ·· = GetMinimumMinimizer ( f ) ˜ f ·· = the function obtained by fixing the i -th variable of f to x i for all i ∈ supp x J ← ∅ for i ∈ [ n ] \ supp x do for α ← to k do if min ˜ f i,α = min f then J ← J ∪ n GetMinimumMinimizer ( ˜ f i,α ) o return J Before describing the main part of our algorithm, we present a subroutine GetMin-imumMinimizer in Algorithm 1. This subroutine returns the minimum minimizer of a k -submodular function. The validity of this subroutine can be checked by the fact thatmin f i, is equal to min f if (min D min ( f )) i = 0 and otherwise it holds min f i, > min f .This subroutine calls k -SFM at most n + 1 times.Algorithm 2 shows a procedure to collect all join-irreducible minimizers of a k -submodular function. Let x be the minimum minimizer of f . The function ˜ f : S kn → R in Algorithm 2 is defined as ˜ f ( y ) ·· = f (( y t x ) t x ) for every y ∈ S kn . Since (( y t x ) t x ) i is equal to y i if x i = 0 and to x i if x i = 0, we can regard ˜ f as a k -submodular functionobtained by fixing each i -th variable of f to x i if x i = 0. Note that the minimum valuesof f and ˜ f are the same. The correctness of this algorithm is based on Lemma 10 (1)and (2). Namely, the set of join-irreducible minimizers of f coincides with the set n min D min (cid:16) ˜ f i,α (cid:17) (cid:12)(cid:12)(cid:12) i ∈ [ n ] \ supp x, α ∈ [ k ] , min ˜ f i,α = min f o . (4.1)The algorithm collects each join-irreducible minimizer according to (4.1) by calling Get-MinimumMinimizer at most nk + 1 times. Consequently, if a minimizing oracle isavailable, the minimizer set can also be obtained in polynomial time. Theorem 13. The PIP-representation for the minimizer set of a k -submodular function f : S kn → R is obtained by O( kn ) calls of k -SFM. U U U U ts X Figure 6: Legal cut X ⊆ V corresponding to (1 , , , , ∈ S . Vertices in each U i are v i , v i , v i from left to right. k -submodular functions Iwata–Wahlström–Yoshida [18] introduced basic k -submodular functions , which form aspecial class of k -submodular functions. They showed a reduction of the minimizationproblem of a nonnegative combination of binary basic k -submodular functions to theminimum cut problem on a directed network. We describe their method and present analgorithm to obtain the PIP-representation for the minimizer set.Let n and k be positive integers. We consider a directed network N = ( V, A, c ) withvertex set V , edge set A and nonnegative edge capacity c . Suppose that V consists ofsource s , sink t and other vertices v αi , where i ∈ [ n ] and α ∈ [ k ]. Let U i ·· = n v i , v i , . . . , v ki o for i ∈ [ n ]. An ( s, t )-cut of N is a subset X of V such that s ∈ X and t / ∈ X . We callan ( s, t )-cut X legal if | X ∩ U i | ≤ i ∈ [ n ]. There is a natural bijection ψ from S kn to the set of legal ( s, t )-cuts of N defined by ψ ( x ) ·· = { s } ∪ { v x i i | i ∈ supp x } ( x ∈ S kn ) . See Figure 6.For an ( s, t )-cut X of N , let ˇ X denote the legal ( s, t )-cut obtained by removing verticesin X ∩ U i from X for every i ∈ [ n ] with | U i ∩ X | ≥ 2. The capacity c ( X ) of X is definedas sum of capacities c ( e ) of all edges e from X to V \ X . We say that a network N represents a function f : S kn → R if it satisfies the following conditions:(NR1) There exists a constant K ∈ R such that f ( x ) = c ( ψ ( x )) + K for all x ∈ S kn .(NR2) It holds c ( ˇ X ) ≤ c ( X ) for all ( s, t )-cuts X of N .From (NR1), the minimum value of f − K is equal to the capacity of a minimum ( s, t )-cutof N . For every minimum ( s, t )-cut X of N , ˇ X is also a minimum ( s, t )-cut since N satis-fies the condition (NR2). Therefore ψ − ( ˇ X ) is a minimizer of f , and a minimum ( s, t )-cutcan be computed by maximum flow algorithms. Indeed, Iwata–Wahlström–Yoshida [18]showed that nonnegative combinations of basic k -submodular functions are representableby such networks; see Iwamasa [16] for further study on this network construction.Now we shall consider obtaining the PIP-representation for the minimizer set of a k -submodular function f : S kn → R represented by a network N . The minimizer set of f isisomorphic to the family of legal minimum ( s, t )-cuts of N ordered by inclusion, where theisomorphism is ψ . It is well-known that the family of (not necessarily legal) minimum( s, t )-cuts forms a distributive lattice. Thus, by Birkhoff representation theorem, thefamily is efficiently representable by a poset. Picard–Queyranne [25] showed an algorithmto obtain the poset from the residual graph corresponding to a maximum ( s, t )-flow of N . We describe their theorem briefly. For an ( s, t )-flow ϕ of N , the residual graph ϕ is a directed graph ( V, A ϕ ), where A ϕ ·· = { a ∈ A | ϕ ( a ) < c ( a ) } ∪ { ( u, v ) ∈ V × V | ( v, u ) ∈ A and 0 < ϕ ( v, u ) } . Theorem 14 ([25, Theorem 1]) . Let N = ( V, A, c ) be a directed network with s, t ∈ V and G the residual graph corresponding to a maximum ( s, t ) -flow of N . Let Σ be the setof strongly connected components (sccs) of G other than the following:(1) Sccs reachable from s .(2) Sccs reachable to t .Let ≤ be a partial order on Σ defined by X ≤ Y if and only if X is reachable from Y on G for every X, Y ∈ Σ . The ideal family of the poset ( Σ, ≤ ) is isomorphic to the family ofminimum ( s, t ) -cuts of N ordered by inclusion. The isomorphism τ is given by τ ( I ) ·· = X ∪ ( S X ∈ I X ) , where X is the set of vertices reachable from s . Our result is the following. Theorem 15. Let N be a network representing a k -submodular function f : S kn → R and G the residual graph corresponding to a maximum ( s, t ) -flow of N . Let Σ be the setof sccs of G other than the following:(1) Sccs reachable from s .(2) Sccs reachable to t .(3) Sccs reachable to an scc containing two or more elements in U i for some i ∈ [ n ] .(4) Sccs reachable to sccs X and Y such that X = Y and | X ∩ U i | = | Y ∩ U i | = 1 forsome i ∈ [ n ] .A partial order ≤ on Σ is defined in the same way as Theorem 14. Let ^ be a symmetricbinary relation on Σ defined as X ^ Y if and only if there are distinct X , Y ∈ Σ such that X ≤ X, Y ≤ Y and | X ∩ U i | = | Y ∩ U i | = 1 for some i ∈ [ n ] . Then Σ forms an elementary PIP with inconsistency relation ^ . The consistent idealfamily of Σ is isomorphic to the minimizer set of f , where the isomorphism is ψ − ◦ τ .Proof. First we prove that Σ is a PIP. We can see that ^ satisfies the condition (IC1)since for every X, Y ∈ Σ with X ^ Y , an scc Z reachable to X and Y does not belongto Σ according to the above exclusion rule (4). The condition (IC2) is also satisfied fromthe definition of the relation ^ . Thus Σ forms a PIP.Next we show ψ − ( τ ( I )) ∈ D min ( f ) for every consistent ideal I of Σ . Let Σ be theposet given in Theorem 14. Note that Σ is a subposet of Σ . We show that I is an idealof Σ . Suppose not. Then there exist X ∈ I and Y ∈ Σ \ Σ such that Y is reachablefrom X and meets the above exclusion rules (3) or (4). Now since X also satisfies thesame exclusion rule, X does not belong to Σ . This is a contradiction. Hence I is anideal of Σ , and τ ( I ) is a minimum ( s, t )-cut (Theorem 14). Moreover, from the exclusionrule (3) and the definition of ^ , we can see that τ ( I ) is legal. Therefore ψ − ( τ ( I )) is aminimizer of f . 15 lgorithm 3 Obtain sccs which do not meet the exclusion rules Input : The residual graph G = ( V, A ϕ ) corresponding to a maximum ( s, t )-flow ϕ Output: The set Σ of sccs of G defined in Theorem 15 function ApplyExclusionRules ( G ) Σ ← the set of sccs of G Remove all sccs from Σ which meet the exclusion rules (1), (2) or (3) for X ∈ Σ in the reverse topological order of G do U X ← X Y ·· = { Y ∈ Σ | there is an edge ( x, y ) ∈ A ϕ for some x ∈ X and y ∈ Y } for Y ∈ Y do U X ← U X ∪ U Y if | U X ∩ U i | ≥ i ∈ [ n ] then Remove all sccs from Σ which are reachable to X , and go to Line 4 return Σ Conversely, let x ∈ S kn be a minimizer of f . Since ψ ( x ) is a minimum ( s, t )-cut, I ·· = τ − ( ψ ( x )) is an ideal of Σ (Theorem 14). Suppose that I (cid:42) Σ . Then there exists X ∈ I \ Σ which meets the exclusion rule (3) or (4). Suppose that X meets the rule (3).Then X is reachable to an scc Y such that | Y ∩ U i | ≥ i ∈ [ n ]. Now Y is notreachable to t since X is not reachable to t . Thus Y meets the rule (1) or belongs to I otherwise. In either case it holds Y ⊆ ψ ( x ). This contradicts the fact that ψ ( x ) is legal.A similar argument can also be applied in the case where X meets the rule (4). Therefore I ⊆ Σ holds, and I is an ideal of Σ since Σ is a subposet of Σ . The consistency of I isan immediate consequence of the fact that ψ ( x ) is legal.Now we have shown that ψ − ◦ τ is a bijection from C ( Σ ) to D min ( f ). In addition, ψ − ◦ τ clearly preserves the orders, hence it is an isomorphism. Finally from Corollary 8, Σ is elementary. (cid:3) Algorithm 3 shows a procedure to obtain Σ from the residual graph G . First we canobtain the sccs of G in O( kn + ˜ m ) time, where ˜ m ·· = | A | . Additionally, the exclusionrules (1), (2) and (3) can be applied to the sccs in the same time complexity. Hence it isonly the exclusion rule (4) that we should carefully take account of. An efficient way isdescribed in Line 4 to 10 in Algorithm 3. For each scc X , the algorithm memorizes theset U X of vertices reachable to X . Now since the size of each U X is O( n ) at any moment,Algorithm 3 runs in O( | V | + n | A | ) = O( kn + n ˜ m ) time. Therefore the time complexityfor obtaining Σ from G is much less than the one for computing G from the network N .Consequently, we obtain the following theorem: Theorem 16. Let f : S kn → R be a k -submodular function represented by a network N with ˜ m edges. The PIP-representation for the minimizer set of f is obtained in O(MF( kn, ˜ m )) time. k -submodular functions Here we consider a practically important subclass of network representable k -submodularfunctions, called Potts k -submodular functions . Let ( V, E ) be a connected undirectedgraph on vertex set V = [ n ] with m = | E | , where each edge { i, j } ∈ E has a positive edgeweight λ i,j . Let [ k ] be the set of labels. A Potts k -submodular function is a k -submodular16unction ˜ g : S kn → R of the following form:˜ g ( x ) = n X i =1 ˜ g i ( x i ) + X { i,j }∈ E λ i,j d ( x i , x j ) ( x ∈ S kn ) , (4.2)where g i is any k -submodular function on S k for each i ∈ [ n ] and d is a k -submodularfunction on S k defined by d ( a, b ) ·· = = a = b = 0) , a = b ) , / a, b ∈ S k . A Potts k -submodular function is naturally associated with a Pottsenergy function g : [ k ] n → R : g ( x ) = n X i =1 g i ( x i ) + X { i,j }∈ E λ i,j = ( x i , x j ) ( x ∈ [ k ] n ) , (4.3)where g i is any function on [ k ] for each i ∈ [ n ] and 1 = : [ k ] → R is defined by 1 = ( α, β ) ·· = 1if α = β and 1 = ( α, β ) ·· = 0 if α = β .Finding a labeling x ∈ [ k ] n of the minimum Potts energy is NP-hard for k ≥ k -submodularfunction with appropriate k -submodular functions ˜ g i . Define each ˜ g i by ˜ g i ( α ) ·· = g i ( α )for α ∈ [ k ] and ˜ g i (0) ·· = min β,γ ∈ [ k ] : β = γ ( g i ( β ) + g i ( γ )) / 2. In this case, ˜ g is a k -submodularrelaxation of g , and an optimal labeling of g is a partially recovered from a minimizer of g ; see the next section. Another choice of ˜ g i is: ˜ g i ( α ) ·· = (cid:16) g i ( α ) − min β ∈ [ k ] \{ α } g i ( β ) (cid:17) / α ∈ [ k ] and ˜ g (0) ·· = 0. Also in this case, a part of an optimal labeling is obtainedfrom a minimizer of ˜ g , and coincides with Kovtun’s partial labeling [9, 21].The goal of this section is to develop a fast algorithm to construct the PIP of a Potts k -submodular function ˜ g . Notice that ˜ g is network-representable with km edges [18]. There-fore we can obtain a minimizer as well as the PIP-representation for ˜ g in O(MF( kn, km ))time by the network construction in the previous section. However it is hard to apply thisalgorithm to the vision application with large k ( ∼ 60) in [9]. Gridchyn–Kolmogorov [9]developed an O(log k · MF( n, m ))-time algorithm to find a minimizer of ˜ g . The maintheorem in this section is a stronger result that the PIP-representation is also obtainedin the same time complexity. Theorem 17. The PIP-representation for the minimizer set of ˜ g is obtained in O(log k · MF( n, m )) time. The rest of this subsection is devoted to proving this theorem. First we construct anetwork N , different from the one in the previous section. For each i ∈ [ n ], decompose˜ g i as follows. Let 1 = : S k → R be defined by 1 = ( a, b ) ·· = 1 if a = b and 1 = ( a, b ) ·· = 0otherwise. Choose a minimizer γ i ∈ S k of ˜ g i . Then ˜ g i is represented as˜ g i ( x i ) = ˜ g i ( γ i ) + µ i d ( γ i , x i ) + X α ∈ [ k ] \{ γ i } σ i,α = ( α, x i ) , where µ i ·· = 2(˜ g i (0) − ˜ g i ( γ i )) ( ≥ 0) and σ i,α ·· = ˜ g i ( α ) − g i (0) + ˜ g i ( γ i ) for α ∈ [ k ]. Weremark that σ i,α is nonnegative by k -submodularity, and that µ i > γ i = 0.17 X X s s s Figure 7: Admissible semi-multiway cut X = ( X , X , X , X ) corresponding to(1 , , , , ∈ S .Let us construct N . Starting from ( V, E ), define the edge-capacity c ( { i, j } ) of eachedge { i, j } ∈ E by λ i,j . Next add new vertices s , s , . . . , s k , called terminals . For each i ∈ [ n ], if µ i > α = γ i ∈ [ k ], add a new edge { i, s α } of capacity c ( { i, s α } ) ·· = µ i .An edge { i, s α } is called a terminal edge . For each α ∈ [ k ] with σ i,α > 0, add a newvertex i α and a new edge { i, i α } of capacity c ( { i, i α } ) ·· = 2 σ i,α . A vertex i α is called the α -fringe of i . Let S ·· = { s , s , . . . , s k } . Let V be the set of all fringes, E the set of alledges incident to fringes, and E S the set of all terminal edges. Let ˜ V ·· = V ∪ V ∪ S and˜ E ·· = E ∪ E ∪ E S . Let N = (cid:16) ˜ V , ˜ E, c (cid:17) be the resulting network.Second we show that ˜ g is represented as a certain multicut function in N . For a vertexsubset X , the cut capacity c ( X ) of X is the sum of c ( e ) of all edges e between X and V \ X . For α ∈ [ k ], a vertex subset X is called an s α -isolating cut or α -cut if s α ∈ X , s β X for β ∈ [ k ] \ { α } , and X contains no α -fringe. A semi-multicut is an orderedpartition ( X , X , . . . , X k ) of ˜ V such that X α is an α -cut for each α ∈ [ k ]. The capacity c ( X ) of a semi-multicut X = ( X , X , . . . , X k ) is defined by c ( X ) ·· = 12 X α ∈ [ k ] c ( X α ) . An admissible semi-multicut is a semi-multicut ( X , X , X , . . . , X k ) such that for each α ∈ [ k ], each α -fringe i α belongs to X if i ∈ X ∪ X α and belongs to X β if i ∈ X β for β ∈ [ k ] \{ α } . Observe that the part to which a fringe of i ∈ [ n ] belongs is uniquely determinedfrom the part which i belongs. For an admissible semi-multicut X = ( X , X , . . . , X k ),define x ( X ) = ( x ( X ) , x ( X ) , . . . , x n ( X )) ∈ S kn by x i ( X ) ·· = a ∈ S k if and only if i ∈ X a .This map X 7→ x ( X ) is a bijection from the family of all admissible semi-multicuts to S kn ; see Figure 7. The next lemma says that a k -submodular function ˜ g is actuallyrepresented by capacities of admissible semi-multicuts. Lemma 18. For any admissible semi-multicut X , it holds ˜ g ( x ( X )) = c ( X ) + X i ∈ [ n ] ˜ g i ( γ i ) . Proof. Let x ·· = x ( X ). The capacity 2 σ i,α of a fringe edge { i, i α } contributes to c ( X ) by σ i,α if i ∈ X α and by 0 otherwise. Thus the contribution is equal to σ i,α = ( α, x i ). Thecapacity µ i of a terminal edge { i, s α } contributes to c ( X ) by 0 if i ∈ X α and by µ i / i ∈ X , and by µ i if i ∈ X β with β = α . Thus the contribution is equal to µ i d ( x i , α ).18imilarly, we verify that the contribution of the capacity λ i,j of { i, j } ∈ E is equal to λ i,j d ( x i , x j ). Thus the claimed equality holds. (cid:3) Third we show that a minimum admissible semi-multicut is easily obtained by k max-flow computations, where “minimum” is with regard to the cut capacity. An admissible α -cut is an α -cut X such that for each β ∈ [ k ] \ { α } , each β -fringe i β belongs to X if i ∈ X and ˜ V \ X otherwise. Then an admissible semi-multicut ( X , X , X , . . . , X k ) isexactly a partition of ˜ V such that X α is an admissible α -cut for each α ∈ [ k ]. Lemma 19. (1) Any minimum α -cut is admissible.(2) For α ∈ [ k ] , let Y α be the inclusion-minimal minimum α -cut. Then ( Y , Y , . . . , Y k ) is a minimum admissible semi-multicut.In particular, a minimum admissible semi-multicut is exactly a partition ( X , X , . . . , X k ) of ˜ V such that X α is a minimum α -cut for each α ∈ [ k ] .Proof. (1). Let X be an α -cut. For β ∈ [ k ] \ { α } , if the β -fringe i β of i ∈ X is outsideof X , then include i β into X to decrease the cut capacity. Similarly, for β ∈ [ k ] \ { α } ,if the β -fringe i β of i ∈ V \ X belongs to X , then remove i β from X to decrease thecut capacity. (2) is immediate from the standard uncrossing argument; see the proof ofLemma 21. (cid:3) In particular, a minimum admissible multicut is obtained by computing a minimalminimum α -cut for each α ∈ [ k ]. The network N has at most k + n + nk vertices and m + n + nk edges. When computing a minimum α -cut, all β -fringes with β = α canbe removed, and a max-flow algorithm is performed on a network of n + 2 vertices and m + 2 n edges (after combining s β for β = α and all α -fringes into a single vertex). Thuswe obtain the following, which was essentially shown in [9, 21]. Lemma 20 ([9, 21]) . A minimizer of ˜ g can be obtained in O( k MF( n, m )) time. Fourth we explain how to obtain the PIP representation from maximum α -flows for α ∈ [ k ], where by an α -flow we mean a flow from s α to the union of S \{ s α } and α -fringes.To construct the PIP, we use the following intersecting properties of minimum isolatingcuts. Here a minimum α -cut is simply called an α -mincut . Lemma 21. (1) For distinct α, β ∈ [ k ] , if X is an α -mincut and Y is a β -mincut,then X \ Y is an α -mincut and Y \ X is a β -mincut.(2) For distinct α, β, γ ∈ [ k ] , if X is an α -mincut, Y is a β -mincut and Z is a γ -mincut,then X ∩ Y ∩ Z = ∅ .Proof. In the theory of minimum cuts on undirected networks, the following inequalitiesare well-known: c ( X ) + c ( Y ) ≥ c ( X \ Y ) + c ( Y \ X ) ,c ( X ) + c ( Y ) + c ( Z ) ≥ c ( X \ ( Y ∪ Z )) + c ( Y \ ( Z ∪ X )) + c ( Z \ ( X ∪ Y )) + c ( X ∩ Y ∩ Z )for every X, Y, Z ⊆ ˜ V . Then (1) is an immediate consequence of the first inequality andthe fact that any subset of an α -cut containing s α is again an α -cut. (2) is also immediatefrom the second inequality and the condition that ( V, E ) is connected and each edge of N has a positive capacity. (cid:3) 19y Lemma 21 (2), each vertex belongs to at most two minimum isolating cuts. Let −→ N denote the directed network obtained from N by replacing each undirected edge { u, v } ∈ ˜ E by two directed edge ( u, v ) and ( v, u ) of capacity c ( u, v ) = c ( v, u ) ·· = c ( { u, v } ). For each α ∈ [ k ], consider the network obtained from −→ N by removing all β -fringes with β = α andcontracting terminals s β with β = α and α -fringes into a single terminal s , and considerthe residual graph G α corresponding to a maximum ( s α , s )-flow in this network. Let Σ α = ( Σ α , ≤ α ) be the poset obtained from G α in the same way as defined in Theorem 14.Here each element in Σ α is a subset of V (not including terminals and fringes). The idealfamily of each Σ α is isomorphic to the family of minimum α -cuts. The intersecting partin Σ α and Σ β is described as follows. Lemma 22. Let α, β ∈ [ k ] with α = β . The following hold:(1) For every A ∈ Σ α and B ∈ Σ β , it holds either A ∩ B = ∅ or A = B .(2) For every A, B ∈ Σ α ∩ Σ β , if A ≤ α B , then it holds B ≤ β A .Proof. (1). Assume that A ∩ B = ∅ and A = B . We can assume A \ B = ∅ . Consideran α -mincut X with A ⊆ X and consider a β -mincut Y with B ⊆ Y . Take Y minimal.Then every scc of G β included in Y is less than or equal to B with respect to ≤ β .Suppose that Y contains A . There is a β -mincut Z containing A \ B and disjoint from B . By Lemma 21 (1), X \ Z is an α -mincut and properly intersects A . However this isimpossible since the set of non-fringe vertices in each α -mincut is a disjoint union of sccsof G α . Suppose that Y does not contain A . Then X \ Y is an α -mincut and properlyintersects A again. This is a contradiction.(2). Assume that A ≤ α B and B β A . There is a β -mincut Y containing A anddisjoint with B . Consider an α -mincut X containing B . Then X \ Y is an α -mincut,contains B , and does not contain A . However this contradicts the assumption that A ≤ α B . (cid:3) By Lemma 22, we obtain the elementary PIP representing minimum admissible cutsjust by “gluing” Σ , Σ , . . . , Σ k along the intersections. Let P ·· = S α ∈ [ k ] Σ α × { α } and ≤ a partial order on P defined by( X, α ) ≤ ( Y, β ) if and only if α = β and X ≤ α Y for every ( X, α ) , ( Y, β ) ∈ P . In addition, let • ^ be a symmetric binary relation on P defined by ( X, α ) • ^ ( Y, β ) if and only if α = β and X = Y for every ( X, α ) , ( Y, β ) ∈ Σ . Theorem 23. The triplet P = ( P, ≤ , • ^ ) is an elementary PIP with minimal inconsis-tency relation • ^ . The consistent ideal family C ( P ) and the family of minimum admissiblesemi-multicuts of N are in one-to-one correspondence by the map I (cid:16) X I , X I , X I , . . . , X Ik (cid:17) , where, for each α ∈ [ k ] , X Iα is the admissible α -cut containing all vertices i ∈ V suchthat i is reachable from s α in G α or belongs to X for some ( X, α ) ∈ I . roof. It is easy to see from Lemma 22 (2) that P is a PIP with minimal inconsistencyrelation • ^ .We next show that C ( P ) represents the family of minimum semi-multiway cuts. Let I ∈ C ( P ). Then X Iα is a minimum s α -isolating cut (by Theorem 14). By consistency,it necessarily holds X Iα ∩ X Iβ = ∅ for α = β . Thus (cid:16) X I , X I , X I , . . . , X Ik (cid:17) is a minimumsemi-multiway cut.Conversely, let ( X , X , X , . . . , X k ) be a minimum semi-multiway cut. Each X α is aminimum s α -isolating cut, and is represented by an ideal I α of Σ α . Now I ·· = S α ∈ [ k ] I α ×{ α } is a consistent ideal of P since X , X , . . . , X k are pairwise disjoint. Then it holds X α = X Iα for α ∈ [ k ].Now P represents a ( u , t )-closed set in S kn , and is necessarily elementary by Corol-lary 8. (cid:3) Therefore the PIP-representation is obtained by computing a maximum α -flow foreach α ∈ [ k ]. Lemma 24. The PIP-representation for the minimizer set of ˜ g is obtained in O( k MF( n, m )) time. Finally we present an improved algorithm of time complexity O(log k · MF( n, m )).The key is the existence of a single “multiflow” that includes all maximum α -flows. Let Q denote the set of α -paths over all α ∈ [ k ], where an α -path is a path connecting s α andan α -fringe or a terminal s β with β = α . A multiflow is a nonnegative-valued function f on Q satisfying the capacity constraint: f ( e ) ·· = X { f ( Q ) | Q ∈ Q : Q contains e } ≤ c ( e ) (cid:16) e ∈ ˜ E (cid:17) . Let | f | denote the total-flow value of f : | f | ·· = X { f ( Q ) | Q ∈ Q} . For α ∈ [ k ], let f α be the submultiflow of f defined by f α ( Q ) ·· = f ( Q ) if Q is an α -pathand f α ( Q ) ·· = 0 otherwise. Although the set Q is exponential, we can efficiently handlemultiflow f by keeping f as k flows of node-arc form in −→ N , as in [15, p. 65–66]. Thefollowing is a special case of [10, Theorem 1.2] (a version of multiflow locking theorem ). Lemma 25 ([10]) . There exists a multiflow f such that | f α | is equal to the minimumcapacity of an α -cut for each α ∈ [ k ] . Thus the submultiflow f α of f turns into a maximum α -flow in −→ N . We call sucha multiflow locking . Our goal is to show that a locking multiflow f is obtained inO(log k · MF( n, m )) time. This, consequently, yields O(log k · MF( n, m ))-time algorithmto obtain posets Σ , Σ , . . . , Σ k and the desired PIP P = S α ∈ [ k ] Σ α × { α } .In the case where there are no fringes, the problem of finding a locking multiflowis nothing but the maximum free multiflow problem , which is a well-studied problem inmultiflow theory. Ibaraki–Karzanov–Nagamochi [15] developed an O(log k · MF( n, m ))-time algorithm ( IKN-algorithm ) to obtain a locking multiflow. Babenko–Karzanov [3]extended the IKN-algorithm to a more general case, and can be applied to our case. Forcompleteness, we present a direct adaptation of IKN-algorithm to the case where fringesexist, though our algorithm may be regarded as a specialization of [3]. The pseudo codeis shown in Algorithm 4. 21 lgorithm 4 Compute a locking multiflow Input : A network N with terminal set S Output: A locking multiflow in N function Locking ( N ) if | S | ≥ then Divide S into S and S with | S | = b| S | / c and | S | = d| S | / e Compute a minimum cut X with S ⊆ X and X ∩ S = ∅ Construct two networks N and N f ·· = Locking ( N ) and f ·· = Locking ( N ) Aggregate f and f into a locking multiflow f in N else if there is an α -fringe then Compute a minimum α -cut X Construct two network N and N f ·· = a maximum ( s α , s )-flow and f ·· = Locking ( N ) Aggregate f and f to obtain a locking multiflow f in N else Compute a locking multiflow f by IKN-algorithm return f Let us explain the detail of the algorithm. Consider the case | S | ≥ 4. As in IKN-algorithm, our algorithm divides terminal set S into two sets S and S such that | S | = b| S | / c and | S | = d| S | / e , and find a minimum cut X with S ⊆ X and S ∩ X = ∅ .Here fringes may be removed in computation since i ∈ X implies that all fringes of i belong to X . Two networks N and N are constructed as follows. The network N is obtained from N by contracting ˜ V \ X into a single terminal s and by removing all α -fringes for α ∈ S . Similarly, the network N is obtained from N by contracting X into a single terminal s and by removing all α -fringes for α ∈ S .Suppose that we have a locking multiflow f in N and locking multiflow f in N .Then a locking multiflow f in N is obtained by “aggregating” f and f as follows. An α -path Q in N not connecting s is regarded as an α -path in N . Set f ( Q ) ·· = f ( Q ) for sucha path Q . Similarly, set f ( Q ) ·· = f ( Q ) for each α -path Q in N not connecting s . Nextconsider paths connecting s in N and s in N . Observe that { s } is a minimum s -cutin N and { s } is a minimum s -cut in N . An edge e in N joining X and ˜ V \ X becomesan edge connecting s in N and an edge connecting s in N . Then f ( e ) = f ( e ) = c ( e )necessarily holds. Consider an s -path Q in N and s -path Q in N containing e .The two paths Q and Q are concatenated along e into an ( s β , s γ )-path Q in N for s β ∈ S , s γ ∈ S , and set f ( Q ) ·· = min { f ( Q ) , f ( Q ) } . Decrease f by f ( Q ) on Q (no s -flows in N ), and decrease f by f ( Q ) on Q . Repeating this process until there are no s -flows in N , we obtain a multiflow f in N . Here f is a locking in N . This follows fromthe fact (obtained from uncrossing) that for α ∈ [ k ] with s α ∈ S (resp. S ), a minimum α -cut in N (resp. N ) is a minimum α -cut in N . Multiflows are kept as node-arc forms.This procedure, called the aggregation , can be done in O( nm ) time as in [15, Section 2.2].Suppose that | S | ≤ 3. Suppose that there is an α -fringe. Compute a minimum α -cut X . Construct N and N as above, find locking multiflows f in N and f in N , andaggregate f and f into a locking multiflow f in N . In N , there are two terminals, anda locking multiflow is obtained by a maximum flow. In N , there are (at most) three22erminals but no α -fringes. After recursing at most three times, we arrive at the situationthat there are no fringes. This situation is precisely the same as [15, Section 2.1]. Thena locking multiflow is obtained in at most three max-flow computations.The time complexity of this algorithm is analyzed in precisely the same way as [15,Section 2.3], sketched as follows. For simplicity of analysis, we use Orlin’s O( nm )-timealgorithm [24] to find a maximum flow and minimum cut. Let T ( k, n, m ) denote the timecomplexity of the algorithm applied to Potts k -submodular functions on graph ( V, E )with | V | = n , and | E | = m . Suppose that the time complexity of the max-flow algorithmand the aggregation procedure are bounded by Dnm and by D nm for constants D and D , respectively. We show by induction that T ( k, n, m ) ≤ Cnm log k for a constant C (to be determined later). For k ≤ 3, it holds T (3 , n, m ) ≤ (4 D + 3 D ) nm . Supposethat k ≥ 4. Then T ( k, n, m ) ≤ T ( k/ , n , m ) + T ( k/ , n , m ) + Dnm + D nm with n + n = n + 2. By induction, we have T ( k, n, m ) ≤ Cn m log k/ Cn m log k/ D + D ) nm ≤ Cnm log k − Cnm (1 − k/ /n ) + ( D + D ) nm ≤ Cnm log k − Cnm/ D + D ) nm, where we use k ≤ n and 2(log n/ /n ≤ / 2. For C ≥ D + D ), it holds T ( k, n, m ) ≤ Cnm log k as required. This completes the proof of Theorem 17. The compact representation for ( u , t )-closed sets by an elementary PIP is kind of a datacompression. Hence it is natural to consider an efficient way to extract elements of theoriginal ( u , t )-closed set. This corresponds to the enumeration of consistent ideals of anelementary PIP. As seen in Remark 1, consistent ideals correspond to true assignmentsof a Boolean 2-CNF. Thus we can enumerate all consistent ideals in output-polynomialtime [7] (i.e., the algorithm stops in time polynomial in the length of the input andoutput).Maximal consistent ideals are of special interest, as described in Section 5.1. For aPIP P , let C max ( P ) denote the family of maximal consistent ideals. Now we considerthe enumeration of C max ( P ). This can also be done in output-polynomial time by usingthe algorithm of [19] in O( k n ) time per output. We here develop a considerably fasteralgorithm for the elementary PIP of a Potts k -submodular function ˜ g . Our algorithmutilizes its amalgamated structure by posets (Theorem 23). In fact, the structure of C max ( P ) is quite simple, which we now explain. Let Σ , Σ , . . . , Σ k be the posets, and P ·· = S α ∈ [ k ] Σ α × { α } the PIP defined in the previous section. For distinct α, β ∈ [ k ],let Σ α,β ·· = Σ α ∩ Σ β be the subposet of Σ α . In particular, Σ α,β is equal to Σ β,α asa set, and the partial order of Σ α,β is the reverse of that of Σ β,α by Lemma 22. Let Σ α, ·· = Σ α \ S β ∈ [ k ] \{ α } Σ α,β . Now Σ ∪ Σ ∪ · · · ∪ Σ k is the disjoint union of Σ α,β and Σ α , for α, α , β ∈ [ k ] with α < β (recall Lemma 21 that the intersection of three distinct Σ α , Σ β , Σ γ is empty). Define the poset R by R ·· = [ ≤ α<β ≤ k Σ α,β , where partial order ≤ on R is defined as: the relation on Σ α,β is the same as the partialorder of Σ α,β and there is no relation between Σ α,β and Σ α ,β for ( α, β ) = ( α , β ). For23n ideal J of R , let J be defined by J ·· = [ ≤ α ≤ k Σ α, × { α } ∪ [ ≤ α<β ≤ k ( J ∩ Σ α,β ) × { α } ∪ ( Σ β,α \ J ) × { β } . Theorem 26. The map J J is a bijection from the ideal family of R to C max ( P ) .Proof. Let J be an ideal of R . We first show that J is a consistent ideal. Consider( X , α ) ≤ ( X, α ) ∈ J . If ( X, α ) ∈ Σ α, × { α } , then ( X , α ) ∈ Σ α, × { α } ⊆ J since Σ α, × { α } is an ideal by (EP1). Suppose that ( X, α ) ∈ ( J ∩ Σ α ,β ) × { α } . Then α = α .Since J is an ideal in Σ α,β , J ∪ Σ α, is an ideal in Σ α . Consequently X ∈ J ∪ Σ α, ,and ( X , α ) ∈ J . Suppose that ( X, α ) ∈ ( Σ β ,α \ J ) × { β } . Then α = β . Observe that Σ β , ∪ Σ β ,α \ J is an ideal in Σ β . From this, we obtain ( X , α ) ∈ J , as above. Since J contains exactly one of ( X, α ) , ( X, β ) ∈ Σ with α = β , the image J is consistent andmaximal.Let I be a maximal consistent ideal of Σ . Necessarily I contains Σ α, × { α } forall α ∈ [ k ]. Consider ( X, α ) , ( X, β ) ∈ Σ with α = β . Then I contains exactly one of( X, α ) , ( X, β ). Otherwise, consider the principal ideal I of ( X, α ), and the ideal I ∪ I .By maximality, I ∪ I is inconsistent. Then there are ( Y, α ) ∈ I and ( Y, β ) ∈ I with α = β . By (EP1), (EP2) and Lemma 22, there is ( X, β ) ∈ Σ with ( X, β ) ≤ ( Y, β ).Since I is an ideal, it holds ( X, β ) ∈ I . Necessarily β = β and ( X, β ) ∈ I ; this is acontradiction.For distinct α, β ∈ [ k ] let J α,β ·· = { X | ( X, α ) ∈ ( I ∩ Σ α,β ) × { α }} . Then Σ α,β is thedisjoint union of J α,β and J β,α (as a set). Thus, letting J ·· = S ≤ α<β ≤ k J α,β , (cid:3) Therefore our problem of enumerating all maximal minimizers of ˜ g is reduced to theenumeration of all ideals of poset R . This is a well-studied enumeration problem. Oneof the current best algorithms is Squire’s algorithm [30] that enumerates all ideals of an n -element poset in amortized O(log n ) time per output. Theorem 27. From the elementary PIP for the minimizer set of Potts k -submodularfunction ˜ g : S kn → R , all maximal minimizers of ˜ g can be enumerated in amortized O(log n ) time per output. Remark 3. The above poset R may be viewed as a “compact representation” of maximalminimizers of Potts k -submodular function ˜ g . In a general elementary PIP P (for theminimizer set of a general k -submodular function), such a compact representation is stillpossible if P has a maximal consistent ideal C satisfying the following property:(P) C contains exactly one of x ◦ and y ◦ for each i, j of the case (EP2-1).In this case, as in J J , there is a bijection between C ( P \ C ) and C max ( P ). One cansee that the PIP P \ C has a simple structure similar to the above poset R (though it isnot elementary). We developed an algorithm to enumerate consistent ideals of P \ C inO( n ) time per output, and announced in the conference version of this paper [13] thatsuch a fast enumeration is possible for maximal consistent ideals of PIP P .However we found an elementary PIP that having no maximal consistent ideal withthe property (P); consider PIP P = { x, x , y, y , z, z } with x • ^ x , y • ^ y , z • ^ z , x (cid:31) y ≺ z , y (cid:31) z ≺ x , and z (cid:31) x ≺ y . Therefore [13, Theorem 14] is not true for sucha PIP. 24 Application k -submodular relaxation A k -submodular relaxation ˜ f of a function f : [ k ] n → R is a k -submodular function on S kn such that f ( x ) = ˜ f ( x ) for all x ∈ [ k ] n ( ⊆ S kn ). Iwata–Wahlström–Yoshida [18] in-vestigated k -submodular relaxations as a key tool for designing efficient FPT algorithms.Gridchyn–Kolmogorov [9] applied k -submodular relaxations to labeling problems on com-puter vision, which we describe below.A label assignment is a process of assigning a label to each pixel of a given image. Forexample, in the object extraction, each pixel is labeled as “foreground” or “background”.In stereo matching, the disparity of each pixel is computed from the given two photostaken from slightly different positions, and the pixel is labeled according to the estimateddepth. We consider the labels to be numbered from 1 to k . Such a labeling problem isformulated as the problem of minimizing an energy function . A Potts energy functionis simple but widely used energy function. However the exact minimization of a Pottsenergy function is computationally intractable. Gridchyn–Kolmogorov [9] applied the k -submodular relaxation, that is, the energy function is relaxed to a k -submodular functionby allowing some pixels to have 0 (meaning “non-labeled”). The following property, called persistency [9, 18], is the reason why they introduced the relaxation. Theorem 28 ([9, Proposition 10] and [18, Lemma 2]) . Let f : [ k ] n → R be a functionand ˜ f : S kn → R a k -submodular relaxation of f . For every minimizer x ∈ S kn of ˜ f ,there exists a minimizer y ∈ [ k ] n of f such that x i = 0 implies x i = y i for each i ∈ [ n ] . Namely, each minimizer of ˜ f gives us partial information about a minimizer of f . Anefficient algorithm for minimizing k -submodular relaxations of Potts functions was alsoproposed in [9]. Hence we can obtain a partial labeling extensible to an optimal labeling,which we call a persistent labeling .In Section 4.3 we gave an efficient algorithm to construct the elementary PIP rep-resenting all the minimizers of a Potts k -submodular function. Since minimizers thatcontain more nonzero elements have more information, we want to find a minimizerwhose support is largest. In fact, such minimizers are precisely maximal minimizers. Proposition 29. Let M be a ( u , t ) -closed set on S kn . The supports of maximal elementsin M are the same.Proof. Let x, y ∈ M be maximal and z ·· = ( x t y ) t y . For each i ∈ [ n ], it holds z i = x i if y i = 0 and z i = y i if y i = 0. In particular, y (cid:22) z and supp z = supp x ∪ supp y hold.Since y is maximal, we obtain y = z and supp x ⊆ supp y . By changing the role of x and y , we also have supp x ⊇ supp y . Thus supp x = supp y . (cid:3) From this lemma, it turns out that all maximal minimizers of ˜ f have the same andlargest amount of information about minimizers of f . In labeling problem with Pottsenergy, all maximal persistent labelings (with respect to a k -submodular relaxation) canbe efficiently generated by the algorithm in Section 4.4. We implemented our algorithm on the stereo matching problem with Potts energy func-tion (4.3). This has an aspect of the replication of the experiment in [9], but we com-25uted not only one of the persistent labelings but also its PIP-representation. We used“tsukuba” and “cones” in the Middlebury data [27, 28] as input images. Problem setting and formulation. We are given photo images L and R taken fromleft and right positions, respectively. The images L and R are N × M arrays suchthat entries L [ x, y ] and R [ x, y ] are RGB vectors ∈ { , , , . . . , } of the intensity atpixel ( x, y ), where each pixel is represented by a pair ( x, y ) of its horizontal coordinate x = 1 , , . . . , N and vertical coordinate y = 1 , , . . . , M . The goal of the stereo matchingproblem is to assign to each pixel the “disparity label” ∈ [ k ] that represents the depthof the object on the pixel. We model this problem as a minimization of a Potts energyfunction (4.3) on diagonal grid graph ( V, E ), where V is the set of pixels, and two pixels( x, y ) and ( x , y ) have an edge in E if and only if | x − x | ≤ | y − y | ≤ 1. Thefirst and the second term of (4.3) are called “data term” and “smoothness term” [28],respectively.For each pixel i ∈ V , the data term g i measures how well the estimated disparity ofpixel i agrees with the pair of given images. We employed the traditional averaged SSD(sum of squared difference) costs as in [9]: g i ( α ) ·· = the nearest integer of 1 | W i | X ( x,y ) ∈ W i k L [ x, y ] − R [ x − d α , y ] k ( α ∈ [ k ]) , (5.1)where W i is the 9 × i = ( x, y ) (i.e., the set of pixels ( x , y ) with | x − x | ≤ | y − y | ≤ k·k is the 2-norm, d α ≥ α . We set d α ·· = 2( α − 1) for each α ∈ [ k ].For each pair of adjacent pixels { i, j } ∈ E , the smoothness term increases the energyby λ i,j if i and j have different labels. We set every λ i,j to be the same value λ as in [9],and conducted experiments with λ = 1 and 20 to see the effect of λ . Experimental results. Figure 8 and Table 1 show the results of our experiment. Thepixels labeled in the minimum persistent labeling are colored in gray of the brightnesscorresponding to each label. The blue pixels are unlabeled even in maximal persistentlabelings. The red pixels are the difference between the minimum persistent labeling andmaximal ones, i.e., the pixel was labeled in (any of) maximal persistent labelings butnot in the minimum one. We can observe that there are few red pixels as mentionedin [9], and they are mainly located on the boundary of two regions with different labels.A possible reason is the following: consider a simple 1-dimensional case where a pixel i is adjacent only to pixels j and j . Let x ∈ S kn be the minimum persistent labeling andassume x j = x j = 0. Then the increment of the energy is the same (= λ ) even if x i isset to any of { , x j , x j } . Therefore the pixel i will be red if ˜ g i (0) = ˜ g i ( x j ), and thus wethink that this will occur in boundaries more frequently than inside of regions.With regard to the effect of λ , the larger λ decreases the percentages of gray and redpixels on both tsukuba and cones, and increases the blue pixels to the contrary. Thisresult agrees with the experiments in [9]. We consider that this is due to the fact thatthe value of each ˜ g i (0) is moderately lower in ˜ g i since ˜ g i (0) is the average of the minimumand the second minimum values of g i as described in Section 4.3. Hence if λ is large, theenergy will be lower just by letting all x i ·· = 0 than by tuning each x i finely according tothe values of the corresponding data term ˜ g i .26 a) λ = 1 (b) λ = 20 (c) ground truth(d) λ = 1 (e) λ = 20 (f) ground truth Figure 8: Results for “tsukuba” (top row) with k = 16 and “cones” (bottom row) with k = 26. Table 1: Experimental resultimage λ % of gray % of red % of blue × × × × cones 1 99.00 0.30 0.70 2 × × × g i image λ % of gray % of red % of blue × tsukuba 20 90.71 0.002 9.29 2 × cones 20 93.40 0.000 6.60 1 127igure 9: The elementary PIP for persistent labelings of tsukuba with λ = 1.28 he structure of the PIP. Figure 9 shows the PIP-representation for the partiallabelings on tsukuba with λ = 1. The PIP consists of many small connected PIPs, whichcorrespond to each of connected red regions in Figure 8. Thus we can easily calculate thenumber of maximal persistent labelings by multiplying the number of maximal consistentideals of each connected PIP (notice that an ideal of the PIP is maximal and consistentif and only if it contains all elements having no inconsistent pair and one element ofeach minimally inconsistent pairs). The right most column of Table 1 shows the numberof maximal persistent labelings in each experiment. We discovered the fact that thereare plenty of maximal persistent labelings even though the percentages of red pixels aresmall. Effect of rounding. In our experiment, the data term g i is defined to be integer-valuedby rounding a rational to the nearest integer. One of the referees conjectured that if g i is defined without the rounding, then there is a unique persistent labeling. We did anexperiment to verify this conjecture. Table 2 shows the result. Without the rounding, thepercentage of the red pixels and the number of persistent labelings dramatically decrease,though there are some cases where a persistent labeling is not unique. Acknowledgments We thank Kazuo Murota, Satoru Fujishige, and the referees for helpful comments. Thiswork was partially supported by JSPS KAKENHI Grant Numbers 25280004, 26330023,26280004, and by JST, ERATO, Kawarabayashi Large Graph Project. References [1] K. Ando and S. Fujishige. t , u -closed families and signed posets. Technical report,Forschungsinstitut für Diskrete Mathematik, Universität Bonn, 1994.[2] F. Ardila, M. Owen, and S. Sullivant. Geodesics in CAT(0) cubical complexes. Advances in Applied Mathematics , 48:142–163, 2012.[3] M. A. Babenko and A. V. Karzanov. On weighted multicommodity flows in directednetworks. arXiv:1212.0224v1 , 2012.[4] J.-P. Barthélemy and J. Constantin. Median graphs, parallelism and posets. DiscreteMathematics , 111(1-3):49–63, 1993.[5] A. Bouchet. Multimatroids I. Coverings by independent sets. SIAM Journal onDiscrete Mathematics , 10:626–646, 1997.[6] V. Chepoi. Nice labeling problem for event structures: a counterexample. SIAMJournal on Computing , 41:715–727, 2012.[7] T. Feder. Network flow and 2-satisfiability. Algorithmica , 11:291–319, 1994.[8] S. Fujishige. Submodular functions and combinatorial optimization (in Japanese).In Proceedings of the 7th Research Association of Mathematical Programming Sym-posium (RAMP 1995) , pages 13–28, 1995.299] I. Gridchyn and V. Kolmogorov. Potts model, parametric maxflow and k -submodularfunctions. In Proceedings of the IEEE International Conference on Computer Vision(ICCV 2013) , pages 2320–2327, 2013.[10] H. Hirai. A note on multiflow locking theorem. Journal of the Operations ResearchSociety of Japan , 53(2):149–156, 2010.[11] H. Hirai. L-extendable functions and a proximity scaling algorithm for minimumcost multiflow problem. Discrete Optimization , 18:1–37, 2015.[12] H. Hirai and Y. Iwamasa. On k -submodular relaxation. SIAM Journal on DiscreteMathematics , 30:1726–1736, 2016.[13] H. Hirai and T. Oki. A compact representation for minimizers of k -submodularfunctions (extended abstract). In Proceedings of the 4th International Symposiumon Combinatorial Optimization (ISCO 2016) , volume 9849 of Lecture Notes in Com-puter Science , pages 381–392, Cham, 2016. Springer.[14] A. Huber and V. Kolmogorov. Towards minimizing k -submodular functions. In Pro-ceedings of the 2nd International Symposium on Combinatorial Optimization (ISCO2012) , volume 7422 of Lecture Notes in Computer Science , pages 451–462, Heidel-berg, 2012. Springer.[15] T. Ibaraki, A. V. Karzanov, and H. Nagamochi. A fast algorithm for finding amaximum free multiflow in an inner eulerian network and some generalizations. Combinatorica , 18:61–83, 1998.[16] Y. Iwamasa. On a general framework for network representability in discrete opti-mization. arXiv:1609.03137v2 , 2017.[17] S. Iwata, S. Tanigawa, and Y. Yoshida. Improved approximation algorithms for k -submodular function maximization. In Proceedings of the 27th Annual ACM-SIAMSymposium on Discrete Algorithms (SODA 2016) , pages 404–413, 2016.[18] Y. Iwata, M. Wahlström, and Y. Yoshida. Half-integrality, LP-branching and FPTalgorithms. SIAM Journal on Computing , 45:1377–1411, 2016.[19] D. J. Kavvadias, M. Sideri, and E. C. Stavropoulos. Generating all maximal modelsof a Boolean expression. Information Processing Letters , 74:157–162, 2000.[20] V. Kolmogorov, J. Thapper, and S. Živný. The power of linear programming forgeneral-valued CSPs. SIAM Journal on Computing , 44:1–36, 2015.[21] I. Kovtun. Partial optimal labeling search for a NP-hard subclass of (max,+) prob-lems. In Proceedings of the 25th German Association for Pattern Recognition (DAGM2003) , volume 2781 of Lecture Notes in Computer Science , pages 402–409, Heidel-berg, 2003. Springer.[22] K. Murota. Matrices and Matroids for Systems Analysis . Springer, Berlin, 2000.[23] M. Nielsen, G. Plotkin, and G. Winskel. Petri nets, event structures and domains,part I. Theoretical Computer Science , 13:85–108, 1981.3024] J. B. Orlin. Max flows in O( nm ) time, or better. In Proceedings of the 45th annualACM Symposium on Theory of Computing (STOC 2013) , pages 765–774, 2013.[25] J.-C. Picard and M. Queyranne. On the structure of all minimum cuts in a networkand applications. In Combinatorial Optimization II , volume 13 of MathematicalProgramming Studies , pages 8–16. Springer, Berlin, 1980.[26] V. Reiner. Signed posets. Journal of Combinatorial Theory, Series A , 62:324–360,1993.[27] D. Scharstein and R. Szeliski. High-accuracy stereo depth maps using structuredlight. In Proceedings of the 2003 IEEE Computer Society Conference on ComputerVision and Pattern Recognition (CVPR 2003) , pages 195–202, 2003.[28] D. Scharstein, R. Szeliski, and R. Zabih. A taxonomy and evaluation of dense two-frame stereo correspondence algorithms. In Proceedings of the IEEE Workshop onStereo and Multi-Baseline Vision (SMBV 2001) , pages 131–140, 2001.[29] M. Sholander. Medians and betweenness.