markdown
集合と写像の基本md 0eef8b8
lecture/information/discrete-math/sets-and-maps-basics.lecture.n.md
Download PDF

集合しゅうごう写像しゃぞう基本きほん

date2026-07-14document_iddoc_b74e514fff9b51f3ab8732d3410fb63ddescription集合の演算と写像の基本概念を厳密に定義し、アルゴリズムとグラフを記述するための基礎を構成する。prerequisites離散数学への導入 / 論理と真理値表の基本type講義statusactiverelateddata/lecture/information/discrete-math/introduction-to-discrete-mathematics.lecture.n.md / data/lecture/information/graph/graph-basics.lecture.n.md / data/lecture/information/algorithm/algorithms-portal.lecture.n.md
informationdiscrete-mathundergraduatelecture

1導入どうにゅう

この講義こうぎでは、集合しゅうごう基本演算きほんえんざん写像しゃぞう性質せいしつ定義ていぎし、アルゴリズムの入出力にゅうしゅつりょくやグラフの頂点集合ちょうてんしゅうごう記述きじゅつするための基礎きそ構成こうせいする。

2集合しゅうごう包含ほうがん

集合しゅうごうとは、対象たいしょう要素ようそとしてまとめたものである。x集合しゅうごう A要素ようそであることを xA要素ようそでないことを xAしるす。要素ようそひとつもたない集合しゅうごう空集合くうしゅうごうといい、[PARSE ERROR: Undefined("Command(\"varnothing\")")]しるす。

任意にんいx について xA ならば xB であるとき、AB部分集合ぶぶんしゅうごうであるといい、ABしるす。AB かつ BA であることと A=B であることは同値どうちである。

3集合演算しゅうごうえんざん

集合しゅうごう A,Bたいして、和集合わしゅうごう共通部分きょうつうぶぶん差集合さしゅうごう

AB={xxAまたはxB},
AB={xxAかつxB},AB={xxAかつxB}

定義ていぎする。補集合ほしゅうごうには、考察対象こうさつたいしょうふく全体集合ぜんたいしゅうごう U指定してい必要ひつようである。AU補集合ほしゅうごう

Ac=UA

である。したがって、全体集合ぜんたいしゅうごう変更へんこうすれば補集合ほしゅうごう変化へんかする。

集合しゅうごう A,B直積ちょくせきは、順序対じゅんじょつい集合しゅうごう

A×B={(a,b)aA,bB}

である。一般いっぱんには (a,b)(b,a) であり、順序じゅんじょ区別くべつする。

4関係かんけい

集合しゅうごう A,B二項関係にこうかんけい R とは、直積ちょくせき部分集合ぶぶんしゅうごう RA×B である。(a,b)R のとき、abあいだ関係かんけい R成立せいりつするといい、aRb ともしるす。A=B場合ばあいは、A じょう関係かんけいという。

有向ゆうこうグラフの辺集合へんしゅうごう EV×V は、頂点集合ちょうてんしゅうごう V じょう二項関係にこうかんけいである。無向むこうグラフでは端点たんてん順序じゅんじょ区別くべつせず、二要素部分集合にようそぶぶんしゅうごう {u,v}へんとして使用しようする。この相違そういは、後続こうぞくするグラフの講義こうぎ厳密げんみつ定義ていぎする。

5写像しゃぞう

集合しゅうごう A,Bたいして、写像しゃぞう f:AB とは、A各要素かくようそ aB要素ようそをただひと対応たいおうさせる規則きそくである。A定義域ていぎいきB終域しゅういきといい、a対応たいおうする要素ようそf(a)しるす。定義域ていぎいき全要素ぜんようそあたい指定していされ、しかも各要素かくようそあたい一意いちいであることが必要ひつようである。

部分集合ぶぶんしゅうごう SAぞうと、TB逆像ぎゃくぞう

f(S)={f(a)aS},f-1(T)={aAf(a)T}

定義ていぎする。とくf(A)fぞうという。f(A)B であり、ぞう終域しゅういきかならずしも一致いっちしない。また、f-1(T) という記法きほうは、f逆写像ぎゃくしゃぞうたない場合ばあいにも使用しようできる。

6単射たんしゃ全射ぜんしゃ全単射ぜんたんしゃ

写像しゃぞう f:AB単射たんしゃであるとは、

f(a1)=f(a2)a1=a2

がすべての a1,a2A について成立せいりつすることである。すなわち、ことなる入力にゅうりょくことなる出力しゅつりょくつ。

f全射ぜんしゃであるとは、すべての bBたいして f(a)=b となる aA存在そんざいすることである。これは f(A)=B同値どうちである。単射たんしゃかつ全射ぜんしゃである写像しゃぞう全単射ぜんたんしゃという。全単射ぜんたんしゃかぎり、かく bB をその唯一ゆいいつ原像げんぞう対応たいおうさせる逆写像ぎゃくしゃぞう f-1:BA存在そんざいする。

7れい

A={1,2,3}B={a,b,c,d} とし、

f(1)=a,f(2)=b,f(3)=b

とする。このとき f(A)={a,b} であり、f-1({b,c})={2,3} である。f(2)=f(3) なので f単射たんしゃでなく、c,dぞうふくまれないので全射ぜんしゃでもない。

8情報科学じょうほうかがくへの接続せつぞく

