Download presentation
Presentation is loading. Please wait.
Published byAbigail Richards Modified over 9 years ago
1
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p q) is true OR -(p ~q) is true. It means that both p AND ~q must be true -To show contradiction, show that q is also true, OR Show that ~p is also true. -~q = n is not odd = n is even -n = 2k -3n + 2 = 6k + 2 = 2 (3k + 1) = 2t is even -~p is true -Thus, p and ~p are both true contradiction
2
Example
3
Functions Definition: Let X and Y be nonempty sets. A function f from X to Y: for each x X, there is exactly one y Y We write f(x) = y is the unique element of Y assigned by the function f to the element x of X. Notation: f : X Y f is a function from X to Y Other names: mappings, tranformations
4
Example 1 2 3 4 a b c d 1 2 3 4 a b c d 1 2 3 4 a b c d XY XY XY fungsiBukan fungsi
5
Some Terminology Definition: f is a function from A to B. A is the domain of f. B is the codomain of f. f(a) = b. b is the image of a. a is the preimage of b. The range of f is the set of all images of elements of A. f maps A to B. From previous example: f is the function “lahir di” f(x) = lahir di Domain: {xx, yy, zz} Codomain: (Jakarta, Solo, Bogor} The range of f: {Jakarta, Solo}
6
Example R is the relation consist of pairs {Abdul, 22}, (Brenda, 24}, {Carla, 21}. What are the domain, codomain and function? Domain: {Abdul, Brenda, Carla} Codomain: {21, 22, 24} Function f, ages of students Range: {21, 22, 24}
7
Equality of Functions Definition: Two functions are equal when they have the same domain, have the same codomain, and map elements of their common domain to the same elements in their common codomain.
8
Sum and Product of Functions Definition: Let f 1 and f 2 be functions from A to R. Then f 1 +f 2 and f 1 f 2 are also functions from A to R defined by. Notation: (f 1 + f 2 )(x) = f 1 (x) + f 2 (x) (f 1 f 2 )(x) = f 1 (x) f 2 (x)
9
Example f 1 (x) = x 2 f 2 (x) = x – x 2 (f 1 + f 2 )(x) = f 1 (x) + f 2 (x) = x 2 + (x – x 2 ) = x (f 1 f 2 )(x) = f 1 (x) f 2 (x) = x 2 (x – x 2 ) = x 3 – x 4
10
Image of a Subset Definition: Let f be a function from the set A to the set B and let S be a subset of A. The image of S under the function f is the subset of B that consists of the images of the elements of S. we denote the image of S by f(S). Notation: f(S) = {t | s S (t = f(s))} {f(s) | s S}
11
Example A = {a, b, c, d} B = {1, 2, 3, 4} f(a) = 2, f(b) = 1, f(c) = 4, f(d) = 1. S = (b, c, d) f(S) = {1, 4}
12
One-to-One Function Definition: A function f is said to be one-to-one, or injective, if and only if f(a) = f(b) implies that a = b for all a and b in the domain of f. A function is said to be an injection if it is one- to-one. Notation: a b (f(a) = f(b) a = b) a b (a ≠ b f(a) ≠ f(b))
13
Example A = {a, b, c, d} B = {1, 2, 3, 4, 5} f(a) = 4, f(b) = 5, f(c) = 1, f(d) = 3. Is this one-to-one? Yes, because f takes on different values at the four elements of its domain. f(x) = x 2, x is integer Is this one-to-one? No, because f(1) = f(-1)
14
Example
15
Onto Function Definition: A function f from A to B is called onto, or surjective, if and only if for every elements b B there is an element a A with f(a) = b. A function f is called a surjection if it is onto. Notation: y x ( f(x) = y)
16
Example A = {a, b, c, d} B = {1, 2, 3} f(a) = 3, f(b) = 2, f(c) = 1, f(d) = 3. Is this onto? Yes, because all elements of B are images of elements of A. f(x) = x + 1, x is integer Is this onto? Yes, because for every integer y there is an x such that f(x) = y.
17
One-to-One Correspondence Definition: The function f is a one-to-one correspondence, or a bijection, if it is both one-to-one and onto. A = {a, b, c, d} B = {1, 2, 3, 4} f(a) = 4, f(b) = 2, f(c) = 1, f(d) = 3. Is this a bijection? Yes, because it is both one-to-o ne and onto.
18
One-to-One Correspondence One-to-one, not onto Onto, not one-to-one One-to-one, onto Neither one-to-one, nor onto Not a function
19
Inverse Function Definition: Let f be a bijection from the set A to the set B. The inverse function of f is the function that assigns to an element b belonging to B the unique element a in A such that f(a) = b. The inverse function of f is denoted by f -1. Hence, f -1 (b) = a when f(a) = b.
20
Example A = {a, b, c} B = {1, 2, 3} f(a) = 2, f(b) = 3, f(c) = 1 Is f invertible? Yes, f -1 (1) = c, f -1 (2) = a, f -1 (3) = b f(x) = x + 1, x is integer Is f invertible? Yes. y = x + 1 x = y – 1 f -1 (x) = y - 1
21
Example f(x) = x 2 Is f invertible? No. Because f(-2) = f(2) = 4
22
Composition of Functions Definition: Let g be a function from the set A to the set B and let f be a function from the set B to set C. The composition of the functions f and g, denoted by f ○ g, is defined by (f ○ g)(a) = f(g(a))
23
Composition of Functions
24
f ○ g = g ○ f?
25
Composition of Functions f(x) = 2x + 3 g(x) = 3x + 2 What are f ○ g and g ○ f? (f ○ g)(x) = f(g(x)) = f(3x + 2) = 6x + 7 (g ○ f)(x) = g(f(x)) = g(2x + 3) = 6x + 11
26
The Graph of Functions Definition: Let f be a function from the set A to the set B. The graph of the function f is the set of ordered pairs {(a, b) | a A and f(a) = b} Example: F(x) = x 2 X are integer The graph of f is the set of (x, f(x)) = (x, x 2 )
27
Floor and Ceiling Definition: The floor function assigns to the real number x the largest integer that is less than or equal to x. The ceiling function assigns to the real number x the smallest integer that is greater than or equal to x. Notation: floor : x ceiling : x
28
Example 0.5 = ? 0 0.5 = ? 1 8.9 = ? 8 8.9 = ? 9
29
Floor and Ceiling True or False? x + y = x + y x + y = x + y
30
Sequences Sequence is an ordered list of elements. A sequence is a special type of function in which the domain consists of a set of consecutive integers. Definition: A sequence is a function from a subset of the set of integers (usually either the set {0, 1, 2, …} or the set {1, 2, 3, …}) to a set S. a n denote the image of the integer n and called as the term of the sequence. Finite sequence: {1, 2, 3, 4}, {1, 3, 5, 7} Infinite sequence: {1, 2, 3, …}, {1, 3, 5, 7, …}
31
Sequences Sequence {a n }, where a n = 1/n The terms of this sequence: a 1, a 2, a 3, …, Starts with 1, 1/2, 1/3, 1/4, …,
32
Geometric Progression Definition: A geometric Progression is a sequence of the form a, ar, ar 2, …, ar n, … Where the initial term a and the common ratio r are real numbers. Sequence {c n } with c n = 2. 5 n Initial term: 2 Common ratio: 5 List of terms c 0, c 1, c 2, … = 2, 10, 50, …
33
Geometric Progression Sequence {d n } with d n = 6. (1/3) n Initial term: 6 Common ratio: 1/3 List of terms d 0, d 1, d 2, … = 6, 2, 2/3, … Sequence {b n } with b n = (-1) n Initial term: 1 Common ratio: -1 List of terms b 0, b 1, b 2, … = 1, -1, 1, …
34
Arithmetic Progression Definition: A Arithmetic Progression is a sequence of the form a, a + d, a + 2d, …, a + n.d, Where the initial term a and the common difference d are real numbers. Sequence {s n } with s n = -1 + 4n Initial term: -1 Common difference: 4 List of terms s 0, s 1, s 2, s 3, … = -1, 3, 7, 11, …
35
Arithmetic Progression Sequence {t n } with t n = 7 – 3n Initial term: 7 Common difference: -3 List of terms t 0, t 1, t 3, … = 7, 4, 1, -2, …
36
Special Integer Sequences How to find a general rule or formula for constructing the terms of a sequence? 1, 1/2, 1/4, 1/8, 1/16 a n = 1/2 n geometric progression 1, 3, 5, 7, 9 a n = 2n + 1 arithmetic progression 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, …. a 11 = …, a 12 = … 5, 11, 17, 23, 29, … a n = 6n – 1 Compare with the well-known integer sequence
37
Well-Known Integer Sequences Check On-Line Encyclopedia of Integer Sequences
38
Special Integer Sequences 1, 7, 25, 79, 241 a n = 3 n – 2 0, 4, 18, 48, 100, … a n = n 3 – n 2
39
Summations Sequence: a m, a m+1, … a n Summation: a m + a m+1 + … a n
40
Summations The sum of the first 100 terms of the sequence {an} where a n = 1/n
41
String A string is a finite sequence of characters. Example: “Saya kuliah Matematika Diskrit” A string over X, where X is a finite set, is a finite sequence of elements from X. Example: X = {a, b, c} 1 = b 2 = a 3 = a 4 = c The string over X: baac baac ≠ abac baac = ba 2 c : string with no elements or null string
42
String The length of a string is the number of elements in . = aabab = a 3 b 4 a 32 | | = 5| | = 39 Concatenation of and : = aababa 3 b 4 a 32 Substring : some or all consecutive elements of . = aba is a substring of .
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.