Minimum jointly structural input and output selection ✩

placement to guarantee controllability and observability, respectively) that it is NP-hard. © 2024TheAuthor(s).PublishedbyElsevierLtd.ThisisanopenaccessarticleundertheCCBYlicense (http://creativecommons.org/licenses/by/4.0/).

Two systems properties that are desirable in MADS are controllability and observability, since they enable the proper regulation and monitoring of the agents behavior.Whereas we often want the agents to be equipped with low computational and communication capabilities toward low power consumption and maintenance costs, when dealing with large-scale MADS, we may need to equip a subset of agents with more expensive on-board capabilities.For instance, we may need to consider higher computational capabilities and long-range communication systems.In fact, the latter can perform both (global) actuation and sensing tasks, which are a recurrent scheme for surveillance, exploration, and monitoring tasks that consider a multi-agent system composed of vehicles interconnected by a communication network.
Overall, possible scenarios include (but are not limited to): (i) expensive nodes (leaders) that can communicate with a ground station to receive mission commands and that need to be equipped with complex sensors or localization devices; and (ii) cheaper mobile drones (followers) executing local controllers based on onboard sensors that measure relative localization and receive a small amount of data from the leaders.Therefore, for budgetary reasons, a crucial task is to minimize the number of leaders, without compromising the overall system controllability and observability.
Envisioned operational scenarios in search and rescue applications and environmental monitoring using autonomous robotic vehicles require mobile multi-agent systems with complementary sensor suites to increase task efficiency and performance.An example of the former case arises when there is a cooperation between heterogeneous unmanned aerial vehicles (UAVs) (Kaminer et al., 2007), where only one UAV carries on-board expensive sensors as infrared cameras or a LIDAR sensor.For the latter case, an example is some marine applications that may include ambient data acquisition, pollution source localization, and mapping.Here, some marine robotic vehicles may carry more sophisticated and high-performance sensor suites (usually requiring some latency time to detect particles in water) than others.
The problem that emerges from the previous goals is, given a linear time-invariant (LTI) system, to design a minimal input placement and a minimal output placement such that the sensored and actuated system's variables have a maximal intersection.In fact, to the best of the authors' knowledge, the only paper addressing a related problem is Ramos et al. (2021b).In that case, the authors explore the non-structural version of the problem that seeks to determine the minimum number of a simultaneous actuator and sensor placement to ensure controllability and observability, respectively.Unfortunately, the authors showed the problem is NP-hard.
In recent years, research has focused solely in determining a solution for the minimal controllability problem, i.e., the minimum number of state variables that need to be directly controlled to attain controllability (Olshevsky, 2014;Pequito et al., 2017;Ramos et al., 2018).In fact, it readily follows that the solution to the minimal observability problem can be retrieved by invoking duality between controllability and observability in linear timeinvariant systems.It is important to notice that such solutions do not provide the answer on how to determine the solution to the minimum jointly controllability and observability problem, since by invoking a 'separation principle' to determine the solution to the minimum controllability and observability problems separately and then putting the solutions together does not hold an optimal solution as there are no guarantees that the state variables chosen are the same, see illustrative examples in Section 5.
In this paper, motivated by the freedom in selecting the weights of the dynamics in various MADS, we take a radically different approach to the problem in Ramos et al. (2021b) by leveraging structural systems theory (Ramos et al., 2022a).Specifically, structural systems enable the exploration of system properties such as controllability and observability by considering only the underlying dynamics structure, i.e., the interconnection between different agents.The structural systems counterpart of such system properties are referred to as structural controllability and observability, respectively.Briefly, guaranteeing such structural system properties yields that the corresponding system properties hold for almost all (real) possible combinations of parameters (i.e., weights considered in the interaction between agents) (Ramos et al., 2022a).
Henceforth, the main contribution of this paper is to provide a polynomial solution to the minimum jointly structural controllability and (structural) observability problem.It is worth emphasizing that such reduction is different from previously proposed solutions to the minimal structural controllability (or, minimal structural observability) problems that are polynomially reduced to a maximum weight maximum matching -see Pequito et al. (2016), Ramos et al. (2022a) for details.Other equivalent formulations further reduce controllability or observability problems to linear programming problems (Zhang, 2022).
We organized the remainder of the paper as follows.In Section 2, we introduce the required notation.In Section 3, we formally state the problem that we address in Section 4. Subsequently, we illustrate the proposed algorithm with examples in Section 5. Section 6 concludes the paper and sheds light on future research directions.

Preliminaries and notation
We denote the reals by R, the integers by Z, and the nonnegative integers by Z + 0 .We denote matrices by upper-case letters, e.g., A, B and C , and vectors by lower-case letters, e.g., x, y and u.For a vector x ∈ R n , we denote its ith entry by x i (i ∈ {1, . . ., n}).Analogously, for a matrix A ∈ R n×m , we denote the ith row of A by A i and the jth entry of the ith row by A ij (i ∈ {1, . . ., n} and j ∈ {1, . . ., m}).We denote the identity matrix in R n×n by I n .For A 1 ∈ R n×m 1 and A 2 ∈ R n×m 2 , we define by [A 1 , A 2 ] ∈ R n×(m 1 +m 2 ) the matrix whose first m 1 columns are the columns of A 1 and the last m 2 columns are the ones of A 2 .Similarly, for A 1 ∈ R n 1 ×m and A 2 ∈ R n 2 ×m , we define by [A 1 ; A 2 ] ∈ R (n 1 +n 2 )×m the matrix whose first n 1 rows are the rows of A 1 and the last n 2 rows are the ones of A 2 .
We denote sets of natural numbers by calligraphic letters, e.g., I, J .The cardinality of a set I denoted by |I| is the number of elements in the set.Also, we denote by I I n , where I ⊆ {1, . . ., n}, the n × n matrix with the columns with indices in I equal to the columns of I n and the remaining ones equal to zero.We use the semi-norm ∥ • ∥ 0 function which counts the number of free parameters entries of a matrix, i.e., if A ∈ R n×m then ∥A∥ 0 = |{A ij : A ij ̸ = 0, for i = 1, . . ., n and j = 1, . . ., m}|.
A matrix M ∈ {0, ⋆} n×m is referred to as a structural matrix.The structure of a matrix denoted by is assumed to be independent of M i ′ j ′ .To ease the notation, given a structural matrix Ā ∈ {0, ⋆} n×m and z ∈ R, we denote by z Ā ∈ R n×m the matrix with the ⋆'s in Ā replaced by the number z.
Subsequently, we will make use of the following graph-theoretical notions.A digraph (directed graph) is given by G = (X , E X ,X ), where X is a set of nodes (a.k.a.vertices) and E X ,X ⊆ X × X is a set of edges such that if x i , x j ∈ X and (x i , x j ) ∈ E X ,X , then there is an edge that starts in node x i and ends in node x j .Given a structural matrix Ā ∈ {0, ⋆} n×n , we associate to it the digraph representation G( Ā) = (X , E X ,X ) such that X = {x 1 , . . ., x n } and E X ,X = {(x i , x j ) : Āji ̸ = 0}.
Given a digraph G = (X , E X ,X ), we define a path from x 1 to x k with size k as a sequence of nodes (x 1 , . . ., x k ) such that x 1 , . . ., x k ∈ X , x i ̸ = x j for i ̸ = j, and (x i , x i+1 ) ∈ E X ,X for i = 1, . . ., k−1.A node with an edge to itself (i.e., a self-loop), or a path from x 1 to x k comprising an additional edge (x k , x 1 ), is called a cycle.A digraph is strongly connected whenever there exists a path between each pair of nodes in the digraph.A subgraph Furthermore, a strongly connected component (SCC) is a maximal subgraph of a digraph such that it is strongly connected.A maximal subgraph refers to a subgraph that cannot be extended further (adding edges and/or vertices) while maintaining the same properties.See Reed et al. (2022) for an overview of the algorithms to determine SCCs.We denote by target SCC (t-SCC) an SCC ) such that no edge starts from the nodes in that SCC to a node not in that SCC, i.e., |{(u, v) ) such that no edge ends in the nodes in that SCC that originates in a node not in that SCC, i.e., |{(u, v) In other words, it is a graph with two disjoint sets of nodes such that there are only edges starting from nodes in the first set and ending in nodes of the second set.Moreover, we obtained a structural matrix Ā ∈ {0, ⋆} n×m with a bipartite representation denoted by In other words, we associated a b-graph where the second set of nodes is a virtual copy of the first containing the labels of the state variables.Additionally, the edges are represented as the original edges in G( Ā), but where the starting node of an edge is in the first set of nodes and the ending node of an edge is in the second (virtual copy) of the nodes.Additionally, we may associate weights to the edges of a b-graph.
In this case, we denote the weighted bipartite graph (weighted b-

Problem statement
Consider a given (possibly large-scale) MADS described by the following linear time-invariant (LTI) system with autonomous dynamics where , and x(0) = x 0 is the initial state.
We seek to monitor and regulate the MADS, with some actuators and sensors that actuate and measure the state variables as prescribed by B ∈ R n×n and C ∈ R n×n , respectively, so that is both controllable and observable, where u(k) ∈ R n is the input signal, and y(k) ∈ R n is the response of the system.Notice that the matrices B and C may have columns that are zero if the corresponding state variable is not being actuated or measured, respectively.To simplify the notation, we refer to (2) as the 1) and ( 2) can be both posed in continuous-time, as the controllability and observability criteria are the same (Hespanha, 2018).
The edges determining the intercommunication between agents, captured by the nonzero entries in A(G), can be considered as free parameters to be designed.Hence, we can leverage structural systems framework and consider Ā as the matrix with entries in {0, ⋆}, where the first determines that no connection between agents exist and the later corresponds to a free parameter.As such, we can assess system properties by considering the structure alone.This idea allows assessing the so-called structural controllability and observability concerning the structural input matrix B = ĪI n , and the structural output matrix, C = ĪJ n .Specifically, as motivated in the introduction, we would like to determine the smallest number of agents that ensure structural controllability and observability, and such that the largest number of agents have common dedicated inputs and dedicated outputs.
P 1 Given a structural matrix Ā, find Note that the size of the union of the two sets of dedicated inputs and dedicated outputs increases when there are no common elements.Hence, it readily follows that we want to maximize the elements belonging to the intersection of those sets, ensuring minimal structural controllability and minimal structural observability.
It is important to emphasize that a simple attempt to address problem P 1 invoking a separation principle between controllability and observability in LTI systems, and solving independently the minimum structural controllability, and minimal structural observability as in Pequito et al. (2016), would lead us to the computation of all possible solutions for each of the problems to pinpoint a pair (I, J ) with a maximum intersection.Listing all possible pairs would be demanding.Therefore finding the pair that ensures the maximum intersection of I and J (or, equivalently, the objective in (3)), would translate into a strictly combinatorial problem with a prohibitive computational complexity.

Minimum jointly structural input and output selection
In what follows, we provide the solution to P 1 in Algorithm 1.1 Next, we show several lemmas that will play a key role in proving the correctness of a solution attained using Algorithm 1, as stated in Theorem 9. Additionally, we provide the worst-case complexity of Algorithm 1 to attain a solution in Proposition 10. (Cormen et al., 2009).The following result is important to characterize the proposed solution to problem we seek to address.

First, given a b-graph
Proposition 1 (Maximum Matching Decomposition (Pequito et al., 2016)).Given a digraph G( Ā), consider an MM M * associated with the b-graph

•
Note that a single node is a zero length path -degenerated path -corresponding to have both a left-and right-unmatched vertex in an MM.Second, we recall the necessary and sufficient conditions for the structural controllability and the structural observability of a system given by ( Ā, B, C).We require two G( Ā, B), every state vertex is input-reachable whenever there exists a path from an input vertex to every state vertex in G( Ā, B).Similarly, in G( Ā, C), every state vertex is output-reachable whenever there exists a path from every state vertex to an output vertex in G( Ā, C).
Proposition 3 (Pequito et al., 2016).A system described by ( Ā, B) is structurally controllable if and only if ) has an MM of size n; (C-matching condition) • every state vertex is input-reachable in G( Ā, B). (C-reachability condition) • If Ā ∈ {0, ⋆} n×n and B ∈ {0, ⋆} n×p , then the digraph G( Ā, B) of Proposition 3 has vertices V = X ∪ U , with X = {x 1 , . . ., x n } (state vertices) and U = {u 1 , . . ., u p } (input vertices), and edges Proposition 4 (Pequito et al., 2016).A system described by ( Ā, B) is structurally observable if and only if has an MM of size n; (O-matching condition) , respectively, then there is an MM M * of B( Ā) with right-unmatched and left-unmatched vertices given by ( L ).Upon the notions above, the reduction to an MWM, where the minimal conditions verifying Propositions 3 and 4, toward a solution to P 1 is provided in Algorithm 1.A brief overview of the algorithm's steps is as follows: Algorithm 1 Solution to P 1 1: input: A structural dynamics matrix Ā 2: output: An input and output matrices, ĪI * n and ĪJ * n respectively, describing a dedicated solution to P 1 3: compute the S = {S 1 , . . ., S α }, the set of sets of vertices that are the s-SCCs of G( Ā) 4: compute the T = {T 1 , . . ., T β }, the set of sets of vertices that are the t-SCCs of G( Ā) 5: build the weighted b-graph where W 1 ∈ R n×α and W 2 ∈ R α×n are such that (W 1 ) ij = 3 and (W 2 ) ji = 2 if i ∈ S j , and (W 1 ) ij = 0 and (W 2 ) ij = 0, otherwise.The columns of W 1 (and rows of W 2 ) encode α slack variables, one for each s-SCC.W 1 defines edges from each slack variable to the all state variables of the respective s-SCC.(‡), and W 2 defines the opposite direction edges( ¶) otherwise.The columns of V 1 (and rows of V 2 ) encode β slack variables, one for each t-SCC.V 1 defines edges from each slack variable to the all state variables of the respective t-SCC( §), and V 2 defines the opposite direction edges(∥).Furthermore, randomly select one t ∈ T i 27: end if 29: end for In summary, the idea is to enforce paths that start in s-SCCs and/or end in t-SCCs whenever possible.Observe that we must have an input at the start of each path and at least one input per s-SCC.Similarly, we must have an output at the end of each path and at least one input per t-SCC.Thus, we would like to fulfill, if possible, all the conditions.Additionally, we aim for the remaining paths to consist of a single vertex, which require sensing and actuating the corresponding state variable.Note that we need to place an input at the start of each path and an output at the end.Therefore, in a degenerated path, we place the input and the output in the same state variable.
To ease the exposition, let ) be the bgraph constructed using Algorithm 1.In what follows, we denote by slack nodes (or slack vertices) the nodes associated with slack By carefully selecting a relation between the weights, we can demonstrate that the maximum weight matching achieves both feasibility and optimality in obtaining a solution for P 1 .The next results formally show how the proposed method fulfills these intuitive requirements.

