Docsity

Introduction Sets, Basic Terminology - Discrete Mathematics | MAD 2104, Study notes of Mathematics

Partial preview of the text

Download Introduction Sets, Basic Terminology - Discrete Mathematics | MAD 2104 and more Study notes Mathematics in PDF only on Docsity!

Florida State University

Course Notes

MAD 2104 Discrete Mathematics I

Florida State University

Tallahassee, Florida 32306-

Copyright ©c2004 Florida State University

Written by Dr. John Bryant and Dr. Penelope Kirby All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means without permission from the authors or a license from Florida State University.

  • Chapter 1. Introduction to Sets and Functions
      1. Introduction to Sets
    • 1.1. Basic Terminology
    • 1.2. Notation for Describing a Set
    • 1.3. Common Universal Sets
    • 1.4. Complements and Subsets
    • 1.5. Element v.s. Subsets
    • 1.6. Cardinality
    • 1.7. Set Operations
    • 1.8. Example 1.8.1
    • 1.9. Product
      1. Introduction to Functions
    • 2.1. Function
    • 2.2. Terminology Related to Functions
    • 2.3. Example 2.3.1
    • 2.4. Floor and Ceiling Functions
    • 2.5. Characteristic Function
  • Chapter 2. Logic
      1. Logic Definitions
    • 1.1. Propositions
    • 1.2. Examples
    • 1.3. Logical Operators
    • 1.4. Negation
    • 1.5. Conjunction
    • 1.6. Disjunction
    • 1.7. Exclusive Or
    • 1.8. Implications
    • 1.9. Terminology
    • 1.10. Example
    • 1.11. Biconditional
    • 1.12. NAND and NOR Operators
    • 1.13. Example
    • 1.14. Bit Strings
      1. Propositional Equivalences
    • 2.1. Tautology/Contradiction/Contingency
      • CONTENTS
    • 2.2. Logically Equivalent
    • 2.3. Examples
    • 2.4. Important Logical Equivalences
    • 2.5. Simplifying Propositions
    • 2.6. Implication
    • 2.7. Normal or Canonical Forms
    • 2.8. Examples
    • 2.9. Constructing Disjunctive Normal Forms
    • 2.10. Conjunctive Normal Form
      1. Predicates and Quantifiers
    • 3.1. Predicates and Quantifiers
    • 3.2. Example of a Propositional Function
    • 3.3. Quantifiers
    • 3.4. Example 3.4.1
    • 3.5. Converting from English
    • 3.6. Additional Definitions
    • 3.7. Examples
    • 3.8. Multiple Quantifiers
    • 3.9. Ordering Quantifiers
    • 3.10. Unique Existential
    • 3.11. De Morgan’s Laws for Quantifiers
    • 3.12. Distributing Quantifiers over Operators
  • Chapter 3. Methods of Proofs
      1. Logical Arguments and Formal Proofs
    • 1.1. Basic Terminology
    • 1.2. More Terminology
    • 1.3. Formal Proofs
    • 1.4. Rules of Inference
    • 1.5. Example 1.5.1
    • 1.6. Rules of Inference for Quantifiers
    • 1.7. Example 1.7.1
    • 1.8. Fallacies
      1. Methods of Proof
    • 2.1. Types of Proofs
    • 2.2. Trivial Proof/Vacuous Proof
    • 2.3. Direct Proof
    • 2.4. Proof by Contrapositive
    • 2.5. Proof by Contradiction
    • 2.6. Proof by Cases
    • 2.7. Existence Proofs
    • 2.8. Constructive Proof
    • 2.9. Nonconstructive Proof
    • 2.10. Nonexistence Proofs
      • CONTENTS
    • 2.11. The Halting Problem
    • 2.12. Counterexample
    • 2.13. Biconditional
      1. Mathematical Induction
    • 3.1. First Principle of Mathematical Induction
    • 3.2. Using Mathematical Induction
    • 3.3. Example 3.3.1
    • 3.4. Example 3.4.1
    • 3.5. Example 3.5.1
    • 3.6. The Second Principle of Mathematical Induction
    • 3.7. Well-Ordered Sets
  • Chapter 4. Applications of Methods of Proof
      1. Set Operations
    • 1.1. Set Operations
    • 1.2. Equality and Containment
    • 1.3. Union and Intersection
    • 1.4. Complement
    • 1.5. Difference
    • 1.6. Product
    • 1.7. Power Set
    • 1.8. Examples
    • 1.9. Venn Diagrams
    • 1.10. Examples
    • 1.11. Set Identities
    • 1.12. Union and Intersection of Indexed Collections
    • 1.13. Infinite Unions and Intersections
    • 1.14. Example 1.14.1
    • 1.15. Computer Representation of a Set
      1. Properties of Functions
    • 2.1. Injections, Surjections, and Bijections
    • 2.2. Examples
    • 2.3. Example 2.3.1
    • 2.4. Example 2.4.1
    • 2.5. Example 2.5.1
    • 2.6. Example 2.6.1
    • 2.7. Inverse Functions
    • 2.8. Inverse Image
    • 2.9. Composition
    • 2.10. Example 2.10.1
      1. Recurrence
    • 3.1. Recursive Definitions
    • 3.2. Recursive definition of the function f (n) = n!
    • 3.3. Recursive definition of the natural numbers
      • CONTENTS
    • 3.4. Proving assertions about recursively defined objects
    • 3.5. Definition of f n
    • 3.6. Example 3.6.1
    • 3.7. Fibonacci Sequence
    • 3.8. Strings
    • 3.9. Bit Strings
      1. Growth of Functions
    • 4.1. Growth of Functions
    • 4.2. The Big-O Notation
    • 4.3. Proofs of Theorems 4.2.1 and 4.2.2
    • 4.4. Example 4.4.1
    • 4.5. Calculus Definition
    • 4.6. Basic Properties of Big-O
    • 4.7. Proof of Theorem 4.6.3
    • 4.8. Example 4.8.1
    • 4.9. Big-Omega
    • 4.10. Big-Theta
    • 4.11. Summary
    • 4.12. Appendix. Proof of the Triangle Inequality
  • Chapter 5. Number Theory
      1. Integers and Division
    • 1.1. Divisibility
    • 1.2. Basic Properties of Divisibility
    • 1.3. Theorem 1.3.1 - The Division Algorithm
    • 1.4. Proof of Division Algorithm
    • 1.5. Prime Numbers, Composites
    • 1.6. Fundamental Theorem of Arithmetic
    • 1.7. Factoring
    • 1.8. Mersenne Primes
    • 1.9. Greatest Common Divisor and Least Common Multiple
    • 1.10. Modular Arithmetic
    • 1.11. Applications of Modular Arithmetic
      1. Integers and Algorithms
    • 2.1. Euclidean Algorithm
    • 2.2. GCD’s and Linear Combinations
    • 2.3. Uniqueness of Prime Factorization
      1. Applications of Number Theory
    • 3.1. Representation of Integers
    • 3.2. Constructing Base b Expansion of n
    • 3.3. Cancellation in Congruences
    • 3.4. Inverses mod m
    • 3.5. Linear Congruence
    • 3.6. Criterion for Invertibility mod m
      • CONTENTS
    • 3.7. Example 3.7.1
    • 3.8. Fermat’s Little Theorem
    • 3.9. RSA System
      1. Matrices
    • 4.1. Definitions
    • 4.2. Matrix Arithmetic
    • 4.3. Example 4.3.1
    • 4.4. Special Matrices
    • 4.5. Boolean Arithmetic
    • 4.6. Example 4.6.1
  • Chapter 6. Introduction to Graph Theory
      1. Introduction to Graphs
    • 1.1. Simple Graphs
    • 1.2. Examples
    • 1.3. Multigraphs
    • 1.4. Pseudograph
    • 1.5. Directed Graph
    • 1.6. Directed Multigraph
    • 1.7. Graph Isomorphism
      1. Graph Terminology
    • 2.1. Undirected Graphs
    • 2.2. The Handshaking Theorem
    • 2.3. Example 2.3.1
    • 2.4. Directed Graphs
    • 2.5. The Handshaking Theorem for Directed Graphs
    • 2.6. Underlying Undirected Graph
    • 2.7. New Graphs from Old
    • 2.8. Complete Graphs
    • 2.9. Cycles
    • 2.10. Wheels
    • 2.11. n-Cubes
    • 2.12. Bipartite Graphs
    • 2.13. Examples
      1. Representing Graphs and Graph Isomorphism
    • 3.1. Adjacency Matrix
    • 3.2. Example 3.2.1
    • 3.3. Incidence Matrices
    • 3.4. Degree Sequence
    • 3.5. Graph Invariants
    • 3.6. Example 3.6.1
    • 3.7. Example
    • 3.8. Proof of Theorem 3.5.1 Part 3 for finite simple graphs
  • Chapter 7. Introduction to Relations
    • CONTENTS
    1. Relations and Their Properties
  • 1.1. Definition of a Relation
  • 1.2. Examples
  • 1.3. Directed Graphs
  • 1.4. Inverse Relation
  • 1.5. Special Properties of Binary Relations
  • 1.6. Examples of Relations and their Properties
  • 1.7. Proving or disproving relations have a property
  • 1.8. Combining Relations
  • 1.9. Example of Combining Relations
  • 1.10. Composition
  • 1.11. Example of Composition
  • 1.12. Characterization of Transitive Relations
  1. INTRODUCTION TO SETS 10

