<<

From Wikipedia, the free encyclopedia Contents

1 1 1.1 Mathematical properties ...... 2 1.1.1 , , and ...... 2 1.1.2 Topological ordering ...... 3 1.1.3 Combinatorial enumeration ...... 3 1.1.4 Related families of graphs ...... 3 1.2 Computational problems ...... 3 1.2.1 and recognition ...... 3 1.2.2 Construction from cyclic graphs ...... 4 1.2.3 Transitive closure and transitive reduction ...... 4 1.2.4 Closure problem ...... 4 1.3 Applications ...... 4 1.3.1 ...... 4 1.3.2 Scheduling ...... 4 1.3.3 Data processing networks ...... 5 1.3.4 Causal structures ...... 5 1.3.5 Genealogy and version history ...... 5 1.3.6 ...... 6 1.4 References ...... 6 1.5 External links ...... 8

2 9 2.1 Basic terminology ...... 10 2.2 Indegree and outdegree ...... 10 2.3 Degree sequence ...... 11 2.4 Digraph connectivity ...... 11 2.5 Classes of digraphs ...... 12 2.6 See also ...... 13 2.7 Notes ...... 14 2.8 References ...... 14

3 Orientation () 15 3.1 Oriented graphs ...... 15

i ii CONTENTS

3.2 Constrained orientations ...... 15 3.3 References ...... 16 3.4 External links ...... 16

4 Strong orientation 17 4.1 Application to traffic control ...... 17 4.2 Related types of orientation ...... 17 4.3 Flip graphs ...... 18 4.4 Algorithms and complexity ...... 18 4.5 Notes ...... 18 4.6 References ...... 19

5 Tournament (graph theory) 21 5.1 Paths and cycles ...... 21 5.2 Transitivity ...... 21 5.2.1 Equivalent conditions ...... 21 5.2.2 Ramsey theory ...... 22 5.2.3 Paradoxical tournaments ...... 23 5.2.4 Condensation ...... 23 5.3 Score sequences and score sets ...... 23 5.4 See also ...... 24 5.5 Notes ...... 24 5.6 References ...... 24 5.7 Text and image sources, contributors, and licenses ...... 26 5.7.1 Text ...... 26 5.7.2 Images ...... 26 5.7.3 Content license ...... 26 Chapter 1

Directed acyclic graph

5

10

11 3 2 9

7 8

An example of a directed acyclic graph

In and , a directed acyclic graph (DAG i/ˈdæɡ/), is a directed graph with no directed cycles. That is, it is formed by a collection of vertices and directed edges, each edge connecting one to another, such that there is no way to start at some vertex v and follow a sequence of edges that eventually loops back to v again.[1][2][3] DAGs may be used to model many different kinds of information. The reachability in a DAG forms a partial order, and any finite partial order may be represented by a DAG using reachability. A collection of tasks that must be ordered into a sequence, subject to constraints that certain tasks must be performed earlier than others, may be represented as a DAG with a vertex for each task and an edge for each constraint; algorithms for topological ordering may be used to generate a valid sequence. Additionally, DAGs may be used as a space-efficient representation of a collection of sequences with overlapping subsequences. DAGs are also used to represent systems of events or potential events and the causal relationships between them. DAGs may also be used to model processes in which data flows in a consistent direction through a network of processors, or states of a repository in a version-control system.

1 2 CHAPTER 1. DIRECTED ACYCLIC GRAPH

The corresponding concept for undirected graphs is a forest, an undirected graph without cycles. Choosing an orien- tation for a forest produces a special kind of directed acyclic graph called a . However there are many other kinds of directed acyclic graph that are not formed by orienting the edges of an undirected acyclic graph. Moreover, every undirected graph has an , an assignment of a direction for its edges that makes it into a di- rected acyclic graph. For these reasons it would be more accurate to call directed acyclic graphs acyclic directed graphs or acyclic digraphs.

1.1 Mathematical properties

1.1.1 Reachability, transitive closure, and transitive reduction

{x,y,z}

{x,y} {x,z} {y,z}

{x} {y} {z}

Ø

A representing the partial order among the subsets of a three-element .

Each directed acyclic graph gives rise to a partial order ≤ on its vertices, where u ≤ v exactly when there exists a directed path from u to v in the DAG.[4] However, many different DAGs may give rise to this same reachability relation:[5] for example, the DAG with two edges a → b and b → c has the same reachability as the graph with three edges a → b, b → c, and a → c. If G is a DAG, its transitive reduction is the graph with the fewest edges that represents the same reachability as G, and its transitive closure is the graph with the most edges that represents the same reachability. The transitive reduction and transitive closure are both uniquely defined for DAGs; in contrast, for a directed graph that is not acyclic, there can be more than one minimal subgraph with the same reachability relation.[6] The transitive closure of G has an edge u → v for every related pair u ≤ v of distinct elements in the reachability relation of G, and may therefore be thought of as a direct translation of the reachability relation ≤ into graph-theoretic terms: every may be translated into a DAG in this way. If a DAG G represents a partial order ≤, then the transitive reduction of G is a subgraph of G with an edge u → v for every pair in the of ≤; transitive reductions are useful in visualizing the partial orders they represent, because they have fewer edges than other graphs representing the same orders and therefore lead to simpler graph drawings.A Hasse diagram of a partial order is a 1.2. COMPUTATIONAL PROBLEMS 3 drawing of the transitive reduction in which the orientation of each edge is shown by placing the starting vertex of the edge in a lower position than its ending vertex.[7]

1.1.2 Topological ordering

Every directed acyclic graph has a topological ordering, an ordering of the vertices such that the starting endpoint of every edge occurs earlier in the ordering than the ending endpoint of the edge. In general, this ordering is not unique; a DAG has a unique topological ordering if and only if it has a directed path containing all the vertices, in which case the ordering is the same as the order in which the vertices appear in the path.[8] The family of topological orderings of a DAG is the same as the family of linear extensions of the reachability relation for the DAG,[9] so any two graphs representing the same partial order have the same set of topological orders.

1.1.3 Combinatorial enumeration

The problem of counting directed acyclic graphs was studied by Robinson (1973).[10] The number of DAGs on n labeled nodes, for n = 0, 1, 2, 3, …, (allowing these numbers to appear in any order in a topological ordering of the DAG) is

1, 1, 3, 25, 543, 29281, 3781503, … (sequence A003024 in OEIS).

These numbers may be computed by the ∑ ( ) n − k−1 n k(n−k) [10] an = k=1( 1) k 2 an−k.

Eric W. Weisstein conjectured,[11] and McKay et al. (2004) proved,[12] that the same numbers count the (0,1) matrices in which all eigenvalues are positive real numbers. The proof is bijective: a matrix A is an of a DAG if and only if A + I is a (0,1) matrix with all eigenvalues positive, where I denotes the identity matrix. Because a DAG cannot have self-loops, its adjacency matrix must have a zero diagonal, so adding I preserves the property that all matrix coefficients are 0 or 1.

1.1.4 Related families of graphs

A polytree is a directed graph formed by orienting the edges of a free .[13] Every polytree is a DAG. In particular, this is true of the arborescences formed by directing all edges outwards from the root of a tree. A multitree (also called a strongly unambiguous graph or a mangrove) is a directed graph in which there is at most one directed path (in either direction) between any two nodes; equivalently, it is a DAG in which, for every node v, the set of nodes reachable from v forms a tree.[14]

1.2 Computational problems

1.2.1 Topological sorting and recognition

Main article: Topological sorting

Topological sorting is the algorithmic problem of finding topological orderings; it can be solved in linear time.[15] Kahn’s for topological sorting builds the vertex ordering directly, by maintaining a list of vertices that have no edges connecting them to vertices that have not already been listed, and repeatedly adding one such vertex to the end of the list that is being built.[16] Alternatively, a topological ordering may be constructed by reversing a postorder numbering of a depth-first search .[15] It is also possible to check whether a given directed graph is a DAG in linear time, either by attempting to find a topological ordering and then testing for each edge whether the resulting ordering is valid[17] or alternatively, for some topological sorting algorithms, by verifying that the algorithm successfully orders all the vertices without meeting an error condition.[16] 4 CHAPTER 1. DIRECTED ACYCLIC GRAPH