•
Proof.Suppose we have two MMs for B( Ā), M * 1 and M * 2 , that lead to two different (minimum number of) path and cycle decompositions of G(A), by invoking Proposition 1. Suppose that first Fig. 2. Illustration of the relevant cases that emerge from Algorithm 1.The vertices associated with the state variables are depicted with circles, the slack vertex of an s-SCC is depicted with a triangle, the slack vertex of a t-SCC is depicted with a square, the slack edges are dashed and colored edges depict the MWM, from a decomposition of the graph G(W ) into paths and cycles.(For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)matching, M * 1 , leads to a decomposition that contains a path with k edges starting in an s-SCC and ends in a t-SCC, while the second matching, M * 2 , contains a path with k edges that does not satisfy this property.In B(W ), both paths have a total weight of 10k.
However, we can extend the path of M * 1 to achieve example (a) in Fig. 2. In this case, the total weight of the resulting cycle is 10k + 3 + 3 + 6 = 10k + 12.As for the second path, of M * 2 , if it neither starts in an s-SCC nor ends in a t-SCC, we cannot augment it with slack edges.If it starts in an s-SCC but does not end in a t-SCC (or, vice-versa), we can augment the path with one or two slack edges -from the s-SCC slack vertex to the start or from the end to the t-SCC slack vertex and possibly from a t-SCC slack vertex to an s-SCC slack vertex.In both cases, the total weight is either 10k + 3 or 10k + 3 + 6, which is less than 10k + 12.
Thus, an MWM of B(W ) always selects, if possible, a path that starts in an s-SCC and ends in a t-SCC in G( Ā), over paths that do not satisfy this property, corresponding to an MWM with similar properties to those in M * 1 .□ Lemma 7. In the same conditions as Lemma 5, let M * be an MWM of B(W ).Additionally, consider the matching M ′ of B( Ā) that results from keeping the edges of M * that exist in B( Ā), i.e., M ′ = {e : e ∈ M * and e is an edge of B( Ā)}.Then, it follows that M ′ is an MM of B( Ā).
Proof.Let M * = {e 1 , . . ., e k } be an MWM of B(W ).Let M ′ = {e : e ∈ M * and e is an edge of B( Ā)} be a matching of B( Ā).
Suppose, for the sake of contradiction, that M ′ is not an MM of B( Ā).This implies the existence of an augmenting path in B( Ā) that can produce a matching with at least one additional edge, e ′ .An augmenting path in a b-graph is a path that starts and ends at unmatched vertices and alternates between edges that are and that are not in the matching.
However, such an augmenting path would also be an augmenting path for B(W ), which contradicts the fact that M * is an MWM of B(W ).This contradiction arises because such an augmenting path would generate a matching in B( Ā) that can be extended to B(W ) by not considering certain slack edges (zero, one, or two slack edges) -those edges in the MM that contain a state vertex and a slack vertex (see Fig. 2).
Consequently, the weight of this new matching would increase by 10 (due to the edge e ′ ), while experiencing a decrease of one of the following values in Ω = {0, 1 2 , 2, 3, 2 + 3 = 5} from the removed slack edges (0 for zero edges, 1 2 for a self-loop slack edge, 2 and 3 for an edge between a state vertex and a slack vertex, and 2 + 3 = 5 for the cycle formed by the previous two edges).This results in an increase of 10 − Ω = {10, 9.5, 8, 7, 5} in the total weight, meaning M * would not be an MWM.□ Lemma 8.
In the conditions of Lemma 5, an MWM M * of the b-graph B(W ) contains a set of edges, M ′ = {e : e ∈ M * and e is an edge of B( Ā)}, that can be used to form an MM whose decomposition of G( Ā) into paths and cycles yields degenerated paths in G( Ā) instead of non degenerated paths, whenever it is possible.

