1. Trang chủ
  2. » Tất cả

Ds5 relation

133 2 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 133
Dung lượng 1,06 MB

Nội dung

Relations Chapter Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Relations Discrete Structures for Computing on 22 March 2012 Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Faculty of Computer Science and Engineering University of Technology - VNUHCM 5.1 Contents Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Properties of Relations Combining Relations Contents Properties of Relations Combining Relations Representing Relations Representing Relations Closures of Relations Types of Relations Closures of Relations Types of Relations 5.2 Introduction Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.3 Relations Introduction Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations Function? 5.3 Relations Relation Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition Let A and B be sets A binary relation (quan hệ hai ngôi) from a set A to a set B is a set R⊆A×B Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.4 Relations Relation Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition Let A and B be sets A binary relation (quan hệ hai ngôi) from a set A to a set B is a set R⊆A×B Contents Properties of Relations Combining Relations Representing Relations Closures of Relations • Notations: Types of Relations 5.4 Relations Relation Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition Let A and B be sets A binary relation (quan hệ hai ngôi) from a set A to a set B is a set R⊆A×B Contents Properties of Relations Combining Relations Representing Relations Closures of Relations • Notations: (a, b) ∈ R ←→ aRb Types of Relations 5.4 Relations Relation Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition Let A and B be sets A binary relation (quan hệ hai ngôi) from a set A to a set B is a set R⊆A×B Contents Properties of Relations Combining Relations Representing Relations Closures of Relations • Notations: (a, b) ∈ R ←→ aRb • Types of Relations n-ary relations? 5.4 Example Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Example Let A = {a, b, c} be the set of students, B = {l, c, s, g} be the set of the available optional courses We can have relation R that consists of pairs (a, b), where a is a student enrolled in course b Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.5 Relations Example Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Example Let A = {a, b, c} be the set of students, B = {l, c, s, g} be the set of the available optional courses We can have relation R that consists of pairs (a, b), where a is a student enrolled in course b Contents Properties of Relations Combining Relations Representing Relations R = {(a, l), (a, s), (a, g), (b, c), (b, s), (b, g), (c, l), (c, g)} Closures of Relations Types of Relations 5.5 Maximal & Minimal Elements Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is maximal (cực đại) in the poset (S, 4) if there is no b ∈ S such that a ≺ b • a is minimal (cực tiểu) in the poset (S, 4) if there is no b ∈ S such that b ≺ a Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.41 Maximal & Minimal Elements Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is maximal (cực đại) in the poset (S, 4) if there is no b ∈ S such that a ≺ b • a is minimal (cực tiểu) in the poset (S, 4) if there is no b ∈ S such that b ≺ a Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.41 Maximal & Minimal Elements Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is maximal (cực đại) in the poset (S, 4) if there is no b ∈ S such that a ≺ b • a is minimal (cực tiểu) in the poset (S, 4) if there is no b ∈ S such that b ≺ a Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations Example Which elements of the poset ({2, 4, 5, 10, 12, 20, 25}, |) are minimal and maximal? 5.41 Maximal & Minimal Elements Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is maximal (cực đại) in the poset (S, 4) if there is no b ∈ S such that a ≺ b • a is minimal (cực tiểu) in the poset (S, 4) if there is no b ∈ S such that b ≺ a Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations Example Which elements of the poset ({2, 4, 5, 10, 12, 20, 25}, |) are minimal and maximal? 5.41 Greatest Element& Least Element Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is the greatest element (lớn nhất) of the poset (S, 4) if b a for all b ∈ S Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.42 Greatest Element& Least Element Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is the greatest element (lớn nhất) of the poset (S, 4) if b a for all b ∈ S • a is the least element (nhỏ nhất) of the poset (S, 4) if a b for all b ∈ S Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.42 Greatest Element& Least Element Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is the greatest element (lớn nhất) of the poset (S, 4) if b a for all b ∈ S • a is the least element (nhỏ nhất) of the poset (S, 4) if a b for all b ∈ S Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.42 Greatest Element& Least Element Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is the greatest element (lớn nhất) of the poset (S, 4) if b a for all b ∈ S • a is the least element (nhỏ nhất) of the poset (S, 4) if a b for all b ∈ S The greatest and least element are unique if it exists Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.42 Greatest Element& Least Element Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition • a is the greatest element (lớn nhất) of the poset (S, 4) if b a for all b ∈ S • a is the least element (nhỏ nhất) of the poset (S, 4) if a b for all b ∈ S The greatest and least element are unique if it exists Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations Example Let S be a set In the poset (P (S), ⊆), the least element is ∅ and the greatest element is S 5.42 Upper Bound & Lower Bound Definition Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Let A ⊆ (S, 4) • If u is an element of S such that a u for all elements a ∈ A, then u is called an upper bound (cận trên) of A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.43 Upper Bound & Lower Bound Definition Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Let A ⊆ (S, 4) • If u is an element of S such that a u for all elements a ∈ A, then u is called an upper bound (cận trên) of A • If l is an element of S such that l a for all elements a ∈ A, then l is called a lower bound (cận dưới) of A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.43 Upper Bound & Lower Bound Definition Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Let A ⊆ (S, 4) • If u is an element of S such that a u for all elements a ∈ A, then u is called an upper bound (cận trên) of A • If l is an element of S such that l a for all elements a ∈ A, then l is called a lower bound (cận dưới) of A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.43 Upper Bound & Lower Bound Definition Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Let A ⊆ (S, 4) • If u is an element of S such that a u for all elements a ∈ A, then u is called an upper bound (cận trên) of A • If l is an element of S such that l a for all elements a ∈ A, then l is called a lower bound (cận dưới) of A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.43 Relations Upper Bound & Lower Bound Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition Let A ⊆ (S, 4) • If u is an element of S such that a u for all elements a ∈ A, then u is called an upper bound (cận trên) of A • If l is an element of S such that l a for all elements a ∈ A, then l is called a lower bound (cận dưới) of A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Example Types of Relations • Subset A does not have upper bound and lower bound 5.43 Relations Upper Bound & Lower Bound Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan Definition Let A ⊆ (S, 4) • If u is an element of S such that a u for all elements a ∈ A, then u is called an upper bound (cận trên) of A • If l is an element of S such that l a for all elements a ∈ A, then l is called a lower bound (cận dưới) of A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Example Types of Relations • Subset A does not have upper bound and lower bound • The upper bound of B are 20, 40 and the lower bound is 5.43 ... A relation on the set A is a relation from A to A Contents Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.8 Relations on a Set Relations... of Relations Combining Relations Representing Relations Closures of Relations Types of Relations 5.7 Functions as Relations Relations Huynh Tuong Nguyen, Tran Huong Lan, Tran Vinh Tan • Is a relation. .. Properties of Relations Combining Relations Representing Relations Closures of Relations Types of Relations • Relations are a generalization of functions 5.7 Relations on a Set Relations Huynh

Ngày đăng: 27/02/2023, 22:10

w