More Sets, Functions, Graphs, Trees, and Proofs




CS154

Chris Pollett

Feb. 3, 2020

Outline

Introduction

Power Set

Successor sets

Axiom of Infinity

The Set of Natural Numbers

Quiz

Which of the following is true?

  1. XML is a web language that can only be used to specify regular expressions.
  2. The statement `A \cup B subseteq A` is never true.
  3. There exists more than one partition of the set `{1,2,3}`.

Functions

Types of Functions

Size of sets

Growth Rates of Functions

In this class we will frequently examine the efficiency of algorithms. We will use the notions on this slide to do this.

Definition: Let `NN` be the nonnegative integers. Let `f` and `g` be functions from `NN` to `NN`.

For example, `n^2+1 = O(n^2)`.

To see this notice, for all `n geq 1`, `n^2+1 leq n^2+ n^2 leq 2cdot n^2`. So `m=1`, `c=2` work for the above definition.

You might want to convince yourself that: `n^3 = Omega(n^2+n+1)` and `n^3 + n^2= Theta(n^3)`.

Equivalence Relations

Example Equivalence Relations

Graphs