Get 2 days of unlimited access
Class Notes (1,000,000)
CA (600,000)
McMaster (40,000)
Lecture 2

COMPENG 2SI4 Lecture 2: Math Review and Binary Search

Computer Engineering
Course Code
Sorina Dumitrescu

This preview shows half of the first page. to view the full 3 pages of the document.
Math Review
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
You're Reading a Preview

Unlock to view full version