markdown
関係の合成と閉包md dcd89d7
lecture/math/discrete-math/関係の合成と閉包-講義.n.md
Download PDF

関係かんけいrelation合成ごうせいcomposition閉包へいほうclosure

date2026-06-06description関係の合成を、二段階の到達可能性として導入し、反射閉包・対称閉包・推移閉包を、何を最小限追加する操作かとして整理する講義である。prerequisites関係の基本 / 直積集合の基本type講義statusactiverelateddata/lecture/math/discrete-math/離散数学ポータル-講義.n.md / data/lecture/math/discrete-math/関係の基本-講義.n.md / data/lecture/math/discrete-math/同値関係と分割-講義.n.md / data/lecture/math/discrete-math/半順序関係と全順序関係-講義.n.md / data/exercise/math/discrete-math/関係と同値関係-基本演習.n.mdrelateddata/lecture/math/discrete-math/離散数学ポータル-講義.n.md
mathdiscrete-mathrelation-compositionclosurelecture

Composition合成ごうせい and closure閉包へいほう of relations関係かんけい

1導入どうにゅう

関係かんけいrelation一回いっかいだけ確認かくにんするのではなく、「関係かんけいつづけて使つかうとどこへ到達とうたつできるか」をあつかいたい場合ばあいがある。たとえば、えきどうしの直通ちょくつう関係かんけいあたえられたとき、えをゆるせばどこへけるかをりたい。この発想はっそう関係かんけいrelation合成ごうせいcompositionである。

閉包へいほうclosureは、ある性質せいしつpropertyたすために不足ふそくしている順序対じゅんじょついordered pair最小限さいしょうげん追加ついかする操作そうさである。

合成ごうせいcompositionでは「1 かいける」ことと「何回なんかい使つかえばける」ことを区別くべつする。閉包へいほうclosureもと関係かんけいrelationふくんだまま性質せいしつたすようにするので、既存きそん順序対じゅんじょついordered pairうしなわれない。

1Introduction

Sometimes we do not want to check a relation関係かんけい only once; we want to know where repeated use of the relation can reach. For example, if direct train connections are given, we may want to know what stations are reachable with transfers. This idea is composition合成ごうせい of relations.

A closure閉包へいほう is an operation that adds the minimum missing ordered pairs順序対じゅんじょつい needed to satisfy a property性質せいしつ.

2用語ようご定義ていぎ合成ごうせいcomposition

RA×BSB×C関係かんけいrelationとする。合成関係ごうせいかんけいcomposite relation SRA×C

a(SR)cあるbBが存在してaRbかつbSc

定義ていぎする。これは「a から bRすすみ、b から cSすすめる」ことをあらわす。

2Terms and definition: composition合成ごうせい

Let RA×B and SB×C be relations関係かんけい. Define the composite relation合成関係ごうせいかんけい SRA×C by

a(SR)cthereexistsbBsuchthataRbandbSc.

This says that we can move from a to b by R and then from b to c by S.

3用語ようご定義ていぎ恒等関係こうとうかんけいidentity relation逆関係ぎゃくかんけいinverse relation

A うえ関係かんけいrelation Rたいして、恒等関係こうとうかんけいidentity relation

ΔA={(a,a)aA}

く。逆関係ぎゃくかんけいinverse relation R-1

R-1={(b,a)(a,b)R}

である。

3Terms and definitions: identity relation恒等関係こうとうかんけい and inverse relation逆関係ぎゃくかんけい

For a relation関係かんけい R on A, the identity relation恒等関係こうとうかんけい is written

ΔA={(a,a)aA}.

The inverse relation逆関係ぎゃくかんけい R-1 is

R-1={(b,a)(a,b)R}.

4閉包へいほうclosureとはなに

反射閉包はんしゃへいほうreflexive closureは、反射性はんしゃせいreflexivityたすために必要ひつよう(a,a)追加ついかした関係かんけいrelationである。

Rref=RΔA

対称閉包たいしょうへいほうsymmetric closureは、逆向ぎゃくむきの順序対じゅんじょついordered pair追加ついかした関係かんけいrelationである。

Rsym=RR-1

推移閉包すいいへいほうtransitive closureは、aRbbRc から必要ひつようになる aRcかえ追加ついかした最小さいしょう推移的すいいてきtransitive関係かんけいrelationである。

4What is closure閉包へいほう?

The reflexive closure反射閉包はんしゃへいほう adds the self-pairs (a,a) needed for reflexivity反射性はんしゃせい.

Rref=RΔA

The symmetric closure対称閉包たいしょうへいほう adds reverse ordered pairs順序対じゅんじょつい.

Rsym=RR-1

The transitive closure推移閉包すいいへいほう is the smallest transitive推移的すいいてき relation関係かんけい obtained by repeatedly adding pairs aRc forced by aRb and bRc.

5方針ほうしん

閉包へいほうclosureつくるときは、「性質せいしつたすまでなに追加ついかするか」を追跡ついせきする。ただし、もと関係かんけいrelationこわしてはいけない。閉包へいほうclosure削除さくじょではなく追加ついか操作そうさである。

ここで経路けいろpathとは、aRbbRc のように関係かんけいrelation矢印やじるし有限回ゆうげんかいつづけて辿たどれつである。有向ゆうこうグラフdirected graphというは、げんelementてん順序対じゅんじょついordered pair矢印やじるしとしてえが見方みかただけをす。

反射閉包はんしゃへいほうreflexive closure対角成分たいかくせいぶん追加ついかし、対称閉包たいしょうへいほうsymmetric closure矢印やじるし逆向ぎゃくむきにも追加ついかし、推移閉包すいいへいほうtransitive closure経路けいろ到達とうたつできるさき直接ちょくせつ関係かんけいrelationとして追加ついかする。

最小さいしょう追加ついかminimal additionであることも閉包へいほう一部いちぶである。つまり、もと関係かんけいrelationふくみ、もとめる性質せいしつたすどの関係かんけいrelationにも、閉包へいほう追加ついかした順序対じゅんじょついordered pairふくまれる。

5Strategy

When constructing a closure閉包へいほう, track what must be added until the desired property性質せいしつ holds. The original relation関係かんけい must not be destroyed. A closure is an adding operation, not a deleting operation.

Here a path経路けいろ means a finite chain that follows relation arrows, such as aRb and then bRc. The term directed graph有向ゆうこうグラフ means only the viewpoint of drawing elementsげん as points and ordered pairs順序対じゅんじょつい as arrows.

The reflexive closure反射閉包はんしゃへいほう adds diagonal pairs, the symmetric closure対称閉包たいしょうへいほう adds reverse arrows, and the transitive closure推移閉包すいいへいほう adds direct relation pairs for destinations reachable by paths.

Being a minimal addition最小さいしょう追加ついか is also part of closure. That is, every relation関係かんけい that contains the original relation and satisfies the desired property must contain the ordered pairs順序対じゅんじょつい added by the closure.

6直感的ちょっかんてき説明せつめい

関係かんけいrelation有向ゆうこうグラフとしてると、合成ごうせいcompositionは 2 ほん矢印やじるしつづけてすすむことである。推移閉包すいいへいほうtransitive closureは、何本なんぼんかの矢印やじるし辿たどって到達とうたつできるなら、直接ちょくせつ矢印やじるし追加ついかしたものとかんがえられる。

この見方みかたでは、推移閉包すいいへいほうtransitive closure到達可能性とうたつかのうせい記録きろくする関係かんけいrelationである。もと関係かんけいrelationは「1 ける」、推移閉包すいいへいほうtransitive closureは「なにかでける」をあらわす。

経路けいろpathながさでかんがえると、反射閉包はんしゃへいほうreflexive closureながさ 0 の移動いどうゆるし、推移閉包すいいへいほうtransitive closureせいながさの経路けいろ到達とうたつできるさき直接ちょくせつ関係かんけいとしてくわえる。

6Intuitive explanation

If a relation関係かんけい is viewed as a directed graph, composition合成ごうせい means following two arrows in sequence. The transitive closure推移閉包すいいへいほう can be thought of as adding a direct arrow whenever a destination is reachable by following some number of arrows.

In this view, the transitive closure is the relation関係かんけい that records reachability. The original relation means “reachable in one step,” while the transitive closure means “reachable in some positive number of steps.”

In terms of path length, the reflexive closure反射閉包はんしゃへいほう allows movement of length 0, while the transitive closure推移閉包すいいへいほう adds destinations reachable by paths of positive length as direct relation pairs.