1.2.2 Construction from cyclic graphs

Any undirected graph may be made into a DAG by choosing a for its vertices and orienting every edge from the earlier endpoint in the order to the later endpoint. However, different total orders may lead to the same acyclic orientation. The number of acyclic orientations is equal to |χ(−1)|, where χ is the of the given graph.[18] Any directed graph may be made into a DAG by removing a or a . However, the smallest such set is NP-hard to find.[19] An arbitrary directed graph may also be transformed into a DAG, called its condensation, by contracting each of its strongly connected components into a single supervertex.[20] When the graph is already acyclic, its smallest feedback vertex sets and feedback arc sets are empty, and its condensation is the graph itself.

1.2.3 Transitive closure and transitive reduction

The transitive closure of a given DAG, with n vertices and m edges, may be constructed in time O(mn) by using either breadth-first search or depth-first search to test reachability from each vertex.[21] Alternatively, it can be solved in time O(nω) where ω < 2.373 is the exponent for fast matrix multiplication algorithms; this is a theoretical improvement over the O(mn) bound for dense graphs.[22] In all of these transitive closure algorithms, it is possible to distinguish pairs of vertices that are reachable by at least one path of length two or more from pairs that can only be connected by a length-one path. The transitive reduction consists of the edges that form length-one paths that are the only paths connecting their endpoints. Therefore, the transitive reduction can be constructed in the same asymptotic time bounds as the transitive closure.[23]

1.2.4 Closure problem

Main article: Closure problem

The closure problem takes as input a directed acyclic graph with weights on its vertices and seeks the minimum (or maximum) weight of a closure, a set of vertices with no outgoing edges. (The problem may be formulated for directed graphs without the assumption of acyclicity, but with no greater generality, because in this case it is equivalent to the same problem on the condensation of the graph.) It may be solved in polynomial time using a reduction to the maximum flow problem.[24]

1.3 Applications

1.3.1 Path algorithms

Some algorithms become simpler when used on DAGs instead of general graphs, based on the principle of topological ordering. For example, it is possible to find shortest paths and longest paths from a given starting vertex in DAGs in linear time by processing the vertices in a topological order, and calculating the path length for each vertex to be the minimum or maximum length obtained via any of its incoming edges.[25] In contrast, for arbitrary graphs the shortest path may require slower algorithms such as Dijkstra’s algorithm or the Bellman–Ford algorithm,[26] and longest paths in arbitrary graphs are NP-hard to find.[27]

1.3.2 Scheduling

DAG representations of partial orderings have many applications in scheduling problems for systems of tasks with ordering constraints.[28] For instance, a DAG may be used to describe the dependencies between cells of a : if one cell is computed by a formula involving the value of a second cell, draw a DAG edge from the second cell to the first one. If the input values to the spreadsheet change, all of the remaining values of the spreadsheet may be recomputed with a single evaluation per cell, by topologically ordering the cells and re-evaluating each cell in this order.[29] Similar problems of task ordering arise in makefiles for program compilation,[29] instruction scheduling 1.3. APPLICATIONS 5 for low-level computer program optimization,[30] and PERT scheduling for management of large human projects.[31] Dependency graphs without circular dependencies form directed acyclic graphs.

1.3.3 Data processing networks

A directed graph may be used to represent a network of processing elements; in this formulation, data enters a processing element through its incoming edges and leaves the element through its outgoing edges. Examples of this include the following:

• In electronic circuit design, a combinational logic circuit is an acyclic system of logic gates that computes a function of an input, where the input and output of the function are represented as individual bits.[32]

• Dataflow programming languages describe systems of values that are related to each other by a directed acyclic graph. When one value changes, its successors are recalculated; each value is evaluated as a function of its predecessors in the DAG.[33]

• In , straight line code (that is, sequences of statements without loops or conditional branches) may be represented by a DAG describing the inputs and outputs of each of the arithmetic operations performed within the code; this representation allows the to perform common subexpression elimination efficiently.[34]

• In most spreadsheet systems, the dependency graph that connects one cell to another if the first cell stores a formula that uses the value in the second cell must be a directed acyclic graph. Cycles of dependencies are disallowed because they cause the cells involved in the to not have a well-defined value. Additionally, requiring the dependencies to be acyclic allows a topological sort to be used to schedule the recalculations of cell values when the spreadsheet is changed.[29]

1.3.4 Causal structures

Graphs that have vertices representing events, and edges representing causal relations between events, are often acyclic[35] – arranging the vertices in linear order of time, all arrows point in the same direction as time, from parent to child (due to affecting the future, not the past), and thus have no loops. For instance, a represents a system of probabilistic events as nodes in a directed acyclic graph, in which the likelihood of an event may be calculated from the likelihoods of its predecessors in the DAG.[36] In this context, the of a DAG is the undirected graph created by adding an (undirected) edge between all parents of the same node (sometimes called marrying), and then replacing all directed edges by undirected edges.[37] Another type of graph with a similar causal structure is an influence diagram, the nodes of which represent either decisions to be made or unknown information, and the edges of which represent causal influences from one node to another.[38] In epidemiology, for instance, these diagrams are often used to estimate the expected value of different choices for intervention.[39][40] The role of DAGs in these applications is to convert causal assumptions into conditional independencies constraints, which can be read from the DAG using Pearl’s d-separation[41] and tested in the data.

1.3.5 Genealogy and version history

Family trees may also be seen as directed acyclic graphs, with a vertex for each family member and an edge for each parent-child relationship.[42] Despite the name, these graphs are not necessarily trees because of the possibility of marriages between distant relatives (so a child has a common ancestor on both the mother’s and father’s side) causing pedigree collapse. (The graphs of matrilineal descent (“mother” relationships between women) and patrilineal descent (“father” relationships between men) are trees within this graph.) Because no one can become their own ancestor, these graphs are acyclic. For the same reason, the version history of a distributed revision control system generally has the structure of a directed acyclic graph, in which there is a vertex for each revision and an edge connecting pairs of revisions that were directly derived from each other; these are not trees in general due to merges.[43] In many randomized algorithms in , the algorithm maintains a history DAG representing the version history of a geometric structure over the course of a sequence of changes to the structure. For instance in a randomized incremental algorithm for , the triangulation changes by replacing one triangle 6 CHAPTER 1. DIRECTED ACYCLIC GRAPH by three smaller triangles when each point is added, and by “flip” operations that replace pairs of triangles by a different pair of triangles. The history DAG for this algorithm has a vertex for each triangle constructed as part of the algorithm, and edges from each triangle to the two or three other triangles that replace it. Tracing a path through this DAG representing the sequence of triangles that contain an individual point allows point location queries to be answered efficiently.[44]

1.3.6 Data compression

Another type of application of directed acyclic graphs arises in the concise representation of a set of sequences as paths in a graph. For example, the directed acyclic word graph is a in computer science formed by a directed acyclic graph with a single source and with edges labeled by letters or symbols; the paths from the source to the sinks in this graph represent a set of strings, such as English words.[45] Any set of sequences can be represented as paths in a tree, by forming a tree node for every prefix of a sequence and making the parent of one of these nodes represent the sequence with one fewer element; the tree formed in this way for a set of strings is called a .A directed acyclic word graph saves space over a trie by allowing paths to diverge and rejoin, so that a set of words with the same possible suffixes can be represented by a single tree node. The same idea of using a DAG to represent a family of paths occurs in the ,[46][47] a DAG- based data structure for representing binary functions. In a binary decision diagram, each non-sink vertex is labeled by the name of a binary variable, and each sink and each edge is labeled by a 0 or 1. The function value for any truth assignment to the variables is the value at the sink found by following a path, starting from the single source vertex, that at each non-sink vertex follows the outgoing edge labeled with the value of that vertex’s variable. Just as directed acyclic word graphs can be viewed as a compressed form of , binary decision diagrams can be viewed as compressed forms of decision trees that save space by allowing paths to rejoin when they agree on the results of all remaining decisions.

1.4 References

[1] Christofides, Nicos (1975), Graph theory: an algorithmic approach, Academic Press, pp. 170–174.