•
Proof.Suppose we have two MMs for B( Ā), M * 1 and M * 2 , that lead to two different path and cycle decompositions of G(A), by invoking Proposition 1.The first collection, M * 1 , decomposes the digraph into a cycle with size k 1 and a path of size k 2 , while the second collection, M * 2 , decomposes into a cycle of size k 1 +k 2 and a path of size 0, both with a total weight of 10(k 1 + k 2 ) in B(W ).
Subsequently, given the first decomposition, we can augment the path with a slack edge of B(W ) if the path starts in an s-SCC or ends in a t-SCC.The total weight of the augmented path plus the cycle is one of the following: • 10(k 1 + k 2 ) + 3 + 3, if the path starts in an s-SCC and ends in a t-SCC; • 10(k 1 + k 2 ) + 3, if the path either starts in an s-SCC or ends in a t-SCC; • 10(k 1 + k 2 ), otherwise.
In the second and third cases, we can create one of the cycles depicted in Fig. 2(e) or (f), or Fig. 2(g), respectively, using the slack edges.The final possible total weight is either Therefore, if possible, given the cost structure the MWM, it leads to a selection of a path that starts in an s-SCC and ends in a t-SCC (opting for a cycle with size k 1 and a path of size k 2 ), corresponding to the cases in Fig. 2(e) or (f).If this is not possible, it leads to a cycle of size k 1 +k 2 and a path of size 0, corresponding to case in Fig. 2(g).
Finally, it is worth noticing that the cases of Fig. 2(c) and (d) will not be selected when k 2 = 1.Instead, the cycle with size k 1 + k 2 and a degenerated path, which corresponds to either Fig. 2(e) or (f), is chosen as it yields a larger total weight.□ Theorem 9. Algorithm 1 is sound, i.e., it computes a solution to problem P 1 .

•
Proof.First, we show Algorithm 1 feasibility.That is, it produces a structural input and a structural output matrices with minimal dedicated input and minimal dedicated output placements, respectively.First, by invoking Lemma 5, it follows that an MWM M * obtained with Algorithm 1 yields a collection of disjoint cycle and paths that spans G( Ā), by invoking Lemma 7. Further, by invoking Proposition 1, it follows that the collection is minimal in the sense that it has the minimal number of paths.Let such decomposition be due to an MM M ′ * of B( Ā), that results from discarding the edges with slack variables' vertices, with set of left-unmatched vertices I = I 1 ∪ I 2 ∪ I 3 ∪ I 4 (resulting from steps 7-10 of Algorithm 1), and set of right-unmatched vertices Subsequently, by invoking Lemma 6, it follows that B′ and C′ correspond to dedicated input and dedicated output placements that are the outcome of a collection of cycles and paths that span G( Ā) and has the maximum number of paths starting in s-SCCs and ending in t-SCCs.Therefore, Algorithm 1 places a dedicated input in each s-SCC without dedicated inputs previously assigned (I * ), and a dedicated output in each t-SCC without dedicated outputs previously assigned (J * ).This is done in steps 11-17 and steps 23-29, respectively.Hence, we set B = ĪI * n and C = ĪJ * n , the C-reachability condition and O-reachability condition of Propositions 3 and 4 are also fulfilled, respectively.
Next, we show that the solution minimizes |I * ∪ J * |.In fact, by invoking Lemma 8, it readily follows that the obtained solution yields the maximum number of degenerated paths, i.e., to state variables where we need to place a dedicated input and a dedicated output.□ It is worth noticing that the properties detailed in Lemmas 5-8 are not sequentially achieved by Algorithm 1.In fact, they are all achieved by the proper selection of the B(W ) weights to compute an MWM.
Additionally, the worst-case computational complexity to obtain a solution to P 1 is as follows.
Proposition 10.The worst-case computational time-complexity of Algorithm 1 is O(n 3 ).