7例題れいだい推移閉包すいいへいほうtransitive closureつく

7.1問題もんだい

A={1,2,3} うえ関係かんけいrelation R={(1,2),(2,3)}推移閉包すいいへいほうtransitive closureもとめよ。

7Worked example: construct a transitive closure推移閉包すいいへいほう

7.1Problem

Find the transitive closure推移閉包すいいへいほう of the relation関係かんけい R={(1,2),(2,3)} on A={1,2,3}.

7.2解説かいせつ

1R2 かつ 2R3 なので、推移性すいいせいtransitivityたすには 1R3必要ひつようである。したがって (1,3)追加ついかする。

追加後ついかご関係かんけいrelation

R+={(1,2),(2,3),(1,3)}

である。これ以上いじょうあたらしく追加ついかする順序対じゅんじょついordered pairはない。よってこれが推移閉包すいいへいほうtransitive closureである。

7.2Explanation

Because 1R2 and 2R3, transitivity推移性すいいせい requires 1R3. Therefore add (1,3).

The resulting relation関係かんけい is

R+={(1,2),(2,3),(1,3)}.

No further ordered pair順序対じゅんじょつい is forced, so this is the transitive closure推移閉包すいいへいほう.

8証明しょうめい補足ほそく推移閉包すいいへいほうtransitive closure最小性さいしょうせい

関係かんけい R推移閉包すいいへいほうtransitive closure

R+=RR2R3

かんがえる。ここで RnRn かい合成ごうせいした関係かんけいである。

R+Rふくむ。また、(a,b)R+(b,c)R+ なら、ある m,n[PARSE ERROR: Undefined("Command(\"ge\")")]1存在そんざいして (a,b)Rm(b,c)Rn である。経路けいろpath連結れんけつすれば (a,c)Rm+n なので (a,c)R+ である。

さらに、SRSたす推移的すいいてき関係かんけいなら、帰納法きのうほうRnSかる。よって R+S であり、R+Rふく推移的すいいてき関係かんけいなか最小さいしょうである。

8Proof supplement: minimality of the transitive closure推移閉包すいいへいほう

Think of the transitive closure推移閉包すいいへいほう of a relation関係かんけい R as

R+=RR2R3,

where Rn is the relation obtained by composing R with itself n times.

The relation R+ contains R. Also, if (a,b)R+ and (b,c)R+, then for some m,n[PARSE ERROR: Undefined("Command(\"ge\")")]1, (a,b)Rm and (b,c)Rn. Concatenating the paths gives (a,c)Rm+n, so (a,c)R+.

Finally, if S is any transitive relation with RS, induction gives RnS for every n. Hence R+S, so R+ is the smallest transitive relation containing R.

9見分みわかた関連かんれんリンク

  • 関係かんけいつづけて使つかうなら、合成ごうせいcompositionかんがえる。
  • りない自己じこループを追加ついかするなら、反射閉包はんしゃへいほうreflexive closureである。
  • 逆向ぎゃくむきの矢印やじるし追加ついかするなら、対称閉包たいしょうへいほうsymmetric closureである。
  • 到達可能性とうたつかのうせい直接ちょくせつ関係かんけいrelationとして記録きろくするなら、推移閉包すいいへいほうtransitive closureである。
data/exercise/math/discrete-math/関係と同値関係-基本演習.n.md data/lecture/math/discrete-math/関係の基本-講義.n.md data/lecture/math/discrete-math/同値関係と分割-講義.n.md

9How to identify it and related links

  • If a relation is used repeatedly, think of composition合成ごうせい.
  • If missing self-loops are added, it is the reflexive closure反射閉包はんしゃへいほう.
  • If reverse arrows are added, it is the symmetric closure対称閉包たいしょうへいほう.
  • If reachability is recorded as a direct relation関係かんけい, it is the transitive closure推移閉包すいいへいほう.
data/exercise/math/discrete-math/関係と同値関係-基本演習.n.md data/lecture/math/discrete-math/関係の基本-講義.n.md data/lecture/math/discrete-math/同値関係と分割-講義.n.md
raw .n.md をコピー
loc をコピー (filepath:line ~ line)
copy share link
copy encoded share link
path をコピー
copy share link
copy encoded share link
copy share link
copy encoded share link
タブを全て閉じる