[2] Thulasiraman, K.; Swamy, M. N. S. (1992), “5.7 Acyclic Directed Graphs”, Graphs: Theory and Algorithms, John Wiley and Son, p. 118, ISBN 978-0-471-51356-8.

[3] Bang-Jensen, Jørgen (2008), “2.1 Acyclic Digraphs”, Digraphs: Theory, Algorithms and Applications, Springer Monographs in Mathematics (2nd ed.), Springer-Verlag, pp. 32–34, ISBN 978-1-84800-997-4.

[4] Kozen, Dexter (1992), The Design and Analysis of Algorithms, Monographs in Computer Science, Springer, p. 9, ISBN 978-0-387-97687-7.

[5] Banerjee, Utpal (1993), “Exercise 2(c)", Loop Transformations for Restructuring Compilers: The Foundations, Springer, p. 19, ISBN 978-0-7923-9318-4.

[6] Bang-Jensen, Jørgen; Gutin, Gregory Z. (2008), “2.3 Transitive Digraphs, Transitive Closures and Reductions”, Digraphs: Theory, Algorithms and Applications, Springer Monographs in Mathematics, Springer, pp. 36–39, ISBN 978-1-84800- 998-1.

[7] Jungnickel, Dieter (2012), Graphs, Networks and Algorithms, Algorithms and Computation in Mathematics 5, Springer, pp. 92–93, ISBN 978-3-642-32278-5.

[8] Sedgewick, Robert; Wayne, Kevin (2011), “4,2,25 Unique topological ordering”, Algorithms (4th ed.), Addison-Wesley, pp. 598–599, ISBN 978-0-13-276256-4.

[9] Bender, Edward A.; Williamson, S. Gill (2005), “Example 26 (Linear extensions – topological sorts)", A Short Course in , Dover Books on Computer Science, Courier Dover Publications, p. 142, ISBN 978-0-486-43946-4.

[10] Robinson, R. W. (1973), “Counting labeled acyclic digraphs”, in Harary, F., New Directions in the Theory of Graphs, Academic Press, pp. 239–273. See also Harary, Frank; Palmer, Edgar M. (1973), Graphical Enumeration, Academic Press, p. 19, ISBN 0-12-324245-2.

[11] Weisstein, Eric W., “Weisstein’s Conjecture”, MathWorld.

[12] McKay, B. D.; Royle, G. F.; Wanless, I. M.; Oggier, F. E.; Sloane, N. J. A.; Wilf, H. (2004), “Acyclic digraphs and eigenvalues of (0,1)-matrices”, Journal of Integer Sequences 7, Article 04.3.3. 1.4. REFERENCES 7

[13] Rebane, George; Pearl, Judea (1987), “The recovery of causal poly-trees from statistical data”, in Proc. 3rd Annual Con- ference on Uncertainty in Artificial Intelligence (UAI 1987), Seattle, WA, USA, July 1987 (PDF), pp. 222–228.