•
Proof.First, we observe that we can compute the SCCs of G( Ā) in O(n 2 ), using the Tarjan's algorithm (Tarjan, 1972).Moreover, we can verify if an SCC is an s-SCC by checking if there are no edges that start in a vertex that does not belong to that SCC and ends in a vertex belonging to that SCC.Analogously, we can verify if an SCC is a t-SCC by checking if there are no edges that start in a vertex that belongs to that SCC and ends in a vertex that does not belong to that SCC.These steps can be done in O(n) if we use a dictionary structure that maps vertices into the index of the SCC they belong to.
Step 6 can be solved using the Dinic & Kronrod algorithm (Dinic & Kronrod, 1969), which finds an MWM of B(W ) with time- then the time-complexity of step 6 is O(n 3 ).The remaining steps have lower computational complexity.Hence, the total computational complexity is the summation of each step computational complexity, yielding a total of O(n 3 ).□ Notice that we can further have an approximated solution computed in linear time as follows.
Remark 11.If we can tolerate a negligible relative error, then we can make use of a linear-time approximation algorithm to find an MWM (Duan & Pettie, 2014), yielding a linear-time approximated version of Algorithm 1 that is an approximate solution to P 1 .

⋄
In the next section, we illustrate the proposed method with examples, and compare it with the simple approach that only aims to find minimal dedicated input and output placements (without necessarily maximizing the intersections between the two).

