Discrete Mathematical Structures

  • View
    97

  • Download
    0

Embed Size (px)

DESCRIPTION

Discrete Mathematical Structures. . http://sist.sysu.edu.cn/~qiaohy/DiscreteMath/ qiaohy@mail.sysu.edu.cn slides contributed by Dr. Wu Xiangjun. Course Contents. Cantors Set theory, including sets, relations and functions. - PowerPoint PPT Presentation

Transcript

  • Discrete Mathematical Structures http://sist.sysu.edu.cn/~qiaohy/DiscreteMath/ qiaohy@mail.sysu.edu.cn slides contributed by Dr. Wu Xiangjun

  • Course ContentsCantors Set theory, including sets, relations and functions. Mathematical Logic, including propositions, logical operations and mathematical proofs.Graph Theory, including trees, graphs, and graph algorithms.Group theory.

  • Course GoalsLearn mathematical knowledge that will be used in solving problems;Learn abstraction and mathematical thinking;Learn doing mathematical proofs.

    *

    Discrete Mathematical Structures (Fifth Edition) Bernard Kolman, Robert C. Busby and Sharon C. Ross, , 20056 Textbook Discrete Mathematical Structures Theory and Applications D. S. Malik, , 20057 Discrete Mathematics (Fifth Edition) Kenneth A. Ross, Charles R. B. Wright, , 2003() , , 2004 , , 2002 , , 1985 Reference Book

    *

    RequirementsParticipating in Lectures actively, asking questions and taking notesReading the English text book, getting used to read English materialsFinishing homework individually before the dead line. No acceptance after the deadline.

    *

    Grading SchemeHomework and attendance 20% Midterm 20% Final 60% Cheating may make you fail the course. We may increase the percentage of homework and attendance t0 30% or higher.

    *

    1.1 Sets and Subsets1.2 Operations on Sets1.3 Sequences1.6 Mathematical StructuresChapter 1 Fundamentals

    *

    quizLet S ={}, T = {, {}}Which is true? S S T T S S S S S T S T T T

    *

    Quiz Let S ={}, T = {, {}}Which is true? S T = S S T = T S T = S S T = T S T = S T = S S T = S T =

    *

    1.1 Sets and SubsetsA Set is any well-defined collection of objects called the elements or members of the set().1). Describe a set1.1). List the elements of the set between bracesThe set of all positive integers that are less than 4 can be written as { 1, 2, 3 }.1.2). Describe a set by statement P{ x | P(x) } is just a set which P(x) is true.Ex. { x | 0 < x < 4 }, P(x) is sentence 0 < x < 4. { y | y is a letter in the word Hello }.

    *

    1.1 Sets and Subsets2). The order of elements of setThe order in which the elements of a set are listed is not important.{ 1, 2, 3 } = { 2, 3, 1 } = { 3, 2, 1 } = 3). Denotation for element of setWe use uppercase letters such as A, B, C to denote sets, lowercase letters such as a, b, c to denote the members of sets.(1). x is a member of set A, write x A (2). x is not a member of set A, write x A

    *

    1.1 Sets and Subsets4). Some important setsN = { x | x 0, x is an integer }Z = { x | x is an integer } = { 0, 1, 2, 3, }Z+ = { x | x > 0, x Z }Q = { x | x is a rational number } = { x | x = a/b, a, b Z, b 0 }R = { x | x is a real number } or { } stands for empty set, it has no elements.Ex. { x | x2 = -1, x R } is .

    *

    1.1 Sets and Subsets5). Subset and Proper Subset ()If whenever x A then x B, we say A is a subset of B, or A is contained in B. we write A B.If A is not a subset of B, we write A B.Ex. N Z Q R, but Z N.If A is a set, then A A. i.e. every set is a subset of itself.Ex. A = { 1, 2, 3, 4, 5, 6 }, B = { 2, 4, 5 }, C = { 1, 2, 3, 4, 5 }Then B A, B C, C A, A B, A C, C B.If B A and B A, then B is a proper subset of A(), and is denoted by B A. BAVenn diagrams

    *

    1.1 Sets and Subsets6). Difference between and B = {A, {A}}, A is a set.A B, {A} B, {A} B and {{A}} B.A B.If A is a set, then A is true.The empty set is a subset of any set.7). Equality of two setsTwo sets A and B are equal if they have same elements, we write A = B.A = { 1, 2, 3 }, B = { x | x2 < 12, x Z+ } A=BA = B iff A B and B A.

    *

    1.1 Sets and Subsets8). Universal set ()An universal set is a set which contains all objects for which the discussion is meaningful. U is abbreviated from Universal Set.If set A is a set in the discussion, then A is a subset of U.In Venn diagrams, set U is denoted by a rectangle.UARussells Paradox

    *

    1.1 Sets and Subsets9). Cardinality of set (, )A set A is called finite() if it has n distinct elements, where n N.In this case, n is called the cardinality of set A, and is denoted by |A|, or # of A.If a set is not finite, it is called infinite().Ex. N, Z, R, etc.

    *

    1.1 Sets and Subsets10). Power set ()If A is a set, the set of all subset of A is called the power set of A, and is denoted by P(A).Ex. A = { 1, 2, 3 }P(A) = { , {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }|P(A)| = 8.|P(A)| = 2|A|.

    *

    1.2 Operations on Sets1). UnionThe union of A and B is a set which contains all elements of A or B, we write AB.AB = { x | x A or x B }Ex. A = { 1, 2, 3, 4, 5 }, B = { 3, 5, 6, 7, 8 } AB = { 1, 2, 3, 4, 5, 6, 7, 8 }AB

    *

    1.2 Operations on Sets2). IntersectionThe intersection of A and B is a set which contains all elements of A and B, we write AB.AB = { x | x A and x B }Ex. A = { 1, 2, 3, 4, 5 }, B = { 3, 5, 6, 7, 8 } AB = { 3, 5 }If set A and B have no common elements, they are called disjoint sets().ABDisjoint Sets

    *

    1.2 Operations on SetsABC = { x | x A or x B or x C }i=1..nAi = A1A2 AnABC = { x | x A and x B and x C }i=1..nAi = A1A2 AnABABCCABABCC

    *

    1.2 Operations on Sets3). Complement of B with respect to AIf A and B are two sets, The complement of B with respect to A is defined the set of all elements that belong to A but not to B, and is denoted by A - B.A - B = { x | x A and x B }Ex. A = { 1, 2, 3, 4, 5 }, B = { 3, 5, 6, 7, 8 } A - B = { 1, 2, 4 }AA - BBB - A1

    *

    1.2 Operations on Sets4). Complement of AAIf U is a universal set containing A, U-A is the comple-ment of A, and is denoted by A.A = U-A = { x | x U and x A }Ex. A = { 1, 2, 3, 4, 5 }, U = Z+ A = { x | x is an integer and x > 5 }UAA

    *

    1.2 Operations on Sets5). Symmetric difference A and B are two sets, their symmetric difference is the set of all elements that belong to A or to B, but not to A and B, it is denoted by AB.AB = { x | (x A and x B) or (x B and x A) } = (A B)(B A) = (AB) (AB)Ex. A = { 1, 2, 3, 4, 5 }, B = { 3, 5, 7, 9 } AB = { 1, 2, 4, 7, 9 }AB

    *

    1.2 Operations on Sets6) Algebraic properties of set operations(1) Commutative Properties AB = BAAB = BA(2) Associative Properties (AB)C = A(BC) (AB)C = A(BC)(3) Distributive Properties A(BC) = (AB)(AC) A(BC) = (AB)(AC)(4) Idempotent Properties AA = AAA = A

    *

    1.2 Operations on Sets6) Algebraic properties of set operations(5) Properties of the Complement A = A AA = UAA = = UU = AB = AB AB = AB(6) Properties of a Universal Set AU = UAU = A(7) Properties of the Empty Set A = AA = De Morgans Laws

    *

    1.2 Operations on Sets6) Algebraic properties of set operationsDe Morgans law: AB = ABProof:(1). Suppose that x AB.Then x AB, so x A and x B.x A, x B, so x AB.Thus AB AB.(2). Suppose that x AB.Then x A, x B, so, x A, x B.Thus, x AB, x AB.We have that AB AB.Thus, we hold that AB = AB.A common style of proof for statements of sets is to choose an element in one of the sets.

    *

    QuizWhich of the following is true? Prove or disprove it. A B = A B A B = A B A (B C) = A B C A (B C) = (A B )(A C) A (B C) = (A B) (A C)

    Hints: Use Venn diagrams and operation laws.

    *

    The addition principleQuestions: How many of you can program in C# or Java?How many of you can program in Java?How many of you can program in C#?How many can program in both C# and Java?

    *

    1.2 Operations on Sets7) The addition principleTheorem 2. If A and B are finite sets, then |AB| = |A| + |B| - |AB|Ex. A = { a, b, c, d, e }, B = { c, e, f, h, k, m }, |AB| = ? AB = { c, e }, |AB| = 2. |AB| = |A| + |B| - |AB| = 5 + 6 2 = 9.Theorem 3. If A, B and C are finite sets, then |ABC | = |A| + |B| + |C| - |AB| - |AC| - |BC| + |ABC|Ex. A = { a, b, c, d, e }, B = { a, b, e, g, h }, C = { b, d, e, g, h, k, m, n }, |ABC | = ?

    *

    1.2 Operations on Sets 11000(11000), 56, 8. S = { x | xZ1 x 1000 }A = { x | xSx5 }B = { x | xSx6 }C = { x | xSx8 }|ABC| =| ABC| = 1000 - | ABC| |A| = 1000/5 = 200, |B| = 1000/6 = 166, |C| = 1000/8 = 125|AB| = 1000/lcm(5,6) = 33, |AC| = 1000/lcm(5,8) = 25|BC| = 1000/lcm(6,8) = 41|ABC| = 1000/lcm(5,6,8) = 8| ABC| = 400|ABC| = 1000-400=600

    *

    1.2 Operations on Sets 24.: : 13, 5, 109;2;4., (). E, F, GJ.x, y1, y2y3..y224-xy1x4-x4-xy35-2JEGF

    *

    1.2 Operations on Sets 24.: : 13, 5, 109;2;4., (). E, F, GJ.x, y1, y2y3..:y1 + 2(4-x) + x + 2 = 13y2 + 2(4-x) + x = 9y3 + 2(4-x) + x = 10y1 + y2 + y3 + 3(4-x) + x = 19: x = 1, y1 = 4, y2 = 3, y3 = 3.y224-xy1x4-x4-xy35-2JEGF

    *

    1.2 Operations on Sets8) The characteristic functionThe characteristic function fA of A is defined for each x U as follows:fA(x) = 1x A0x ATheorem 4. Characteristic function of subsets satisfy the following properties:(a). fAB = fAfB, fAB(x) = fA(x)fB(x) for all x.(b). fAB = fA + fB - fAfB, fAB(x) = fA(x)+fB(x)-fA(x)fB(x) for all x.(c). fAB = fA + fB - 2fAfB, fAB(x) = fA(x)+fB(x)-2fA(x)fB(x) for all x.Example: U = N, A = {0,2,4,}, fA, fN, f ?

    *

    1.3 Sequences1.4 Division in the Integers1.5 MatricesWhich of the following sets has more elements?N {x| x = 2n, nN} {p| p is a prime} Q R

    *

    Computer Representations of SetsExample 1: the union functionExample 2: Message flood (soj.me/1443).

    *

    1.6 Mathematical StructuresA collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system. is a mathematical structure, where Sets is set of sets on some universe , , and ~ are operations of set: union, intersection and complement., are a mathematical structure too.(1). An