Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)

Similar presentations


Presentation on theme: "Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)"— Presentation transcript:

1 Discrete Mathematics CS 2610 February 10, 2009

2 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)

3 3 But First p  q  r, is NOT true when only one of p, q, or r is true. Why not? It is true for (p Λ ¬q Λ ¬r) It is true for (¬p Λ q Λ ¬r) It is true for (¬p Λ ¬q Λ r) So what’s wrong? Raise your hand when you know.

4 4 Injective Functions (one-to-one) If function f : A  B is 1-to-1 then every b  B has 0 or 1 pre-image. Proof (bwoc): Say f is 1-to-1 and b  B has 2 or more pre-images. Then  a 1, a 2 st a 1  A and a 2  A, and a 1 ≠ a 2. So f(a 1 ) = b and f(a 2 ) = b, meaning f(a 1 ) = f(a 2 ). This contradicts the definition of an injection since when a 1 ≠ a 2 we know f(a 1 ) ≠ f(a 2 ).

5 5 Combining Real Functions Given f :R  R and g :R  R then (f  g): R  R, is defined as (f  g)(x) = f(x)  g(x) (f · g): R  R is defined as (f · g)(x) = f(x) · g(x) Example: Let f :R  R be f(x) = 2x and and g :R  R beg(x) = x 3 (f+g)(x) = x 3 +2x (f · g)(x) = 2x 4

6 6 Monotonic Real Functions Let f: A  B such that A,B  R f is strictly increasing iff  for all x, y  A x > y  f(x) > f(y) f is strictly decreasing iff  for all x, y  A, x > y  f(x) < f(y) Example: f: R+  R+, f(x) = x 2 is strictly increasing

7 7 Increasing Functions are Injective Theorem: A strictly increasing function is always injective Proof:

8 8 Floor and Ceiling Function Definition: The floor function .  :R → Z,  x  is the largest integer which is less than or equal to x.  x  reads the floor of x Definition: The ceiling function .  :R → Z,  x  is the smallest integer which is greater than or equal to x.  x  reads the ceiling of x

9 9 Example Ceiling and Floor Functions Example:  -2.8  =  2.8  =  2.8  =  -2.8  = -3 2 3 -2

10 10 Ceiling and Floor Properties Let n be an integer (1a)  x  = n if and only if n ≤ x < n+1 (1b)  x  = n if and only if n-1 < x ≤ n (1c)  x  = n if and only if x-1 < n ≤ x (1d)  x  = n if and only if x ≤ n < x+1 (2)x-1 <  x  ≤ x ≤  x  < x+1 (3a)  -x  = -  x  (3b)  -x  = -  x  (4a)  x+n  =  x  +n (4b)  x+n  =  x  +n

11 11 Ceiling and Floor Functions Let n be an integer, prove  x+n  =  x  +n Proof Let k =  x  Then k ≤ x < k+1 So k+n ≤ x+n < k+1+n I.e., k+n ≤ x+n < (k+n)+1 Since both k and n are integers, k+n is an integer Thus,  x+n  = k+n =  x  +n (by our choice of k) This concludes the proof This also concludes Chapter 2!

12 12 Boolean Algebras (Chapter 11) Boolean algebra provides the operations and the rules for working with the set {0, 1}. These are the rules that underlie electronic and optical circuits, and the methods we will discuss are fundamental to VLSI design.

13 13 Boolean Algebra The minimal Boolean algebra is the algebra formed over the set of truth values {0, 1} by using the operations functions +, ·, - (sum, product, and complement). The minimal Boolean algebra is equivalent to propositional logic where O corresponds to False 1 corresponds to True  corresponds logical operator AND + corresponds logical operator OR - corresponds logical operator NOT

14 14 Boolean Algebra Tables x0011x0011 y0101y0101 x + y 0 1 xy 0 1 x01x01 x10x10 x,y are Boolean variables – they assume values 0 or 1

15 15 Boolean n-Tuples Let B = {0, 1}, the set of Boolean values. Let B n = { (x 1,x 2,…x n ) | x i  B, i=1,..,n}. B 1= { (x 1 ) | x 1  B,} B 2= { (x 1, x 2 ), | x i  B, i=1,2} B n= { ((x 1,x 2,…x n ) | x i  B, i=1,..,n,} For all n  Z +, any function f:B n → B is called a Boolean function of degree n.

16 16 Example Boolean Function x00001111x00001111 y00110011y00110011 z01010101z01010101 F(x,y,z)=x(y+z) F(x,y,z) =B 3  B B 3 has 8 triplets 0 0 0 0 1 1 0 1

17 17 Number of Boolean Functions How many different Boolean functions of degree 1 are there? How many different Boolean functions of degree 2 are there? How many different functions of degree n are there ? There are 2 2ⁿ distinct Boolean functions of degree n.


Download ppt "Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)"

Similar presentations


Ads by Google