Illustrative examples
In this section, we explore several examples.The first corresponds to a structural matrix representing MADSs with bidirectional communication networks.The last ones represent unidirectional communication networks.In the digraph figures that follow, the red and orange edges represent an MWM.The red edges correspond to edges in the original digraph and the orange ones either to edges that start or end in the slack variables or that correspond to the self-loops introduced in Algorithm 1.
Example 1.To illustrate Algorithm 1, consider a structural matrix , whose digraph representation is depicted in Fig. 3. Next, we illustrate the use of Algorithm 1 in the general scenario (i.e., when the digraph representation is not strongly connected).

Conclusions
This paper studies the problem of, given a multi-agent dynamical system described by a linear time-invariant system, identifying a minimal set of common state variables to be both actuated and measured, i.e., that achieve a maximum intersection, while ensuring structural controllability and structural observability.We present a solution to the problem with O(n 3 ) (i.e., polynomial) time-complexity, which contrasts with the similar problem of the simultaneous minimum actuator-sensor placement that guarantees (non-structural) controllability and observability, which is NP-hard.
union of cycles and paths (each one starting in a left-unmatched vertex and ending in the right-unmatched vertex of M * ) that spans G( Ā).Moreover, such a decomposition is minimal, in the sense that, no other spanning subgraph decomposition of G( Ā) into paths and cycles has a smaller number of paths.

