Class Notes (972,785)
CA (572,895)
McMaster (46,551)
COMPENG (55)
Lecture 2

COMPENG 2SI4 Lecture 2: Math Review and Binary Search
Premium

by OneClass502226 , Winter 2017
3 Pages
67 Views

Department
Computer Engineering
Course Code
COMPENG 2SI4
Professor
Sorina Dumitrescu
Lecture
2

This preview shows page 1. Sign up to view the full 3 pages of the document.
Math Review
Permutations
Ordered arrangement of a number of objects
If there are n distinct elements there are n! Permutations
Modular Arithmetic
The modulus function returns the remainder after dividing two integer
Say we have 10 modulo 8 → this gives an answer of 2
In java this operation is written as 10%8
Arithmetic and Geometric Series
These series are good to know
Harmonic Series
The above series diverges as n goes to infinity but it can be shown that:
And therefore we can say that the series diverges logarithmically as n approaches infinity
Sum of Consecutive Numbers Raised to the Same Power

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.

Leah — University of Toronto

OneClass has been such a huge help in my studies at UofT especially since I am a transfer student. OneClass is the study buddy I never had before and definitely gives me the extra push to get from a B to an A!

Leah — University of Toronto
Saarim — University of Michigan

Balancing social life With academics can be difficult, that is why I'm so glad that OneClass is out there where I can find the top notes for all of my classes. Now I can be the all-star student I want to be.

Saarim — University of Michigan
Jenna — University of Wisconsin

As a college student living on a college budget, I love how easy it is to earn gift cards just by submitting my notes.

Jenna — University of Wisconsin
Anne — University of California

OneClass has allowed me to catch up with my most difficult course! #lifesaver

Anne — University of California
Description
Math Review Permutations Ordered arrangement of a number of objects If there are n distinct elements there are n! Permutations Modular Arithmetic The modulus function returns the remainder after dividing two integer Say we have 10 modulo 8 this gives an answer of 2 In j
More Less
Unlock Document

Only page 1 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit