
In graph theory, a uniconnected subgraph is a directed graph that has at most one path between any pair of vertices.[1][2]
Definition
[edit]Given a directed graph , where denotes the set of vertices and denotes the set of edges, a subgraph where is called uniconnected if for every pair of vertices , there exists at most one directed path from to in .[1]
In the context of finite state machines, a graph obtained by deleting a set of transitions from the original FSM is uniconnected if there does not exist a pair of paths that begin and end at the same pair of states.[3]
Maximal uniconnected subgraph problem
[edit]The maximal uniconnected subgraph problem (also called the uniconnected subgraph problem or minimal marker placement problem[3]) involves finding the largest subset of edges from a directed graph that forms a uniconnected subgraph. More formally, given a directed graph and a positive integer , the decision problem asks whether there exists a subset with such that is uniconnected.[2]
Equivalently, the problem can be stated as finding the smallest subset of edges whose removal from a directed graph results in a uniconnected subgraph: find a set of minimum cardinality such that is uniconnected.[1]
Computational complexity
[edit]The uniconnected subgraph problem is NP-complete.[2] For acyclic directed graphs (including acyclic flow graphs with a single source and sink), the problem remains NP-complete.[1][2] This was proven by Maheshwari (1976) through a polynomial-time reduction from the vertex cover problem.[1]
The problem remains NP-complete even with strong restrictions on the graph, such as small indegree and outdegree.[3] Furthermore, even finding an -approximate solution to the problem is NP-complete for any , where an -approximate algorithm for a minimization problem produces a solution with cardinality such that , with being the cardinality of the optimal solution and being the cardinality of the approximate solution. This implies that any polynomial-time approximation algorithm for this problem will produce arbitrarily bad outputs on some inputs.[1][3]
Applications
[edit]Software testing
[edit]Uniconnected subgraphs have applications in software testing, particularly in the optimal placement of software monitors called traversal markers. When programs are viewed as flow graphs, the problem of optimally placing traversal markers to identify test paths is equivalent to the maximal uniconnected subgraph problem for acyclic flow graphs.[1]
The traversal marker placement problem seeks to find the minimal number of locations needed to place monitors such that each path from source to sink in the program's flow graph covers a unique subset of monitored edges. The deletion of these traversal marker edges results in a uniconnected subgraph.[1]
Transactional services
[edit]In transactional Web services, the uniconnected subgraph problem arises when determining minimal logging requirements. Services modeled as finite state machines require logging of certain transitions to enable recovery through compensation in case of failure. The problem of finding the minimal set of transitions to log such that any execution can be uniquely determined from the partial log is equivalent to the uniconnected subgraph problem.[3]
See also
[edit]- Graph connectivity
- Directed acyclic graph
- Path (graph theory)
- NP-completeness
- Software testing
- Finite-state machine
References
[edit]- ^ a b c d e f g h Maheshwari, Shachindra (1976). Traversal Marker Placement Problems are NP-Complete (Technical report). University of Colorado at Boulder, Department of Computer Science. CU-CS-092-76.
- ^ a b c d Garey, Michael R.; Johnson, David S. (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman. p. 197. ISBN 0-7167-1045-5.
- ^ a b c d e Biswas, Debmalya; Genest, Blaise; Gazagnaire, Thomas (2008). "Small Logs for Transactional Services: Distinction is much more accurate than (Positive) Discrimination" (PDF). 20th IEEE International Conference on Software Engineering and Knowledge Engineering (SEKE). pp. 531–536. doi:10.1109/HASE.2008.24.