2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 관계와 표현 (Relations and Representation)

Slides:



Advertisements
Similar presentations
CSE 211- Discrete Structures
Advertisements

5/16/20151 You Never Escape Your… Relations. 5/16/20152Relations If we want to describe a relationship between elements of two sets A and B, we can use.
CS2210(22C:19) Discrete Structures Relations Spring 2015 Sukumar Ghosh.
1 Relations Rosen 5 th ed., ch Relations Relationships between elements of sets occur very often.Relationships between elements of sets occur very.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Relations.
1 Section 7.1 Relations and their properties. 2 Binary relation A binary relation is a set of ordered pairs that expresses a relationship between elements.
1 Representing Relations Epp section ??? CS 202 Aaron Bloomfield.
Relations Chapter 9.
2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 집합과 연산 (Sets and Operations)
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 8: Relations Relations(8.1) n-any Relations &
2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 행렬 (Matrices)
Relations (1) Rosen 6 th ed., ch. 8. Binary Relations Let A, B be any two sets. A binary relation R from A to B, written (with signature) R:A↔B, is a.
Module #21 - Relations Representing Relations Rosen 6 th ed., Ch. 8.
Module #18: Relations, part I
Relations Rosen 5 th ed., ch. 7. Binary Relations Let A, B be any sets. A binary relation R from A to B, written (with signature) R:A×B, or R:A,B, is.
April 10, 2002Applied Discrete Mathematics Week 10: Relations 1 Counting Relations Example: How many different reflexive relations can be defined on a.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Discrete Maths Objective to introduce relations, show their connection to sets, and their use in databases , Semester 2, Relations.
강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics)  정수와 나눗셈 (The Integers and Division)
Unit Unit 04 Relations IT DisiciplineITD1111 Discrete Mathematics & Statistics STDTLP1 Unit 4 Relations.
Relations and Their Properties
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics)  함수 (Functions)
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Discrete Structures1 You Never Escape Your… Relations.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 8 Relations 歐亞書局.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Relations and their Properties
2014 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics)  집합 (Set)
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Fall 2002CMSC Discrete Structures1 You Never Escape Your… Relations.
2014 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics)  집합 연산 (Set Operations)
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
이산수학 (Discrete Mathematics) 7.3 관계의 표현 (Representing Relations) 2006 년 봄학기 문양세 강원대학교 컴퓨터과학과.
Lecture on Relations 1Developed by CSE Dept., CIST Bhopal.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Discrete Structures – CNS2300
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
Relations Section 9.1, 9.3—9.5 of Rosen Spring 2012
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Relations (2) Rosen 6 th ed., ch. 8. Closures of Properties Let R be a relation on a set A. R may or may not have some property P, such as reflexivity,
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
2012 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) n- 항 관계 (n-ary Relations)
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
Section 9.3. Section Summary Representing Relations using Matrices Representing Relations using Digraphs.
15.1 CompSci 102© Michael Frank Today’s topics RelationsRelations –Kinds of relations –n-ary relations –Representations of relations Reading: Sections.
Chapter 5 Relations and Operations
Relations Chapter 9.
Applied Discrete Mathematics Week 10: Relations
Dr. Ameria Eldosoky Discrete mathematics
Relations Rosen 5th ed., ch. 7.
CSE 504 Discrete Structures & Foundations of Computer Science
Discrete Mathematics and its Applications
§7.3 Representing Relations Longin Jan Latecki
CS2210 Discrete Structures Relations
Rosen 5th ed., ch. 7 ~32 slides (in progress), ~2 lectures
Relations and Their Properties
8.1 Relations and Their Properties
Relations and their Properties
2/18/2019 §7.1 Binary Relations (2nd pass) and §7.2 n-ary Relations Longin Jan Latecki Slides adapted from Kees van Deemter who adopted them from Michael.
2/25/2019 §7.1 Binary Relations (2nd pass) and §7.2 n-ary Relations Longin Jan Latecki Slides adapted from Kees van Deemter who adopted them from Michael.
§7.3 Representing Relations Longin Jan Latecki
7/30/2019 §7.1 Binary Relations (2nd pass) and §7.2 n-ary Relations Longin Jan Latecki Slides adapted from Kees van Deemter who adopted them from Michael.
Relations 12/7/2019.
Presentation transcript:

2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 관계와 표현 (Relations and Representation)

Discrete Mathematics by Yang-Sae Moon Page 2 강의 내용 관계와 속성 (Relation and Its Properties) n- 항 관계 (n-ary Relations) 관계의 표현 (Representing Relations) Relations and Representation

Discrete Mathematics by Yang-Sae Moon Page 3 Binary Relations ( 이진 관계 ) Let A, B be any two sets. A binary relation R from A to B, written R:A ↔ B, is a subset of A×B. (A 에서 B 로의 이진 관계 R 은 R:A ↔ B 로 표기하며 A×B 의 부분집합이다.) E.g., let < : N ↔ N : ≡ {(n,m) | n < m} The notation a R b or aRb means (a,b)  R. E.g., a < b means (a,b)  < If aRb, we may say “a is related to b (by relation R).” (aRb 이면, “a 는 ( 관계 R 에 의해서 ) b 에 관계된다 ” 고 말한다.) Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 4 Complementary Relations ( 보수 관계 ) Let R:A ↔ B be any binary relation. Then, R:A ↔ B, the complement of R, is the binary relation defined by R : ≡ {(a,b) | (a,b)  R} = (A×B) − R Note the complement of R is R.  <} = {(a,b) | ¬(a<b)} = ≥ Example: < = {(a,b) | (a,b)  <} = {(a,b) | ¬(a<b)} = ≥ Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 5 Complementary Relation Example 예제 : A = {0, 1, 2}, B = {a, b} 라 하면, {(0,a), (0,b), (1,a), (2,b)} 는 A 에서 B 로 의 관계 R 로 표현할 수 있다. 이 때, (0,a)  R 이므로, 0Ra 라 할 수 있다. 그러나, (1,b)  R 이므로, 1Rb 라 할 수 있다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 6 Inverse Relations ( 역 관계 ) Any binary relation R:A ↔ B has an inverse relation R −1 :B ↔ A, defined by R −1 : ≡ {(b,a) | (a,b)  R}. E.g., if R:People ↔ Foods is defined by aRb  a eats b, then: b R −1 a  b is eaten by a. (Passive voice.) (R −1 will be “is eaten by.”) Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 7 Relations on a Set A (binary) relation from a set A to itself is called a relation on the set A. ( 집합 A 에서 A 로의 관계를 집합 A 상의 관계라 한다.) E.g., the “<” relation from earlier was defined as a relation on the set N of natural numbers. (“<” 은 정수 집합 N 에 대한 관계이다.) The identity relation I A on a set A is the set {(a,a)|a  A}. ( 집합 A 에 대한 항등 관계 I A 는 집합 {(a,a)|a  A} 를 의미한다.) Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 8 Examples of Relations on a Set (1/2) 예제 : A = {1, 2, 3, 4} 라 할 때, 관계 R = {(a,b)| a divides b} 에 속하는 순서쌍은 ? A x A 의 원소인 (a,b) 에 있어서 b 를 a 로 나눌 수 있는 순서쌍을 구한다. 즉, R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4)} 이다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 9 Examples of Relations on a Set (2/2) 예제 : n 개의 원소를 갖는 집합에는 몇 개의 관계가 있는가 ? 정의에 의해, 집합 A 에 대한 관계는 A x A 의 부분집합이다. A x A 의 원소 개수는 n 2 이다. 또한, m 개의 원소를 가지는 집합의 부분집합 개수는 2 m 개 이다. 그러므로, A x A 의 부분집합 개수는 이 된다. 결국, n 개 원소를 갖는 집합에 대한 가능한 관계의 수는 이다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 10 Reflexivity ( 반사성 ) A relation R on A is reflexive if  a  A, aRa. E.g., the relation ≥ : ≡ {(a,b) | a≥b} is reflexive. 즉, (a,a) 를 원소로 가지면 반사적 (reflexive) 이라고 이야기한다. A relation is irreflexive iff its complementary relation is reflexive. ( 역관계가 반사이면, 해당 관계는 비반사이다 ) Example: < is irreflexive. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 11 Reflexivity Example 예제 : 양의 정수 집합에 대해 “ 나누다 ” 관계는 반사적인가 ? 임의의 양의 정수 a 에 대해 a|a 가 성립한다. 즉, 양의 정수 a 는 자기 자신 a 로 나누어 떨어진다. 따라서, “ 나누다 ” 는 양의 정수 집합에 대해 반사적이다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 12 Symmetry & Antisymmetry ( 대칭성 ) A binary relation R on A is symmetric iff R = R −1, that is, if (a,b)  R ↔ (b,a)  R. E.g., = (equality) is symmetric. < is not. “is married to” is symmetric, but “likes” is not. 즉, (a,b) 가 R 의 원소일 때, 반드시 (b,a) 도 원소이면 대칭적이라 한다. A binary relation R is antisymmetric if (a,b)  R → (b,a)  R. < is antisymmetric, “likes” is also antisymmetric. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 13 Symmetry & Antisymmetry Example 예제 : 양의 정수 집합에 대한 “ 나누다 ” 관계는 대칭인가 ? 반대칭인가 ? 반례 (counterexample) 를 들어 반대칭임을 보인다. 즉, 1|2 이지만 2|1 이므로, 반대칭이다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 14 Transitivity ( 전이성 ) A relation R is transitive iff (for all a,b,c) (a,b)  R  (b,c)  R → (a,c)  R. A relation is intransitive if it is not transitive. Examples: “is an ancestor of” is transitive. “likes” is intransitive. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 15 Transitivity Example 예제 : 양의 정수 집합에 대한 “ 나누다 ” 관계가 전이적인가 ? 양의 정수 a, b, c 에 대해서, a 가 b 를 나누고, b 가 c 를 나눈다고 하자. 즉, a|b, b|c 가 성립한다고 가정하자. 그러면, b = ak, c = bl 인 양의 정수 k 와 l 이 있다. 따라서, c = a(kl) 이 성립하므로, a 는 c 를 나눌 수 있다. 즉, a|c 가 성립하므로, “ 나누다 ” 는 전이적이다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 16 Composite Relations ( 관계 합성 / 결합 ) Let R:A ↔ B, and S:B ↔ C. Then the composite S  R of R and S is defined as: S  R = {(a,c) |  b: aRb  bSc} ((a,b)  R 이고 (b,c)  S 이면, S  R 은 (a,c) 을 원소로 하는 관계이다.) Note function composition f  g is an example. The n th power R n of a relation R on a set A (A 에 대한 관계 R 의 n 제곱 ) can be defined recursively by: R 0 : ≡ I A ;R n+1 : ≡ R n  R for all n≥0. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 17 Examples of Composite Relations (1/2) 예제 : {1, 2, 3} 에서 {1, 2, 3, 4} 로의 관계 R = {(1,1), (1,4), (2,3), (3,1), (3,4)} 과, {1, 2, 3, 4} 에서 {0, 1, 2} 로의 관계 S = {(1,0), (2,0), (3,1), (3,2), (4,1)} 가 있을 때, R 과 S 의 합성 S  R 은 ? S  R 의 구성을 위해서는, R 에 속한 순서쌍의 두 번째 원소와 S 에 속한 순서쌍의 첫 번째 원소가 같은 것을 찾으면 된다. 예를 들어, R 의 (2,3) 과 S 의 (3,1) 을 바탕으로 S  R 의 순서쌍 (2,1) 을 만 든다. 결국, S  R = {(1,0), (1,1), (2,1), (2,2), (3,0), (3,1)} 이 된다. Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 18 Examples of Composite Relations (2/2) 예제 : R = {(1,1), (2,1), (3,2), (4,3)} 이라 하자. n = 2, 3, 4, … 일 때, 거듭 제곱 R n 을 구하라. R 2 = R  R = {(1,1), (2,1), (3,1), (4,2)} R 3 = R 2  R = {(1,1), (2,1), (3,1), (4,1)} R 4 = R 3  R = {(1,1), (2,1), (3,1), (4,1)} … R n = R n-1  R = {(1,1), (2,1), (3,1), (4,1)} You can get R n using “induction.” Relations & Its Properties

Discrete Mathematics by Yang-Sae Moon Page 19 강의 내용 관계와 속성 (Relation and Its Properties) n- 항 관계 (n-ary Relations) 관계의 표현 (Representing Relations) Relations and Representation

Discrete Mathematics by Yang-Sae Moon Page 20 n-ary Relations (n- 항 관계 ) An n-ary relation R on sets A 1,…,A n, written R:A 1,…,A n, is a subset R  A 1 × … × A n. (A 1,…,A n 에 대한 n- 항 관계 R 은 A 1 × … × A n 의 부분집합이다.) The sets A i are called the domains of R. (A i 를 R 의 정의역이라 한다.) The degree of R is n. ( 관계 R 의 차수는 n 이다.) n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 21 Relational Databases ( 관계형 DB) A relational database is essentially an n-ary relation R. ( 관계형 데이터베이스란 n- 항 관계 R 을 의미한다.) A domain A i is a primary key for the database if the relation R contains at most one n-tuple (…, a i, …) for any value a i within A i. ( 만일 R 이 ( 정의역 A i 에 포함된 ) a i 에 대해서 기껏해야 하나의 n- 항 튜플 (…, a i, …) 를 포함하면, A i 는 기본 키라 한다.) ( 다시 말해서, a i 값을 가지는 n- 항 튜플이 유일하면 A i 를 키본 키라 한다.) A composite key for the database is a set of domains {A i, A j, …} such that R contains at most 1 n-tuple (…,a i,…,a j,…) for each composite value (a i, a j,…)  A i ×A j ×… n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 22 Primary Key 예제 예제 : ( 새로운 튜플이 추가되지 않는다고 할 때,) 다음 테이블에서 어떤 정의역이 기본 키인가 ? Student_nameID_numberMajorGPA Ackermann Computer Science3.88 Adams Physics3.45 Chou Computer Science3.49 Goodfriend Mathematics3.45 Rao Mathematics3.90 Stevens Psychology2.99 Student_name 은 키본 키이다. ( 유일하게 구분 짓는다.) 마찬가지로, ID_number 또한 기본 키이다. 반면에, Major 나 GPA 는 기본 키가 아니다. n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 23 Composite Key 예제 예제 : ( 새로운 튜플이 추가되지 않는다고 할 때,) 다음 테이블에서 {Major, GPA} 는 합성 키인가 ? Student_nameID_numberMajorGPA Ackermann Computer Science3.88 Adams Physics3.45 Chou Computer Science3.49 Goodfriend Mathematics3.45 Rao Mathematics3.90 Stevens Psychology2.99 Major 와 GPA 를 조합하여 사용하면 튜플을 유일하게 구분 지을 수 있으므로, {Major, GPA} 는 상기 테이블의 합성 키이다. n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 24 Selection Operator (  ) Let A be any n-ary domain A=A 1 ×…×A n, and let P:A → {T,F} be any predicate on elements of A. (A 를 n- 항 관계의 정의역이라 하고, P 를 A 에서 {T,F} 로의 술어라 하자.) Then, the selection operator  p is the operator that maps any (n-ary) relation R on A to the n-ary relation of all n- tuples from R that satisfy P. ( 셀렉션 연산자  p 은 관계 R 의 n- 튜플 중에서 술어 P 를 만족하는 튜플들의 관계 로 정의한다.) I.e.,  R  A,  p (R) = R  {a  A | P(a) = T} n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 25 Selection Example Suppose we have a domain A = StudentName × Level × SocSecNos Suppose we define a certain predicate on A, UpperLevel(name, level, ssn) : ≡ [(level = junior)  (level = senior)] Then,  UpperLevel is the selection operator that takes any relation R on A (database of students) and produces a relation consisting of just the upper-level classes (juniors and seniors). That is,  (level = junior)  (level = senior) (R) Student_nameID_numberMajorGPA Ackermann Computer Science3.88 Adams Physics3.45 Chou Computer Science3.49 Goodfriend Mathematics3.45 Rao Mathematics3.90 Stevens Psychology2.99 n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 26 Projection Operator (  ) Let A = A 1 ×…×A n be any n-ary domain, and let {i k }=(i 1,…,i m ) be a sequence of indexes, That is, where 1 ≤ i k ≤ n for all 1 ≤ k ≤ m. Then the projection operator  on n-tuples is defined by: Student_nameID_numberMajorGPA Ackermann Computer Science3.88 Adams Physics3.45 Chou Computer Science3.49 Goodfriend Mathematics3.45 Rao Mathematics3.90 Stevens Psychology2.99 n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 27 Projection Example Suppose we have a ternary (3-ary) domain Cars = Model×Year×Color. (note n=3). Consider the index sequence {i k }= 1,3. (m=2) Then the projection  simply maps each tuple (a 1,a 2,a 3 ) = (model,year,color) to its image: Student_nameID_numberMajorGPA Ackermann Computer Science3.88 Adams Physics3.45 Chou Computer Science3.49 Goodfriend Mathematics3.45 Rao Mathematics3.90 Stevens Psychology2.99 n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 28 (Natural) Join Operator ( ) Puts two relations together to form a sort of combined relation. ( 관계를 합성하는 한 가지 방법 ) If the tuple (A,B) appears in R 1, and the tuple (B,C) appears in R 2, then the tuple (A,B,C) appears in the join R 1 R 2. A, B, C can also be sequences of elements rather than single elements. n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 29 (Natural) Join Example Suppose R 1 is a teaching assignment table, relating Professors to Courses. ((Professor, Courses) 로 구성된 관계 ) Suppose R 2 is a room assignment table relating Courses to Rooms,Times. ((Courses, Rooms, Times) 로 구성된 관계 ) Then R 1 R 2 is like your class schedule, listing (professor,course,room,time). n-ary Relations

