21a-Mathematical-Induction

21a-Mathematical-Induction - Mathematical Introduction...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Mathematical Induction II Discrete Mathematics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics – Mathematical Induction II 21-2 Principle of Mathematical Induction Principle of mathematical induction : To prove that a statement that assert that some property P(n) is true for all positive integers n, we complete two steps Basis step : We verify that P(1) is true. Inductive step : We show that the conditional statement P(k) P(k + 1) is true for all positive integers k To prove the conditional statement, we assume that P(k) is true (it is called inductive hypothesis ) and show that under this assumption P(k + 1) is also true
Background image of page 2
Discrete Mathematics – Mathematical Induction II 21-3 Analysis of Algorithms Consider the following problem There is a group of proposed talks to be given. We want to schedule as many talks as possible in the main lecture room. Let be the talks, talk begins at time and ends at time . (No two lectures can proceed at the same time, but a lecture can begin at the same time another one ends.) We assume that . 9:00 10:00 11:00 12:00
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Greedy algorithm: At every step choose a talk with the earliest ending time among all those talks that begin after all talks already scheduled end. We prove that the greedy algorithm is optimal in the sense that it always schedules the most talks possible in the main lecture hall. 9:00 10:00 11:00 12:00 Discrete Mathematics – Mathematical Induction II 21-4 Greedy Algorithm
Background image of page 4
Discrete Mathematics – Mathematical Induction II 21-5 Greedy Algorithm (cntd) Let P(n) be the proposition that if the greedy algorithm schedules n talks, then it is not possible to schedule more than n talks. Basis step. Suppose that the greedy algorithm has scheduled only one talk, . This means that every other talk starts before , and ends after . Hence, at time each of the remaining talks needs to use the lecture hall. No two talks can be scheduled because of that. This proves P(1). Inductive step. Suppose that P(k) is true, that is, if the greedy algorithm schedules k talks, it is not possible to schedule more than k talks. We prove P(k + 1), that is, if the algorithm schedules k + 1 talks then this is the optimal number.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Discrete Mathematics – Mathematical Induction II 21-6 Greedy Algorithm (cntd) Suppose that the algorithm has selected k + 1 talks.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/12/2010 for the course MACM 201 taught by Professor Marnimishna during the Fall '09 term at Simon Fraser.

Page1 / 21

21a-Mathematical-Induction - Mathematical Introduction...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online