Sets can be written in a variety of ways. One can, of course, simply list the elements if there are only a few. Another way is to use set builder notation, which specifies the sets using a predicate to indicate the attributes of the elements of the set. For example, the set of even integers is

{x|x = 2n, n ∈ Z}

or

{... , − 2 , 0 , 2 , 4 , 6 ,... }.

The first set could be read as “the set of all x’s such that x is twice an integer.” The symbol | stands for “such that.” A colon is often used for “such that” as well, so the set of even integers could also be written

{x : x = 2n, n ∈ Z}.

1.3. Common Universal Sets. The following notation will be used throughout these notes.

  • R = the real numbers
  • N = the natural numbers = { 0 , 1 , 2 , 3 ,... }
  • Z = the integers = {... , − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 ,... }
  • Z+^ = the positive integers = { 1 , 2 , 3 ,... }

Discussion

The real numbers, natural numbers, rational numbers, and integers have special notation which is understood to stand for these sets of numbers. Corresponding bold face letters are also a common notation for these sets of numbers. Some authors do not include 0 in the set of natural numbers. We will include zero.

Exercise 1.3.1. Which of the following sets are equal to the set of all integers that are multiples of 5. There may be more than one or none.

(1) { 5 n|n ∈ R} (2) { 5 n|n ∈ Z} (3) {n ∈ Z|n = 5k and k ∈ Z} (4) {n ∈ Z|n = 5k and n ∈ Z} (5) {− 5 , 0 , 5 , 10 }

  1. INTRODUCTION TO SETS 11