Discrete Mathematics by Yang-Sae Moon Page 30 강의 내용 관계와 속성 (Relation and Its Properties) n- 항 관계 (n-ary Relations) 관계의 표현 (Representing Relations) Relations and Representation

Discrete Mathematics by Yang-Sae Moon Page 31 Representing Relations Some ways to represent n-ary relations: With an explicit list or table of its tuples. With a function, or with an algorithm for computing this function. Some special ways to represent binary relations: With a zero-one matrix. With a directed graph. Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 32 Using Zero-One Matrices To represent a relation R by a matrix M R = [m ij ], let m ij = 1 if (a i,b j )  R, else 0. E.g., Joe likes Susan and Mary, Fred likes Mary, and Mark likes Sally. The 0-1 matrix representation of that “Likes” relation: Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 33 Zero-One Reflexive, Symmetric (1/2) Terms: Reflexive, irreflexive, symmetric, and antisymmetric. These relation characteristics are very easy to recognize by inspection of the zero-one matrix. Reflexive: all 1’s on diagonal Irreflexive: all 0’s on diagonal any- thing Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 34 Zero-One Reflexive, Symmetric (2/2) Symmetric: all identical across diagonal Antisymmetric: all 1’s are across from 0’s anything Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 35 Using Directed Graphs (1/2) A directed graph or digraph G=(V G,E G ) is a set V G of vertices (nodes) with a set E G  V G ×V G of edges (arcs,links). ( 관계는 노드 ( 꼭지점 ) 의 집합 V 와 에지 ( 링크 ) 의 집합 E 로 표현되는 방향성 그래 프로 나타낼 수 있다.) Visually represented using dots for nodes, and arrows for edges. Notice that a relation R:A ↔ B can be represented as a graph G R =(V G =A  B, E G =R). ( 일반적으로, 노드는 점으로, 에지는 화살표로 표현한다.) Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 36 Using Directed Graphs (2/2) MRMR GRGR Joe Fred Mark Susan Mary Sally Node set V G (black dots) Edge set E G (blue arrows) Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 37 Digraph Reflexive, Symmetric It is extremely easy to recognize the reflexive/irreflexive/ symmetric/antisymmetric properties by graph inspection.       Reflexive: Every node has a self-loop Irreflexive: No node links to itself Symmetric: Every link is bidirectional   Antisymmetric: No link is bidirectional    Asymmetric, non-antisymmetricNon-reflexive, non-irreflexive Representing Relations

Discrete Mathematics by Yang-Sae Moon Page 38 강의 내용 관계와 속성 (Relation and Its Properties) n- 항 관계 (n-ary Relations) 관계의 표현 (Representing Relations) Relations and Representation

Discrete Mathematics by Yang-Sae Moon Page 39 Homework #7 Representing Relations