page527.html
来自「Data Structures And Algorithms With Obje」· HTML 代码 · 共 48 行
HTML
48 行
<HTML><HEAD><TITLE>Labeled Graphs</TITLE></HEAD><BODY bgcolor="#FFFFFF"> <a href="../index.html" target="_top"><img src="../icons/usins.gif" alt="Logo" align=right></a><b>Data Structures and Algorithms with Object-Oriented Design Patterns in Python</b><br><A NAME="tex2html7226" HREF="page528.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7224" HREF="page520.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7220" HREF="page526.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html7228" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H3><A NAME="SECTION0016107000000000000000">Labeled Graphs</A></H3><P>Practical applications of graphs usually require that theybe annotated with additional information.Such information may be attached to the edges of the graphand to the nodes of the graph.A graph which has been annotated in some way is called a<em>labeled graph</em><A NAME=48933> </A><A NAME=48934> </A>.Figure <A HREF="page527.html#figgraph4"><IMG ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A> shows two examples of this.<P><P><A NAME="49107"> </A><A NAME="figgraph4"> </A> <IMG WIDTH=575 HEIGHT=180 ALIGN=BOTTOM ALT="figure48936" SRC="img2225.gif" ><BR><STRONG>Figure:</STRONG> Labeled graphs.<BR><P><P>For example, we can use a directed graph with labeled verticessuch as <IMG WIDTH=18 HEIGHT=23 ALIGN=MIDDLE ALT="tex2html_wrap_inline70825" SRC="img2226.gif" > in Figure <A HREF="page527.html#figgraph4"><IMG ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A>to represent a finite state machine.Each vertex corresponds to a state of the machineand each edge corresponds to an allowable state transition.In such a graph we can attach a label to each vertexthat records some property of the corresponding statesuch as the latency time for that state.<P>We can use an undirected graph with labeled edgessuch as <IMG WIDTH=19 HEIGHT=23 ALIGN=MIDDLE ALT="tex2html_wrap_inline70827" SRC="img2227.gif" > in Figure <A HREF="page527.html#figgraph4"><IMG ALIGN=BOTTOM ALT="gif" SRC="../icons/cross_ref_motif.gif"></A>to represent geographic information.In such a graph, the vertices represent geographic locationsand the edges represent possible routes between locations.In such a graph we might use a label on each edgeto represent the distance between the end points.<P><HR><A NAME="tex2html7226" HREF="page528.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7224" HREF="page520.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7220" HREF="page526.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html7228" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <P><ADDRESS><img src="../icons/bruno.gif" alt="Bruno" align=right><a href="../copyright.html">Copyright © 2003</a> by <a href="../signature.html">Bruno R. Preiss, P.Eng.</a> All rights reserved.</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?