📄 9.4.2.htm
字号:
<html>
<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>
<BODY>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.4.1_2.htm'" ></td>
<td>
<img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.4.2_2.htm'" ></img></td>
</tr>
</table>
<br><br>
<font class="title2"><b>9.4.2 自然循环</b></font>
<table>
<tr>
<td>    </td>
<td class="content">
<p>
必经结点信息的一个重要运用是确定流图中合适于改进的循环。这样的循环有两个基本性质:
</p>
<p>
1、循环必须有唯一的入口点,叫做<font class = "definition2">首结点</font>。
</p>
<p>
2、至少有一种办法重复循环,也就是至少有一条路径回到首结点。
</p>
<p>
寻找流图中所有循环的一个好办法是找出流图的回边(<font class = "definition2">回边</font>:如果有a dom b,那么边b→a叫做回边。)
</p>
<p><img align=right src="images/9_17.gif">
<font class = "example">例9.8</font> 看图9.18的流图中有哪些回边。<br>
<p>
结点4 dom 7,所以7→4是回边。
</p>
<p>
类似地: 10→7是回边 <br>
            4→3是回边 <br>
             8→3是回边 <br>
             9→1是回边 <br>
</p>
<p>
有了回边的定义,这里给出自然循环的定义:给出一个回边n→d,我们定义这个边的自然循环是d加上所有不经过d能到达n的结点。d是这个循环的首结点。
</p>
<p>
例如,在图9.18的流图中,回边10→7的自然循环由结点7,8和10组成,因为8和10是所有能够到达10而不经过7的结点。回边9→1的自然循环是整个流图。(不要忘记路径10→7→8→9)
</p>
</td>
</tr>
</table>
<br>
<table align=right width=300>
<tr>
<td>
<img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.4.1_2.htm'" ></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='9.4.2_2.htm'" ></td>
</tr>
</table>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -