An introduction to

An introduction to Matroids

E.M.VRETTA

Department of Electrical and Computer Engineering, Aristotle University of Thessaloniki

3rd of May 2017

rd E.M.VRETTA | AUTH | 3 of May 2017 1 / 29 An introduction to Matroids Outline of the talk

1 Definition of a Independence axioms Circuit axioms Rank axioms

2 Structures that give rise to matroids Matrices Graphs Signed graphs Transversals Optimization problems

rd E.M.VRETTA | AUTH | 3 of May 2017 2 / 29 An introduction to Matroids | Definition of a Matroid | Independence axioms Definition of Matroids (Independence axioms)

Set system (E, I) is a tuple of a finite set E and a family of subsets of E, I =(Si : i ∈ I ) where the index mapping is φ : I → 2A. An independence system (E, I) is a finite set E together with a collection I of subsets of E closed under inclusion.

Definition (Independence axioms) Given some finite set E, the set system (E, I) is a matroid if the following are satisfied: (I1) ∅∈I, (I2) If I ∈I and I ′ ⊆ I , then I ′ ∈I,

(I3) If I1 and I2 are in I and |I1| < |I2|, then there is an element e of I2 − I1 such that I1 ∪ e ∈I. We write M =(E, I) or simply M if E and I are self-evident.

The members of I are the independent sets of M. Basis is a maximal independent set. A subset of E that is not in I is called dependent.

rd E.M.VRETTA | AUTH | 3 of May 2017 3 / 29 An introduction to Matroids | Definition of a Matroid | Circuit axioms Definition of Matroids (Circuit axioms)

Matroids were introduced by Whitney in 1935 to try to capture abstractly the essence of dependence.

Definition (Circuit axioms) Given some finite set E, the set system (E, C) is a matroid if the following are satisfied: (C1) ∅ ∈/ C,

(C2) If C1, C2 ∈ C and C1 ⊆ C2, then C1 = C2,

(C3) If C1, C2 ∈ C and e ∈ C1 ∩ C2, then there is a member C3 of C such that C3 ⊆ (C1 ∪ C2) − e. We write M =(E, C) or simply M if E and C are self-evident.

E is called the ground set of M. Circuit is a minimal dependent set of M. C is the family of circuits of M.

rd E.M.VRETTA | AUTH | 3 of May 2017 4 / 29 An introduction to Matroids | Definition of a Matroid | Rank axioms Definition of Matroids (Rank axioms)

The rank of a is the dimension of the vector space generated (or spanned) by its columns. The rank of a matrix is defined as the maximum number of linearly independent column vectors in the matrix. matroidal generalization: rank function of a matroid.

Definition (Rank axioms) Let E be a set and r be a function that maps 2E into the set of non-negative integers and satisfies (R1) If X ⊆ E, then 0 ≤ r(X ) ≤ |X |. (R2) If X ⊆ Y ⊆ E, then r(X ) ≤ r(Y ). (R3) If X and Y are subsets of E, then r(X ∪ Y )+ r(X ∩ Y ) ≤ r(X )+ r(Y ). Let I be the collection of subsets X of E for which r(X )= |X |. Then (E, I) is a matroid having rank function r.

rd E.M.VRETTA | AUTH | 3 of May 2017 5 / 29 An introduction to Matroids | Structures that give rise to matroids | Matrices Matroids can arise from matrices

Let E be the set of column labels of an m × n matrix A over a field F, and let I be the set of subsets X of E for which the set of columns is a linearly independent set in the vector space V (m, F). Then M[A]=(E, I) is the vector matroid of A. Consider the matrix over the field R of real numbers:

12345 10011 A =  01001 

M[A]=(E, I) where E = {1, 2, 3, 4, 5} and I = {∅, {1}, {2}, {4}, {5}, {1, 2}, {1, 5}, {2, 4}, {2, 5}, {4, 5}}. C is the set of subsets X of E for which the set of columns is a minimal linearly dependent set in the vector space V (m, F). M[A]=(E, C) where E = {1, 2, 3, 4, 5} and C = {{3}, {1, 4}, {1, 2, 5}, {2, 4, 5}}. r(M[A]) = rank(A)= 2.

