page528.html

来自「Data Structures And Algorithms With Obje」· HTML 代码 · 共 34 行

HTML
34
字号
<HTML><HEAD><TITLE>Representing 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="tex2html7235" HREF="page529.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7233" HREF="page520.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7229" HREF="page527.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html7237" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H2><A NAME="SECTION0016110000000000000000">Representing Graphs</A></H2><P>Consider a directed graph  <IMG WIDTH=73 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70549" SRC="img2166.gif"  >.Since  <IMG WIDTH=73 HEIGHT=26 ALIGN=MIDDLE ALT="tex2html_wrap_inline70559" SRC="img2169.gif"  >,graph <I>G</I> contains at most  <IMG WIDTH=25 HEIGHT=28 ALIGN=MIDDLE ALT="tex2html_wrap_inline70835" SRC="img2228.gif"  > edges.There are  <IMG WIDTH=29 HEIGHT=17 ALIGN=BOTTOM ALT="tex2html_wrap_inline70837" SRC="img2229.gif"  > possible sets of edgesfor a given set of vertices  <IMG WIDTH=11 HEIGHT=12 ALIGN=BOTTOM ALT="tex2html_wrap_inline70551" SRC="img2167.gif"  >.Therefore,the main concern when designing a graph representation schemeis to find a suitable way to represent the set of edges.<P><BR> <HR><UL> <LI> <A NAME="tex2html7238" HREF="page529.html#SECTION0016111000000000000000">Adjacency Matrices</A><LI> <A NAME="tex2html7239" HREF="page530.html#SECTION0016112000000000000000">Sparse vs. Dense Graphs</A><LI> <A NAME="tex2html7240" HREF="page531.html#SECTION0016113000000000000000">Adjacency Lists</A></UL><HR><A NAME="tex2html7235" HREF="page529.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7233" HREF="page520.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7229" HREF="page527.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A>  <A NAME="tex2html7237" 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 &#169; 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 + -
显示快捷键?