page530.html
来自「Data Structures And Algorithms With Obje」· HTML 代码 · 共 52 行
HTML
52 行
<HTML><HEAD><TITLE>Sparse vs. Dense 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="tex2html7260" HREF="page531.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7258" HREF="page528.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7252" HREF="page529.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html7262" HREF="page611.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="../icons/index_motif.gif"></A> <BR><HR><H3><A NAME="SECTION0016112000000000000000">Sparse vs. Dense Graphs</A></H3><P>Informally, a graph with relatively few edges is <em>sparse</em>,and a graph with many edges is <em>dense</em>.The following definition defines precisely what we meanwhen we say that a graph ``has relatively few edges'':<P><BLOCKQUOTE> <b>Definition (Sparse Graph)</b> A <em>sparse graph</em><A NAME=49154> </A><A NAME=49155> </A> is a graph <IMG WIDTH=73 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70549" SRC="img2166.gif" > in which <IMG WIDTH=82 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70933" SRC="img2244.gif" >.</BLOCKQUOTE><P>For example, consider a graph <IMG WIDTH=73 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70549" SRC="img2166.gif" > with <I>n</I> nodes.Suppose that the out-degree of each vertex in <I>G</I> issome fixed constant <I>k</I>.Graph <I>G</I> is a <em>sparse graph</em> because <IMG WIDTH=133 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70945" SRC="img2245.gif" >.<P>A graph that is not sparse is said to be <em>dense</em>:<P><BLOCKQUOTE> <b>Definition (Dense Graph)</b> A <em>dense graph</em><A NAME=49162> </A><A NAME=49163> </A> is a graph <IMG WIDTH=73 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70549" SRC="img2166.gif" > in which <IMG WIDTH=89 HEIGHT=28 ALIGN=MIDDLE ALT="tex2html_wrap_inline70949" SRC="img2246.gif" >.</BLOCKQUOTE><P>For example, consider a graph <IMG WIDTH=73 HEIGHT=24 ALIGN=MIDDLE ALT="tex2html_wrap_inline70549" SRC="img2166.gif" > with <I>n</I> nodes.Suppose that the out-degree of each vertex in <I>G</I> issome fraction <I>f</I> of <I>n</I>, <IMG WIDTH=67 HEIGHT=25 ALIGN=MIDDLE ALT="tex2html_wrap_inline70961" SRC="img2247.gif" >.For example, if <I>n</I>=16 and <I>f</I>=0.25,the out-degree of each node is 4.Graph <I>G</I> is a <em>dense graph</em> because <IMG WIDTH=147 HEIGHT=28 ALIGN=MIDDLE ALT="tex2html_wrap_inline70971" SRC="img2248.gif" >.<P><HR><A NAME="tex2html7260" HREF="page531.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="../icons/next_motif.gif"></A> <A NAME="tex2html7258" HREF="page528.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="../icons/up_motif.gif"></A> <A NAME="tex2html7252" HREF="page529.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="../icons/previous_motif.gif"></A> <A NAME="tex2html7262" 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 + -
显示快捷键?