Algorithms and Discrete Mathematics 20082009 - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Algorithms and Discrete Mathematics 20082009

Description:

the first task and for each of these ways of doing the first task, there are ... same as any of the set of n2 ways, then there are n1 n2 ways to do the. task. Exercise ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 28
Provided by: dur9
Category:

less

Transcript and Presenter's Notes

Title: Algorithms and Discrete Mathematics 20082009


1
Algorithms and Discrete Mathematics 2008/2009
  • Lecture 9
  • Revision

Ioannis Ivrissimtzis
08-Dec-2008
2
Overview of the lecture
  • Combinatorics
  • Exponentiation and logarithms

3
Counting pinciples
  • 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.
4
Exercise
  • Exercise R.1
  • A bit is a symbol with two possible values,
    namely 0 and 1. A bit string
  • is a sequence of bits.
  • How many different bit strings are there of
    length six?
  • How many bit strings of length six start and end
    with 1s?

5
Answer
  • Answer R.1
  • Using the product rule, there are 2 2 2 2
    2 2 64 different bit strings of length six.
  • There are two choices for each bit, except for
    the first and the last bits where there is only
    one choice.
  • Using the product rule, there are 1 2 2 2
    2 1 16 bit strings of length six that start
    and end with 1s.

6
Factorial
  • Definition 2.1 The factorial of an integer n 0
    is defined by
  • and denoted by n!

7
Permutations
  • Definition 2.2 Rosen, p.355 A permutation of a
    set of distinct
  • objects is an ordered arrangement of these
    objects.

We are also interested in ordered arrangements of
some of the elements of a set.
Definition 2.3 Rosen, p.355 An ordered
arrangement of r elements of a set is called an
r-permutation.
8
Permutations
  • Theorem 2.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.

Corollary 2.1 Rosen, p.356 If n and r are
integers with 0 r n, then
9
Combinations
  • Definition 2.4 Rosen, p.357 An r-combination
    of elements of a set
  • is an unordered selection of r elements from the
    set.

Theorem 2.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
10
Binomial coefficients
  • Definition 2.5 Rosen, p.357 The number of
    r-combinations of a set
  • with n distinct elements is denoted by C( n, r ).
    It is also denoted by
  • and is called a binomial coefficient. It is
    pronounced n choose r.

11
Exercise
  • Exercise R.2 Rosen, p.361, Ex.20
  • How many bit strings of length eight have
  • exactly three 1s?
  • at most three 1s?

12
Answer
  • Answer R.2
  • The bit strings of length 8 with exactly three 1s
    are
  • The bit strings of length 8 with at most three 1s
    are

13
Pascals triangle
14
Pascals triangle
15
Binomial theorem
  • The Binomial Theorem Rosen, p.363 Let x and y
    be variables, and
  • let n be a nonnegative integer. Then

16
Exercise
  • Exercise R.3 Rosen, p.364 Expand (xy)4

Answer R.3
17
Overview of the lecture
  • Combinatorics
  • Exponentiation and logarithms

18
Positive integer powers
  • Proposition 4.1 If b is a real number and n,m
    are positive integers,
  • we have

Proposition 4.2 If b is a real number and n,m
are positive integers, we have
19
Negative integer powers
  • 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, is a real number x with the property
20
Exponential functions
  • The exponential functions
  • are everywhere positive
  • At zero their value is 1.
  • For bgt1 they increase
  • monotonically. They grow
  • fast.

1
0
21
Properties of exponentials
  • Proposition 4.3 Let a,b,x,y be real numbers,
    with a,bgt0. We have

22
Exercise
  • Exercise R.5 Find one solution of the equation

Answer R.5
23
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

24
Logarithms
  • Exercise R.4 Compute

Answer R.4
25
Logarithms
  • The logarithms are inverses
  • of the exponentials.
  • They are only defined on
  • positive real numbers.
  • For any base, the logarithm
  • of 1 is 0.
  • For bgt1 they increase
  • monotonically. They grow
  • slow.

1
0
26
Properties of logarithms
  • Proposition 5.1 Let b,r,s be positive real
    numbers with b?1. We have
  • These properties are related to properties of the
    exponents mentioned
  • in the previous lecture.

27
Exercise
  • Exercise R.6 Solve the equation

Answer R.6
Write a Comment
User Comments (0)
About PowerShow.com