第四章 二元关系

Click here to load reader

Upload: wylie-hancock

Post on 31-Dec-2015

27 views

Category:

Documents


3 download

DESCRIPTION

第四章 二元关系. 关系: 人与人的关系有朋友关系,上下级关系,父子关系,同学关系。两数之间有大于、小于、等于关系,还有整除、同余关系。两个变量有函数关系等。 关系描述个体之间相互联系。 关系的数学概念是建立在日常生活中关系的概念之上的 。. 例如 ,设 A ={ a , b , c , d } 是某乒乓球队的男队员集合, B ={ e , f , g } 是女队员集合 。如果 A 和 B 元素之间有 混双配对关系 的是 a 和 g , d 和 e 。 我们可表达为: R ={< a , g > , < d , e >} - PowerPoint PPT Presentation

TRANSCRIPT

PowerPoint




A×B={<x,y>|x∈A∧y∈B}
={<a,e><a,f><a,g><b,e><b,f><b,g><c,e><c,f><c,g><d,e><d,f><d,g>}
Discrete Mathematics
ABCα,β,γ,δAαδ Bγ Cαβ
R={<A, α>,<A, δ>,<B, γ>,<C, α >,<C, α>}
{A,B,C}{α,β,γ,δ}
Discrete Mathematics
(3)
An


<x3,y1>∈Rx3Ry1x3y1R
“=”“”“”<3,5>∈35
ARBR
Discrete Mathematics
x(R∪S)y⇔ xRy∨xSy
x(R∩S)y ⇔ xRy∧xSy
Discrete Mathematics
ABAB2mnAB2mn
A=BA2n2
Discrete Mathematics
A AA
(1) AAAA
(2) AAAAAAAAUA UA={<a,b>aA∧bA}
(3)A={<a,a>aA}A
Discrete Mathematics
UA={<0,0>,<0,1>,<0,2>,<1,0>,<1,1>,<1,2>,<2,0>,<2,1>,<2,2>}
UAA
Discrete Mathematics
LA={<a,b>a,bA∧a≤b}
LA ={<1,1>,<1,2>,<1,3>,<2,2>,<2,3>,<3,3>}
2 B={1,2,3,4,5,6}BDB={ <a,b>a,bB∧baN}
DB={<1,1>,<1,2>,<1,3>,<1,4>,<1,5>,<1,6><2,2>,<2,4>,<2,6>,<3,3>,<3,6>,<4,4>,<5,5>,<6,6>}
baN“ab”“ba”“ba”
Discrete Mathematics
R={<a,b>( a-b)/2Z∧a,bA}

“2”a=b(mod2)
Discrete Mathematics


4 Aρ(A)R={<u,v>uρ(A)vρ(A)uv}
A={a,b}, ρ(A)={ ,{a},{b},A}
R={<,{a}><,{b}><,><,A><{a},{a}><{a},A}><{b},{b}><{b},A><A,A>}
Discrete Mathematics
R={<a,b>a/b}
R={<a,b>a,b}
R={<2,2><3,3><4,2><4,4><5,5><6,2><6,3><6,6>}
R={<a,b>(a-b)2A}R={<2,4><3,5><4,6><4,2><5,3><6,4>}
R={<a,b>a/b}R={<4,2><6,3><6,2>}
R={<a,b>ab}R=EA-A25-5
R={<a,b>a,b}
R={<2,3><2,5>,<3,2><3,4><3,5><4,3><4,5><5,2><5,3><5,4><5,6><6,5>}
Discrete Mathematics
RABRmn
rij =0<ai,bj>R
RA
Discrete Mathematics
R={<a,x>,<a,z>,<b,y>,<c,z>,<d,y>}
|A|=4|B|=3,
MR4×3
Discrete Mathematics
Discrete Mathematics
RABm+na1,…,amb1,…,bn()
<ai,bj>Raibj,bj<ai,bj>RR
RAma1,…,am(2m),<ai,ai>Rai
Discrete Mathematics
R={<a,x>,<a,z>,<b,y>,<c,z>,<d,y>}
R
a
b
c
d
x
y
z