1.4. Complements and Subsets. Definition 1.4.1. The complement of A A = {x ∈ U |x 6 ∈ A}. Definition 1.4.2. A set A is a subset of a set B, denoted

A ⊆ B, if and only if every element of A is also an element of B. Definition 1.4.3. If A ⊆ B but A 6 = B then we say A is a proper subset of B and denote it by A ⊂ B. Definition 1.4.4. The null set, or empty set, denoted ∅, is the set with no members.

Note:

  • ∅ is a subset of every set.
  • A set is always a subset of itself.

Discussion

Please study the notation for elements, subsets, proper subsets, and the empty set. Two other common notations for the complement of a set, A, is Ac^ and A′. Notice that we make a notational distinction between subsets in general and proper subsets. Not all texts and/or instructors make this distinction, and you should check in other courses whether or not the notation ⊂ really does mean proper as it does here.

1.5. Element v.s. Subsets. Sets can be subsets and elements of other sets. Example 1.5.1. Let A = {∅, {∅}}. Then A has two elements ∅ and {∅}

and the four subsets ∅, {∅}, {{∅}}, {∅, {∅}}. Example 1.5.2. Pay close attention to whether the symbols means “element” or “subset” in this example

If S = { 2 , 3 , { 2 }, { 4 }}, then

  • 2 ∈ S • 3 ∈ S • 4 6 ∈ S
  • { 2 } ∈ S • { 3 } 6 ∈ S • { 4 } ∈ S
  • { 2 } ⊂ S • { 3 } ⊂ S • { 4 } 6 ⊂ S
  • {{ 2 }} ⊂ S • {{ 3 }} 6 ⊂ S • {{ 4 }} ⊂ S
  1. INTRODUCTION TO SETS 13