rd E.M.VRETTA | AUTH | 3 of May 2017 6 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Graphs

Definition A graph G =(V , E) is an ordered pair of a finite set of vertices V and a set of edges E ⊆ V ∪ V 2. G loop Given two vertices u, v of a graph G we define four types of edges: e = {u, v} is a link, half-edge e = {v, v} is a loop,

e = {v} is a half-edge, link e = ∅ is a loose-edge. V (G) the set of vertices and E(G) the set of edges of G A graph H is a subgraph of a graph G if V (H) and E(H) are subsets of V (G) and E(G), respectively.

rd E.M.VRETTA | AUTH | 3 of May 2017 7 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Walk, Path, Cycle and tree in a graph

v0 − vn walk is an alternating sequence W = {v0, e1, v1, e2,..., vn−1, en, vn} of vertices and edges such that ei = {vi−1, vi }. G v2

e5 e3 v0 e1 e4

e2 v1

rd E.M.VRETTA | AUTH | 3 of May 2017 8 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Walk, Path, Cycle and tree in a graph

v0 − vn walk is an alternating sequence W = {v0, e1, v1, e2,..., vn−1, en, vn} of vertices and edges such that ei = {vi−1, vi }. G A walk with all distinct vertices is called v2 path. e5 e3 v0 e1 e4

e2 v1

rd E.M.VRETTA | AUTH | 3 of May 2017 8 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Walk, Path, Cycle and tree in a graph

v0 − vn walk is an alternating sequence W = {v0, e1, v1, e2,..., vn−1, en, vn} of vertices and edges such that ei = {vi−1, vi }. G A walk with all distinct vertices is called v2 path. e5 e3 A path with the same endvertices is v0 e1 called cycle. e4

e2 v1

rd E.M.VRETTA | AUTH | 3 of May 2017 8 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Walk, Path, Cycle and tree in a graph

v0 − vn walk is an alternating sequence W = {v0, e1, v1, e2,..., vn−1, en, vn} of vertices and edges such that ei = {vi−1, vi }. A walk with all distinct vertices is called G path. e A path with the same endvertices is 5 e3 called cycle. e1 e4 A graph G is connected if for any two

vertices v, w ∈ V (G) there is a v − w e2 path.

rd E.M.VRETTA | AUTH | 3 of May 2017 8 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Walk, Path, Cycle and tree in a graph

v0 − vn walk is an alternating sequence W = {v0, e1, v1, e2,..., vn−1, en, vn} of vertices and edges such that ei = {vi−1, vi }. G A walk with all distinct vertices is called v2 path. e5 e3 A path with the same endvertices is v0 e1 called cycle. e4 A graph G is connected if for any two e vertices v, w ∈ V (G) there is a v − w 2 v path. 1 A tree is a connected acyclic graph.

rd E.M.VRETTA | AUTH | 3 of May 2017 8 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Walk, Path, Cycle and tree in a graph

v0 − vn walk is an alternating sequence W = {v0, e1, v1, e2,..., vn−1, en, vn} of vertices and edges such that ei = {vi−1, vi }. G A walk with all distinct vertices is called v2 path. e5 e3 A path with the same endvertices is v0 e1 called cycle. e4 A graph G is connected if for any two e vertices v, w ∈ V (G) there is a v − w 2 v path. 1 A tree is a connected acyclic graph. A subgraph X of G is spanning if V (X )= V (G).

rd E.M.VRETTA | AUTH | 3 of May 2017 8 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Matroids can arise from graphs

Let E be the set of edges of a graph G and C be the set of edge sets of cycles of G. Then C is the set of circuits of a matroid on E which is called the cycle matroid of G.

Consider the graph G:

G E = {e1, e2, e3, e4, e5}

