[Discrete Math] f: A->B; surjective? find necessary & sufficient condition.

The best way to think of it is that a function isn't just a formula, but a formula with a variable, and the values of the variable are all the points at which the function is defined.So f(x) = x^2 and f(y) = y^2 are two totally different functions.But if you say "let A be the set of all (x, x^2)", then f and g are the same function.##In summary, the conversation discusses a problem involving a function f: A->B and finding a necessary and sufficient condition for f such that for any set C and any functions g,h:B->C, if g o f = h o f, then g =
  • #1
Servo888
43
0
[Discrete Math] f: A-->B; surjective? find necessary & sufficient condition.

Ok in practice for my discrete exam, I have the following problem.

Let f : A->B be a function.
a) Show that if f is surjective, then whenever g o f = h o f holds for the functions g,h : B -> C, then g =h.

b) Find a necessary and sufficient condition for f such that for any set C and any functions g,h:B->C, if g o f = h o f, then g = h


I need help at starting this problem. How do I start on a)? Here's what I know,

g o f : A -> C , so (g o f)(a) = g(f(a)),

such that (a,c) are elements in g o f <=> [tex]\exists b \in B:(a,b)\in f[/tex], [tex](b,c)\in g[/tex]

I hope that latex stuff comes out right. Anyways I've got 3 hours to figure this out. I just need a push forward, maybe some hints, or suggestions.
 
Last edited:
Physics news on Phys.org
  • #2
For the first one, prove it by contradiction. If g, h are unequal then there must be some element (b, c) of g that is not an element of h (without loss of generality; it could be the other way around but in that case simply rename h g and rename g h). But since f is onto, what can you say about g o f that you can't say about h o f with regards to (b, c)?
 
  • #3
Here's what I don't understand... When you have g(f)=h(f), obviously g = h...

As far as proving it by contradiction... If g,h are unequal, then there must be some element (b,c) of g that is not an element of h. But since f is onto, you can say that (b, c) [tex] \in [/tex] g(f), and you can't say (b, c) [tex] \in [/tex] h(f) (I think).
 
  • #4
No, you're wrong. Here's the problem:
Here's what I don't understand... When you have g(f)=h(f), obviously g = h...
Let A = {1, 2}, let B = {3, 4}, and let C = {5, 6}
Let f = {(1, 3), (2, 3)}
g = {(3, 5), (4, 5)}
h = {(3, 5), (4, 6)}
Now is it true that g o f = h o f here? And is it true that g = h? Do you understand why not?
 
  • #5
0rthodontist said:
No, you're wrong. Here's the problem:

Let A = {1, 2}, let B = {3, 4}, and let C = {5, 6}
Let f = {(1, 3), (2, 3)}
g = {(3, 5), (4, 5)}
h = {(3, 5), (4, 6)}
Now is it true that g o f = h o f here? And is it true that g = h? Do you understand why not?

What's g(f) and h(f), I don't understand how to show g(f) and h(f) using sets.

g != h
 
  • #6
Do you know about the definition of functions as sets of ordered pairs?
 
  • #7
0rthodontist said:
Do you know about the definition of functions as sets of ordered pairs?

(a,b) in f, is f(a)=b? like that?
 
  • #8
Yes, so can you figure out what functional composition looks like for ordered pairs?
 
  • #9
0rthodontist said:
Yes, so can you figure out what functional composition looks like for ordered pairs?

Something like
g(f(a))=g(b)=c (a,c)
But somebody is going to have to give me an example of using the sets A, B, C, because I'm drawing a blank as to how the hell to get g(f(a))=g(b)=c by replacing the a's, b's, c's with the numbers in the sets...
 
  • #10
No need to look at it as ordered pairs. Work by contradiction though. Suppose g and h are unequal, even though f is surjective and (g o f) = (h o f). Then by definition of equality of functions, there is some b in B such that:

g(b) != h(b)

But for all b in B, there is an a in A such that f(a) = b, since f is surjective, so there is some a in A such that:

g(f(a)) != h(f(a))

By definition of composition, this means that there is some a such that:

(g o f)(a) != (h o f)(a)

By definition of equality of functions, this means that

(g o f) != (h o f)

contradiction.

