1 / 19

Discrete Mathematics CS 2610

Discrete Mathematics CS 2610. September 16, 2008. 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:

lara
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 September 16, 2008

  2. 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) = x2 is strictly increasing

  3. Increasing Functions are Injective Theorem: A strictly increasing function is always injective Proof: Let x, y be 2 numbers st x ≠ y, now show that their images are not equal. Either x > y, or y > x. 1) x > y: since f is strictly increasing then f(x) > f(y), i.e., f(x) ≠ f(y)! 2) y > x: since f is strictly increasing then f(y) > f(x), i.e., f(y) ≠ f(x)!  x ≠ y implies f(x) ≠ f(y) so the function f is injective.

  4. 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”

  5. 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

  6. 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

  7. Boolean Algebras • Boolean algebra provides the operations and the rules for working with the set {0, 1}. • The rules of Boolean algebra will be familiar. It is essentially the same as Boolean logic, except that we manipulate symbols within the context of an algebra. • These are the rules that underlie electronic and optical circuits, and the methods we will discuss are fundamental to VLSI design.

  8. Boolean Algebra • The minimal Boolean algebra is the algebra formed over the set of truth values {0, 1} by using the operations: +, •, ¯ (sum, product, 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

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

  10. Boolean n-Tuples Let B = {0, 1}, the set of Boolean values. Let Bn = { (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.

  11. Example Boolean Function • F(x,y,z) = B3→B x y z F(x,y,z)=x(y+z) 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0

  12. 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.

  13. Combining Boolean Functions • Let F and G be two Booleans functions of degree n. _ _______ • Complement of F: F(x1,…,xn) = F(x1,…,xn) • Boolean Sum : (F + G)(x1,…,xn) = F(x1,…,xn) + G(x1,…,xn) • Boolean Product: (F  G) (x1,…,xn) = F(x1,…,xn)  G(x1,…,xn)

  14. Equal Boolean Functions • Two Boolean functions F and G of degree n are equal iff for all (x1,…,xn)  Bn, F(x1,…,xn) = G(x1,…,xn) • Example: F(x,y,z) = x(y+z), G(x,y,z) = xy + zx

  15. Boolean Expressions • Let x1,…,xn be n different Boolean variables. • A Boolean expression is a string of one of the following forms (recursive definition): • 0, 1, x1,…, or xn are Boolean Expressions • If E1 and E2 are Boolean expressions then -E1, (E1E2), or (E1+E2) are Boolean expressions. • Example: • E1 = x • E2 = y • E3 = z • E4 = E1 + E2= x + y • E5 = E1E2 = x y • E6 = -E3 = -z • E7 = E6 + E4 = -z + x + y • E8 = E6E4 = -z( x + y) _ • Note: equivalent notation: -E = E for complement

  16. Functions and Expressions • A Boolean expression represents a Boolean function. • Furthermore, every Boolean function (of a given degree) can be represented by a Boolean expression with n variables. _ _ x1 x2 x3 F(x1,x2,x3)=x1(x2+x3)+x1x2x3 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1

  17. Boolean Functions • Two Boolean expressions E1 and E2 that represent the exact same function F are called equivalent x1 x2 x3 F(x1,x2,x3) 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 _ _ F(x1,x2,x3) = x1(x2+x3)+x1x2x3 _ _ _ F(x1,x2,x3) = x1x2+x1x3+ x1x2x3

  18. Representing Boolean Functions • How to construct a Boolean expression that represents a Boolean Function? • Create the “sum of products” expansion. • Then you can simplify using identities.

  19. Double complement: x = x Idempotent laws: x + x = x, x · x = x Identity laws: x + 0 = x, x · 1 = x Domination laws: x + 1 = 1, x · 0 = 0 Commutative laws: x + y = y + x, x · y = y · x Associative laws: x + (y + z) = (x + y) + z x · (y · z) = (x · y) · z Distributive laws: x + y·z = (x + y)·(x + z) x · (y + z) = x·y + x·z De Morgan’s laws: (x · y) = x + y, (x + y) = x · y Absorption laws: x + x·y = x, x · (x + y) = x Boolean Identities the Unit Property: x + x = 1 and Zero Property: x · x = 0

More Related