Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Mathematics Review: Sets of Numbers, Sequences, Logarithms, and Induction, Study notes of Algorithms and Programming

A comprehensive review of various mathematical concepts including sets of numbers (natural, real, integers, rational), cardinality, polynomial functions, set notation, sequences, logic, permutations, combinations, logarithms and exponents, and proof by induction. It covers topics such as polynomial functions of degree n, set notation [a, b] and (a, b), permutations and combinations, binomial coefficients, logarithms and exponents, and proof by induction.

Typology: Study notes

Pre 2010

Uploaded on 08/09/2009

koofers-user-s1p
koofers-user-s1p 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 2 - Mathematics Review
Sets of Numbers
- Natural numbers {1, 2, 3, 4, …} positive whole numbers, infinite, countable
- Real numbers (i.e., floating point numbers) infinite, not countable
Integers both non-negative and negative whole numbers {…-2, -1, 0, 1, 2, …}, includes zero, countable
Rational numbers can be expressed as a fraction of two whole numbers (i.e., 0.25 = ¼), countable
2
is not rational, i.e., can not be expressed as a/b where a and b are whole numbers.
Cardinality
If X is a finite set, |X| is the number of elements in the set.
Polynomial of degree n
01
2
2
2
2
1
1
...)( cxcxcxcxcxcxp
n
n
n
n
n
n
Example:
3x3+5x2+4x+x4 Polynomial of degree 4 (a common trick in this course)
Set Notation
[a, b] All the number between a and b, including both a and b.
(a, b) All the number between a and b, excluding both a and b.
Examples:
[3, 6] = {3, 4, 5, 6} assuming a and b are integers. (1, 2) = { } [1, 3) = {1, 2}
[3.0, 6.0] is infinite, assuming a and b are Real Numbers
Sequences are like sets except the order of the elements matter.
Given a = 1, 2, 3 and b = 3, 1, 2, the sequences a and b are not equal.
Sequence a[n] = a0, a1, a2, …, an-1
1, 5, 6, 10, 14, 23 increasing sequence 9, 6, 5, 3, 2 decreasing sequence
1, 2, 2, 6, 7, 7 non-decreasing sequence 9, 9, 9, 5, 4 non-increasing sequence
3, 7, 10 is a sub-sequence of a = 1, 3, 4, 7, 8, 10
Logic
p
q
r
interpreted as ((not p) and q) or (not r) Can also be written as ~pq+~r
~pq is true when p = 0 and q = 1. Also, ~r is true when r = 0.
Thus, ~pq+~r is true when r = 0 or when p = 0 and q = 1.
Permutations - number of different orderings (analogous to sequences).
Given {a,b,c}, there are 3! = 6 permutations (abc, acb, bca, bac, cab, cba).
Combinations - number of different subsets (order does not matter).
Given {a,b,c}, there is one combination of size 3.
Given {a,b,c,d} there are 4 combinations of size 3 (abc, bcd, cda, dac).
Binomial coefficient counts the number of combinations, i.e., the number of k-element subsets of an n-element set.
!)!(
!
kkn
n
k
n
1204*3*10
2*3
8*9*10
1*2*3*4*5*6*7*1*2*3
1*2*3*4*5*6*7*8*9*10
!7!3
!10
!7)!710(
!10
7
10
Logarithms & Exponents
pf2

Partial preview of the text

Download Mathematics Review: Sets of Numbers, Sequences, Logarithms, and Induction and more Study notes Algorithms and Programming in PDF only on Docsity!

Chapter 2 - Mathematics Review

Sets of Numbers

 - Natural numbers {1, 2, 3, 4, …} positive whole numbers, infinite, countable

 - Real numbers (i.e., floating point numbers) infinite, not countable

Integers both non-negative and negative whole numbers {…-2, -1, 0, 1, 2, …}, includes zero, countable

Rational numbers can be expressed as a fraction of two whole numbers (i.e., 0.25 = ¼), countable

2 is^ not^ rational, i.e., can not be expressed as a/b where a and b are whole numbers.

Cardinality

If X is a finite set, |X| is the number of elements in the set.

Polynomial of degree n

1 0

2

2

2

2

1

1

p ( x ) cx c x c x ... cx cx c

n

n

n

n

n

n

Example:

3x

3 +5x

2 +4x+x

4 Polynomial of degree 4 (a common trick in this course)

Set Notation

[a, b] All the number between a and b , including both a and b.

(a, b) All the number between a and b , excluding both a and b.

Examples:

[3, 6] = {3, 4, 5, 6} assuming a and b are integers. (1, 2) = { } [1, 3) = {1, 2}

[3.0, 6.0] is infinite, assuming a and b are Real Numbers

Sequences are like sets except the order of the elements matter.

Given a = 1, 2, 3 and b = 3, 1, 2 , the sequences a and b are not equal.

Sequence a[n] = a 0 , a 1 , a 2 , …, an-

1, 5, 6, 10, 14, 23 increasing sequence 9, 6, 5, 3, 2 decreasing sequence

1, 2, 2, 6, 7, 7 non-decreasing sequence 9, 9, 9, 5, 4 non-increasing sequence

3, 7, 10 is a sub-sequence of a = 1, 3, 4, 7, 8, 10

Logic

pq^  r interpreted as (( not p) and q) or (not r) Can also be written as ~pq+~r

~pq is true when p = 0 and q = 1. Also, ~r is true when r = 0.

Thus, ~pq+~r is true when r = 0 or when p = 0 and q = 1.

Permutations - number of different orderings (analogous to sequences).

Given {a,b,c}, there are 3! = 6 permutations (abc, acb, bca, bac, cab, cba).

Combinations - number of different subsets (order does not matter).

Given {a,b,c}, there is one combination of size 3.

Given {a,b,c,d} there are 4 combinations of size 3 (abc, bcd, cda, dac).

Binomial coefficient counts the number of combinations, i.e., the number of k-element subsets of an n-element set.

n k k

n

k

n

Logarithms & Exponents

Example 2

3

= 8, so log 8 3

2

Thus,

b x

x b

log

and b x

x

b

log  (Logarithms cancel out exponentials)

x y x

b

y

b

log  log

a

x

x

b

b

a log

. log

log  (Change of base formula)

Natural Log = ln(x) = logex where e = 2.

If base not given, assume base equals 2. log(x/y) = log(x) - log(y) log(xy) = log(x) + log(y)

1 2 2 2

  

n n n m n m 2  22

m

n

n m

2

2

2 

Summations

2 2

( 1 )

2

1

nn n n

i

n

i

 6

2 3

6

( 1 )( 2 1 )

3 2

1

2 nn n n n n

i

n

i

 

 

1

( 1 )

1

1

r

a r

ar

n^ n

i

i

Proof by Induction

Example

Side A = Side B

2

( 1 )

1

n n

i

n

i

Step 1 : Show that the base case is true: n = 1 Side A: 1

1

1

i

i Side B: 1

Substitute base value, i.e., n = 1, on both Side A and Side B and show that the numeric value is equal.

Step 2: Assume true for n. This is important because we can use the equality to perform a substitution

Step 3: Prove true for n+

Side A:

1

1

n

i

i (^) Side B:

( n  1 )(( n  1 ) 1 )

Try to re-write Side A or Side B so that it includes the initial equality, i.e., Side A:

  

n

i

n

i

i n i

1

1

1

( 1 )

Notice how Side A is re-written as (n+1) plus the initial equality.

Now, perform the substitution and simplify side A:

Side A:

2

3 2

2

2 2

2

( 1 )

( 1 ) ( 1 )

2 2

1

 

  

    

nn n n n n n

n i n

n

i

Now, simplify side B.

Side B:

2

n  n   n n n n