Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish...
-
Upload
bernadette-sims -
Category
Documents
-
view
214 -
download
0
Transcript of Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish...
![Page 1: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/1.jpg)
Discrete Mathematics CS 2610
February 10, 2009
![Page 2: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/2.jpg)
2
Agenda
Previously Functions
And now Finish functions Start Boolean algebras (Sec. 11.1)
![Page 3: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/3.jpg)
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.
![Page 4: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/4.jpg)
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).
![Page 5: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/5.jpg)
5
Combining Real Functions
Given f :RR and g :RR then
(f g): RR, is defined as
(f g)(x) = f(x) g(x)
(f · g): RR is defined as
(f · g)(x) = f(x) · g(x)
Example:
Let f :RR be f(x) = 2x and and g :RR be g(x) = x3
(f+g)(x) = x3+2x
(f · g)(x) = 2x4
![Page 6: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/6.jpg)
6
Monotonic Real Functions
Let f: AB such that A,B Rf 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
![Page 7: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/7.jpg)
7
Increasing Functions are Injective
Theorem: A strictly increasing function is always injective
Proof:
![Page 8: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/8.jpg)
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
![Page 9: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/9.jpg)
9
Example Ceiling and Floor Functions
Example:
-2.8 =
2.8 =
2.8 =
-2.8 =
-3
2
3
-2
![Page 10: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/10.jpg)
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
![Page 11: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/11.jpg)
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!
![Page 12: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/12.jpg)
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.
![Page 13: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/13.jpg)
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
![Page 14: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/14.jpg)
14
Boolean Algebra Tables
x
0
0
1
1
y
0
1
0
1
x + y
0
1
1
1
xy
0
0
0
1
x
0
1
x
1
0
x,y are Boolean variables – they assume values 0 or 1
![Page 15: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/15.jpg)
15
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 nZ+, any function f:Bn→B is called a Boolean function of degree n.
![Page 16: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/16.jpg)
16
Example Boolean Function
x
0
0
0
0
1
1
1
1
y
0
0
1
1
0
0
1
1
z
0
1
0
1
0
1
0
1
F(x,y,z)=x(y+z)
F(x,y,z) =B3B
B3 has 8 triplets
0
0
0
0
1
1
0
1
![Page 17: Discrete Mathematics CS 2610 February 10, 2009. 2 Agenda Previously Functions And now Finish functions Start Boolean algebras (Sec. 11.1)](https://reader036.fdocuments.us/reader036/viewer/2022062519/5697c0301a28abf838cdaad6/html5/thumbnails/17.jpg)
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.