ics141-lecture11-Algorithms

# ics141-lecture11-Algorithms - 11-1ICS 141 Discrete...

This preview shows pages 1–11. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 11-1ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiICS141: Discrete Mathematics for Computer Science IDepartment of Information and Computer SciencesUniversity of HawaiiStephen Y. Itoga11-2ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiLecture 11Chapter 3. The Fundamentals3.1 Algorithms11-3ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiSome material in these slides were taken/adapted from the slides made by Prof. Michael P. Frank and Prof. Jonathan L. Gross which are provided through the publisher of “Discrete Mathematics and Its Applications” written by Kenneth H. Rosen.Some material is from Prof. Baek11-4ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiSummation NotationGiven a sequence {an}, an integer lower bound (orlimit) j≥, and an integer upper bound k≥j, then the summation of {an} from ajto akis written and defined as follows:kjjkjiiaaaa+++=+=∑...1∑∑∑=====kjllkjmmkjiiaaa11-5ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiNested SummationsThese have the meaning you’d expect.Note issues of free vs. bound variables, just like in quantified expressions, integrals, etc.( 2960106)4321(666321414141413141314131=⋅=+++===++===∑∑∑∑∑∑ ∑∑∑=========iiiijijijiiijiijij11-6ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiSome Shortcut ExpressionsGeometric sequenceEuler’s trickQuadratic seriesCubic series11-7ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiUsing the ShortcutsExample: Evaluate∑=100502kk.925,297425,40350,33869950496201101100491210012100502100502491210012=-=⋅⋅-⋅⋅=-=+=∑∑∑∑∑∑======kkkkkkkkkkkkUse series splitting.Solve for desiredsummation.Apply quadraticseries rule.Evaluate.11-8ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiSummations: ConclusionYou need to know:How to read, write & evaluate summation expressions like:Summation manipulation laws we covered.Shortcut closed-form formulas, & how to use them.∑∈Xxxf)(∑)()(xPxf∑=kjiia∑∞=jiia11-9ICS 141: Discrete Mathematics I (Spr 2008)University of HawaiiThe sets Aand Bhave the same cardinalityif and only if there is a one-to-one correspondence from Ato B. A set that is either finite or has the same cardinality as the set of positive integers is called countable. A set that is not countable is called uncountable. Example: Show that the set of odd positive integers is a countable set.Cardinality (I)A one-to-one correspondence between Z+and the set of odd positive integers.Consider the functionf(n) = 2n– 1from Z+to the set of odd positive integers11-10ICS 141: Discrete Mathematics I (Spr 2008)University of Hawaiia1, a2,…,an,… expresses one-to-one correspondence f: Z+→S where a1=f(1), a2=f(2),…, an=f(n),…Example: Show that the set of positive rational numbers is countable (see figure)...
View Full Document

## This note was uploaded on 09/12/2008 for the course ICS 141 taught by Professor Idk during the Fall '08 term at Hawaii.

### Page1 / 36

ics141-lecture11-Algorithms - 11-1ICS 141 Discrete...

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

View Full Document
Ask a homework question - tutors are online