ながn配列はいれつは、添字集合そえじしゅうごう {0,1,,n-1} からあたい終域しゅういきへの写像しゃぞうとして表現ひょうげんできる。各入力かくにゅうりょく出力しゅつりょく一意いちいさだまる決定的けっていてきなアルゴリズムは、許容入力集合きょようにゅうりょくしゅうごうから出力集合しゅつりょくしゅうごうへの写像しゃぞうとして仕様化しようかできる。複数ふくすう正解せいかい許容きょようする問題もんだい出力仕様しゅつりょくしようは、入力にゅうりょく許容出力きょようしゅつりょく関係かんけいとして表現ひょうげんできる。一方いっぽう、グラフ G=(V,E) は、頂点集合ちょうてんしゅうごう V と、直積ちょくせきまたは V二要素部分集合にようそぶぶんしゅうごうからなる辺集合へんしゅうごう E によって記述きじゅつされる。

data/lecture/information/algorithm/algorithms-portal.lecture.n.md data/lecture/information/graph/graph-basics.lecture.n.md

9まとめ

  • 集合しゅうごう要素ようそ所属しょぞくによってさだまり、AB任意にんいx について xAxB成立せいりつすることを意味いみする。
  • 補集合ほしゅうごう定義ていぎには全体集合ぜんたいしゅうごう必要ひつようであり、直積ちょくせきでは順序じゅんじょ区別くべつする。
  • 写像しゃぞう定義域ていぎいき各要素かくようそ終域しゅういき要素ようそ一意いちい対応たいおうさせる。
  • 単射たんしゃではことなる入力にゅうりょくことなる出力しゅつりょく対応たいおうし、全射ぜんしゃでは終域しゅういき全要素ぜんようそぞうふくまれ、全単射ぜんたんしゃでは一対一対応いちたいいちたいおう成立せいりつする。

Sets and Maps

1Introduction

This lecture defines the basic operations on sets and the principal properties of maps. These concepts provide the language for specifying algorithmic input and output and for defining the vertex set of a graph.

2Sets and inclusion

A set is a collection of objects called its elements. The notation xA states that x is an element of A, whereas xA states that it is not. The empty set, denoted by [PARSE ERROR: Undefined("Command(\"varnothing\")")], has no elements.

A set A is a subset of a set B, written AB, if xA implies xB for every x. The conjunction of AB and BA is equivalent to A=B.

3Operations on sets

For sets A and B, their union, intersection, and difference are defined by

AB={xxAorxB},
AB={xxAandxB},AB={xxAandxB}.

A complement requires a specified universal set U containing the objects under consideration. For AU, the complement of A is

Ac=UA.

Changing the universal set can therefore change the complement.

The Cartesian product of sets A and B is the set of ordered pairs

A×B={(a,b)aA,bB}.

Order matters: in general, (a,b)(b,a).

4Relations

A binary relation R from a set A to a set B is a subset RA×B of their Cartesian product. If (a,b)R, we say that a is related to b by R and may write aRb. When A=B, this is called a relation on A.

The edge set EV×V of a directed graph is a binary relation on its vertex set V. In an undirected graph, the order of endpoints is ignored, and a two-element subset {u,v} is used as an edge. The following graph lecture defines this distinction precisely.

5Maps

For sets A and B, a map f:AB is a rule that assigns exactly one element of B to every element a of A. The set A is the domain, the set B is the codomain, and the assigned element is denoted by f(a). Thus every domain element must receive a value, and that value must be unique.

For SA and TB, the image of S and the preimage of T are

f(S)={f(a)aS},f-1(T)={aAf(a)T}.

In particular, f(A) is the image of the map. Although f(A)B, the image need not equal the codomain. The notation f-1(T) for a preimage remains valid even when f has no inverse map.

6Injective, surjective, and bijective maps

A map f:AB is injective if

f(a1)=f(a2)a1=a2

for all a1,a2A. Equivalently, distinct inputs have distinct outputs.

The map is surjective if, for every bB, there exists aA such that f(a)=b. This condition is equivalent to f(A)=B. A map that is both injective and surjective is bijective. Exactly for a bijection, there is an inverse map f-1:BA that assigns each bB its unique preimage.

7Example

Let A={1,2,3} and B={a,b,c,d}, and define

f(1)=a,f(2)=b,f(3)=b.

Then f(A)={a,b} and f-1({b,c})={2,3}. Because f(2)=f(3), the map is not injective. Because c and d do not belong to its image, it is not surjective either.

8Connections to computer science

An array of length n can be represented as a map from the index set {0,1,,n-1} to a codomain of values. A deterministic algorithm whose output is uniquely determined for every input can be specified as a map from its set of admissible inputs to its set of outputs. When a problem permits more than one correct output, its output specification can instead be represented as a relation between inputs and admissible outputs. A graph G=(V,E) is described by a vertex set V and an edge set E whose elements are ordered pairs in a Cartesian product or two-element subsets of V.

data/lecture/information/algorithm/algorithms-portal.lecture.n.md data/lecture/information/graph/graph-basics.lecture.n.md

9Summary

  • A set is determined by element membership, and AB means that xAxB holds for every x.
  • A complement requires a universal set, while a Cartesian product distinguishes the order of its coordinates.
  • A map assigns exactly one codomain element to every domain element.
  • Under an injective map, distinct inputs have distinct outputs; under a surjective map, every codomain element lies in the image; and a bijection gives a one-to-one correspondence.
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
タブを全て閉じる