Definition 1.7.2. The intersection of sets A and B, denoted by A ∩ B (read “A intersection B”), is the set consisting of all elements that belong both A and B. In symbols A ∩ B = {x|x ∈ A and x ∈ B} Definition 1.7.3. The difference or relative compliment of two sets A and B, denoted by A − B is the set of all elements in A that are not in B. A − B = {x|x ∈ A and x 6 ∈ B}

Discussion

The operations of union and intersection are the basic operations used to combine two sets to form a third. Notice that we always have A ⊆ A ∪ B and A ∩ B ⊆ A for arbitrary sets A and B.

1.8. Example 1.8.1. Example 1.8.1. Suppose A = { 1 , 3 , 5 , 7 , 9 , 11 }, B = { 3 , 4 , 5 , 6 , 7 } and C = { 2 , 4 , 6 , 8 , 10 }. Then

(a) A ∪ B = { 1 , 3 , 4 , 5 , 6 , 7 , 9 , 11 } (b) A ∩ B = { 3 , 5 , 7 } (c) A ∪ C = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 } (d) A ∩ C = ∅ (e) A − B = { 1 , 9 , 11 } Exercise 1.8.1. Let A = { 1 , 2 , { 1 }, { 1 , 2 }} and B = { 1 , { 2 }}. True or false:

(a) 2 ∈ A ∩ B (b) 2 ∈ A ∪ B (c) 2 ∈ A − B (d) { 2 } ∈ A ∩ B (e) { 2 } ∈ A ∪ B (f ) { 2 } ∈ A − B

1.9. Product. Definition 1.9.1. The (Cartesian) Product of two sets, A and B, is denoted A × B and is defined by A × B = {(a, b)|a ∈ A and b ∈ B}

Discussion

A cartesian product you have used in previous classes is R × R. This is the same as the real plane and is shortened to R^2. Elements of R^2 are the points in the plane.

  1. INTRODUCTION TO SETS 14

Notice the notation for and element in R × R is the same as the notation for an open interval of real numbers. In other words, (3, 5) could mean the ordered pair in R × R or it could mean the interval {x ∈ R| 3 < x < 5 }. If the context does not make it clear which (3, 5) stands for you should make it clear.

Example 1.9.1. Let A = {a, b, c, d, e} and let B = { 1 , 2 }. Then

(1) A × B = {(a, 1), (b, 1), (c, 1), (d, 1), (e, 1), (a, 2), (b, 2), (c, 2), (d, 2), (e, 2)}. (2) |A × B| = 10 (3) {a, 2 } 6 ∈ A × B (4) (a, 2) 6 ∈ A ∪ B Exercise 1.9.1. Let A = {a, b, c, d, e} and let B = { 1 , 2 }. Find

(1) B × A. (2) |B × A| (3) Is (a, 2) ∈ B × A? (4) Is (2, a) ∈ B × A? (5) Is 2 a ∈ B × A?

  1. INTRODUCTION TO FUNCTIONS 16

2.2. Terminology Related to Functions. Let A and B be sets and suppose f : A → B.

  • The set A is called the domain of f.
  • The set B is called the codomain of f.
  • If f (x) = y, then x is a preimage of y. Note, there may be more than one preimage of y, but only one image (or value) of x.
  • The set f (A) = {f (x)|x ∈ A} is called the range of f.
  • If S ⊆ A, then the image of S under f is the set f (S) = {f (s)|s ∈ S}.
  • If T ⊆ B, then the preimage of T under f is the set f −^1 (T ) = {x ∈ A|f (x) ∈ T }.

Discussion

Some of the fine points to remember:

  • Every element in the domain must be assigned to exactly one element in the codomain.
  • Not every element in the codomain is necessarily assigned to one of the elements in the domain.
  • The range is the subset of the codomain consisting of all those elements that are the image of at least one element in the domain. It is the image of the domain.
  • If a subset T of the codomain consists of a single element, say, T = {b}, then we usually write f −^1 (b) instead of f −^1 ({b}). Regardless, f −^1 (b) is still a subset of A.