2 A={1,2,3,4}R={<1,1>,<1,2>,<2,3>,<2,4>,<4,2>}AR
{1,2,3,4} <1,1>,<1,2>R11(1)12
Discrete Mathematics
R={<a,b>a/b}
R={<a,b>a,b}
A,B,CRABSBCRSAC,RS
R S={<x,z>xA∧zC∧yB<x,y>R,<y,z>S}
Discrete Mathematics
1 A={1,2,3,4,5}B={3,4,5}C={1,2,3}
R={<x,y>|x+y=6}={<1,5>,<2,4>,<3,3>}RAB
S={<y,z>y-z=2} ={<3,1>,<4,2>,<5,3>} SBC
Discrete Mathematics
RS={<1,3>,<2,2>,<3,1>}
:
Discrete Mathematics
R={<a,b>,<c,d>,<b,b>}S={<d,b>,<b,e>,<c,a>}
R S={<a,e>,<c,b>,<b,e>}
S R={<d,b> ,<c,b>}
R R={<a,b>,<b,b>}
Discrete Mathematics
<2> A=CRSASRB
<3> A=B=CRSARSS RAR SS R
Discrete Mathematics
RABMRm×n
SBCMSn×p
R SAC
×
Discrete Mathematics
0S={<d,b>,<b,d>,<c,a>,<a,c>}
MR= MS=
MS R= MS×M R =
R S={<a,d>,<b,d>,<c,b>}
S R={<a,d>,<c,b>,<d,b>}
Discrete Mathematics
(1). R(S∪T)=R S∪R T
(2). R(S∩T) R S∩R T
(3). (S∪T) U=S U∪T U
(4). (S∩T) U S U∩T U
Discrete Mathematics
⇔ y∈B<x,y>∈R∧<y,z>∈S∪T
⇔ y( <x,y>∈R∧(<y,z>∈S∨<y,z>∈T))
⇔ y(<x,y>∈R∧<y,z>∈S)∨
y(<x,y>∈R∧<y,z>∈T)
⇔ <x,z>∈R S∨<x,z>∈R T)
⇔ <x,z>∈R S∪R T
R S∪R T= R (S∪T)
Discrete Mathematics

RSTABBCCD (R S) T = R (S T)
Discrete Mathematics
z∈C<x,z>∈R S∧<z,w>∈T
y∈B<x,y>∈R∧<y,z>∈S∧<z,w>∈T
<x,y>∈R∧<y,w>∈S T
<x,w>∈R (S T)
R (S T)( R S) T
(R S) T = R (S T)
Discrete Mathematics
(1). R0 =AAR0={<x,x>|xA}
(2). Rn+1=Rn R

