markdown
Sets and Mapsmd 0eef8b8
lecture/information/discrete-math/sets-and-maps-basics.lecture.n.md
Download PDF

Sets and Maps

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

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
タブを全て閉じる