C = {{e3}, {e1, e4}, e5 e3 {e1, e2, e5}, {e2, e4, e5}} e1 e4 M(G)=(E, C)

e2 I = {X ⊆ E : X does not contain the edges of a cycle of G} M(G)=(E, I) where I = {∅, {e1}, {e2}, {e4}, {e5}, {e1, e2}, {e1, e5}, {e2, e4}, {e2, e5}, {e4, e5}}.

rd E.M.VRETTA | AUTH | 3 of May 2017 9 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Matroids can arise from graphs

Let E be the set of edges of a graph G and C be the set of edge sets of cycles of G. Then C is the set of circuits of a matroid on E which is called the cycle matroid of G.

Consider the graph G:

G E = {e1, e2, e3, e4, e5} v2 e C = {{e3}, {e1, e4}, 5 e v 3 {e , e , e }, {e , e , e }} e 0 1 2 5 2 4 5 1 e 4 M(G)=(E, C)

e2 v1 I = {X ⊆ E : X does not contain the edges of a cycle of G} M(G)=(E, I) where I = {∅, {e1}, {e2}, {e4}, {e5}, {e1, e2}, {e1, e5}, {e2, e4}, {e2, e5}, {e4, e5}}. r(M(G)) = |V (G)| − 1 = 2. a basis of M(G) is the set of edges of a spanning tree of G.

rd E.M.VRETTA | AUTH | 3 of May 2017 9 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Isomorphic matroids

∼ Two matroids are M1 and M2 are isomorphic, written M1 = M2, if there is a bijection ψ from E(M1) to E(M2) such that for all X ⊆ E(M1), the set ψ(X ) is a circuit in M2 iff X is a circuit in M1. G

12345 e5 e3 10011 e1 A = e4  01001 

e2 M[A] =∼ M(G)

Under the bijection ψ : {1, 2, 3, 4, 5} → {e1, e2, e3, e4, e5} defined by ψ(i)= ei , a set X is a circuit in M[A] iff ψ(X ) is a circuit in M(G).

C(M(G)) = {{e3}, {e1, e4}, {e1, e2, e5}, {e2, e4, e5}}. C(M[A]) = {{3}, {1, 4}, {1, 2, 5}, {2, 4, 5}}

rd E.M.VRETTA | AUTH | 3 of May 2017 10 / 29 An introduction to Matroids | Structures that give rise to matroids | Graphs Matrices and Graphs are representations of matroids

A matroid isomorphic to the matroid M[A] for an m × n matrix A over a field F is called F-representable. GF (2)-representable matroids are called also binary.

12345 10011 A =  01001 

GF (3)-representable and GF (4)-representable matroids are called ternary and quaternary, respectively. A matroid isomorphic to the matroid M(G) for a graph G is called graphic matroid.

rd E.M.VRETTA | AUTH | 3 of May 2017 11 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs Signed graphs

Definition () Σ + A signed graph is defined as Σ:=(G, σ) − + − − where G is a graph called the underlying + graph and σ is a sign function + + + σ : E(G) → {±1} where σ(e)= −1 if e is − + + a half-edge and σ(e)=+1 if e is a − loose-edge. + +

A walk W = {e1, e2,..., en} has a sign σ(W ) := σ(e1)σ(e2) ...σ(en). a positive (resp. negative) cycle is a cycle that contains an even (resp. odd) number of negative edges. negative loops and half-edges are considered negative cycles and are called joints.

rd E.M.VRETTA | AUTH | 3 of May 2017 12 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs Signed-graphic matroids

Theorem (Zaslavsky) Given a signed graph Σ let C ⊆ 2E(Σ) be the family of edge sets inducing a subgraph in Σ which is either: (i) a positive cycle, or (ii) two negative cycles which have exactly one common vertex (Tight handcuff), or (iii) two vertex-disjoint negative cycles connected by a path which has no common vertex with the cycles apart from its end-vertices (Loose handcuff).

       +         + +               +      +        + −  + −                                                 + +        +  −          −        − −                   −       + − − − −                                     +  +  +  (a) Positive cy- (b) Tight handcuff (c) Loose handcuff cle