Discrete Mathematics
1 Rm Rn=Rm+n (
2(Rm)n=Rmn (
Rm R0
Rm Rk+1
Rm (Rk R)
(Rm Rk) R
Rm+k+1
(R S)n≠Rn Sn
(R S)2=(R S) (R S)=R (S R) S
R2 S2=R R S S=R (R S) S

R
R1=R
R3=R2 R={<1,2><2,1><1,4><2,3><2,5>}
R4= R3 R1={<1,1><2,2><1,5><2,4><1,3>}
R5=R4 R1={<1,2><1,4><2,1><2,3><2,5>}
Discrete Mathematics
R3
R4
3
1
2
4
5
3
1
2
4
5
3
1
2
4
5
3
1
2
4
5
|A|=nR A×Aij∈N
0≤ij≤2n2Ri=Rj
|A×A|=n2ρ(A×A)=
A
AR A×Aij∈Nij
Ri=Rj
. k,m∈NRi+md+k=Ri+k(d=j-i);
. n∈N Rn ∈{R0,R1,…,Rj-1};
(1) Ri+kRi RkRj RkRj+k
(2)mm=0 Ri+0*d+kRi+k
Ri+nd+kRi+kdj-im=n+1
Ri+(n+1)d+k
Ri+nd+d+k
Ri+k+j-i
RGGRnGG GGxiGxinxjG xixjG'
Discrete Mathematics


2R-1 R

Discrete Mathematics
4(R-S)-1=R-1-S-1;
5(R)-1= R-1;
7-1=;
Discrete Mathematics
<b,a>∈R ∧<b,a>∈S
<a,b>∈R-1 ∧ <a,b>∈S-1
(R-S)-1=(R∩S)-1=R-1∩(S)-1
=R-1∩S-1=R-1-S-1

R-1BA S-1CB
<x,z>(R S)
y(yB∧<z,y>S–1∧ <y,x>R–1)
<z,x> S–1 R–1
(R S)–1S–1 R–1
<z,x>S–1 R–1
yB,<z,y>S–1∧<y,x>R–1
y(yB<x,y>R∧<y,z>S)
<x,z>R S
(R S)–1= S–1 R–1
Discrete Mathematics
Discrete Mathematics
A={a,b,c}
R2={<a,b><b,c><c,a>}R2
R3={<a,a>,<b,c>}R3<b,b><c,c>R3<a,a>R3
2RR
Discrete Mathematics
∴R
∴<x,x>∈R∴R
Discrete Mathematics
∴ N
Discrete Mathematics
∴<a,a>∈R∩S∴R∩S
RSR∪SR∴IARR∪S∴R∪S
nA
|A|=n|A×A|=n2nA2n(n-1)
Discrete Mathematics

RAa,b∈A<a,b>∈R<b,a>∈RRR
A={1234}
R1{<1,1><2,3><3,2>}R1
R2{<1,1><3,3>}R2
R3<3,1>∈R<1,3>R
Discrete Mathematics
<2> <a,a><b,b>RR
RZ5,R
(y-x)/5 - (x-y)/5 ∈Z
∴i,jrijrji=1
,UAA
Discrete Mathematics
R1R<b,a>∈R∴R
Discrete Mathematics
R<a,b>∈R∴R1R
<a,b>∈RR
RR1
RST
<a,b>∈R∪S<a,b>∈R<a,b>∈S
R,S<b,a>∈R<b,a>∈S
<b,a>∈R∪SR∪S
Discrete Mathematics

RAa,b∈R<a,b>∈R<b,a>∈RabR
:
<1>
a,b∈Aa≠b<a,b>∈R<b,a>R
<2>“a≠b<a,b>R<b,a>∈R”
Discrete Mathematics
R{<a,a>,<b,b>}
S{<a,b>,<a,c>}
xyx≠yyxR
Discrete Mathematics
R
∴AR


a,b∈Aa≠b<a,b>∈R∩S,
<a,b>∈R<a,b>∈SRS
∴<b,a>R<b,a>S
Discrete Mathematics
<1> RSRS
R{<a,b>}S{<b,a>}RS, RS{<a,b>,<b,a>}
<2>
R{<a,b>,<b,a>,<a,c>}, R{<a,a>,<c,c>}
<3>AUA
Discrete Mathematics

RAa,b,c∈A<a,b>∈R<b,c>∈R<a,c>∈RRR
1 R1{<z,x>, <x,y>, <z,y>}R
R2{<a,b>,<c,d>}
R3{<a,b>,<b,a>}R3 <a,b>∈R<b,a>∈R<a,a>,<b,b>RR
Discrete Mathematics
2 DNN
x,y,z∈N<x,y>∈DN<y,z>∈DNxyyzxz<x,z>∈DN
3 ρ(A)
4 ≤
UAA
)axR
R={<a,b>,<b,c>,<c,d>,<a,c>} adbd<a,d>R<b,d>R∴R,<a,d>,<b,d>R

a,b,cA<a,b>R1 <b,c>R1
<c,b>R<b,a>RR,
<c,a>R <a,c>R1
R1
RSRS
R={<a,b>},S={<b,c>}RSRS={<a,b>,<b,c>}
Discrete Mathematics
Discrete Mathematics
(3). (3)R
Discrete Mathematics
s(R)={<a,a>,<a,b>,<b,a>,<b,c>,<c,b>}
t(R)={<a,a>,<a,b>,<b,c>,<a,c>}
Discrete Mathematics
R={<a,b>,<b,a>,<b,c>,<c,d>,<d,e>}
r(R) s(R) t(R)
RRA , RA
RRR R
<a,b>RA<a,b>R<a,b>A
<a,b>RRR <a,b> R
<a,b>Aa=b<a,a>AR <a,b>R <a,b>R
RAR 2

<a,b>RR-1
<a,b>R∨<a,b>R-1
2. <a,b>R-1<b,a>R<b,a>R
R <a,b>R
RR-1R
r(R)={<1,2>,<2,3>,<3,2>,<3,3>,<2,2>,<1,1>}
s(R)={<1,2>,<2,3>,<3,2>,<3,3>,<2,1>}
t(R)=R{<1,3>,<2,2>}
t(R=∪Ri=RR2…Rn
Rk Rxky<x,y> Rk
t(R)Rxyxy
Discrete Mathematics
Discrete Mathematics
S={<a,b>,<b,c>,<c,d>}t(R)t(S)

t(R)=R{<a,d>}
t(S)=S{<a,c>,<b,d>,<a,d>}
Discrete Mathematics
RA
xA<a,x>Rk∧<x,b>R
RkR<b,x>R∧ <x,a> Rk
<b,a>RRk=Rk+1 Rk+1
<a,b>t(R)=∪Rii<a,b> Ri Ri<b,a>Rit(R)
t(R)
(1) <a,b><b,c>r(R)=RA
<a,b><b,c>A<a,b>Aa=b<a,c>=<b,c>r(R)
abc<a,b>R <b,c>RR<a,c>Rr(R)
r(R)
s(R)={<a,b>,<b,a>,<c,b>,<b,c>}
s(R)<a,a>,<b,b>,<c,c>,<a,c>,<c,a>
Discrete Mathematics
(1) sr(R)=s(R∪IA)= (R∪IA) ∪ (R∪IA) –1
= (R∪IA) ∪ R–1 ∪IA
=(R∪ R–1 ) ∪IA
4.4

RARRAx,yA<x,y>R(R)xyx~y

Discrete Mathematics
(3).Rabb cacacac
Discrete Mathematics
R={<x,y>|x,yA∧x =y(mod3)}x =y(mod3)xy3x-y3RA
14725836
Discrete Mathematics
n=5
Discrete Mathematics
(2)
RAAA
RAaA [a]R={x|xA∧xRa}
[a]RaRa[a]
a[a]RRRR
Discrete Mathematics
[3]=[3]R={3,6}= [6]R;
R3
(2).xRy[x] = [y]
(3). [x]∩[y]=
(4)A1
1AR
2 (1) AUAAx A[x] =AA/ EA={A}
Discrete Mathematics
A/ IA ={{x}| x A}
(3) Zk
[1]={kz+1|zZ} =kZ+1
[2]= {kz+2|zZ} =kZ+2 ……
[k-1]= {kz+k-1|zZ} =kZ+k-1
{[0], [1], [2],…, [n-1]}
Discrete Mathematics
Discrete Mathematics
Discrete Mathematics

AA
Discrete Mathematics
R={1,4}×{1,4}∪{2,5,6}×{2,5,6}∪{3,3}×{3,3}
={<1,1>,<1,4>,<4,1>,<4,4>,<2,2>,<2,5>,<2,6>,
<5,2>,<5,5>,<5,6>,<6,2>,<6,5>,<6,6>,<3,3>}
2 A={1,2,3 }A
πiRi (i=1,2,..,5)
R5=IA; R1 =UA
R4={<1,2>,<2,1>}∪IA

Aππ′Aπ′ππ′ππ′π Ππ

π1 π1
Discrete Mathematics
ππ1π2 π1•π2
(2).πA
π1π2π
(2). t(R1∪ R2)π1+π2
4.5

RARRAR≤<a,b>∈≤a≤b“ab”
“≤”≤
R
R
(2) xy ∈Axy,yx,xy
<x,y>∈DA ,<y,x>∈DA , xyDA
(3) x,y,z∈A<x,y>∈DA ,<y,z>∈DA ,xyyzxz,
∴<x,z>∈DA , D A

RARRAR<a,b>∈R,ab“ab”
A{1,2,3,4}RA
R{<2,1>,<3,1>,<3,2>,<4,1>,<4,2>,<4,3>}
<3,1>∈R31“3<1”“31”“”
Discrete Mathematics
a,b∈Aa≠b<a,b>∈R<b,a>∈R
R∴<a,a>∈R<b,b>∈R
R
∴R

(3).a≤bb≤ca≤cab,bc,ac
Discrete Mathematics
<1,3>,<1,4>,<1,5>,<1,6>,<2,4>,<2,6>,<3,6>}
DA

1≤41≤22≤412241416
4≤55≤445
1468
Discrete Mathematics
≤={<a,c>,<c,e>, <a,e>, <a,d>, <d,e>, <b,c>,<b,e>,
<b,d>, <f,g>}∪A
(1). b∈Bx∈Bx≤bbB
(2). b∈Bx∈Bb≤xbB
Discrete Mathematics
∴b1b2
A
5
3
1
2
4
6
:
Discrete Mathematics
B B
BxxBx
(1). B1={2,4,6,12}
(3).B3={2,3,4,6,12,30}B3 123023
Discrete Mathematics
(A,≤)BA
(3).C={b|bB}CB
(4).D={b|bB}CB
Discrete Mathematics
(1). B1={1,2,3,6}612243060B166
(2). B2={1,2,3, 6,15}3060120B230 B2 30B2
(3). B3={12,30,60}601201236
Discrete Mathematics
4.6
RARRAx,yA<x,y>R(R)xyxy

Discrete Mathematics
(2). CRbCaC<a,b>RCR