Discrete Structures for Computer Science
Ruoming Jin MW 2:15 3:00pm Spring 2010 rm MSB115
Textbook: Discrete Mathematics and Its Applications Kenneth H. Rosen, McGraw Hill
Homework, 20% Quiz, 20% Three Intermediate Ex
R e la tio ns
a re la tio nb e twe e ne le m e nts o ftwo s e ts is a s ub s e t o fth e irC a rte s ia np ro d uc t(o fo rd e re d p a irs ) . No te th e d ie re nc e b e twe e na re la tio na nd a func tio n:ina re la tio n,e a c h a A
Induction and Recursion
Odd Powers Are Odd
Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, mk is odd for all non-negative integer k.
Let P(i) be the proposition that mi is odd.
Proof by induction
P(1) is true by definiti
Counting in Algorithms
How many comparisons are needed to sort n numbers?
How many steps to compute the GCD of two numbers ?
How many steps to factor an integer?
Counting in Games
How many different configurations for a Rubiks cube?
f( ) =
f :A B
function, f, from set A to set B associates an element
f (a) B
, with an element
The domain of f is A. The codomain of f is B.
For every input there is exactly one output.
Functions f(S) = |S
A set is a collection of (mathematical) objects, with the collection treated as a single mathematical object. Examples: real numbers, integers,
complex numbers, C All students in our class
Sets can be defined directl
Logic and Proof
An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement is called the conclusion. An argument is valid if: whenever all the assumptions are true, then the
First Order Logic
A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both. Are the following sentences propositions?
Toronto is the capital of Canada. Read this carefully.