Then M(Σ) = (E(Σ), C) is a matroid on E(Σ) with circuit family C, called signed-graphic.

rd E.M.VRETTA | AUTH | 3 of May 2017 13 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs of a signed graph

The incidence matrix of a signed graph Σ=(G, σ), is a |V (G)|×|E(G)| matrix AΣ ∈ GF (3) with columns ae for each e ∈ E(Σ) defined as follows:

e e v 1 v 2     (i) if e =(v, w) is a positive link then ae is or , w  2  w  1 

e e v 1 v 2     (ii) if e =(v, w) is a negative link then ae is or , w  1  w  2 

e e

    (iii) if e =(v) is a half-edge or e =(v, v) is a negative loop then ae is v 1 or v 2 ,    

(iv) if e =(v, v) is a positive loop then ae = 0, where all the other unspecified elements in the columns are zero.

rd E.M.VRETTA | AUTH | 3 of May 2017 14 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs

A signed graph Σ and its incidence matrix AΣ

A signed graph Σ and its incidence matrix AΣ where negative edges are shown in blue color, and positive edges by solid black color.

Σ e1 v4 e1 e2 e3 e4 e5 e6 e7 e8 e9 e e 2 5 v1 011100000 e6 v2 001000021 e v e   v 4 5 7 v 1 3 A = v3 000010210 Σ   v e 4  110012000  e 9 e   3 8 v5  000201102   

v2 ∼ M(Σ) = M[AΣ]

AΣ is a representation of M(Σ) over GF (3).

rd E.M.VRETTA | AUTH | 3 of May 2017 15 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs Bidirected graphs

An orientation o of a graph G is a mapping that labels the endvertices of its edges with the positive or the negative sign. o : |E(G)|×|V (G)| → {+1, −1}. If o(e, u) = {+1}, the end of the edge e incident to the vertex u is the head of an arrow. If o(e, u) = {−1}, the end of the edge e incident to the vertex u is the tail of an arrow.

Definition (J. Edmonds) −→ A bidirected graph Σ is a signed graph Σ=(G, σ) with an orientation o applied to the underlying graph G such that −o(e, u)o(e, v) = σ(e) for any edge e = {u, v}∈ E(Σ).

Edges with the same sign at their endvertices are called bidirected, while edges with different sign at their endvertices are called directed. positive edges will have end-vertices with different signs (directed) negative edges will have end-vertices with the same sign. (bidirected)

rd E.M.VRETTA | AUTH | 3 of May 2017 16 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs Incidence matrix of a bidirected graph

−→ The incidence matrix of a bidirected graph Σ , is a |V (G)| × |E(G)| matrix A−→ ave ∈ R defined as follows: Σ =( )

+1 if vertex v is the head of the non-loop arc e, −1 if vertex v is the tail of the non-loop arc e,   ave = +2 if vertex v is the head of the loop arc e,  −2 if vertex v is the tail of the loop arc e,   0 otherwise.   Note that in the case of a vertex v being both the tail and the head of a loop arc e, then by the above definition ave = 0.

rd E.M.VRETTA | AUTH | 3 of May 2017 17 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs A bidirected graph and its incidence matrix

−→ The bidirected graph and its associated incidence matrix A−→ so obtained for an Σ Σ orientation of the signed graph Σ

−→ Σ e1 v4 e1 e2 e3 e4 e5 e6 e7 e8 e9 e e 2 5 v1 011100 0 0 0 e6 v2 001000 0 −1 1 e v e   v 4 5 7 v 1 3 A−→ = v3 000 0 1 0 −1 1 0 Σ   v e 4  110 0 1 −10 0 0  e 9 e   3 8 v5  0 0 0 −101 1 0 −1   

v2

A−→ is a represenation of M over R. Σ (Σ)