2.3. Example 2.3.1.

Example 2.3.1. Let A = {a, b, c, d} and B = {x, y, z}. The function f is defined by the relation pictured below:

a

<   << << << << << <<

<<< << x

b //y

c //z

d

q^ q^88 qqq qqq qqq qq

  1. INTRODUCTION TO FUNCTIONS 17
  • f (a) = z
  • the image of d is z
  • the domain of f is A = {a, b, c, d}
  • the codomain is B = {x, y, z}
  • f (A) = {y, z}
  • f ({c, d}) = {z}
  • f −^1 (y) = {b}.
  • f −^1 (z) = {a, c, d}
  • f −^1 ({y, z}) = {a, b, c, d}
  • f −^1 (x) = ∅.

Discussion

This example helps illustrate some of the differences between the codomain and the range. f (A) = {y, z} is the range, while the codomain is all of B = {x, y, z}.

Notice also that the image of a single element is a single element, but the preimage of a single element may be more than one element. Here is another example.

Example 2.3.2. Let f : N → R be defined by f (n) =

n.

  • The domain is the set of natural numbers.
  • The codomain is the set of real numbers.
  • The range is { 0 , 1 ,
  • The image of 5 is
  • The preimage of 5 is 25.
  • The preimage of N is the set of all perfect squares in N. Exercise 2.3.1. Suppose f : R → R is defined by f (x) = |x|. Find

(1) the range of f. (2) the image of Z, the set of integers. (3) f −^1 (π). (4) f −^1 (−1). (5) f −^1 (Q), where Q is the set of rational numbers.

2.4. Floor and Ceiling Functions. Definitions 2.4.1. Floor and ceiling functions:

  • The floor function, denoted f (x) = bxc or f (x) = floor(x),
  1. INTRODUCTION TO FUNCTIONS 19

2.5. Characteristic Function.

Definition: Let U be a universal set and A ⊆ U. The Characteristic Func- tion of A is defined by

χA(s) =

1 if s ∈ A 0 if s 6 ∈ A

Discussion

The Characteristic function is another function that may be new to you.

Example 2.5.1. Consider the set of integers as a subset of the real numbers. Then χZ(y)

will be 1 when y is an integer and will be zero otherwise.

Exercise 2.5.1. Graph the function χZ

given in the previous example in the plane.

Exercise 2.5.2. Find

(1) χZ(0) (2) χ− Z 1 (0) (3) χZ([3, 5]) (4) χ− Z 1 ([3, 5]) Exercise 2.5.3. Let E = { 4 n|n ∈ N} and consider the characteristic function χE : Z → Z. What is the...

(1) domain (2) codomain (3) range (4) χE ({ 2 n|n ∈ N}) (5) χ− E 1 ({ 2 n|n ∈ N})

CHAPTER 2

Logic

  1. Logic Definitions

1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either

true (denoted either T or 1) or

false (denoted either F or 0).

Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Discussion

Logic has been studied since the classical Greek period ( 600-300BC). The Greeks, most notably Thales, were the first to formally analyze the reasoning process. Aristo- tle (384-322BC), the “father of logic”, and many other Greeks searched for universal truths that were irrefutable. A second great period for logic came with the use of sym- bols to simplify complicated logical arguments. Gottfried Leibniz (1646-1716) began this work at age 14, but failed to provide a workable foundation for symbolic logic. George Boole (1815-1864) is considered the “father of symbolic logic”. He developed logic as an abstract mathematical system consisting of defined terms (propositions), operations (conjunction, disjunction, and negation), and rules for using the opera- tions. It is this system that we will study in the first section.

Boole’s basic idea was that if simple propositions could be represented by pre- cise symbols, the relation between the propositions could be read as precisely as an algebraic equation. Boole developed an “algebra of logic” in which certain types of reasoning were reduced to manipulations of symbols.

1.2. Examples. Example 1.2.1. “Drilling for oil caused dinosaurs to become extinct.” is a propo- sition.

20