For part ii), look at why a surjective f makes [(g o f) = (h o f)] imply [g = h]. It's because if f weren't surjective, then there could be some element of B, call it b, which f doesn't reach, but which g and h differ on. If g and h differ on b, then g != h, but if f never reaches b, then as long as g and h agree on Im(f), (g o f) = (h o f). So what is the necessary and sufficient condition on f such that (g o f) = (h o f) implies g = h? It's that g and h don't differ on B - Im(f). So either Im(f) = B (that is, f is surjective), or |C| < 2, making it impossible to differ no matter how big B is and no matter how small Im(f) is.
 
  • #11
I would go further than AKG: please don't think about functions as ordered pairs, I implore you.

As for the second part of the question, think about it as word association.

Right cancellation is to surjective as left cancellation is to...

can only be one thing, really. Now prove it.

Can I give another example?

Suppose that f maps into the set {0,1}, and suppose that it isn't surjective, well, that just means that f(x)=0 for all x (or f(x)=1 for all x, doesn't matter which).

Now, I can make g and h whatever the hell I feel like and gf(x)=g(0) and hf(x)=h(0) for all x.

So I am free to make g(0)=h(0) and we get gf=hf, and I'm free to make g(1) and h(1) completely different. (This is AKG's 'parts that f doesn't reach').

This shows that right cancellation implies f is surjective, it is up to you to prove the opposite thing.
 
  • #12
AKG said:
By definition of equality of functions, this means that
Well, you're saying the same thing. Equality of functions is just equality of sets.

There is sometimes an advantage to looking at functions as ordered pairs. I am taking formal language theory and we see that an automaton Q, sigma, delta, q0, F can be represented as a graph where the edges correspond to ordered pairs in the function delta. function = ordered pairs = edges of a graph. That would not have been as clear without the ordered pair concept.
 
  • #13
Of course it is technically saying the same thing, but the whole point is that looking at them as ordered pairs is a poor way to look at them. Looking at them as edges of a graph is an even worse way to look at them. The goal here was to prove some property of surjective functions, not to think up all possible ways to regard functions.
 
  • #14
In finite automata it seems that visualization as graphs is really the best way to think about the automata, from an intuitive perspective. I'm not saying you need to explicitly think about ordered pairs in this problem but it is not entirely useless. It seems to me that the best way to think about easy function problems like this is in terms of domain-codomain diagrams, where the idea of images and preimages gets close to ordered pairs.

Anyway, it's simple to give counterexamples in the notation of ordered pairs. You could organize it as a table, but why bother. The notation is there, it only takes a minute to learn if he doesn't already know it, and he may run into it later.
 
Last edited:
  • #15
I agree that thinking in terms of domain-codomain diagrams with pictures of images and preimages is a good, if not natural way to think about these problems. If you believe that ordered pairs, graphs, or automata (whatever those may be) are somehow easier, more intuitive, more effective, or at all necessary, then go ahead and believe it, but I don't think you'll convince me. It's simple to give a counterexample in any notation, I would bet, but in which "notation" is it easiest to think of a counterexample?
 
  • #16
If you think only in terms of ordered pairs to describe functions then the number of functions you can actually work with reasonably is vanishingly small.
 

Related to [Discrete Math] f: A->B; surjective? find necessary & sufficient condition.

1. What does it mean for a function to be surjective?

A function f: A->B is surjective if every element in the codomain B has at least one preimage in the domain A. In other words, every element in B is being mapped to by at least one element in A.

2. What is the difference between a surjective function and an injective function?

A surjective function is one where every element in the codomain is being mapped to by at least one element in the domain. An injective function, on the other hand, is one where each element in the codomain is being mapped to by at most one element in the domain. In simpler terms, a surjective function covers the entire range of the codomain, while an injective function may leave some elements in the codomain unmapped.

3. How can I determine if a given function is surjective?

To determine if a function f: A->B is surjective, you can use the following criteria:
- Every element y in the codomain B has at least one preimage in the domain A
- The range of the function is equal to the codomain B

4. What is the necessary and sufficient condition for a function to be surjective?

The necessary and sufficient condition for a function f: A->B to be surjective is that the range of the function is equal to the codomain B. This means that every element in B is being mapped to by at least one element in A.

5. Can a function be both injective and surjective?

Yes, a function can be both injective and surjective. This type of function is called a bijective function. A bijective function is one where each element in the codomain is being mapped to by exactly one element in the domain, and every element in the codomain has at least one preimage in the domain.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
577
  • Calculus and Beyond Homework Help
Replies
15
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
417
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
21
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
Back
Top