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

04 bộ

27 0 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 27
Dung lượng 300,61 KB

Nội dung

Sets Sets Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Contents Sets Set Operation 3 1 Chapter 3 Sets Discrete Structures for Computing on September 2, 2017 Nguyen An Khuong, Tran Tuan Anh, Le Hong[.]

Sets Chapter Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Sets Discrete Structures for Computing on September 2, 2017 Contents Sets Set Operation Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Faculty of Computer Science and Engineering University of Technology - VNUHCM nakhuong@hcmut.edu.vn 3.1 Sets Contents Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Sets Contents Sets Set Operation Set Operation 3.2 Sets Course outcomes Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Course learning outcomes L.O.1 Understanding of logic and discrete structures L.O.1.1 – Describe definition of propositional and predicate logic L.O.1.2 – Define basic discrete structures: set, mapping, graphs L.O.2 Represent and model practical problems with discrete structures L.O.2.1 – Logically describe some problems arising in Computing L.O.2.2 – Use proving methods: direct, contrapositive, induction L.O.2.3 – Explain problem modeling using discrete structures Contents L.O.3 Understanding of basic probability and random variables L.O.3.1 – Define basic probability theory L.O.3.2 – Explain discrete random variables L.O.4 Compute quantities of discrete structures and probabilities L.O.4.1 – Operate (compute/ optimize) on discrete structures L.O.4.2 – Compute probabilities of various events, conditional ones, Bayes theorem Sets Set Operation 3.3 Sets Set Definition • Set is a fundamental discrete structure on which all discrete Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang structures are built • Sets are used to group objects, which often have the same properties Example Contents Sets • Set of all the students who are currently taking Discrete Set Operation Mathematics course • Set of all the subjects that K2011 students have to take in the first semester • Set of natural numbers N Definition A set is an unordered collection of objects The objects in a set are called the elements (phần tử ) of the set A set is said to contain (chứa) its elements 3.4 Sets Notations Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition • a ∈ A: a is an element of the set A • a∈ / A: a is not an element of the set A Contents Sets Set Operation Definition (Set Description) • The set V of all vowels in English alphabet, V = {a, e, i, o, u} • Set of all real numbers greater than 1??? {x | x ∈ R, x > 1} {x | x > 1} {x : x > 1} 3.5 Sets Equal Sets Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition Two sets are equal iff they have the same elements Contents Sets • (A = B) ↔ ∀x(x ∈ A ↔ x ∈ B) Set Operation Example • {1, 3, 5} = {3, 5, 1} • {1, 3, 5} = {1, 3, 3, 3, 5, 5, 5, 5} 3.6 Sets Venn Diagram Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang • John Venn in 1881 • Universal set (tập vũ trụ) is represented by a rectangle Contents Sets Set Operation • Circles and other geometrical figures are used to represent sets • Points are used to represent particular elements in set 3.7 Sets Special Sets Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang • Empty set (tập rỗng ) has no elements, denoted by ∅, or {} • A set with one element is called a singleton set Contents Sets Set Operation • What is {∅}? • Answer: singleton 3.8 Sets Subset Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition The set A is called a subset (tập con) of B iff every element of A is also an element of B, denoted by A ⊆ B Contents If A 6= B, we write A ⊂ B and say A is a proper subset (tập thực sự) of B Sets Set Operation • ∀x(x ∈ A → x ∈ B) • For every set S, (i) ∅ ⊆ S, (ii) S ⊆ S 3.9 Sets Cardinality Definition Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang If S has exactly n distinct elements where n is non-negative integers, S is finite set (tập hữu hạn), and n is cardinality (bản số ) of S, denoted by |S| Example Contents Sets • A is the set of odd positive integers less than 10 |A| = Set Operation • S is the letters in Vietnamese alphabet, |S| = 29 • Null set |∅| = Definition A set that is infinite if it is not finite Example • Set of positive integers is infinite 3.10 Sets Ordered n-tuples Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition The ordered n-tuple (dãy thứ tự) (a1 , a2 , , an ) is the ordered collection that has a1 as its first element, a2 as its second element, , and an as its nth element Contents Sets Set Operation Definition Two ordered n-tuples (a1 , a2 , , an ) = (b1 , b2 , , bn ) iff = bi , for i = 1, 2, , n Example 2-tuples, or ordered pairs (cặp), (a, b) and (c, d) are equal iff a = c and b = d 3.13 Sets Cartesian Product Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang • René Descartes (1596–1650) Definition Let A and B be sets The Cartesian product (tích Đề-các) of A and B, denoted by A × B, is the set of ordered pairs (a, b), where a ∈ A and b ∈ B Hence, Contents Sets Set Operation A × B = {(a, b) | a ∈ A ∧ b ∈ B} Example Cartesian product of A = {1, 2} and B = {a, b, c} Then A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)} Show that A × B 6= B × A 3.14 Sets Cartesian Product Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition A1 ×A2 ×· · ·×An = {(a1 , a2 , , an ) | ∈ Ai for i = 1, 2, , n} Contents Sets Set Operation Example A = {0, 1}, B = {1, 2}, C = {0, 1, 2} What is A × B × C? A×B×C = {(0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 2, 0), (1, 2, 1), (1, 2, 2)} 3.15 Sets Union Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition The union (hợp) of A and B A ∪ B = {x | x ∈ A ∨ x ∈ B} Contents Sets A∪B A Set Operation B • Example: • {1,2,3} ∪ {2,4} = {1,2,3,4} • {1,2,3} ∪ ∅ = {1,2,3} 3.16 Sets Intersection Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition The intersection (giao) of A and B A ∩ B = {x | x ∈ A ∧ x ∈ B} Contents Sets A∩B A Set Operation B Example: • {1,2,3} ∩ {2,4} = {2} • {1,2,3} ∩ N = {1,2,3} 3.17 Sets Union/Intersection Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang n [ Contents Sets Ai = A1 ∪ A2 ∪ ∪ An = {x | x ∈ A1 ∨ x ∈ A2 ∨ ∨ x ∈ An } Set Operation i=1 n \ Ai = A1 ∩ A2 ∩ ∩ An = {x | x ∈ A1 ∧ x ∈ A2 ∧ ∧ x ∈ An } i=1 3.18 Sets Difference Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition The difference (hiệu) of A and B A − B = {x | x ∈ A ∧ x ∈ / B} Contents Sets A−B A Set Operation B Example: • {1,2,3} - {2,4} = {1,3} • {1,2,3} - N = ∅ 3.19 Sets Complement Nguyen An Khuong, Tran Tuan Anh, Le Hong Trang Definition The complement (phần bù) of A A = {x | x ∈A} / Contents Sets Example: Set Operation • A = {1,2,3} then A = ??? • Note that A - B = A ∩ B 3.20

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

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w