<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../xslt/mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:m="http://www.w3.org/1998/Math/MathML">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Graph Theory: Networking</title>
    <link rel="stylesheet" href="../../css/style_mozilla.css" type="text/css" media="screen"/>
  </head>
  <body>
    <div id="logobarleft">
      <a href="http://links.math.rpi.edu/">
        <img src="../../css/titlebar_left.gif" alt="Project Links Logo"/>
      </a>
    </div>
    <div id="logobarright">
      <img src="../../css/titlebar_right.jpg" alt="Artwork"/>
    </div>
    <div id="titlebar">Graph Theory: Networking</div>
    <div id="breadcrumbbar">
			Home &gt; Graph Theory: Networking
					&gt; Foundations
					&gt; Definitions</div>
    <div id="sidebar">
      <div class="toolmenu1">
        <a href="banana.html" class="toolmenu1">Crib Sheet</a>
      </div>
      <br/>
      <div class="toolmenu2">
        <a href="banana.html" class="toolmenu2">Library</a>
      </div>
      <br/>
      <div class="toolmenu3">
        <a href="banana.html" class="toolmenu3">Help</a>
      </div>
      <br/>
      <div class="toolmenu4">
        <a href="banana.html" class="toolmenu4">Map</a>
      </div>
      <br/>
      <div class="toolmenu5">
        <a href="problemlist.xml" class="toolmenu5">Problem List</a>
      </div>
      <br/>
      <div class="toolmenu5">
        <a href="../index.html" class="toolmenu5">Module Home</a>
      </div>
      <br/>
      <div class="toolmenu6">
        <a href="http://links.math.rpi.edu/" class="toolmenu6">Links Home</a>
      </div>
      <br/>
      <br/>
      <div class="toc_topic">
        <a class="toc_link" href="page1.xml">Introduction</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="page2.xml">Objectives</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="page3.xml">Prerequisites</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Foundations</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page4.xml">Directed Graphs</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page6.xml">Definitions</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page9.xml">Shortest Paths</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Shortest-Path Algorithms</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page11.xml">Problem Variations</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page13.xml">Dijkstra's Algorithm</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page16.xml">Bellman-Ford Algorithm</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Routing</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page19.xml">Overview</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page21.xml">Designing A Routing Protocol</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">Telephone Networks</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page23.xml">Overview</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page25.xml">Routing Strategies</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page26.xml">Costs</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page27.xml">DNHR</a>
      </div>
      <div class="toc_topic">
        <a class="toc_link" href="">The Internet</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page29.xml">Overview</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page30.xml">Distance-Vector Routing</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page33.xml">Link-State Routing</a>
      </div>
      <div class="toc_subtopic">
        <a class="toc_link" href="page37.xml">What's Next?</a>
      </div>
    </div>
    <div id="sectionbar">
      <div id="spacerright" class="spacerright">-</div>
      <div>
        <a href="page6.xml" class="sections">concepts</a>
      </div>
      <div>
        <a href="" class="sectionsgrayed">discover</a>
      </div>
      <div>
        <a href="page7.xml" class="sections">apply</a>
      </div>
      <div>
        <a href="page8.xml" class="sectionshighlighted">collaborate</a>
      </div>
      <div>
        <a href="" class="sectionsgrayed">practice</a>
      </div>
      <div id="spacerleft" class="spacerleft">-</div>
    </div>
    <div id="content"><h1>Definitions</h1>
				<h2>Definitions Associated With Directed Graphs</h2>
				<h2>Theorem</h2>
				<p>
				Let <m:math><m:mi>G</m:mi></m:math> be a <i>labeled digraph</i> with adjacency
				matrix <m:math><m:mi>A</m:mi></m:math> and 
				<m:math>
					<m:msup>
						<m:mi>A</m:mi>
						<m:mfenced>
							<m:mi>k</m:mi>
						</m:mfenced>
					</m:msup>
					<m:mo>=</m:mo>
					<m:mo>[</m:mo>
					<m:msubsup>
						<m:mi>a</m:mi>
						<m:mrow>
							<m:mi>i</m:mi>
							<m:mo>,</m:mo>
							<m:mi>j</m:mi>
						</m:mrow>
						<m:mfenced>
							<m:mi>k</m:mi>
						</m:mfenced>
					</m:msubsup>
					<m:mo>]</m:mo>
				</m:math>
				be the <i>k-power</i> of <m:math><m:mi>A</m:mi></m:math>.
				</p>
				
				<p>
				Then the
				<m:math>
					<m:mfenced>
						<m:mi>i</m:mi>
						<m:mi>j</m:mi>
					</m:mfenced>
				</m:math>-th
				entry of
				<m:math>
					<m:msup>
						<m:mi>A</m:mi>
						<m:mfenced>
							<m:mi>k</m:mi>
						</m:mfenced>
					</m:msup>
				</m:math>
				is the number of directed walks of length <m:math><m:mi>k</m:mi></m:math> from
				<m:math>
					<m:msub>
						<m:mi>v</m:mi>
						<m:mi>i</m:mi>
					</m:msub>
				</m:math>
				to
				<m:math>
					<m:msub>
						<m:mi>v</m:mi>
						<m:mi>j</m:mi>
					</m:msub>
					<m:mfenced>
						<m:mi>i</m:mi>
						<m:mrow>
							<m:mi>j</m:mi>
							<m:mo>=</m:mo>
							<m:mn>0</m:mn>
						</m:mrow>
						<m:mo>…</m:mo>
						<m:mrow>
							<m:mi>p</m:mi>
							<m:mo>-</m:mo>
							<m:mn>1</m:mn>
						</m:mrow>
					</m:mfenced>
				</m:math>.
				</p>
				
				<h2>Proof</h2>
				<p>
				Let us prove it by induction on <m:math><m:mi>k</m:mi></m:math>.
				</p>
				
				<p>
				<b>Base Case:</b> The number of directed walks of length
				<m:math><m:mi>k</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:math>
				is equal to
				<m:math><m:mn>1</m:mn></m:math> iff
				<m:math>
					<m:msub>
						<m:mi>a</m:mi>
						<m:mrow>
							<m:mi>i</m:mi>
							<m:mo>,</m:mo>
							<m:mi>j</m:mi>
						</m:mrow>
					</m:msub>
					<m:mo>=</m:mo>
					<m:mn>1</m:mn>
				</m:math>;
				since 
				<m:math>
					<m:msubsup>
						<m:mi>a</m:mi>
						<m:mrow>
							<m:mi>i</m:mi>
							<m:mo>,</m:mo>
							<m:mi>j</m:mi>
						</m:mrow>
						<m:mn>1</m:mn>
					</m:msubsup>
					<m:mo>=</m:mo>
					<m:msub>
						<m:mi>a</m:mi>
						<m:mrow>
							<m:mi>i</m:mi>
							<m:mo>,</m:mo>
							<m:mi>j</m:mi>
						</m:mrow>
					</m:msub>
				</m:math>,
				the base of the induction
				<m:math>
					<m:mfenced>
						<m:mrow>
							<m:mi>k</m:mi>
							<m:mo>=</m:mo>
							<m:mn>1</m:mn>
						</m:mrow>
					</m:mfenced>
				</m:math>
				holds true.
				</p>
				
				<p>
				<b>Inductive Step:</b> Let the theorem be true for some
				<m:math>
					<m:mi>k</m:mi>
					<m:mo>≥</m:mo>
					<m:mn>1</m:mn>
				</m:math>
				and let us present the entries of
				<m:math>
					<m:msup>
						<m:mi>A</m:mi>
						<m:mfenced>
							<m:mrow>
								<m:mi>k</m:mi>
								<m:mo>+</m:mo>
								<m:mn>1</m:mn>
							</m:mrow>
						</m:mfenced>
					</m:msup>
				</m:math>
				through those of
				<m:math><m:mi>A</m:mi></m:math>
				and
				<m:math><m:msup><m:mi>A</m:mi><m:mi>k</m:mi></m:msup></m:math>.
				</p>
				
				<p>
					Since
					<m:math>
						<m:msup>
							<m:mi>A</m:mi>
							<m:mfenced>
								<m:mrow>
									<m:mi>k</m:mi>
									<m:mo>+</m:mo>
									<m:mn>1</m:mn>
								</m:mrow>
							</m:mfenced>
						</m:msup>
						<m:mo>=</m:mo>
						<m:msup>
							<m:mi>A</m:mi>
							<m:mfenced>
								<m:mi>k</m:mi>
							</m:mfenced>
						</m:msup>
						<m:mo>×</m:mo>
						<m:mi>A</m:mi>
					</m:math>,
					we write
					<m:math>
						<m:msubsup>
							<m:mi>A</m:mi>
							<m:mrow>
								<m:mi>i</m:mi>
								<m:mo>,</m:mo>
								<m:mi>j</m:mi>
							</m:mrow>
							<m:mfenced>
								<m:mrow>
									<m:mi>k</m:mi>
									<m:mo>+</m:mo>
									<m:mn>1</m:mn>
								</m:mrow>
							</m:mfenced>
						</m:msubsup>
						
						<m:mo>=</m:mo>
						
						<m:munderover>
							<m:mo lspace="thinmathspace" rspace="thinmathspace">∑</m:mo>
							<m:mrow>
								<m:mi>n</m:mi>
								<m:mo>=</m:mo>
								<m:mn>1</m:mn>
							</m:mrow>
							<m:mi>p</m:mi>
						</m:munderover>
						
						<m:msubsup>
							<m:mi>a</m:mi>
							<m:mrow>
								<m:mi>i</m:mi>
								<m:mo>,</m:mo>
								<m:mi>j</m:mi>
							</m:mrow>
							<m:mfenced>
								<m:mi>k</m:mi>
							</m:mfenced>
						</m:msubsup>
						
						<m:msub>
							<m:mi>a</m:mi>
							<m:mrow>
								<m:mi>i</m:mi>
								<m:mo>,</m:mo>
								<m:mi>j</m:mi>
							</m:mrow>
						</m:msub>
					</m:math>.
				</p>
				
				<p>
				Since every directed walk of length
				<m:math><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:math>
				consists of a directed walk of length
				<m:math><m:mi>k</m:mi></m:math>
				from
				<m:math>
					<m:msub>
						<m:mi>v</m:mi>
						<m:mi>i</m:mi>
					</m:msub>
				</m:math>
				to
				<m:math>
					<m:msub>
						<m:mi>v</m:mi>
						<m:mi>r</m:mi>
					</m:msub>
				</m:math>
				for some
				<m:math><m:mi>r</m:mi></m:math>,
				followed by an edge
				<m:math>
					<m:mfenced>
						<m:msub>
							<m:mi>v</m:mi>
							<m:mi>r</m:mi>
						</m:msub>
						<m:msub>
							<m:mi>v</m:mi>
							<m:mi>j</m:mi>
						</m:msub>
					</m:mfenced>
				</m:math>,
				we see that the equality above counts all paths of length
				<m:math><m:mi>k</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:math>.
				</p>
			</div>
    <div id="nav">
      <a href="page7.xml" class="nav">back</a>
      <a href="page9.xml" class="nav">next</a>
    </div>
    <div class="copyright">
			Copyright 1999
			Rensselaer Polytechnic Institute. All Rights Reserved.
		</div>
  </body>
</html>

