1 / 17

Discrete Mathematics CS 2610

Discrete Mathematics CS 2610. February 10, 2009. Agenda. Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1). 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)

uta
Download Presentation

Discrete Mathematics CS 2610

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete Mathematics CS 2610 February 10, 2009

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

  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. 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 a1, a2 st a1  A and a2  A, and a1 ≠ a2. • So f(a1) = b and f(a2) = b, meaning f(a1) = f(a2). • This contradicts the definition of an injection since when a1 ≠ a2 we know f(a1) ≠ f(a2).

  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 bef(x) = 2x and and g :RR be g(x) = x3 (f+g)(x) = x3+2x (f · g)(x) = 2x4

  6. Monotonic Real Functions • Let f: ABsuch thatA,B  R f is strictlyincreasing iff • for all x, y  A x > y  f(x) > f(y) fis strictlydecreasingiff • for all x, y  A, x > y  f(x) < f(y) Example: f: R+  R+, f(x) = x2 is strictly increasing

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

  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. Example Ceiling and Floor Functions Example: -2.8 = 2.8 = 2.8 = -2.8 = -3 2 3 -2

  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. 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. 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. 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 • Ocorresponds to False • 1 corresponds to True •  corresponds logical operator AND • + corresponds logical operator OR • - corresponds logical operator NOT

  14. x 0 0 1 1 y 0 1 0 1 x + y 0 1 1 1 x 0 1 x 1 0 xy 0 0 0 1 Boolean Algebra Tables x,y are Boolean variables – they assume values 0 or 1

  15. Boolean n-Tuples • Let B = {0, 1}, the set of Boolean values. • LetBn = { (x1,x2,…xn) | xi B, i=1,..,n} . B1= { (x1) | x1 B,} B2= { (x1, x2), | xi B, i=1,2} Bn= { ((x1,x2,…xn) | xi B, i=1,..,n,} • For all nZ+, any function f:Bn→B is called a Boolean function of degree n.

  16. Example Boolean Function F(x,y,z) =B3B z 0 1 0 1 0 1 0 1 x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 F(x,y,z)=x(y+z) 0 0 0 0 1 B3 has 8 triplets 1 0 1

  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 22ⁿ distinct Boolean functions of degree n.

More Related