Algorithms and Discrete Mathematics 20072008 - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Algorithms and Discrete Mathematics 20072008

Description:

O(nk), k = 0,1,2,3,... cubic. O(n3) quadratic. O(n2) n log n. O(nlogn) linear ... leading degree without leading constant. Revision. Exponentials - Logarithms ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 21
Provided by: dur87
Category:

less

Transcript and Presenter's Notes

Title: Algorithms and Discrete Mathematics 20072008


1
Algorithms and Discrete Mathematics 2007/2008
  • Lecture 8
  • Revision

Ioannis Ivrissimtzis
30-Nov-2007
2
Revision
  • Exponentials - Logarithms
  • Properties of exponentials
  • Properties of logarithms
  • Big-O notation
  • Definition
  • Basic Big-O categories
  • Big-O of polynomials
  • Combinatorics
  • Counting principles
  • Permutations - combinations
  • Binomial theorem
  • Pascals triangle

3
Exponentials
  • For a real number b?0 we define

Let b?0 be a real number and let n be a positive
integer. We define
Let b0 be a real number and let n be a positive
integer. We define as the n-th root of b. That
is, a real number x with the property
4
Exponentials
  • The exponential functions
  • are everywhere positive
  • For bgt1 they increase
  • monotonically.

1
0
5
Exponentials
  • Properties of the real exponents
  • Let a,b,x,y be real numbers, with a,bgt0. We have

6
Logarithms
  • For real positive numbers x,b with b?1, the
    logarithm of x to the base
  • b, written logbx is the unique real number y that
    satisfies byx.
  • That is, if we raise b to the power of logbx we
    get x.

7
Logarithms
  • The logarithms are inverses
  • of the exponentials.
  • They are only defined on
  • positive real numbers.

1
0
8
Logarithms
  • Proposition 4.1 Let b,r,s be positive real
    numbers with b?1. We have
  • These properties are related to properties of the
    exponents.

9
Revision
  • Exponentials - Logarithms
  • Properties of exponentials
  • Properties of logarithms
  • Big-O notation
  • Definition
  • Basic Big-O categories
  • Big-O of polynomials
  • Combinatorics
  • Counting principles
  • Permutations - combinations
  • Binomial theorem
  • Pascals triangle

10
The Big-O notation
  • Let f and g be functions from the set of integers
    or the set of real
  • numbers to the set of real numbers. We say that
    f(x) is O(g(x)) if there
  • are constants C and k such that
  • whenever x gt k. This is read as f(x) is
    big-oh of g(x).
  • Rosen, p.180

11
The Big-O notation
  • Some orders that often occur in practice are

12
Big-O of polynomials
  • Proposition 5.1 Rosen, p.184 Any polynomial
    function is Big-O its
  • leading degree without leading constant.

13
Revision
  • Exponentials - Logarithms
  • Properties of exponentials
  • Properties of logarithms
  • Big-O notation
  • Definition
  • Basic Big-O categories
  • Big-O of polynomials
  • Combinatorics
  • Counting principles
  • Permutations - combinations
  • Binomial theorem
  • Pascals triangle

14
Counting principles
  • The product rule Rosen, p.336 Suppose that a
    procedure can be
  • broken down into a sequence of two tasks. If
    there are n1 ways to do
  • the first task and for each of these ways of
    doing the first task, there are
  • n2 ways to do the second task, then there are
    n1n2 ways to do the
  • procedure.

The sum rule Rosen, 338 If a task can be done
either in one of n1 ways or in one of n2 ways,
where none of the set of n1 ways is the same as
any of the set of n2 ways, then there are n1n2
ways to do the task.
15
Counting principles
  • Inclusion-exclusion principle Rosen, p.342 Let
    A1, A2 be finite sets,
  • we have

16
Permutations
Definition 6.2 Rosen, p.355 An ordered
arrangement of r elements of a set is called an
r-permutation.
  • Theorem 6.1 Rosen, p.356 If n and r are
    integers with 1 r n, then
  • there are
  • r-permutations of a set with n distinct elements.

17
Combinations
  • Definition 6.4 Rosen, p.355 An r-combination
    of elements of a set is
  • an unordered selection of r elements from the
    set.
  • Thus, an r-combination is simply a subset with r
    elements.

Theorem 6.2 Rosen, p.358 The number of
r-combinations of a set with n elements, where n
and r are integers with 0 r n, equals
18
Binomial theorem
  • The Binomial Theorem Rosen, p.363 Let x and y
    be variables, and
  • let n be a nonnegative integer. Then

19
Pascals triangle
By Pascals identity
20
Pascals triangle
Write a Comment
User Comments (0)
About PowerShow.com