24 - Functions

!Screenshot 2023-11-06 at 12.27.16 PM.png
!Screenshot 2023-11-06 at 12.28.15 PM.png

In class Practice

f:AB is a function if

  1. fA×B
  2. aA,a is the first coordinate of exactly one ordered pair in f thought of as a subset of A×B.

Not well-defined means it's not a function.



HW 24

Ben Finch

E 24.1
a) Yes, it is a function
b) No, it's not a function since (4,6)A×B.
c) Not a function, doesn't have (3,b)
d) Not a function, 1 is assigned to two items in B
e) Not a function, doesn't have (3,b)
f) Yes, it is a function.

E 24.2
a) R
b) R{π2+kπ:kZ}
c) {xR:x>0}
d) {nR:n1}
e) R{2}

E 24.3
Let A be a finite set and let B be any set. Let f:AB be a function. Considering f as a set of ordered pairs, prove that |f|=|A|.

Proof. Let A be a finite set and let B be any set. Let f:AB be a function. By definition 24.1, each aA must be the first coordinate of exactly one element in f. Also, f cannot have some element (m,n) where mA. Thus if each aA is the first element of one element in f, we know that |A|=|f|.

E 24.4
a) The function is well defined
Proof.
Let XZ8. Let a,bX. Then abmod8. Then ab=8k for some kZ. Now f(a)=[a]. Thus ab=2(4k). Thus abmod4. So [a]=[b]. Thus f(a)=f(b).

b) [0] and [4] are the same in Z4 but g([0])=0 and g([4])=4 are different in Z8. So the function is not well defined.

c) The function is well defined.
Proof.
Let XZ4. Let a,bX. Then abmod4. Then ab=4k for some kZ. Now h([a])=2a. Thus ab=2(4k)=8k. Thus abmod8. So [a]=[b].Thus h([a])=h([b]).

d) [1] and [5] are the same in Z4, but j([1])=3 and g([5])=15=7. So the function is not well defined

E 24.5
Define f:Z5Z5 by f(a)=a5. Define g:Z5Z5 by g(a)=a. You may assume that f and g are both well-defined (which they are). Are f and g equal?

Proof.
We can check if f and g are equal by checking every element in Z5:

  1. When a=0, f(0)=05=0 and g(0)=0, so f(0)=g(0).
  2. When a=1, f(1)=15=1 and g(1)=1, so f(1)=g(1).
  3. When a=2, f(2)=25=(24)2=12=2 and g(2)=2, so f(2)=g(2).
  4. When a=3, f(3)=35=(34)3=13=3 and g(3)=3, so f(3)=g(3).
  5. When a=4, f(4)=45=(44)4=14=4 and g(4)=4, so f(4)=g(4).

Since f(a)=g(a) for every aZ5, the functions f and g are indeed equal.

E 24.6
A is a set.
S1,S2A
χ - characteristic function

a) If T=S1S2 and S1S2=, then χT(a)=χS1(a)+χS2(a).

Let aA and consider the value of χT(a). There are two cases:

  1. If aS1, then aS2 because S1S2=. Thus, χS1(a)=1 and χS2(a)=0. The sum χS1(a)+χS2(a)=1+0=1, which is equal to χT(a) because a is in the union T.

  2. If aS2, a similar argument shows that χS1(a)=0 and χS2(a)=1. Again, χS1(a)+χS2(a)=0+1=1, which equals χT(a) because a is in the union T.

  3. If aS1 and aS2, then χS1(a)=0 and χS2(a)=0. Therefore, χS1(a)+χS2(a)=0+0=0, which matches χT(a) because a is not in T.

In all cases, χT(a)=χS1(a)+χS2(a).

b)

If T=S1S2, then χT(a)=χS1(a)χS2(a)

Proof.
Let aA. There are 4 cases:

Case 1. aS1S2
Note that χT(a)=1 because a is in both S1 and S2.
χS1(a)=1, and χS2(a)=1. Thus χT(a)=11=χS1(a)χS2(a).

Case 2. aS1S2
Here, χT(a)=0 because a is not in S2, hence not in the intersection T.
χS1(a)=1, and χS2(a)=0. Thus χT(a)=10=χS1(a)χS2(a).

Case 3. aS2S1.
Here, χT(a)=0 because a is not in S1, hence not in the intersection T.
χS1(a)=0, and χS2(a)=1. Thus χT(a)=01=χS1(a)χS2(a).

Case 4. aA(S1S2)
Here, a is in neither S1 nor S2, so it is not in their intersection.
χS1(a)=0, and χS2(a)=0. Thus χT(a)=00=χS1(a)χS2(a).

In each case, χT(a)=χS1(a)χS2(a). This completes the proof.

c)

If T=S1S2, then χT(a)=χS1(a)+χS2(a)χS1(a)χS2(a)

Proof.
Let aA. There are two cases for each set S1 and S2:

Case 1: aS1
In this case, χS1(a)=1.

Case 1a: aS2
Here, χS2(a)=1. Since a is in both S1 and S2, it is also in their union T. Hence, χT(a)=1.
The right-hand side of the equation becomes 1+111=1, which is equal to χT(a).

Case 1b: aS2
Here, χS2(a)=0. Since a is in S1, it is in their union T. Hence, χT(a)=1.
The right-hand side of the equation becomes 1+010=1, which is equal to χT(a).

Case 2: aS1
In this case, χS1(a)=0.

Case 2a: aS2
Here, χS2(a)=1. Since a is in S2, it is in their union T. Hence, χT(a)=1.
The right-hand side of the equation becomes 0+101=1, which is equal to χT(a).

Case 2b: aS2
Here, χS2(a)=0. Since a is in neither S1 nor S2, it is not in their union T. Hence, χT(a)=0.
The right-hand side of the equation becomes 0+000=0, which is equal to χT(a).

In each case, χT(a)=χS1(a)+χS2(a)χS1(a)χS2(a).

E 24.7

Proof.
Since each fi is a function from Pi to B, it is a subset of Pi×B, and since each Pi is a subset of A, it follows that each fi is a subset of A×B. Thus, their union, f, is also a subset of A×B, so f is a relation from A to B.

To prove that f is a function, we aim to demonstrate that for every element aA, there is exactly one ordered pair in f with a as its first coordinate. Consider an arbitrary element aA. Because {Pi: iI} is a partition of A, there exists a unique index jI such that aPj and aPi for all ij. Therefore, a is the first coordinate of exactly one ordered pair in fj, namely (a,fj(a)), because fj:PjB is a function.

For all ij, aPi, so a is not the first coordinate of any ordered pair in fi. This means that (a,fj(a)) is the unique ordered pair in f with first coordinate a. Hence, f(a)=fj(a) when aPj for some jI.

Since a was an arbitrary element of A and we have shown that for each such a there is exactly one ordered pair in f, it follows that f is a function from A to B.