RELATIONS 030513122 Discrete Mathematics Asst Prof Dr Choopan

  • Slides: 39
Download presentation
RELATIONS 030513122 - Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka

RELATIONS 030513122 - Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka

Relation คณสมบตของ Relation Reflexive Symmetric Transitive Antisymmetric Asymmetric ขอเตอน : คณสมบตนนยา relation บน set

Relation คณสมบตของ Relation Reflexive Symmetric Transitive Antisymmetric Asymmetric ขอเตอน : คณสมบตนนยา relation บน set เทานน มไวสำหรบ

Symmetry และ Antisymmetry ใน symmetric relation a. Rb b. Ra ใน antisymmetric relation, ถา

Symmetry และ Antisymmetry ใน symmetric relation a. Rb b. Ra ใน antisymmetric relation, ถา a. Rb และ b. Ra จะจรงเมอ a=b An antisymmetric relation ไมจำเปนจะตองเปนความ relation แบบ reflexive Relation สามารถเปน ทง symmetric และ antisymmetric ไมเปนเลย มคณสมบตอยางใดอยางหนง

ตวอยาง : Symmetric Relations: พจารณาความสมพนธ R={(x, y) R 2|x 2+y 2=1}, is R Reflexive?

ตวอยาง : Symmetric Relations: พจารณาความสมพนธ R={(x, y) R 2|x 2+y 2=1}, is R Reflexive? Symmetric? Antisymmetric? • R ไม reflexive เชน (2, 2) R 2 • R เปน symmetric เพราะวา x, y R, x. Ry x 2+y 2=1 y 2+x 2=1 y. Rx • R ไม antisymmetric เพราะวา (1/3, 8/3) R และ ( 8/3, 1/3) R แต 1/3 8/3

Transitivity: ตวอยาง Relation R={(x, y) R 2| x y} เปน relation แบบ transitive? ใช

Transitivity: ตวอยาง Relation R={(x, y) R 2| x y} เปน relation แบบ transitive? ใช เพราะ x. Ry และ y. Rz x y และ y z x. Rz Relation R={(a, b), (b, a), (a, a)} เปน relation แบบ transitive? ไม , เพราะ b. Ra และ a. Rb แต b. Rb Relation R= {(x, y) R 2| x 2 y} เปน relation แบบ transitive? ไม เพราะ 2 R 4 และ 4 R 10 แต 2 R 10

Combining Relations ยำอกทวา Relations นนคอ set ปกตของ ordered pairs ซงเปน subsets ของ Cartesian product

Combining Relations ยำอกทวา Relations นนคอ set ปกตของ ordered pairs ซงเปน subsets ของ Cartesian product ของ 2 sets ดงนน , relations สามารถผสมกนเพอสราง relations ใหมได โดยใชตวดำเนนการของ set (R 1 R 2) Union (R 1 R 2) Set difference (R 1R 2) Intersection

การใชงาน Matrix Representation (1) 0 -1 matrix เปนการแสดงคาอยางงายเพอตรวจสอบวา นน relation Reflexive Symmetric Antisymmetric Reflexivity

การใชงาน Matrix Representation (1) 0 -1 matrix เปนการแสดงคาอยางงายเพอตรวจสอบวา นน relation Reflexive Symmetric Antisymmetric Reflexivity R ท reflexive, a (a, a) R ใน MR, R จะ reflexive กตอเมอ mi, i=1 for i=1, 2, …, n สำหรบ

Matrix Representation: ตวอยางท 1 จงหาวา R reflexive? Symmetric? Antisymmetric? MR = 0 0 1

Matrix Representation: ตวอยางท 1 จงหาวา R reflexive? Symmetric? Antisymmetric? MR = 0 0 1 1 0 0 1

Matrix Representation: ตวอยางท 2 กำหนดให set A={a 1, a 2, a 3} ให R

Matrix Representation: ตวอยางท 2 กำหนดให set A={a 1, a 2, a 3} ให R เปน relation จาก A ไป A: R={(a 1, a 1), (a 1, a 2), (a 2, a 1), (a 2, a 2), (a 2, a 3), (a 3, a 2), (a 3, a 3)} จงเขยน R เปน 0 -1 Matrix ของ R reflexive ? symmetric ? antisymmetric ?

Combining Relations: ตวอยาง What is MR 1 R 2 and MR 1 R 2?

Combining Relations: ตวอยาง What is MR 1 R 2 and MR 1 R 2? MR 1 = MR 1 R 2= 1 0 1 1 0 MR 2 = 1 0 1 1 1 1 MR 1 R 2= 0 0 0 1 1 1 0 0 0 0 1 1 0

Equivalence Relation ลองพจารณา set ของคนในโลกน ให R เปน relation ท (a, b) R ถา

Equivalence Relation ลองพจารณา set ของคนในโลกน ให R เปน relation ท (a, b) R ถา a และ b เปนญาตกน แนนอนความสมพนธนจะเปน Reflexive Symmetric และ Transitive Relation แบบนเรยกวา equivalence relation คำนยาม : Relation บน set A จะเปน equivalence relation ถา relation นเปนทงแบบ reflexive, symmetric และ transitive

ตวอยาง 2: Equivalence Relations Example: Let R={ (a, b) | a, b R and

ตวอยาง 2: Equivalence Relations Example: Let R={ (a, b) | a, b R and a b} reflexive? transitive? symmetric?

Partitions Equivalence classes partition the set A into disjoint, non-empty subsets A 1, A

Partitions Equivalence classes partition the set A into disjoint, non-empty subsets A 1, A 2, …, Ak Partition ของ set A จะมคณสมบตดงน ki=1 Ai=A Aj = for i j Ai for all i Ai

กลบมาท อกท Equivalence Class กำหนดให Frank, Susan, George อยท Boston Stephanie, Max อยท Berlin

กลบมาท อกท Equivalence Class กำหนดให Frank, Susan, George อยท Boston Stephanie, Max อยท Berlin Jennifer อยท Sydney ให R เปน equivalence relation {(a, b) | a และ b อยทเดยวกน บน Set P = {Frank, Susan, George, Stephanie, Max, Jennifer} R = { (Frank, Frank), (Frank, Susan), (Frank, George), (Susan, Frank), (Susan, Susan), (Susan, George), (George, Frank), (George, Susan), (George, George), (Stephanie, Stephanie), (Stephanie, Max), (Max, Stephanie), (Max, Max), (Jennifer, Jennifer) } Equivalence Class ของ R บน P คอ }