{"id":476,"date":"2007-07-23T19:48:21","date_gmt":"2007-07-23T19:48:21","guid":{"rendered":"http:\/\/scientopia.org\/blogs\/goodmath\/2007\/07\/23\/powers-and-products-of-graphs\/"},"modified":"2007-07-23T19:48:21","modified_gmt":"2007-07-23T19:48:21","slug":"powers-and-products-of-graphs","status":"publish","type":"post","link":"http:\/\/www.goodmath.org\/blog\/2007\/07\/23\/powers-and-products-of-graphs\/","title":{"rendered":"Powers and Products of Graphs"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"hyperproduct.jpg\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_213.jpg?resize=278%2C196\" width=\"278\" height=\"196\" class=\"inset right\" \/><\/p>\n<p> Often, we use graphs as a structured representation of some kind of information. Many interesting problems involving the things we&#8217;re representing can then by described in terms of operations over<br \/>\ngraphs. Today, I&#8217;m going to talk about some of the basic operations that we can do on graphs, and in later posts, we&#8217;ll see how those operations are used to solve graph-based problems.<\/p>\n<p><!--more--><br \/>\n<img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"graph-powers.jpg\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_214.jpg?resize=167%2C274\" width=\"167\" height=\"274\" class=\"inset left\" \/><\/p>\n<p> The easiest thing to describe is exponents of a graph. Given a graph G=(V,E), for<br \/>\nan integer n, G<sup>n<\/sup> is a graph with the same vertices as G, and with edges between<br \/>\ntwo vertices v and w if and only if there is a path between v and w that contains fewer<br \/>\nthan n edges. For a finite graph, after a finite number of steps, increasing the exponent won&#8217;t<br \/>\nchange the graph &#8211; the graph contains edges between any nodes that will ever be connected. That<br \/>\ngraph is called the <em>closure<\/em> of G, written G<sup>*<\/sup>. If G is an undirected,<br \/>\nconnected graph, then G<sup>*<\/sup> will be K<sup>x<\/sup> where x is the number of vertices in G.<br \/>\nFor an example of exponents and closure, see the graph to the left, which shows a graph G, G<sup>2<\/sup>, and G<sup>3<\/sup>. For this graph, G<sup>*<\/sup> is the same as G<sup>3<\/sup>.<\/p>\n<p> The next most common operation &#8211; or in the case of graphs, <em>family<\/em> of operations &#8211; is product. For graphs, there are a variety of different kinds of graph products: cartesian product, lexicographic (or ordered) product, tensor product, and strong product are the most common ones. All of them have the same vertex sets, but they each have different ways of defining the edges.<\/p>\n<p> In all of the graph products, the set of vertices of two graphs G=(V,E) and H=(W,F) is<br \/>\nV&times;W &#8211; that is, the set of pairs of a vertex from V and a vertex from W. So, if G is<br \/>\na graph with vertices{A,B,C,D}, and H is a graph with vertices {1,2,3}, then the set of vertices in the product of G and H<br \/>\nis {(A,1),(A,2),(A,3),(B,1),(B,2),(B,3),(C,1),(C,2),(C,3),(D,1),(D,2),(D,3),}.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"cartesian-product.jpg\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_215.jpg?resize=276%2C303\" width=\"276\" height=\"303\" class=\"inset right\" \/><\/p>\n<p> The cartesian product is the simplest one. For any two vertices (v,w) and (v&#8217;,w&#8217;) in the cartesian product of G and H, then there is an edge between (v,v&#8217;) and (w,w&#8217;) if and only if v=v&#8217;and (w,w&#8217;) is an edge in H, or w=w&#8217; and (v,v&#8217;) is an edge in G. That sounds kind of frightening, but it&#8217;s really<br \/>\npretty straightforward, as you can see by looking at an example. It&#8217;s a straightforward version of<br \/>\nthe basic idea of cartesian product in sets or topologies. The idea of it is basically<br \/>\nthat for any vertex in G, there&#8217;s a copy of H (with edges), and the copies are connected in the structure of G. For example, to the right is a simple pair of graphs &#8211; one with four vertices, and<br \/>\nthe second one with three. Beneath it is a drawing of the cartesian product of the two graphs. The cartesian graph product is commutative and associative, and it&#8217;s normally written as a box: A[]B. (Not quite the right thing, but I couldn&#8217;t find an HTML entity for a hollow square.)<\/p>\n<p><em>(note: there was an error in the original version of the above paragraph, mixing the v&#8217;s and w&#8217;s.)<\/em><\/p>\n<p> One thing that I think is rather cool about the cartesian product is that it preserves hypercubes. A hypercube is, basically, what you get if you take an N-dimensional cube, make each corner a vertex, and then put edges between two vertices in the graph if there&#8217;s a cube edge between the corners corresponding to the two corners. What it means to preserve hypercubes is: if you take the cartesian product of two hypercubes, the result is also a hypercube. The product of a square (a 2-cube) and a line (a 1-cube) is a common three-dimensional cube. The product of two squares is a tesseract &#8211; a 4-cube. There&#8217;s an illustration of the product of two squares laid out and colored as best I can to make the tesseract structure clear up in the header of this post.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"graph-tensor-product.jpg\" src=\"https:\/\/i0.wp.com\/scientopia.org\/img-archive\/goodmath\/img_216.jpg?resize=264%2C244\" width=\"264\" height=\"244\" class=\"inset left\" \/><\/p>\n<p> The tensor product of two graphs has a set of edges that&#8217;s actually easier to understand in the<br \/>\ndefinition, but it&#8217;s a tad harder to understand what it means. The edges are a subset of the edges in<br \/>\nthe cartesian product. In the tensor product, there is an edge between (v,w) and (v&#8217;,w&#8217;) if and only<br \/>\nif (v,v&#8217;) is an edge in G, and (w,w&#8217;) is an edge in H. You can see it as a kind of a join of the edges<br \/>\nin G and H &#8211; an edge between paired vertices only exists if there is an edge between both of the<br \/>\nvertices that make up the pair in the original graph. To the left, there&#8217;s an example of the tensor<br \/>\nproduct for the same pair of graphs as the cartesian product example. The tensor product is also the product in the category of graphs &#8211; which, in some sense, makes it the most fundamental form of the product. (Just to make things confusing, the cartesian product of graphs is <em>not<\/em> not a categorial product, but a tensor.) Tensor product is associative and commutative, and is written using the usual product notation: A&times;B. Tensor product doesn&#8217;t preserve hypercubes, but it does preserve bipartiteness: the tensor product of two bipartite graphs is a bipartite graph. <\/p>\n<p> The lexicographic product looks strange in its definition. But the idea of it is actually<br \/>\nrelatively simple. If you use <em>ordered<\/em> graphs in the lexicographic product, it actually makes<br \/>\na lot of sense. Treat each graph as the definition of a partial order over its sets of vertices. Then<br \/>\nthe lexicographic product is a graph which defines a partial order of the product of the two sets<br \/>\nwhich is consistent with the orderings over the two member sets. To be precise about it, the<br \/>\nlexicographic product of two graphs has an edge between (v,w) and (v&#8217;,w&#8217;) if and only if G contains an<br \/>\nedge (v,v&#8217;), or v=w and (w,w&#8217;) is an edge in H. Lexicographic product is (obviously) not commutative<br \/>\n&#8211; the order in which graphs are combined using lexicographic product is crucial. It&#8217;s<br \/>\ngenerally written like scalar product A*B; it&#8217;s also often called <em>graph composition<\/em>. For<br \/>\nour example graph, the lexicographic product ends up looking the same as the cartesian product.<\/p>\n<p><em>(Note: in the original version of the above paragraph, I wrote that lexicographic product<br \/>\nwas not associative. Of course, it is &#8211; if it weren&#8217;t, then the result of multiple lexicographic products<br \/>\nof ordered graphs couldn&#8217;t possibly be consistent with the orderings of the element graphs. I don&#8217;t know what I was thinking when I wrote that; it&#8217;s a dumb error.)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often, we use graphs as a structured representation of some kind of information. Many interesting problems involving the things we&#8217;re representing can then by described in terms of operations over graphs. Today, I&#8217;m going to talk about some of the basic operations that we can do on graphs, and in later posts, we&#8217;ll see how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[25],"tags":[],"class_list":["post-476","post","type-post","status-publish","format-standard","hentry","category-graph-theory"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4lzZS-7G","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/comments?post=476"}],"version-history":[{"count":0,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/posts\/476\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/media?parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/categories?post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.goodmath.org\/blog\/wp-json\/wp\/v2\/tags?post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}