[14] Furnas, George W.; Zacks, Jeff (1994), “Multitrees: enriching and reusing hierarchical structure”, Proc. SIGCHI conference on Human Factors in Computing Systems (CHI '94), pp. 330–336, doi:10.1145/191666.191778.

[15] Cormen, Thomas H.; Leiserson, Charles E., Rivest, Ronald L., Stein, Clifford (2001) [1990]. Introduction to Algorithms (2nd ed.). MIT Press and McGraw-Hill. ISBN 0-262-03293-7. Section 22.4, Topological sort, pp. 549–552.

[16] Jungnickel (2012), pp. 50–51.

[17] For depth-first search based topological , this validity check can be interleaved with the topological sorting algorithm itself; see e.g. Skiena, Steven S. (2009), The Algorithm Design Manual, Springer, pp. 179–181, ISBN 978-1- 84800-070-4.

[18] Stanley, Richard P. (1973), “Acyclic orientations of graphs”, Discrete Mathematics 5 (2): 171–178, doi:10.1016/0012- 365X(73)90108-8.

[19] Garey, Michael R.; Johnson, David S. (1979), Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, ISBN 0-7167-1045-5, Problems GT7 and GT8, pp. 191–192.

[20] Harary, Frank; Norman, Robert Z.; Cartwright, Dorwin (1965), Structural Models: An Introduction to the Theory of Di- rected Graphs, John Wiley & Sons, p. 63.

[21] Skiena (2009), p. 495.

[22] Skiena (2009), p. 496.

[23] Bang-Jensen & Gutin (2008), p. 38.

[24] Picard, Jean-Claude (1976), “Maximal closure of a graph and applications to combinatorial problems”, Management Science 22 (11): 1268–1272, doi:10.1287/mnsc.22.11.1268, MR 0403596.

[25] Cormen et al. 2001, Section 24.2, Single-source shortest paths in directed acyclic graphs, pp. 592–595.

[26] Cormen et al. 2001, Sections 24.1, The Bellman–Ford algorithm, pp. 588–592, and 24.3, Dijkstra’s algorithm, pp. 595– 601.

[27] Cormen et al. 2001, p. 966.

[28] Skiena (2009), p. 469.

[29] Gross, Jonathan L.; Yellen, Jay; Zhang, Ping (2013), Handbook of Graph Theory (2nd ed.), CRC Press, p. 1181, ISBN 978-1-4398-8018-0.

[30] Srikant, Y. N.; Shankar, Priti (2007), The Compiler Design Handbook: Optimizations and Machine Code Generation, (2nd ed.), CRC Press, pp. 19–39, ISBN 978-1-4200-4383-9.

[31] Wang, John X. (2002), What Every Engineer Should Know About Decision Making Under Uncertainty, CRC Press, p. 160, ISBN 978-0-8247-4373-4.

[32] Sapatnekar, Sachin (2004), Timing, Springer, p. 133, ISBN 978-1-4020-7671-8.

[33] Dennis, Jack B. (1974), “First version of a data flow procedure language”, Programming Symposium, Lecture Notes in Computer Science 19, pp. 362–376, doi:10.1007/3-540-06859-7_145.

[34] Touati, Sid; de Dinechin, Benoit (2014), Advanced Backend Optimization, John Wiley & Sons, p. 123, ISBN 978-1-118- 64894-0.

[35] Gopnik, Alison; Schulz, Laura (2007), Causal Learning, Oxford University Press, p. 4, ISBN 978-0-19-803928-0.

[36] Shmulevich, Ilya; Dougherty, Edward R. (2010), Probabilistic Boolean Networks: The Modeling and Control of Gene Reg- ulatory Networks, Society for Industrial and Applied Mathematics, p. 58, ISBN 978-0-89871-692-4.

[37] Cowell, Robert G.; Dawid, A. Philip; Lauritzen, Steffen L.; Spiegelhalter, David J. (1999), “3.2.1 Moralization”, Proba- bilistic Networks and Expert Systems, Springer, pp. 31–33, ISBN 0-387-98767-3.

[38] Dorf, Richard C. (1998), The Technology Management Handbook, CRC Press, p. 9-7, ISBN 978-0-8493-8577-3.

[39] Boslaugh, Sarah (2008), Encyclopedia of Epidemiology, Volume 1, SAGE, p. 255, ISBN 978-1-4129-2816-8. 8 CHAPTER 1. DIRECTED ACYCLIC GRAPH

[40] Pearl, Judea (1995). “Causal diagrams for empirical research”. Biometrika 82 (4): 669–709. doi:10.1093/biomet/82.4.669.

[41] “Bayesian network”.

[42] Kirkpatrick, Bonnie B. (April 2011), “Haplotypes versus genotypes on pedigrees”, Algorithms for Molecular Biology 6 (10), doi:10.1186/1748-7188-6-10, PMC 3102622, PMID 21504603.

[43] Bartlang, Udo (2010), Architecture and Methods for Flexible Content Management in Peer-to-Peer Systems, Springer, p. 59, ISBN 978-3-8348-9645-2.

[44] Pach, János; Sharir, Micha, Combinatorial Geometry and Its Algorithmic Applications: The Alcalá Lectures, Mathematical surveys and monographs 152, American Mathematical Society, pp. 93–94, ISBN 978-0-8218-7533-9.

[45] Crochemore, Maxime; Vérin, Renaud (1997), “Direct construction of compact directed acyclic word graphs”, Combina- torial Pattern Matching, Lecture Notes in Computer Science, Springer, pp. 116–129, doi:10.1007/3-540-63220-4_55.

[46] Lee, C. Y. (1959), “Representation of switching circuits by binary-decision programs”, Bell Systems Technical Journal 38: 985–999, doi:10.1002/j.1538-7305.1959.tb01585.x.

[47] Akers, Sheldon B. (1978), “Binary decision diagrams”, IEEE Transactions on Computers C–27 (6): 509–516, doi:10.1109/TC.1978.1675141.

1.5 External links

• Weisstein, Eric W., “Acyclic Digraph”, MathWorld. Chapter 2

Directed graph

A directed graph.

In mathematics, and more specifically in graph theory, a directed graph (or digraph) is a graph, or set of nodes connected by edges, where the edges have a direction associated with them. In formal terms, a digraph is a pair G = (V,A) (sometimes G = (V,E) ) of:[1]

• a set V, whose elements are called vertices or nodes, • a set A of ordered pairs of vertices, called arcs, directed edges, or arrows (and sometimes simply edges with

9 10 CHAPTER 2. DIRECTED GRAPH

a 1 b 1 2 3 4 a 1 0 1-1 4 3 2 b -1 1 0 0 c -1 1 00 d 0 0 0 -1 d c

Directed graph with corresponding incidence matrix.

the corresponding set named E instead of A).

It differs from an ordinary or undirected graph, in that the latter is defined in terms of unordered pairs of vertices, which are usually called edges. A digraph is called “simple” if it has no loops, and no multiple arcs (arcs with same starting and ending nodes). A directed multigraph, in which the arcs constitute a multiset, rather than a set, of ordered pairs of vertices may have loops (that is, “self-loops” with same starting and ending node) and multiple arcs. Some, but not all, texts allow a digraph, without the qualification simple, to have self loops, multiple arcs, or both.

2.1 Basic terminology

An arc e = (x, y) is considered to be directed from x to y ; y is called the head and x is called the tail of the arc; y is said to be a direct successor of x , and x is said to be a direct predecessor of y . If a path made up of one or more successive arcs leads from x to y , then y is said to be a successor of x , and x is said to be a predecessor of y . The arc (y, x) is called the arc (x, y) inverted. An orientation of a simple undirected graph is obtained by assigning a direction to each edge. Any directed graph constructed this way is called an “oriented graph”. A directed graph is an oriented simple graph if and only if it has neither self-loops nor 2-cycles.[2] A weighted digraph is a digraph with weights assigned to its arcs, similar to a weighted graph. In the context of graph theory a digraph with weighted edges is called a network. The adjacency matrix of a digraph (with loops and multiple arcs) is the integer-valued matrix with rows and columns corresponding to the nodes, where a nondiagonal entry aij is the number of arcs from node i to node j, and the diagonal entry aii is the number of loops at node i. The adjacency matrix of a digraph is unique up to identical permutation of rows and columns. Another matrix representation for a digraph is its incidence matrix. See direction for more definitions.

2.2 Indegree and outdegree

For a node, the number of head endpoints adjacent to a node is called the indegree of the node and the number of tail endpoints adjacent to a node is its outdegree (called "branching factor" in trees). 2.3. DEGREE SEQUENCE 11

A digraph with vertices labeled (indegree, outdegree)

Let G = (V, E) and v ∈ V, then the indegree is denoted deg−(v) and the outdegree as deg+(v). A vertex with deg−(v) = 0 is called a source, as it is the origin of each of its incident edges. Similarly, a vertex with deg+(v) = 0 is called a sink. The degree sum formula states that, for a directed graph,

∑ ∑ deg+(v) = deg−(v) = |E| . v∈V v∈V

If, for every node v ∈ V, we have deg+(v) = deg−(v) , the graph is called a balanced digraph.[3]

2.3 Degree sequence

The degree sequence of a directed graph is the list of its indegree and outdegree pairs; for the above example we have degree sequence ((2,0),(2,2),(0,2),(1,1)). The degree sequence is a directed graph invariant so isomorphic directed graphs have the same degree sequence. However, the degree sequence does not, in general, uniquely identify a graph; in some cases, non-isomorphic graphs have the same degree sequence. The digraph realization problem is the problem of finding a digraph with the degree sequence being a given sequence of positive integer pairs. (Trailing pairs of zeros may be ignored since they are trivially realized by adding an appro- priate number of isolated vertices to the digraph.) A sequence which is the degree sequence of some digraph, i.e. for which the digraph realization problem has a solution, is called a digraphic or digraphical sequence. This problem can either be solved by the Kleitman–Wang algorithm or by the Fulkerson–Chen–Anstee theorem.

2.4 Digraph connectivity

Main article: Connectivity (graph theory)

A digraph G is called weakly connected (or just connected[4]) if the undirected underlying graph obtained by replacing all directed edges of G with undirected edges is a connected graph. A digraph is strongly connected or strong if it 12 CHAPTER 2. DIRECTED GRAPH

contains a directed path from u to v and a directed path from v to u for every pair of vertices u,v. The strong components are the maximal strongly connected subgraphs.

2.5 Classes of digraphs

A directed graph G is called symmetric if, for every arc that belongs to G, the corresponding reversed arc also belongs to G. A symmetric, loopless directed graph is equivalent to an undirected graph with the edges replaced by pairs of inverse arcs; thus the number of edges is equal to the number of arcs halved.

5 7 3

11 8

2 9 10

A simple acyclic directed graph

An acyclic directed graph, acyclic digraph, or directed acyclic graph is a directed graph with no directed cycles. Special cases of acyclic directed graphs include multitrees (graphs in which no two directed paths from a single starting node meet back at the same ending node), oriented trees or (digraphs formed by orienting the edges of undirected acyclic graphs), and rooted trees (oriented trees in which all edges of the underlying undirected tree are directed away from the roots). A tournament is an oriented graph obtained by choosing a direction for each edge in an undirected . In the theory of Lie groups, a quiver Q is a directed graph serving as the domain of, and thus characterizing the shape of, a representation V defined as a functor, specifically an object of the functor category FinVctKF(Q) where F(Q) is the free category on Q consisting of paths in Q and FinVctK is the category of finite-dimensional vector spaces over a field K. Representations of a quiver label its vertices with vector spaces and its edges (and hence paths) compatibly with linear transformations between them, and transform via natural transformations. 2.6. SEE ALSO 13

1 2

3 4

A tournament on 4 vertices

2.6 See also

• Coates graph • Flow chart • • Flow graph (mathematics) • Mason graph • Oriented graph • • Quiver • Signal-flow graph • • Vertical constraint graph 14 CHAPTER 2. DIRECTED GRAPH

2.7 Notes

[1] Bang-Jensen & Gutin (2000). Diestel (2005), Section 1.10. Bondy & Murty (1976), Section 10.

[2] Diestel (2005), Section 1.10.

[3] Satyanarayana, Bhavanari; Prasad, Kuncham Syam, Discrete Mathematics and Graph Theory, PHI Learning Pvt. Ltd., p. 460, ISBN 978-81-203-3842-5; Brualdi, Richard A. (2006), Combinatorial matrix classes, Encyclopedia of mathematics and its applications 108, Cambridge University Press, p. 51, ISBN 978-0-521-86565-4.

[4] Bang-Jensen & Gutin (2000) p. 19 in the 2007 edition; p. 20 in the 2nd edition (2009).

2.8 References

• Bang-Jensen, Jørgen; Gutin, Gregory (2000), Digraphs: Theory, Algorithms and Applications, Springer, ISBN 1-85233-268-9 (the corrected 1st edition of 2007 is now freely available on the authors’ site; the 2nd edition appeared in 2009 ISBN 1-84800-997-6). • Bondy, John Adrian; Murty, U. S. R. (1976), Graph Theory with Applications, North-Holland, ISBN 0-444- 19451-7. • Diestel, Reinhard (2005), Graph Theory (3rd ed.), Springer, ISBN 3-540-26182-6 (the electronic 3rd edition is freely available on author’s site). • Harary, Frank; Norman, Robert Z.; Cartwright, Dorwin (1965), Structural Models: An Introduction to the Theory of Directed Graphs, New York: Wiley. • Number of directed graphs (or digraphs) with n nodes. Chapter 3

Orientation (graph theory)

In graph theory, an orientation of an undirected graph is an assignment of a direction to each edge, turning the initial graph into a directed graph.

3.1 Oriented graphs

A directed graph is called an oriented graph if it is the orientation of an undirected graph. Among directed graphs, the oriented graphs are the ones that have no self-loops, no multiple adjacencies, and no 2-cycles.[1] A tournament is an orientation of a complete graph.A polytree is an orientation of an undirected tree.[2] Sumner’s conjecture states that every tournament with 2n − 2 vertices contains every polytree with n vertices.[3] The number of non-isomorphic oriented graphs with n vertices (for n = 1, 2, 3, ...) is

1, 2, 7, 42, 582, 21480, 2142288, 575016219, 415939243032, ... (sequence A001174 in OEIS).

Oriented graphs are in one-to-one correspondence with complete directed graphs (graphs in which there is a directed edge in one or both directions between every pair of distinct vertices). A complete directed graph can be converted to an oriented graph by removing every 2-cycle, and conversely an oriented graph can be converted to a complete directed graph by adding a 2-cycle between every pair of vertices that are not endpoints of an edge; these correspondences are bijective. Therefore, the same sequence of numbers also solves the graph enumeration problem for complete digraphs. There is an explicit but complicated formula for the numbers in this sequence.[4]

3.2 Constrained orientations

A strong orientation is an orientation that results in a strongly connected graph. The closely related totally cyclic orientations are orientations in which every edge belongs to at least one simple cycle. An orientation of an undirected graph G is totally cyclic if and only if it is a strong orientation of every connected of G. Robbins’ theorem states that a graph has a strong orientation if and only if it is 2-edge-connected; disconnected graphs may have totally cyclic orientations, but only if they have no bridges.[5] An acyclic orientation is an orientation that results in a directed acyclic graph. Every graph has an acyclic orientation; all acyclic orientations may be obtained by placing the vertices into a sequence, and then directing each edge from the earlier of its endpoints in the sequence to the later endpoint. The Gallai–Hasse–Roy–Vitaver theorem states that a graph has an acyclic orientation in which the longest path has at most k vertices if and only if it can be colored with at most k colors.[6] Acyclic orientations and totally cyclic orientations are related to each other by planar duality. An acyclic orientation with a single source and a single sink is called a .[7] A transitive orientation is an orientation such that the resulting directed graph is its own transitive closure. The graphs with transitive orientations are called comparability graphs; they may be defined from a partially ordered set by making two elements adjacent whenever they are comparable in the partial order.[8] A transitive orientation, if one exists, can be found in linear time.[9] However, testing whether the resulting orientation (or any given orientation) is actually transitive requires more time, as it is equivalent in complexity to matrix multiplication.

15 16 CHAPTER 3. ORIENTATION (GRAPH THEORY)

An Eulerian orientation of an undirected graph is an orientation in which each vertex has equal in-degree and out- degree. Eulerian orientations of grid graphs arise in statistical mechanics in the theory of ice-type models.[10]

3.3 References

[1] Diestel, Reinhard (2005), “1.10 Other notions of graphs”, Graph Theory (PDF) (3rd ed.), Springer, ISBN 3-540-26182-6.

[2] Rebane, George; Pearl, Judea (1987), “The recovery of causal poly-trees from statistical data”, in Proc. 3rd Annual Con- ference on Uncertainty in Artificial Intelligence (UAI 1987), Seattle, WA, USA, July 1987 (PDF), pp. 222–228.

[3] Sumner’s Universal Tournament Conjecture, Douglas B. West, retrieved 2012-08-02.

[4] Harary, Frank; Palmer, Edgar M. (1973), “Formula 5.4.13”, Graphical Enumeration, New York: Academic Press, p. 133, MR 0357214.

[5] Robbins, H. E. (1939), “A theorem on graphs, with an application to a problem of traffic control”, The American Mathe- matical Monthly 46: 281–283, doi:10.2307/2303897.

[6] Nešetřil, Jaroslav; Ossona de Mendez, Patrice (2012), “Theorem 3.13”, Sparsity: Graphs, Structures, and Algorithms, Algo- rithms and 28, Heidelberg: Springer, p. 42, doi:10.1007/978-3-642-27875-4, ISBN 978-3-642-27874-7, MR 2920058.

[7] de Fraysseix, Hubert; de Mendez, Patrice Ossona; Rosenstiehl, Pierre (1995), “Bipolar orientations revisited”, Discrete Applied Mathematics 56 (2-3): 157–179, doi:10.1016/0166-218X(94)00085-R, MR 1318743.

[8] Ghouila-Houri, Alain (1962), “Caractérisation des graphes non orientés dont on peut orienter les arrêtes de manière à obtenir le graphe d'une relation d'ordre”, Les Comptes rendus de l'Académie des sciences 254: 1370–1371, MR 0172275.

[9] McConnell, R. M.; Spinrad, J. (1997), “Linear-time transitive orientation”, 8th ACM-SIAM Symposium on Discrete Algo- rithms, pp. 19–25.

[10] Mihail, Milena; Winkler, Peter (1992), “On the Number of Eularian Orientations of a Graph”, Proceedings of the Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA '92, Philadelphia, PA, USA: Society for Industrial and Applied Mathematics, pp. 138–145, ISBN 0-89791-466-X.

3.4 External links

• Weisstein, Eric W., “Graph Orientation”, MathWorld. • Weisstein, Eric W., “Oriented Graph”, MathWorld. Chapter 4

Strong orientation

In graph theory, a strong orientation of an undirected graph is an assignment of a direction to each edge (an orientation) that makes it into a strongly connected graph. Strong orientations have been applied to the design of one-way road networks. According to Robbins’ theorem, the graphs with strong orientations are exactly the bridgeless graphs. Eulerian orientations and well-balanced orientations provide important special cases of strong orientations; in turn, strong orientations may be generalized to totally cyclic orientations of disconnected graphs. The set of strong orientations of a graph forms a , with adjacent orientations in this structure differing in the orientation of a single edge. It is possible to find a single orientation in linear time, but it is #P-complete to count the number of strong orientations of a given graph.

4.1 Application to traffic control

Robbins (1939) introduces the problem of strong orientation with a story about a town, whose streets and intersections are represented by the given graph G. According to Robbins’ story, the people of the town want to be able to repair any segment of road during the weekdays, while still allowing any part of the town to be reached from any other part using the remaining roads as two-way streets. On the weekends, all roads are open, but because of heavy traffic volume, they wish to convert all roads to one-way streets and again allow any part of town to be reached from any other part. Robbins’ theorem states that a system of roads is suitable for weekday repairs if and only if it is suitable for conversion to a one-way system on weekends. For this reason, his result is sometimes known as the one-way street theorem.[1] Subsequently to the work of Robbins, a series of papers by Roberts and Xu modeled more carefully the problem of turning a grid of two-way city streets into one-way streets, and examined the effect of this conversion on the distances between pairs of points within the grid. As they showed, the traditional one-way layout in which parallel streets alternate in direction is not optimal in keeping the pairwise distances as small as possible. However, the improved orientations that they found include points where the traffic from two one-way blocks meets itself head-on, which may be viewed as a flaw in their solutions.

4.2 Related types of orientation

If an undirected graph has an Euler tour, an Eulerian orientation of the graph (an orientation for which every vertex has indegree equal to its outdegree) may be found by orienting the edges consistently around the tour.[2] These orientations are automatically strong orientations. A theorem of Nash-Williams (1960, 1969) states that every undirected graph G has a well-balanced orientation. This is an orientation with the property that, for every pair of vertices u and v in G, the number of pairwise edge-disjoint ⌊ k ⌋ directed paths from u to v in the resulting directed graph is at least 2 , where k is the maximum number of paths in a set of edge-disjoint undirected paths from u to v. Nash-Williams’ orientations also have the property that they are as close as possible to being Eulerian orientations: at each vertex, the indegree and the outdegree are within one of each other. The existence of well-balanced orientations, together with Menger’s theorem, immediately implies Robbins’ theorem: by Menger’s theorem, a 2-edge-connected graph has at least two edge-disjoint paths between every pair of

17 18 CHAPTER 4. STRONG ORIENTATION vertices, from which it follows that any well-balanced orientation must be strongly connected. More generally this result implies that every 2k-edge-connected undirected graph can be oriented to form a k-edge-connected directed graph. A totally cyclic orientation of a graph G is an orientation in which each edge belongs to a directed cycle. For connected graphs, this is the same thing as a strong orientation, but totally cyclic orientations may also be defined for disconnected graphs, and are the orientations in which each connected component of G becomes strongly connected. Robbins’ theorem can be restated as saying that a graph has a totally cyclic orientation if and only if it does not have a . Totally cyclic orientations are dual to acyclic orientations (orientations that turn G into a directed acyclic graph) in the sense that, if G is a , and orientations of G are transferred to orientations of the planar of G by turning each edge 90 degrees clockwise, then a totally cyclic orientation of G corresponds in this way to an acyclic orientation of the dual graph and vice versa.[3][4] The number of different totally cyclic orientations of any graph G is TG(0,2) where TG is the of the graph, and dually the number of acyclic orientations is TG(2,0).[5] As a consequence, Robbins’ theorem implies that the Tutte polynomial has a root at the point (0,2) if and only if the graph G has a bridge. If a strong orientation has the property that all directed cycles pass through a single edge st (equivalently, if flipping the orientation of an edge produces an acyclic orientation) then the acyclic orientation formed by reversing st is a bipolar orientation. Every bipolar orientation is related to a strong orientation in this way.[6]

4.3 Flip graphs

If G is a 3-edge-connected graph, and X and Y are any two different strong orientations of G, then it is possible to transform X into Y by changing the orientation of a single edge at a time, at each step preserving the property that the orientation is strong.[7] Therefore, the flip graph whose vertices correspond to the strong orientations of G, and whose edges correspond to pairs of strong orientations that differ in the direction of a single edge, forms a partial cube.

4.4 Algorithms and complexity

A strong orientation of a given bridgeless undirected graph may be found in linear time by performing a depth first search of the graph, orienting all edges in the depth first search tree away from the tree root, and orienting all the remaining edges (which must necessarily connect an ancestor and a descendant in the depth first search tree) from the descendant to the ancestor.[8] If an undirected graph G with bridges is given, together with a list of ordered pairs of vertices that must be connected by directed paths, it is possible in polynomial time to find an orientation of G that connects all the given pairs, if such an orientation exists. However, the same problem is NP-complete when the input may be a mixed graph.[9] It is #P-complete to count the number of strong orientations of a given graph G, even when G is planar and bipartite.[3][10] However, for dense graphs (more specifically, graphs in which each vertex has a linear number of neighbors), the number of strong orientations may be estimated by a fully polynomial-time randomized approximation scheme.[3][11] The problem of counting strong orientations may also be solved exactly, in polynomial time, for graphs of bounded .[3]

4.5 Notes

[1] Koh & Tay (2002).

[2] Schrijver (1983).

[3] Welsh (1997).

[4] Noy (2001).

[5] Las Vergnas (1980).

[6] de Fraysseix, de Mendez & Rosenstiehl (1995). 4.6. REFERENCES 19

[7] Fukuda, Prodon & Sakuda (2001).

[8] See e.g. Atallah (1984) and Roberts (1978).

[9] Arkin & Hassin (2002).

[10] Vertigan & Welsh (1992).

[11] Alon, Frieze & Welsh (1995).

4.6 References

• Alon, Noga; Frieze, Alan; Welsh, Dominic (1995), “Polynomial time randomized approximation schemes for Tutte-Gröthendieck invariants: the dense case”, Random Structures & Algorithms 6 (4): 459–478, doi:10.1002/rsa.3240060409, MR 1368847 • Arkin, Esther M.; Hassin, Refael (2002), “A note on orientations of mixed graphs”, Discrete Applied Mathe- matics 116 (3): 271–278, doi:10.1016/S0166-218X(01)00228-1, MR 1878572. • Atallah, Mikhail J. (1984), “Parallel strong orientation of an undirected graph”, Information Processing Letters 18 (1): 37–39, doi:10.1016/0020-0190(84)90072-3, MR 742079. • de Fraysseix, Hubert; de Mendez, Patrice Ossona; Rosenstiehl, Pierre (1995), “Bipolar orientations revisited”, Discrete Applied Mathematics 56 (2-3): 157–179, doi:10.1016/0166-218X(94)00085-R, MR 1318743. • Fukuda, Komei; Prodon, Alain; Sakuma, Tadashi (2001), “Notes on acyclic orientations and the shelling lemma”, Theoretical Computer Science 263 (1-2): 9–16, doi:10.1016/S0304-3975(00)00226-7, MR 1846912. • Koh, K. M.; Tay, E. G. (2002), “Optimal orientations of graphs and digraphs: a survey”, Graphs and Combi- natorics 18 (4): 745–756, doi:10.1007/s003730200060, MR 1964792. • Las Vergnas, Michel (1980), “Convexity in oriented matroids”, Journal of Combinatorial Theory, Series B 29 (2): 231–243, doi:10.1016/0095-8956(80)90082-9, MR 586435. • Nash-Williams, C. St. J. A. (1960), “On orientations, connectivity and odd-vertex-pairings in finite graphs.”, Canadian Journal of Mathematics 12: 555–567, doi:10.4153/cjm-1960-049-6, MR 0118684. • Nash-Williams, C. St. J. A. (1969), “Well-balanced orientations of finite graphs and unobtrusive odd-vertex- pairings”, Recent Progress in Combinatorics (Proc. Third Waterloo Conf. on Combinatorics, 1968), New York: Academic Press, pp. 133–149, MR 0253933. • Noy, Marc (2001), “Acyclic and totally cyclic orientations in planar graphs”, The American Mathematical Monthly 108 (1): 66–68, doi:10.2307/2695680, MR 1857074. • Robbins, H. E. (1939), “A theorem on graphs, with an application to a problem on traffic control”, American Mathematical Monthly 46: 281–283, JSTOR 2303897. • Roberts, Fred S. (1978), “Chapter 2. The One-Way Street Problem”, Graph Theory and its Applications to Problems of Society, CBMS-NSF Regional Conference Series in Applied Mathematics 29, Philadelphia, Pa.: Society for Industrial and Applied Mathematics (SIAM), pp. 7–14, MR 508050. • Roberts, Fred S.; Xu, Yonghua (1988), “On the optimal strongly connected orientations of city street graphs. I. Large grids”, SIAM Journal on Discrete Mathematics 1 (2): 199–222, doi:10.1137/0401022, MR 941351. • Roberts, Fred S.; Xu, Yonghua (1989), “On the optimal strongly connected orientations of city street graphs. II. Two east-west avenues or north-south streets”, Networks 19 (2): 221–233, doi:10.1002/net.3230190204, MR 984567. • Roberts, Fred S.; Xu, Yonghua (1992), “On the optimal strongly connected orientations of city street graphs. III. Three east-west avenues or north-south streets”, Networks 22 (2): 109–143, doi:10.1002/net.3230220202, MR 1148018. • Roberts, Fred S.; Xu, Yong Hua (1994), “On the optimal strongly connected orientations of city street graphs. IV. Four east-west avenues or north-south streets”, Discrete Applied Mathematics 49 (1-3): 331–356, doi:10.1016/0166- 218X(94)90217-8, MR 1272496. 20 CHAPTER 4. STRONG ORIENTATION

• Schrijver, A. (1983), “Bounds on the number of Eulerian orientations”, Combinatorica 3 (3-4): 375–380, doi:10.1007/BF02579193, MR 729790. • Vertigan, D. L.; Welsh, D. J. A. (1992), “The computational complexity of the Tutte plane: the bipartite case”, Combinatorics, Probability and Computing 1 (2): 181–187, doi:10.1017/S0963548300000195, MR 1179248. • Welsh, Dominic (1997), “Approximate counting”, Surveys in combinatorics, 1997 (London), London Math. Soc. Lecture Note Ser. 241, Cambridge: Cambridge Univ. Press, pp. 287–323, doi:10.1017/CBO9780511662119.010, MR 1477750. Chapter 5

Tournament (graph theory)

A tournament is a directed graph (digraph) obtained by assigning a direction for each edge in an undirected complete graph. That is, it is an orientation of a complete graph, or equivalently a directed graph in which every pair of distinct vertices is connected by a single directed edge. Many of the important properties of tournaments were first investigated by Landau in order to model dominance relations in flocks of chickens. Current applications of tournaments include the study of voting theory and social choice theory among other things. The name tournament originates from such a graph’s interpretation as the outcome of a round-robin tournament in which every player encounters every other player exactly once, and in which no draws occur. In the tournament digraph, the vertices correspond to the players. The edge between each pair of players is oriented from the winner to the loser. If player a beats player b , then it is said that a dominates b .

5.1 Paths and cycles

Any tournament on a finite number n of vertices contains a , i.e., directed path on all n vertices (Rédei 1934). This is easily shown by induction on n : suppose that the statement holds for n , and consider any tournament T on n + 1 vertices. Choose a vertex v0 of T and consider a directed path v1, v2, . . . , vn in T \{v0} . Now let i ∈ {0, . . . , n} be maximal such that for every j ≤ i there is a directed edge from vj to v0 .

v1, . . . , vi, v0, vi+1, . . . , vn is a directed path as desired. This argument also gives an algorithm for finding the Hamiltonian path. More efficient algorithms, that require examining only O(n log n) of the edges, are known.[1] This implies that a strongly connected tournament has a Hamiltonian cycle (Camion 1959). More strongly, every strongly connected tournament is vertex pancyclic: for each vertex v, and each k in the range from three to the number of vertices in the tournament, there is a cycle of length k containing v.[2] Moreover, if the tournament is 4‑connected, each pair of vertices can be connected with a Hamiltonian path (Thomassen 1980).

5.2 Transitivity

A tournament in which ((a → b) and (b → c)) ⇒ (a → c) is called transitive. In a transitive tournament, the vertices may be totally ordered by reachability.

5.2.1 Equivalent conditions

The following statements are equivalent for a tournament T on n vertices:

1. T is transitive.

21 22 CHAPTER 5. TOURNAMENT (GRAPH THEORY)

2 5 3

1 8

7 6 4

A transitive tournament on 8 vertices.

2. T is acyclic.

3. T does not contain a cycle of length 3.

4. The score sequence (set of outdegrees) of T is {0,1,2,...,n − 1}.

5. T has exactly one Hamiltonian path.

5.2.2 Ramsey theory

Transitive tournaments play a role in Ramsey theory analogous to that of cliques in undirected graphs. In particular, ⌊ ⌋ [3] every tournament on n vertices contains a transitive subtournament on 1 + log2 n vertices. The proof is simple: choose any one vertex v to be part of this subtournament, and form the rest of the subtournament recursively on either the set of incoming neighbors of v or the set of outgoing neighbors of v, whichever is larger. For instance, every tournament on seven vertices contains a three-vertex transitive subtournament; the Paley tournament on seven vertices shows that this is the most that can be guaranteed (Erdős & Moser 1964). However, Reid & Parker (1970) showed that this bound is not tight for some larger values of n. Erdős & Moser (1964) proved that there are tournaments on n vertices without a transitive subtournament of size ⌊ ⌋ 2 + 2 log2 n Their proof uses a counting argument: the number of ways that a k-element transitive tournament can 5.3. SCORE SEQUENCES AND SCORE SETS 23

occur as a subtournament of a larger tournament on n labeled vertices is

( ) n n − k k!2(2) (2), k ⌊ ⌋ and when k is larger than 2+2 log2 n , this number is too small to allow for an occurrence of a transitive tournament n within each of the 2(2) different tournaments on the same set of n labeled vertices.

5.2.3 Paradoxical tournaments

A player who wins all games would naturally be the tournament’s winner. However, as the existence of non-transitive tournaments shows, there may not be such a player. A tournament for which every player loses at least one game is called a 1-paradoxical tournament. More generally, a tournament T=(V,E) is called k-paradoxical if for every k-element subset S of V there is a vertex v0 in V \ S such that v0 → v for all v ∈ S . By means of the probabilistic method, Paul Erdős showed that for any fixed value of k, if |V| ≥ k22kln(2 + o(1)), then almost every tournament on V is k-paradoxical.[4] On the other hand, an easy argument shows that any k-paradoxical tournament must have at least 2k+1 − 1 players, which was improved to (k + 2)2k−1 − 1 by Esther and George Szekeres (1965). There is an explicit construction of k-paradoxical tournaments with k24k−1(1 + o(1)) players by Graham and Spencer (1971) namely the Paley tournament.

5.2.4 Condensation

The condensation of any tournament is itself a transitive tournament. Thus, even for tournaments that are not transi- tive, the strongly connected components of the tournament may be totally ordered.[5]

5.3 Score sequences and score sets

The score sequence of a tournament is the nondecreasing sequence of outdegrees of the vertices of a tournament. The score set of a tournament is the set of integers that are the outdegrees of vertices in that tournament.

Landau’s Theorem (1953) A nondecreasing sequence of integers (s1, s2, ··· , sn) is a score sequence if and only if :

1. 0 ≤ s1 ≤ s2 ≤ · · · ≤ sn ( ) ··· ≥ i ··· − 2. s1 + s2 + + si 2 , for i = 1, 2, , n 1 ( ) ··· n 3. s1 + s2 + + sn = 2 .

Let s(n) be the number of different score sequences of size n . The sequence s(n) (sequence A000571 in OEIS) starts as: 1, 1, 1, 2, 4, 9, 22, 59, 167, 490, 1486, 4639, 14805, 48107, ... Winston and Kleitman proved that for sufficiently large n:

n − 5 s(n) > c14 n 2 ,

where c1 = 0.049. Takács later showed, using some reasonable but unproven assumptions, that

n − 5 s(n) < c24 n 2 ,

where c2 < 4.858. Together these provide evidence that: 24 CHAPTER 5. TOURNAMENT (GRAPH THEORY)

n − 5 s(n) ∈ Θ(4 n 2 ).

Here Θ signifies an asymptotically tight bound. Yao showed that every nonempty set of nonnegative integers is the score set for some tournament.

5.4 See also

• Oriented graph • Paley tournament • Sumner’s conjecture

5.5 Notes

[1] Bar-Noy & Naor (1990).

[2] Moon (1966), Theorem 1.

[3] Erdős & Moser (1964).

[4] Erdős (1963).

[5] Harary & Moser (1966), Corollary 5b.

5.6 References

• Bar-Noy, A.; Naor, J. (1990), “Sorting, Minimal Feedback Sets and Hamilton Paths in Tournaments”, SIAM Journal on Discrete Mathematics 3 (1): 7–20, doi:10.1137/0403002. • Camion, Paul (1959), “Chemins et circuits hamiltoniens des graphes complets”, Comptes Rendus de l'Académie des Sciences de Paris 249: 2151–2152. • Erdős, P. (1963), “On a problem in graph theory” (PDF), The Mathematical Gazette 47: 220–223, JSTOR 3613396, MR 0159319. • Erdős, P.; Moser, L. (1964), “On the representation of directed graphs as unions of orderings” (PDF), Magyar Tud. Akad. Mat. Kutató Int. Közl. 9: 125–132, MR 0168494. • Graham, R. L.; Spencer, J. H. (1971), “A constructive solution to a tournament problem”, Canadian Mathe- matical Bulletin 14: 45–48, doi:10.4153/cmb-1971-007-1, MR 0292715. • Harary, Frank; Moser, Leo (1966), “The theory of round robin tournaments”, American Mathematical Monthly 73 (3): 231–246, doi:10.2307/2315334, JSTOR 2315334. • Landau, H.G. (1953), “On dominance relations and the structure of animal societies. III. The condition for a score structure”, Bulletin of Mathematical Biophysics 15 (2): 143–148, doi:10.1007/BF02476378. • Moon, J. W. (1966), “On subtournaments of a tournament”, Canadian Mathematical Bulletin 9 (3): 297–301, doi:10.4153/CMB-1966-038-7. • Rédei, László (1934), “Ein kombinatorischer Satz”, Acta Litteraria Szeged 7: 39–43. • Reid, K.B.; Parker, E.T. (1970), “Disproof of a conjecture of Erdös and Moser”, Journal of Combinatorial Theory 9 (3): 225–238, doi:10.1016/S0021-9800(70)80061-8. • Szekeres, E.; Szekeres, G. (1965), “On a problem of Schütte and Erdős”, The Mathematical Gazette 49: 290– 293, doi:10.2307/3612854, MR 0186566. 5.6. REFERENCES 25

• Takács, Lajos (1991), “A Bernoulli Excursion and Its Various Applications”, Advances in Applied Probability (Applied Probability Trust) 23 (3): 557–585, doi:10.2307/1427622, JSTOR 1427622. • Thomassen, Carsten (1980), “Hamiltonian-Connected Tournaments”, Journal of Combinatorial Theory, Series B 28 (2): 142–163, doi:10.1016/0095-8956(80)90061-1. • Yao, T.X. (1989), “On Reid conjecture of score sets for tournaments”, Chinese Sci. Bull. 34: 804–808.

This article incorporates material from tournament on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License. 26 CHAPTER 5. TOURNAMENT (GRAPH THEORY)

5.7 Text and image sources, contributors, and licenses

5.7.1 Text

• Directed acyclic graph Source: https://en.wikipedia.org/wiki/Directed_acyclic_graph?oldid=667264811 Contributors: Damian Yerrick, Bryan Derksen, Ap, Edward, Patrick, Michael Hardy, TakuyaMurata, Delirium, Dcoetzee, Doradus, Greenrd, StevePowell, Zero0000, Marc Girod~enwiki, Jaredwf, MathMartin, Henrygb, Wile E. Heresiarch, Giftlite, Eric S. Raymond, Esap, Mckaysalisbury, Watcher, Trevor MacInnis, Chris Howard, Oskar Sigvardsson, Smyth, Zaslav, MisterSheik, Kwamikagami, Jonon, Mpoloton, Homerjay, Kier- ano, Jesset77, Samohyl Jan, Oleg Alexandrov, Mindmatrix, Sartak, Rjwilmsi, Mathbot, Margosbot~enwiki, RexNL, NavarroJ, Vonkje, Midgley, Trovatore, Zwobot, Stephenbez, Mitchan, Brick Thrower, Kaaphi, Janmarthedal, Bluebot, Nbarth, Colonies Chris, Emre D., Radagast83, Sanya, Wren337, Comps, CRGreathouse, Epbr123, Hannes Eder, Tigga, Deflective, Andreas Toth, David Eppstein, C-sonic, Gambette, Pleasantville, Davehi1, Rei-bot, PaulTanenbaum, Ddxc, Mauritsmaartendejong, Kvihill, ClueBot, Roy.ba, Farisori, Addbot, Calculuslover, Yobot, TaBOT-zerem, Zat'n'ktel, Materialscientist, Frederic Y Bois, Twri, NoblerSavager, Kristjan.Jonasson, IcedNut, DoostdarWKP, Citation bot 1, DrilBot, RjwilmsiBot, SporkBot, AManWithNoPlan, Ort43v, Helpful Pixie Bot, BattyBot, YiFeiBot and Anonymous: 68 • Directed graph Source: https://en.wikipedia.org/wiki/Directed_graph?oldid=667034926 Contributors: Michael Hardy, Booyabazooka, Altenmann, Bkell, Giftlite, Vadmium, Andreas Kaufmann, Zaslav, Grue, Linas, SixWingedSeraph, Chobot, Wavelength, Stepa, Wook- ieInHeat, BiT, Nbarth, Delcypher, Meno25, Was a bee, Kozuch, Headbomb, Hamaryns, JAnDbot, Catgut, David Eppstein, R'n'B, Mar- cuse7~enwiki, M-le-mot-dit, Llorenzi, VolkovBot, HughD, Constant314, TXiKiBoT, Shauncutts, PaulTanenbaum, Rinix, Henry Delforn (old), Justin W Smith, JP.Martin-Flatin, Brews ohare, NuclearWarfare, MystBot, Addbot, Jarble, Luckas-bot, Ptbotgourou, Pcap, Calle, -Anne Bauval, Miym, Corruptcopper, Einkil, Mark Renier, Ricardo Fer ,آرمان ,Dzied Bulbash, Bryan.burgers, Twri, Ms.wiki.us, Xqbot reira de Oliveira, Pierre5018, EmausBot, WikitanvirBot, Sinuhe20, ChuispastonBot, Joerg Bader, Helpful Pixie Bot, Alesiom, Mark viking, Saranavan, Werddemer, SofjaKovalevskaja and Anonymous: 36 • Orientation (graph theory) Source: https://en.wikipedia.org/wiki/Orientation_(graph_theory)?oldid=608529513 Contributors: Rjwilmsi, David Eppstein, JP.Martin-Flatin and Yobot • Strong orientation Source: https://en.wikipedia.org/wiki/Strong_orientation?oldid=607638509 Contributors: Giftlite, Rjwilmsi, Acer, RDBury, David Eppstein, Mastergreg82, Andreschulz and Anonymous: 3 • Tournament (graph theory) Source: https://en.wikipedia.org/wiki/Tournament_(graph_theory)?oldid=657028153 Contributors: XJaM, Booyabazooka, Charles Matthews, McKay, Altenmann, MathMartin, Giftlite, Smjg, Rich Farmbrough, Paul August, Jnestorius, EmilJ, Rjwilmsi, YurikBot, Spiderboy, JohnWheater, Afrozenator, Kinthelt, Dreadstar, ArglebargleIV, Harrigan, Damelch, A3nm, David Epp- stein, Kope, Yecril, SoCalSuperEagle, Wantnot, DumZiBoT, Addbot, DOI bot, Yobot, AnomieBOT, Twri, Miym, MathsPoetry, Citation bot 1, DrilBot, 777sms, Dangling Reference, Svensvenerson, BattyBot, LRBH, Mateusz Konieczny and Anonymous: 26

5.7.2 Images

• File:4-tournament.svg Source: https://upload.wikimedia.org/wikipedia/commons/8/89/4-tournament.svg License: Public domain Con- tributors: Own work Original artist: Booyabazooka • File:8-tournament-transitive.svg Source: https://upload.wikimedia.org/wikipedia/commons/6/6c/8-tournament-transitive.svg License: Public domain Contributors: Own work Original artist: Booyabazooka • File:Commons-logo.svg Source: https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: ? Contributors: ? Origi- nal artist: ? • File:Directed.svg Source: https://upload.wikimedia.org/wikipedia/commons/a/a2/Directed.svg License: Public domain Contributors: ? Original artist: ? • File:DirectedDegrees.svg Source: https://upload.wikimedia.org/wikipedia/commons/7/77/DirectedDegrees.svg License: GFDL Con- tributors: Own work Original artist: Melchoir • File:Directed_acyclic_graph_2.svg Source: https://upload.wikimedia.org/wikipedia/commons/0/03/Directed_acyclic_graph_2.svg Li- cense: Public domain Contributors: Own work Original artist: Johannes Rössel (talk) • File:Directed_acyclic_graph_3.svg Source: https://upload.wikimedia.org/wikipedia/commons/3/39/Directed_acyclic_graph_3.svg Li- cense: Public domain Contributors: • Directed_acyclic_graph_2.svg Original artist: Directed_acyclic_graph_2.svg: Johannes Rössel (talk) • File:Hasse_diagram_of_powerset_of_3.svg Source: https://upload.wikimedia.org/wikipedia/commons/e/ea/Hasse_diagram_of_powerset_ of_3.svg License: CC-BY-SA-3.0 Contributors: self-made using graphviz's dot. Original artist: KSmrq • File:Incidence_matrix_-_directed_graph.svg Source: https://upload.wikimedia.org/wikipedia/commons/5/50/Incidence_matrix_-_directed_ graph.svg License: CC BY-SA 3.0 Contributors: Own work Original artist: Pistekjakub • File:Speakerlink-new.svg Source: https://upload.wikimedia.org/wikipedia/commons/3/3b/Speakerlink-new.svg License: CC0 Contrib- utors: Own work Original artist: Kelvinsong

5.7.3 Content license

• Creative Commons Attribution-Share Alike 3.0