lnternat. J. Math. & Math. Sci. VoW. 9 No.l (1986) 1-16 CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY RICHARD T. BUMBY Department of Mathematics Rutgers University New Brunswick, New Jersey 08903 and DANA MAY LATCH Department of Mathematics North Carolina State University Raleigh, North Carolina 27650 (Received January 9, 1984) ABSTRACT. This paper presents some graph-theoretic questions from the the portion of category theory which has become common knowledge. viewioint of In particular, the reader is encouraged to consider whether there is only one natural category of graphs and how theories of directed graphs and undirected graphs are related. KEY WORDS AND PHRASES. Category of graphs, algebraic structure. 1980 MATHEMATICS SUBJECT CLASSIFICATION CODES. i. 05C99, 18B99, 18C99. INTRODUCT ION The use of category theory in graph theory is no longer novel (P. Hell [i]), and methods of category theory have been made generally available to the ’Worklng Mathematician". number of MacLane The main category theoretic topics that we need and the section [2] in which they may be found are: adJoint functors (Chap. IV); representable functors (Sect. 111.2); Kan extensions (Chap. IX); functor categories (Sect. II.4); monads (Chap. Vl); and cartesian closed categories (Sect. IV.6). Nevertheless, one can find examples in the literature of errors, imprecision, or laborious constructions of special cases. As a result of reviewing some of this work for Mathematical Reviews, we set ourselves the task of presenting a sound description of some of the material which seemed most susceptible to these flaws. In particular, we wish to answer the question in the title of the paper of Harary and Read [3] with a firm "No’.", and elaborate on defects noted in the reviews of Farzan and Waller [4] and Ribenboim [5] (see also Ribenboim [6]). The concepts of "involutorial graph" and "hom-graph" are defined by Ribenboim without citing any earlier work. This makes it difficult to assess their pedigree. We shall present evidence that, as originally presented, these definitions were wrong since they did not account for the category theoretical properties which have been recognized as essential parts of the algebraic structure and cartesian closedness. with a study of a "category The difficulty of graphs" is that graph theory was born as a branch of R. T. BUMBY AND D. M. LATCH 2 combinatorics which leans towards defining graphs in terms of adjacency properties of a set of vertices, which restrict the available objects and ignores the relations between them, while category theory emphasizes the structure preserving mappings (morphisms) and gives its best results where one is able to construct objects "freely determined by some properties". Our first observation is that directed graphs are easier to describe than undirected graphs. In Section 2, we construct categories which give satisfactory descriptions of a category of directed graphs and which have simple categorical The construction of a category of undirected descriptions (as functor categories). graphs is discussed in Section 3. Second, vertices and edges have traditionally been considered to be different things, but Ribenboim treated vertices as being degenerate edges. In Section 2, we study the relationship between the categories of directed graphs which model these In Section 4, we observe that the "Cartesian" structure has more intuitively satisfying properties when the vertices are considered as degenerate two definitions. edges. Section 3 is devoted to recapturing an undirected graph from one of its canonically generated directed graphs. This process uses the theory of monads which stems from the definition of "algebraic structure" 2. . TWO POSSIBLE DEFINITIONS OF In order to describe a directed graph vertices and a set E of in the context of category theory. "DIRECTED GRAPH" G, one first specifies a set V of Each edge is considered as starting at a vertex, Actually, these (for terminal) from E to V. called its origin and going to another vertex, called its terminal. (for origin) and o assignments define functions t (el,e 2 This definition allows oriented graphs to have multiple e I e2, o(e I) o(e 2) and t(e I) t(e2)) (e e E with and e E with o(e) t(e)). Often, such graphs are excluded in combinatorlal graph theory problems. This definition is equivalent to defining a directed graph as a functor from p (see Figure i) to the category Ens, of sets. the category A_ 1 [011 0 Figure 1. G[0] corresponds to lily, the functions G( Clearly, V and 1):G[l] G[0] The category G[1] and E. to G(6 A Then, without loss of genera- 0):GIll G[0] are the maps and terminal, respectively. If graphs are functors, then the appropriate definition of "graph morphism" should be a natural transformation between these functors. Such a natural transformat ion f:Gl’: G2:AP is given by a map of vertices f[O]:Gl[O] G2[O] Ens and a map of edges with" origin and terminal. Thus a category of directed graphs can be modeled by the functor category [A_P,Ens]. f[l]:Gl[l] G2[I] which "commute CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY 3 By contrast, considering vertices to be "degenerate edges" leads one to view the category of graphs as the functor category [BP,Ens] (see Figure 2). (S I (slo.0 [o] c0 (S O oO(s i ld[0 The Category B Figure 2. H:B_p If H. edges of Ens, H[0] then represents the vertices of H(61):H[I] The functions (i-- 0,1) H[0] and H H[I], and H(0):H[I] HI0] the are again said to be origin and terminal, respectively. In addition, the identities i i I in 0, insure that the function H[I] is an ], o0 H(o0):H[0] _B id[0 embedding of the set of vertices into the set of edges of a loop based at that vertex. H, mapping each vertex to Thus, each vertex can be thought of as a "degenerate edge". [AP,Ens] Since and [BP,Ens] are both examples of functor categories, we are able to use general properties of functor categories to describe the fundamental category-theoretic constructions within each category, and to relate these two candidates for a category of directed graphs. The first principle which we use is that limits and colimits (including the terminal object as a special case of a limit and the initial object as a special case of a colimlt) are computed "pointwise". For example, the null set unique (null) map of [Bp,Ens] Ens is an initial object in into every set. An initial object in since there is a [AP,Ens] or is a graph with no vertices, no edges, and all structural maps null. The null graph is thus essential to a categorical approach. Similarly, since a terminal object of [A__P,Ens] object of ns is any one pointed set, the terminal must have one vertex and one edge which is a loop. [BP,ns], In the unique edge of the terminal object T is degenerate. Thus T the property of representing the vertex set of a graph, i.e., H[O] and the has hom-set p_ [B_ ,Ens] (T,H) are isomorphic as sets, for each graph _[0]:[BP,Ens] ns [BP,ns] (r,_):[BP,Ens] and H. ns In fact, are functors which are naturally equivalent. Since a product in a category is a limit, products in are also computed "pointwise". vertices maps from e[0] P[I] EXAMPLE. vertices (e P[0] and The product P GxG’ [AP,ns] of A-graphs G G[0]xg’[0] and edges PIll G[I]G’[I]. The origin to P[0] are constructed canonically from these maps Suppose from a G to and b and G’ (b,b’) [BP,Ens] G’ has and terminal in G and each have one edge connecting two distinct e’ from a’ to b’, respectively). Then {(a,a’),(a,b’),(b,a’),(b,b’)}; e[l] p(0)(e,e,) and and (see Figure 3). {(e,e’)}; P(61)(e,e’)= (a,a’); G’ R.T. BUMBY AND D. M. LATCH 4 (a,b’) (b,b’) (a,a’) (b,a’) Figure 3. EXAMPLE. H[I]H’[I] Q[I] maps in H Q(60), Q(61) with H’. and H of B-graphs Q The product H Q Q[0] has H[0]H’[0] and constructed from the corresponding H’ and nondegenerate edge, then the product graph H’ and Q(o 0) and In particular, if GxG’ The A-graph each have two vertices and one has four vertices and nine edges, four of which are degenerate (see Figure 4). (a,b’) (b,b’) (a,a’) (b,a’) Figure 4. The B_-graph HH’ [Ap,Ens] Since the same construction can product very different results in and [Bp,fns], it is desirable to be able to relate these t-o categories so that - constructions in one would be naturally "induced" in the other. u:A The inclusion functor For a B-graph p category A B of various vertices B_p. v e as a subcategory of U(H) induces a (forgetful) H to the subfor U(H), the degenerate edges is just the restriction of H(o0)v, In the A_-graph H[0], B [AP,ns]. U:[BP,ns] H, the A-graph of A are no longer distinguished. The restriction of natural transformations gives no difficulty, and it is easy to verify that U:[BP,ns] Because op p :A u B [AP,ns] is actually a U:[BP,Ens] [AP,Ens] p, For each A-graph setting is defined by composition with the inclusion U it induces more structure: L are the Kan extensions by adding to functor. G[l] L(G)(O and . R. , G, L(G), the "B-graph freely generated by a new degenerate edge 0)(v) If formation from the functor defined to agree with f G f:G G’ is an to the functor when "restricted to (e(f)[l])() To see that U:[Bp ns] L: [AP,ns] [Ap Ens] has both left and right adjoints which These are described below. [BP,ns] one for each vertex G", v e is obtained G[0], and A-morphism (i.e., a natural transL(G’) is G’), then L(f):L(G) G" and to satisfy (f[0])(v). is the left adjoint of one shows that there is a natural one-to-one correspondence CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY (G,H):[BP,Ens](L(G),H) for each A-graph G and each B-graph 5 [AP,Ens](G,U(H)) H. This adjoint relationship may also be described in terms of the unit natural transformation ue:[AP,ns] D:Id [AP,ns] or the counit natural transformation <L,U>. of the adjoint pair [B__P,ns] id:[BP,ns] :LU We now construct both natural transformations. The B_-graph L(G) may be restricted to p to give construction, given above, for the UL(G). the A-graph A= G This construction yields G:G the collection of these inclusions UL(G) In fact, this <L,U>. Similarly, G. is natural in collection is the unit natural transformation of the adjunction the counit :LU id H. for each B_-graph is given by describing the LU(H) The graph UL(G)" as a specific subgraph of B=-graph H differs from eH:LU(H) morphism H by the addition of new degenerate edges for each vertex, the old ones having lost their distinction in U(H). The B-graph epimorphism Q new degenerate L added by H H LU(H) is the identity on to the original degenerate edge Next, the adjoint relationship <L,U> and maps each H(o 0)(v) H[I]. in may be verified by demonstrating that the following composites are identity natural transformations: ,qU U U >ULU U L L Lastly, note that neither nor gH aL -LUL G >L can be an isomorphism unless H or G, respectively, is a null graph. The right adjoint R:[AP,Ens] is given as follows: R(G)[0] <Z0,e,l G, R(G) is the B_-graph whose vertex e G[I] with loops of G (i.e. edges for each A-graph is the collection of all G(d I)(Z) G( > 0)()). 0 R(G)[I] The set of edges G of edges of vertex of [BP,:ns] with 0’ Z1 is the collection of all triples loops and G(I)( I) G(0)(1 0,ZI, respectively; i.e. G(0)(e). and an edge having origin the e I’ (R(G))(dl)<0,e,l > 0 and terminal the vertex of i.e. G(60)(0) G(61)(e) <0,e,l > are (R(G))(d0)<O,e,l> i" G(I)( 0) The origin and terminal of and Lastly, the distinguished R(G)-loop at the R(G)-vertex (R(G))(g0)() q:id <,,>. "-RU:[BP,ns]_ H Particularly, i.e. e of qH(e) H [BZP,ns]_ {H(o0)vlv consists of the carries a vertex with origin e H[0]}. H of the v H(o0)(v), v i.e. and terminal <H(g0l)e,e,H(g060)e>. which identifies is <,,>; i.e. The unit natural transformation which is the degenerate loop edge set Clearly, with the full subgraph of _B---mrphlsms B=-graph H to H:H RU(H). the vertex of RU(H) NH(V) H(o0)(v); and H maps an w to the edge <H(g0)v,e,H(g0)w>, H:H RU(H) RU(H) is the B__-monomorphism generated by vertices R. T. BUMBY AND D. M. LATCH 6 e:UR’/Id:[AP,F-ns] The counit of G. eG The A_-morphlsm <o,e,l > G[I]<0,e,I Thus e. is analogously defined to be a UR(G) The vertices of G. are the loops G(O)() G(I)() eG[O]() G(O)() and maps such a loop to its vertex and carries an edge > [Ap,Ens] eG:UR(G) family of A-graph morphlsms e e; i.e. to the edge "compresses" UR(G) G onto the full _A-subgraph of G generated by those vertices having loops. Note that e is an A-graph isomorphism if and only if at each vertex of G, G there is precisely one loop. Similarly, H is a B_-graph isomorphism exactly when H each loop of H(o0)v. is a degenerate loop A isomorphism between the full subcategorles per vertex and 8 U Therefore R and induce an of A_-graphs with exactly one loop of B-graphs with only degenerate loops. These ideas above illustrate the first part of the following theorem whose second part we use later. THEOREM 2 1 (Lambek and Rattray) S X n:id -TS:X functors with unit )._2-y}. ob,ly:ST(, { e V:T be a pair of adjoint V. :ST *id:F {X Fix(TS,) induce an equivalence between Fix(ST,) S:X Let and counit obXlx:X (ii) (iii) (iv) (v) (vi) (TS,r,TS) the triple T _S X_. on is _ idempotent" is a natural isomorphism; (ST,e,ST) the cotriple is idempotent" on is a natural isomorphism" TS:X X ST:- F and and Moreover, the following statements are equivalent (i) T Then TS(X)} factors through the subcategory Fix(TS,)" factors through the subcategory Fix(ST,g). with If these conditions hold, Fix(TS,) is a reflective subcategory of reflector the factorization (v) and Fix(ST,g) is a coreflectlve subcategory of F with coreflector the factorization (vi). See Lambek and Rattray In the example just discussed, PROOF. T:F- [BP,Ens] coreflective fail. v and two loops at RG:RG v. Then RU(RG) RG U:[BP,Ens] [BP,Ens] The [AP,Ens] is Fix(UR,E) to be reflective and Consider 0,%i Theorem i.i. R:[AP,Ens] is the right adjoint Fix(RU,N) [8], S:X_- F__ where G and condition for [Ap,Ens] to be is a graph with one vertex has two vertices {0,I}, each with two loops However, RU(RG) has four vertices, the four loops (2.1). Thus nRG fails to be an isomorphism and condition (ii) above does not hold. In fact, FIx(RU,N) coreflective since the inclusion does not preserve colimlts. __ is not S:X__.._F:T with an adjoint pair Suppose we compose the adjunction adjunction composite the to 2.1 applies then Theorem M: Y of subcategory _F with idempotent cotriple In particular, if Z_ is a reflective -":N (MSTN,g,MSTN), then there is a reflective subcategory X_l of Theorem 2.1 which is equivalent to a coreflective subcategory As an illustration, let generated by all A=-graphs _, Z_l MS:XZ:NT. guaranteed by of Z_. F 1 be the full reflective subcategory of which have at most one loop at each vertex. The left CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY M:[AP,Ens]_ adjoint (usually called the reflector) N maps each At-graph G FI- [A__P,Ens] between G, the same edges vertices as G at each vertex at which [AP,ns] UR:[AP,ns] UR(G I) NG of 1 UR(GI) Note that M:[AP,Ens] F I of the inclusion to the quotient A-graph G 1 with the same distinct vertices, but having only one loop has loops and having no new loops. NG with 1 generated by the vertices of NG to a graph GI I’ F I, has no further effect and yields the full subgraph at which there is a loop. 1 is already in the subcategory Applying I; hence the function URN (GI)’ NG MURN(G I) this construction yields the same graph, up to isomorphism. Iterating I Thus condition (vi) of Theorem 2.1 holds, and all the other equivalent properties (1)-(v) and the conclusions of Theorem 2.1 follow. F of Particularly, the coreflective subcategory consisting of A-graphs with exactly one loop per vertex is equivalent to A of B-graphs with only degenerate loops. Note that I the reflective subcategory and A p Fix(UR,g) U: [Bp ,Ens] [A Fix(RU,q) Ens] :R. for the original adjunctlon Thus it is possible for Fix(TS,q) to be a reflective X_ without the existence of a factorizatlon of TS:X_/ X through (i.e. condition (v) of Theorem 2.1 fails even though part of the conclu- subcategory of Fix(TS,q) sion is still true). 2 A second important subcategory subcategory generated by the simple A_-graph G 2 whenever A_-graphs G with at most one edge from any M:[Ap Ens] 2’ the left adJoint N:F2r-- [A__UP,Ens],-- maps each G(l)e and G A__-graph G, but with edges having the same vertices as G(l)e is the full reflective The reflector particular vertex to another. of the full inclusion [A_P,Ens] of G(O)e G(O)e ’. to the quotient e and e’ Using an argument similar to the one for easily seen to be idempotent. A follows that there exists a reflective subcategory equivalent to a coreflective subcategory 2 [Bp,Ens] of 2 [BP,Ens] I’ 2 is it which is of Theorem 2.1 thus establishes equivalences between subcategorles of and identified Again, the cotriple on [_A_P,Ens] which introduce the combinatorially useful concepts of "absence of (unnecessary) loops" or "characterization of edges by their origin and terminal The "combinatorially interesting graphs" are extracted in a natural way vertices". [AP,ns] from either of the functor categories two possible general definitions of or [BP,Ens]. Thus either of the "directed graph" leads to the same theory. Along the way, though, we have found that the interplay of these generalizations leads to deeper properties than one might have expected. 3. UND IRECTED GRAPHS In combinatorial problems, a graph is simple considered to be one-dimensional Each graph U has a set V(U) of vertice.s, a set E(U) of edges, and complex. I(U) an incidence relation vertices. P(G): V(U) Clearly, a directed the vertices are G[O]; E(U) A_-graph with each edge incident to at most two G can be given this structure, denoted by G[I]; the edges are and the incidence relation is the collection of pairs {(G(60)e,e),(G(61)e,e)le A morphism f:U I U 2 e G[I]} G[O] x G[I]. of undirected graphs is given by a pair of functions, V(f):V(U I) V(U 2) and E(f):E(U I) E(U2), R.T. BUMBY AND DANA MAY LATCH 8 such that incidence is preserved; i.e. Any A__-graph morphism f:G G I "induces" such a pair 2 P(G 2) e(f) :e(G I) commutes with origin and terminal. of functions between undirected graphs since Hence, this construction induces a functor P’[AP,Ens] from the category of A_-graphs to the category The category T I(U2)- E(f)I(U I) (V(f) is not easy T T of undirected graphs. depends on using, within to describe, since it category theory, the notation of a set with at most two elements (to describe the incidence relation I(U)). This difficulty illustrates a difference between the combinatorial and categorical viewpoints in graph theory. The categorical approach searches for general concepts which may be simply described and proceeds from there to particular or special examples" while the combinatorial approach assumes that such The "purity" of the categori- things as multiple edges or loops will be complicated. cal approach aside, it appears necessary to make some arbitrary choices in order to T. obtain a category to model However, we are able to avoid this difficulty by using external relationships (which we expect to exist) between to T. T forgets orientation; hence help "internally" construct The functor p.[oP,ns] P investigate the possibility that OU "intuition" about the category T such that they agree with our and such that there is a natural equivalence (G,U):T(PG,U) /[A_P,ns] (G,OU). Every A_-graph G is determined by the sets edges, respectively, and by the functions G( I) Since [P,Ens] it is reasonable to [P,Ens]. [P,Ens] in and has a right adjoint O:T Thus we search for objects [P,Ens] G[O] and G( and O) (3.i) G[I] of vertices and of origin and terminal. is a functor category, the Yoneda Lemma guarantees that these sets and functions can be naturally described in terms of representable functors; in particular, G[i] [AP,ns] (A(_,[i]),G), i 0,i 3.2 and G[ i] [AP,Ens] (A( ,s i) ,G) i 0,I. The object (actually functor) V -= A=(_, O] p :A which represents vertices has one vertex since identity, and no edges since A([I],[O]) E ns A([O],[O]) is empty. A(_,[I]):Ap consists only of the The object Ens which represents edges similarly has two vertices and one edge joining them. morphisms (natural transformations) S- A( ,61):A(,[0]) i A(,[i]) The CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY 9 and A(_,6 ) :_([o1)-,. __, ,(,[1) T _= V to E edge in m. The subcategory from select the origin and terminal vertices, respectively, of the unique B with morphlsms U For each graph (3.1) and (3.2). T and A’ The set of vertices of (OU) [0] Since graph V functor, PV is the graph in PV U of PV. T:V OU - (OU)[O] [_._op,=,,] (v,ou) = T(PV,U). E by using both which is naturally P:[AP,ns] U T is a forgetful A T-morphism to be the image of the unique vertex is given by the set U. T(PE,U). The A==-morphism T(PT,U):T(PE,U) T(PV,U). The undirected graph PE vertices; thus T(PT,U) restricts a morphism with domain induces a map has one edge and two OU is identified with the set of vertices of OU E [AP, ns] (A(_, [0] ). OU) is given by selecting a vertex of Thus structure of [AP,Ens](V,OU) is with one vertex and no edges. Similarly, the edge set of and A. has one vertex and no edges, and T V consisting of objects T, we can determine the in T(PV,U): isomorphic to [AP,Ens] of is isomorphic to to one of these vertices. If vertex v U of is incident to edge PE e, then there is a T-morphism f :PE/U such that the unique edge of designated by PE PT:PV PE is mapped to is mapped to and such that the vertex of e PE v. We expect that this description above would determine the morphism uniquely. First, if incident with it; and second vertex of incident with PE. e is a proper edge, then f :PE e U f e has precisely one other vertex e should have this vertex as the image of the Second, if is a loop, then there is only one vertex e e; and both vertices of PE must be mapped to v. v Note that these assignments establish a natural equivalence between (OU)[I] T(PE,U) and I(U) V(U) x E(U). In addition, the terminal map (ou) (o) (ou) [1] I(U) is given by the natural projection of on (ou) [o] V(U). To complete the description of the directed graph OU, it is necessary to give the origin map (ou) (l) (ou) [1] (ou) [o]. The argument given above to justify the identification of a construction of (OU)(I); i.e. (OU)(61)(v,e) Iv’; [ if (v’,e) T(PE,U) I(U), v’ # with I(U) is v v; otherwise This construction uses the difficult to either one or two vertices". naturall[ describe notion "is incident with The existence of the adjolnt relationship <P,O> R. T. BUMBY AND D. M. LATCH 10 demands that the construction of the origin be natural. op simple functor category adjoint pair of algebras Ens] of A-graphs Hence we will exploit the use the assumed existence of an <P,O>, and apply the general theory of monads F which will be a functor category model to construct a category [yP,Ens] T. for As a first step, we give a description of the monad (or .triple) M <T,,U> p which results from the assumed existence Ens] of the [h adjunction <P O> in For each h-graph rG[O] G[O] Of(G) G, TG TG[I] and is described using the above discussion. Zo " rG[l] G[I]’’I (G) where G[I] IC( O) (e) {e I(G) [hus - TG( O) G[O]’G[O] TG[O] I) (e) }, the se__t (3 3) o__f loops of G. The universal are used to give a description of origin TG( I) to reflect the above construction of OP:[AP,Ens] T TC(60)’IG[I] G( ns properties of the pushout in and terminal Hence, is given as the pushout TG[O] [AP,Ens]. is the composition of the identification with the function in G( O) (t) while TG(I):TG[I] C(6 I) in (3.4). TG[O] is defined similarly by interchanging G( O) and <P,O>, The unit of the adjunction "-r:[Ap,ns] :id [AP,Ens], is given by ld:G[O] rG[O] TG[O], of diagram (3.3), for each A_-graph TG(I)’ G and G. ]a: <P,O>. pair V( U) M T2"-T:[AP,ns] is constructed from the counit For each graph Id:V(PO(U)) V(U). U, cu-PO(U) The set U construction of the equivalence (G,U) :T(PG,U)-leads to the function to I(K): E(u):E(PO(U)) I(PO(U)) in E(U) PO(U) TG( O) G. [AP,Ens] :PO is the E(PO(U)) above discussion, just the incidence relation The incidence relation _ TG[1] Clearly, from the definition of is an A-graph morphism natural in The muitiplicat ion of the monad -= Zo:G[1 rG[1 and id:T- T of the adjoint identifying map on vertices, of edges of I(U) V(U) PO(U) is, from the E(U). A sketch of the [AP,[ns] (G,OU) being the projection I(U) E(U). can be given as a pushout with a map CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY id I (Pou) (u) (u) ,i (3.5) I (U)" t where is a U E(U). edge in U "twist" map which chooses the other element of I(U) over the same In the context of the monad M, the above constructions lead to the pushout description (3.6) for the multiplication NG:T2G TG: id TG[I]-2 T .W’ G[I] / rG[l] (3.6) GIll. (3.7) t TG[I] t:TG[I] where is defined by z I Z(G) G[l z Note that TG[I] t:TG[I] TG[O] G[O] id:G[O] together with does not define an A-graph morphism, but The axioms for a monad (see MacLane 0 <Id’G[I]>:T2G G TG on vertices is in [AP,Ens]._ [2], VI.I) are now easily verified; in p particular, the constructions are clearly "natural in G" G e [A Ens] An alsebra <T,,> M for the monad [Ap,Ens] lying category, which is is defined as an object X of the under- in this case, together with a morphism h:TX X such that diagrams (3.8) commute: T2X X nX Th TX h 0 Nx[O] (3.8) h TX Since > TX X X X (TX[0] id:X[O] of (3.3), we construct h:TX X X[O]) and hN X with DX[I]:X[I id x TX[I] is the map from the pushout (3.9): ld X[] TX[I] x X[l] (3.9) []/zl____ b The requirement that h:TX X be an A-graph morphism forces the map b:X[l] X[I] X(6 l-i) :X[l] X[O] i 0,i) Furthermore the restriction b/Z(X) must be the "identity" inclusion (X) X[I]. The commuting of the first diagram of (3.8) reduces, in this case, to the statement that to reverse orientation (i.e., x(i)b R.T. BUMBY AND D. M. LATCH 12 X[I] b:X[l] has b i.e., b 2 Id:X[l] X[I]" is an involution. Thus the concept of graph with involution arises naturally from the concept of unoriented graph; in fact, it provides an algebraic realization of this concept. category M monad T I in the base category. In addition, the Kleisli construction uses the monad T 2 which is essentially the category of free algebras. [AP,Ens],_ same as those of functions The of M-algebras always has a pair of adjolnt functors which induce the to describe a category but there are additional morphisms in <fo,fl >, fo:G[O] f M g’[l] T 2. G’[O]:fiG[1] T The objects of are the 2 Any pair of T 2. which preserve incidence (rather than origin and terminal) is a morphism of In general, the category of all algebras (in our case, T I) is a terminal object Adj(M) of adjoint pairs which induce the monad M, and the Kleisli in the category T 2) construction (in our case [2] (VI.5, functor of MacLane T every algebra in T, The unique is isomorphic to a free algebra in I Thus, T I categories are equivalent. of Adj(M). is initial in :T 2 Theorem 3) is both full and faithful. T2 and (T2)" TI Furthermore, hence, the two are, essentially, equally good models and they are canonically chosen from all categories inducing the monad T The category T but the category 2 has other advantages. I M. is perhaps closer to our original idea of unoriented graphs Observe that A__-graphs [c_P,Ens]) C_-graph (object in can be naturally extended to a with involution C with pictured in Fig. 5. [o]-.---. T61 60 T0 Figure 5. The category [cP,ns] T of algebras U C__-graphs of the set of edges fixed by easy to show that T I 6I T 2 Id The category C M defined by the monad satisfying U(T) e} {elU(r)e {elU(60)e U(61)e} is precisely the set of all loops of is a reflective subcategory of I is the full subcategory of TI reflector, the left adjoint to the inclusion of [C_p,ns]. into U. i.e., It is Construct the [cP,Ens],_ by passing U, having the same vertices as U, having the same edges between distinct vertices of U, but having (U). U(r)e identified with e for each loop e weaker than isomorphism. In particular, is of categories Note that equivalence from a given C_-graph the comparison map II:ITml :T 2 TII to a new C-graph U T I UI, a quotient of is not an isomorphism of categories, i.e., the object However, the notion of equiva- is not one-to-one and onto. lence appears to be more appropriate than isomorphism for modeling a theory. Hence, there is only one "useful" model up to equivalence, but two different approaches to that model. We may also form a corresponding theory for B-graphs starting from an orientation-forgetful functor P’:[Bp Ens] T’ CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY T The category of algebras M ties to the monad for a monad I [AP,Ens], in M’ [BP,Ens], in 13 with similar proper- may be described by introducing an "involution". These algebras approximate the "involutional graphs" of Ribenboim [5]. Of course, if a graph admits more than one involution, each involution defines a different algebra. (The original definition required only the existence of an involution in the hope of defining a subcategory of [BP,Ens] into the algebraic structure in Ribenboim Ribenboim [5,6] [6].) but the involution was incorporated Curiously, the definition in also requires that an edge fixed by involution be degenerate. (3.10) The requirement (3.10) is incorporated naturally into the program developing the monad M’ by having H[I] play the role of the inclusion H(oO):H[O]- (G):’ G[I] of (3.3) in the definition of H[O] the common composition r’H(i):T’H[l] r’H[0], is the analog of The category category H[l] 0 (Note that the mapping [5], T’H[I]. With this change, :T’T’H[I] H’ T’H(o 0) is (3.3); and in the analog of 0,i, is given as in (3.4). i of (3.3), and z (3.6) and (3.7). (cf. Ribenboim T’H[I] NH[I]:H[I] Again, T’H[I] T’H[I] is constructed as in in general, is not as isomorphism p. 159).) T [DP,ns], I M’ of all algebras for the monad where D in [BP,Ens]_ is the is depicted in Figure 6. 61 o [o].__.w[ 60 oOO 0I oO T 0 61 60 id 61 T60 Figure 6. The category D The corresponding Kleisli construction yields a category TI; equivalent to rather the free algebras in T2 T2 which is not are characterized by (3.10). Thus the original definition of involutorlal graph was designed to select a subcategory of T I subcategory of equivalent to TI p_ [DJ ns] T 2. It is also curious that (3.10) defines a which is both reflective and coreflective Also, consider the Kan extensions of the functors induced by the inclusions B-D and A’’C. In particular, the forgetful functor U:[DP,ns] and its left adjoint (i.e., left-Kan extension) induce the monad 4. [BP,ns] M. CATEGORIES OF GRAPHS ARE CARTESIAN CLOSED A benefit of viewing a category of graphs as a functor category is that any functor category [xP,Ens], for small X is cartesian closed (see Freyd [9], p. 8). The proof of this result is constructive; i.e. an algorithm is provided for com- puting the "internal-Hom Hom(Y,Z) functors. is also an object in If Y, Z [xP,Ens], are objects in [Xp,ns], whose evaluation at object p then of X is defined by: Hom(Y,Z)(p) [xP,Ens] (X(_,p) x Y,Z). (4.1) R. T. BUMBY AND D. M. LATCH 14 Thus, for our examples, we give the representable functors X(_,[i]):X2 p for A, B, C or D. X and 0,I i ns depicts the directed graphs given Figure by these representable functors. x(,[0]) C B A X id[0 6 x(_,[]) id [0] ld [.] td[t]OoO 6 Hom(Y,Z) in The set of vertices is given by [AP,Ens] (A(_,[O]) Hom(Y,Z)[O] A(_,[O]) is a graph with one vertex and no edges. y "coordinatewise", A(_, [0] A(_,[I]) Y[O] has vertices Hom(Y,Z)[O] The graph to i__ As an example of the use of formula (4.1), we construct But Od[o] Representable functors Figure 7. [AP,Ens]. D Since products are computed and n_9_o edges. Thus ns(Y[O],Z[O]). has one edge joining two vertices. the same number of edges as Y,Z). Thus Y, but twice as many vertices. A(,[i]) Y has The structural maps satisfy 6i(<id>,e) Thus Hom(Y,Z)[I] is identified with Ell], s:Y[O] Z[O], t:Y[O] <r:Y[l] (<6i>,ie) the set of all triples of functions Z[O]> for which diagrams (4.2) commute r r Y[I] Z[I] Y (61) Y[0] The origin, Hom(Y,Z)(61), the terminal, Y[I] >Z[l] $ZZ[O](61) Y[O]y (60) Z[O] z[60]s - (4.2) t is given by Hom(Y,Z)(60), <r,s,t>-s by <r,s,t>--t. EXAMPLE. Y[O] Z[O] If Y is discrete, i.e. Y[I] , then Hom(Y,Z) has all functions as vertices and has a unique edge joining each pair of vertices. In general, the set of edges joining points s,t Hom(Y,Z)[0] is given by the set of functlo=s r:Y[l] satisfies the property (4.1), it seems to have little relation to graph adJoint Z[I] satisfying (4.2). Although this construction homorphisms. Next, consider [BP,Ens]. vertex and one edge; so that From Figure 7, it is clear that B(,[0]) has one CATEGORICAL CONSTRUCTIONS IN GRAPH THEORY _B(_,[O]) Thus, Hom(Y ,Z) [O] Y. is the set of B_-graph morphisms: - Hom(Y,Z)[0] Hom(Y,Z)[I] Z[I]- s:Y Z; t’Y Each "edge" of <r:Y[l] Y 15 [BP,Ens](B(_,[0]) [BP,Ens] (Y,Z). Y,Z) is represented by a triple Z>, where s and t are B_-graph morphisms for which (4.3) is commutative: (4.3) As before, <r,s,t>-s Hom(Y,Z) gives the origin of and <r,s,t>-t defines the terminal. If s and terminal and t t are given, then the set of edges of The definition of Horn graph in Ribenboim [5], given. Z[I] with origin r to s satisfying (4.3). p. 165, was in this spirit. for no apparent reason, only the restriction of that definition. Hom(Y,Z) r:Y[l] is indexed by those functions Y(0)y[0] However, entered into In Ribenboim [6], p. ii0, a totally different definition was Again, it was an explicit construction, and again there was no claim of naturality. The idea was that the edges should be indexed by the functions r:Y[l] Z[I] of our definition. The difficulty is that (4.3) determines only s[0] and t[0], so that the vertices could only be the equivalence classes of "graph homomorphlsms restricting to the same functions on vertices". By contrast, our construction is no more cumbersome than these two attempts, but the underly general principle is quite simple and guarantees the Horn will have the proper adjoint relation to cartesian product. Our internal Hom-functor has the usual properties of Hom in ns in particular, there is a composition o:Hom(Y,Z) The realizations of vertices in Hom(Y,Z)[I] as triples <r,s,t> Hom(W,Y) Hom(Y,Z)[0] Hom(W,Z). as graph homomorphisms and of are compatible with the composition (4.4). The composition (4.4) induces a natural monoid structure on invertible elements of called Hom(W,W) (4.4) Hom(W,W). are selected, the resulting subgraph is a If the group Aut(W). The various reflective subcategorles constructed in Section 2 and Section 3 in the discussion of categories of graphs sould be cartesian closed. In fact, the following proposition gives an easy computation of Hom in many cases. R. T. BUMBY AND D. M. LATCH 16 PROPOSITION. Suppose F full reflective inclusion with pair). in Then R is a cartesian closed category and R:F F’ I:F’ the reflector (i.e., <R,I> F A preserves products iff for all and B is a adjolnt ’, Hom(A,B) is F’ PROOF. REMARK. See Freyd [9; p. 13]. The reflective subcategory 2 does not satisfy this property; however ACKNOWLEDGEMENT. AI A2 of [P,Ens]_ constructed in Section does. We give special thanks to F. E. J. Linton for his advice during Thanks are also due to M. L. Gardner, P. Hell and the writing of this paper. S. MacLane for their encouragement and useful conversations. REFERENCES i. HELL, P. 2. MACLANE, S. 1971. 3. HARARY, F. and READ, R.C. 4. FARZAN, M. and WALLER, D.A. Kronecker Products and Local Joins of Graphs, Canad. J. Math. 29 (1977), 255-269, MR 55#2625. RIBENBOIM, P. Graphs with Algebraic Structures, Report to the Algebra Group, Queens Papers in Pure and Applied Math. 36, Queens University (1973), 155-184. 5. An Introduction to the Category of Graphs (in Topics in Graph Theory, New York, 1977) Ann. New York Acad. Sci. 328 (1979), 120-136. Categories for the Working Mathematician, Springer-Verlag, New York, Is the Null Graph a Pointless Concept?, Graph Theory and Comblnatorics, Springer-Verlag, 1973, 37-44. 6. RIBENBOIM, P. 105-123. 7. MACDONALD, J. and STONE, A. Topoi Over Graphs, Cahiers Topologie Geom. Differentiable 25 (1984), 51-62. LAMBEK, J. and RATTRAY, B.A. Localization and Duality in Additive Categories, Houston J. Math. i (1975), 87-100. FREYD, P. Aspects of Topoi, Bull. Austral. Math. Soc. 7 (1972), 1-76. 8. 9. Algebralc Structures on Graphs, Algebra Unlversalls 16 (1983),