Fig. 1 .
Fig. 1.On the left -(a) and (c), examples of MM cases that we want to avoid, and, on the right -(b) and (d), the desired MWM we obtain with Algorithm 1 to avoid the previous situations.The weights present in the digraph edges are the ones to be used in B(W ).(For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) Additionally, it is worth noticing that, by Lemma 4 of Pequito et al. (2016), if M 1 and M 2 are two possible MMs of B( Ā) with right-unmatched and left-unmatched vertices given by (

Lemma 5 .
Let G( Ā) be a digraph and B(W ) be the b-graph built using Algorithm 1.An MWM M * of the b-graph B(W ) contains a set of edges, M ′ = {e : e ∈ M * and e is an edge of B( Ā)}, that we can use to form a collection of disjoint cycles and paths in G( Ā). • Proof.Let M * be a MWM of the b-graph B(W ), constructed using Algorithm 1. Next, we discard the nodes associated with the slack variables and its incoming and outgoing edges, obtaining M ′ = {e : e ∈ M * and e is an edge of B( Ā)}.Observe that paths that contain slack nodes and corresponding slack edges are still paths if we remove these slack nodes and slack edges, and cycles with slack edges become paths as illustrated in Figs. 2 (b)-(d), and in Figs. 2 (a), (e)-(g), respectively.Hence, M ′ is a decomposition of cycles and paths, of B( Ā) (which may or may not span G( Ā)), i.e., a matching (which may or may not be maximum).□ Lemma 6.In the same conditions as in Lemma 5, an MWM M * of the b-graph B(W ) contains a set of edges, M ′ = {e : e ∈ M * and e is an edge of B( Ā)}, that we can use to form the maximum number of paths that start in different s-SCCs and end in different t-SCCs among possible MM decompositions.
steps 19-22 of Algorithm 1).Thus, with B′ = ĪI n and C′ = ĪJ n , it follows that the C-matching condition and O-matching condition of Propositions 3 and 4 are fulfilled, respectively.

Fig. 3 .
Fig. 3. Example 1. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.) 4. The cost of P 1 is minimal, with |I * ∪ J * | = 5.Furthermore, the slack sets of state variables to place dedicated inputs and of state variables to place dedicated outputs from 2 In the sequel, we omit the b-graph representations.