rd E.M.VRETTA | AUTH | 3 of May 2017 18 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs Binet matrices

Definition −→ Let A−→ be a full row rank incidence matrix of a bidirected graph , R be a basis of it Σ Σ and A−→ R|S . The matrix B−→ R−1S is called a binet matrix. Σ =[ ] Σ =

Applying elementary row operations to A−→ we get Σ

e1 e2 e3 e4 e5 e6 e7 e8 e9

e1 10000 | −2 0 −2 2 e 2  01000 | 1 1 1 −2  e3 00100 | 0 0 −1 1 =[ I |B−→]. (1)   Σ e4  00010 | −1 −1 0 1    e5  00001 | 0 −1 1 0    The matrix B−→ is called the binet matrix of A−→. Σ Σ B−→ is a represenation of M over R. Σ (Σ)

rd E.M.VRETTA | AUTH | 3 of May 2017 19 / 29 An introduction to Matroids | Structures that give rise to matroids | Signed graphs Elementary row operations

Lemma Suppose that the entries of a matrix A are taken from a field F. Then M[A] remains unaltered by performing any of the following operations on A. (i) Interchange two rows. (ii) Multiply a row by a non-zero member of F. (iii) Replace a row by the sum of that row and nother. (iv) Delete a zero row (unless it is the only row). (v) Interchange two columns (moving the labels with the columns). (vi) Multiply a column by a non-zero member of F.

rd E.M.VRETTA | AUTH | 3 of May 2017 20 / 29 An introduction to Matroids | Structures that give rise to matroids | Transversals Matroids occur naturally in scheduling problems

Problem

Assume that a company has m one-employee one-day jobs J1, J2,..., Jm that need to be done. The company has n employees 1, 2,..., n each of whom is qualified to perform some subset of the jobs. The company wants to know the maximum number of jobs the employees can do in one day.

Given some ground set E and a family F =(Si : i ∈ I ) of subsets of E, a transversal of F is a set X ⊆ E of |I | distinct elements such that X ∩ Si =6 ∅, ∀i ∈ I . Given E and F =(Si : i ∈ I ), a transversal of some subfamily (Si : i ∈ J ⊆ I ) is called a partial transversal of F.

Theorem Let F be a collection of subsets of a finite set E and I be the collection of all partial transversals of F. Then (E, I) is a matroid.

denoted by M[F] a matroid isomorphic to M[F] is called transversal.

rd E.M.VRETTA | AUTH | 3 of May 2017 21 / 29 An introduction to Matroids | Structures that give rise to matroids | Transversals ∆(F)

Let E = {1, 2, 3, 4, 5, 6, 7} be the jobs that must be done and F = {{1, 2, 4}, {2, 3, 5, 6}, {5, 6}, {7}} where Si is the set of employees that are qualified to do job Ji . a bipartite graph ∆(F) is associated with F.

1 1 S S 2 1 2 1

3 S2 3 S2 4 4 S3 S3 5 5

6 S4 6 S4

7 7 Figure: Bipartite graph ∆(F) Figure: Transversal

A partial transversal of F corresponds to a matching in ∆(F).

{2, 3, 6, 7} is a transversal because 2, 3, 6 and 7 are in S1, S2, S3, S4, respectively. The maximum number of jobs that can be done in a day is the rank of M[F].

rd E.M.VRETTA | AUTH | 3 of May 2017 22 / 29 An introduction to Matroids | Structures that give rise to matroids | Transversals Regular matroids

A matrix over R for which every square submatrix has determinant in {0, +1, −1} is called totally unimodular (TU). Regular is a matroid that can be represented by a TU matrix. Regular matroids are both binary and ternary.

Theorem (Seymour) Every regular matroid can be constructed using direct sums, 2-sums, and 3-sums begining with graphic matroids, cographic matroids, and copies of R10.

−1 1 0 0 1  1 −1 1 0 0  R10 =  0 1 −1 1 0     0 0 1 −1 1     1 0 0 1 −1

Corollary There is a polynomial time algorithm to determine whether a given real matrix is TU.

rd E.M.VRETTA | AUTH | 3 of May 2017 23 / 29 An introduction to Matroids | Structures that give rise to matroids | Transversals map

GF (4) GF (2)

GF (3) graphic

signed-graphic

regular

rd E.M.VRETTA | AUTH | 3 of May 2017 24 / 29 An introduction to Matroids | Structures that give rise to matroids | Optimization problems Optimization problems

Consider an independence system (E, I) together with a weight function w : E → R+ such that for any X ⊆ E we have

w(X ) = e X w(e). P ∈ General optimization problem on an independence system: max (min) w(X) s.t. X ∈ B

any X ∈ B that solves the above o.p. is called an optimum solution. Many known combinatorial optimization problems can be stated as optimization problems on independence systems, where the objective is to find a minimum (or a maximum) weight basis.

Problem (Maximum Spanning tree) For some weight function w : E → R+ find a spanning tree T of G such that w(E(T )) is maximum. Set E = E(G) and I = {I ⊆ E : I independent set of M(G)}.

Matroids arise naturally in combinatorial optimization since they are presicely the structures for which the greedy algorithm works. rd E.M.VRETTA | AUTH | 3 of May 2017 25 / 29 An introduction to Matroids | Structures that give rise to matroids | Optimization problems Algorithmic definition of matroids

Algorithm:Greedy Input: independence system (E, I), function w : E → R Output: set X ∈ B

1 Sort E such that w(e1) ≥ w(e2) ≥ ... ≥ w(e|E|) 2 X := ∅ 3 for i = 1,..., |E| → 4 if X ∪ {ei }∈I→ 5 X := X ∪ {ei } 6 endif 7 endfor 8 return X

Definition (algorithmic definition of matroids) An independence system (E, I) is a matroid if and only if the GREEDY algorithm is optimal for the maximization problem

max w(X) s.t. X ∈ B

rd E.M.VRETTA | AUTH | 3 of May 2017 26 / 29 An introduction to Matroids | Structures that give rise to matroids | Optimization problems Combinatorial Optimization

a linear programming problem max{cTx : Ax ≤ b, x ≥ 0} where c,x,b and 0 are real 1 × n column vectors and A is a real m × n matrix can be solved in polynomial time. integer linear programming problems: the optimal solution must be integral i.e, have all its coordinates integers.

Theorem The problem: Given an integral matrix A and an integral vector b, does the polyhedron {cTx : Ax ≤ b, x ≥ 0} contain an integral vector x? is N P-complete.

By contrast for an integral polyhedron we have

Theorem (Schrijver) There is a polynomial-time algorithm which, given a rational system Ax ≤ b defining a bounded integral polyhedron and given a rational vector c, finds an optimum solution for the integer linear program max{cTx : Ax ≤ b, x ≥ 0,x integral}.

rd E.M.VRETTA | AUTH | 3 of May 2017 27 / 29 An introduction to Matroids | Structures that give rise to matroids | Optimization problems Combinatorial Optimization

Theorem (Hoffman and Kruskal) Let A be an integral matrix. The polyhedron {x : x ≥ 0, Ax ≤ b} is integral for every integral vector b iff the matrix A is TU.

TU matrices play a central role in combinatorial optimization since they define a class of integer programs that are solved in polynomial time. any integer program whose constraint matrix is TU can be solved as a linear program since the polyhedron is integral.

Theorem (Appa,Kotnyek,Papalamprou, and Pitsoulis) The integer programming problem max{cTx : Bx ≤ b, x ≥ 0, x ∈ Z} where B is an integral binet matrix and b an integral vector can be solved in polynomial time.

Binet matrices are generalizations of TU matrices.

rd E.M.VRETTA | AUTH | 3 of May 2017 28 / 29 An introduction to Matroids | Structures that give rise to matroids | Optimization problems

Thank you!

rd E.M.VRETTA | AUTH | 3 of May 2017 29 / 29