📄 content-4-1-1.htm
字号:
<p style="line-height: 150%"> x(R<img border="0" src="Image/bing.gif" width="14" height="14">S)y<img border="0" src="Image/dengjia.gif" width="17" height="9">(xRy)<img border="0" src="Image/xiqu.gif" width="9" height="15">(xSy)</p>
</li>
<li>
<p style="line-height: 150%"> x(R<img border="0" src="Image/jiao.gif" width="14" height="15">S)y<img border="0" src="Image/dengjia.gif" width="17" height="9">(xRy)<img src="image/hequ.gif" width="9" height="11">(xSy)</p>
</li>
<li>
<p style="line-height: 150%"> x(R-S)y<img border="0" src="Image/dengjia.gif" width="17" height="9">(xRy)<img src="image/hequ.gif" width="9" height="11"><img border="0" src="Image/fei.gif" width="10" height="5">(xSy)</p>
</li>
<li>
<p style="line-height: 150%"> x(~R)y<img border="0" src="Image/dengjia.gif" width="17" height="9"><img border="0" src="Image/fei.gif" width="10" height="5">(xRy)</p>
</li>
</ul>
<p style="line-height: 150%"> </p>
<p style="line-height: 150%"><b>7、二元关系的表示</b></p>
<p style="line-height: 150%"><b> </b>关系是一种集合,因而集合的表示方法均可用于表示关系(如谓词逻辑),此外,还可以用关系矩阵和关系图来描述一个关系。</p>
<p style="line-height: 150%"> <b>a)关系矩阵</b></p>
<p style="line-height: 150%"> 设集合A={a1,a2,…,an},B={b1,b2,…,bn},R时一个从A到B的二元关系,如果矩阵<img src="Image/mr.gif" width="22" height="15" >=[<img src="Image/rij1.gif" width="12" height="13">]中
</p>
<div align="center">
<center>
<table border="0" width="40%">
<tr>
<td width="16%" rowspan="2"><img src="Image/rij1.gif" width="12" height="13">=</td>
<td width="84%">0, 若 <img border="0" src="Image/fei.gif" width="10" height="5">(ai
R bj)</td>
</tr>
<tr>
<td width="84%">1, 若 (ai R bj)</td>
</tr>
</table>
</center>
</div>
<p style="line-height: 150%">则称<img src="Image/mr.gif" width="22" height="15">为R的关系矩阵。
</p>
<p style="line-height: 150%"> <b>例:</b>设A={1,2,3,4},B={1,2,3},A到B的二元关系R={<x,y>|x>y},求<img src="Image/mr.gif" width="22" height="15" >。
</p>
<p style="line-height: 150%"> R={<x,y>|x>y}={<4,1>,<4,2>,<4,3>,<3,1>,<3,2>,<2,1>}
</p>
<div align="center">
<center>
<table border="0" width="34%" cellpadding="0" cellspacing="1">
<tr>
<td width="25%" rowspan="4">
<p align="center"><img src="Image/mr.gif" width="22" height="15">=</td>
<td width="25%" style="border-left-style: solid" align="center">0</td>
<td width="25%" align="center">0</td>
<td width="25%" style="border-right-style: solid" align="center">0</td>
</tr>
<tr>
<td width="25%" style="border-left-style: solid" align="center">1</td>
<td width="25%" align="center">0</td>
<td width="25%" style="border-right-style: solid" align="center">0</td>
</tr>
<tr>
<td width="25%" style="border-left-style: solid" align="center">1</td>
<td width="25%" align="center">1</td>
<td width="25%" style="border-right-style: solid" align="center">0</td>
</tr>
<tr>
<td width="25%" style="border-left-style: solid" align="center">1</td>
<td width="25%" align="center">1</td>
<td width="25%" style="border-right-style: solid" align="center">1</td>
</tr>
</table>
</center>
</div>
<p style="line-height: 150%">
</p>
<p style="line-height: 150%"> <b>b)关系图</b>
</p>
<p style="line-height: 150%"> 设R是A上的二元关系,则R的关系图可表示为G(A,R),G中的点与集合A中的元素相对应,如果有<<img src="Image/xi.gif" width="10" height="11">,<img border="0" src="Image/xj.gif" width="13" height="13">><img border="0" src="image/shuyu.gif" width="13" height="11">R
(<img border="0" src="Image/xi.gif" width="10" height="11">,<img border="0" src="Image/xj.gif" width="13" height="13"><img border="0" src="image/shuyu.gif" width="13" height="11">A),则从<img src="Image/xi.gif" width="10" height="11">到<img border="0" src="Image/xj.gif" width="13" height="13">用带箭头的直线或者弧线画一条线,若有<<img src="Image/xi.gif" width="10" height="11">,<img src="Image/xi.gif" width="10" height="11">><img border="0" src="image/shuyu.gif" width="13" height="11">R,则在<img src="Image/xi.gif" width="10" height="11">处画一条自封闭的直线。
</p>
<p style="line-height: 150%"> <b>例:</b>设A={1,2,3,4},R={<4,1>,<1,2>,<2,2>,<3,3>},则该关系的关系图为:
</p>
<p style="line-height: 150%" align="center"><img border="0" src="Image/gxt1.gif" width="154" height="126">
</p>
<p style="line-height: 150%" align="center">
</p>
<p style="line-height: 150%" align="left">
通常,两个集合之间元素的二元关系用关系矩阵来表示,一个集合内部元素的二元关系用关系图直接给出。
</p>
<p style="line-height: 150%" align="center">
</p>
<p style="line-height: 150%" align="center">
</p>
<p style="line-height: 150%" align="center">
</p>
</td>
</tr>
</table>
<p style="line-height: 150%" align="center"> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -