Injective and surjective functions

Click For Summary

Discussion Overview

The discussion revolves around the concepts of injective and surjective functions, specifically focusing on functions from the set of integers (Z) to the set of natural numbers (N) and vice versa. Participants explore the possibility of generating algorithms for these types of functions and examine specific examples to determine their properties.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants inquire about algorithms to generate injective functions from Z to N and surjective functions from N to Z.
  • A proposed function from Z to N is presented, but its surjectivity is questioned.
  • There is a discussion on the definitions of injectivity and surjectivity, with some participants expressing confusion about the conditions required for surjectivity.
  • Participants suggest specific functions, such as g(x) = x! and f(x) = x^2, and debate their injective and surjective properties.
  • Another participant proposes functions f(x) and g(x) but faces challenges regarding their definitions and whether they meet the criteria for injectivity and surjectivity.
  • Clarifications are sought regarding the definition of N and whether it includes 0, impacting the analysis of the proposed functions.

Areas of Agreement / Disagreement

Participants express differing views on the properties of specific functions, leading to unresolved questions about injectivity and surjectivity. There is no consensus on the existence of a generating algorithm for the functions discussed.

Contextual Notes

Some participants struggle with the definitions and implications of injectivity and surjectivity, indicating a need for further exploration of these concepts. The discussion includes various assumptions about the definitions of functions and the sets involved.

Ciaran
Messages
71
Reaction score
0
Hello,

I've been reading about injectivity from Z to N and surjectivity from N to Z and was wondering whether there was some kind of algorithm that could generate these specific types of functions?
 
Physics news on Phys.org
Ciaran said:
Hello,

I've been reading about injectivity from Z to N and surjectivity from N to Z and was wondering whether there was some kind of algorithm that could generate these specific types of functions?

Sure.

How about $\mathbb Z \to \mathbb N$ given by $n \mapsto \begin{cases}
-2n-1 & \text{if $n < 0$} \\
2n & \text{if $n \ge 0$}
\end{cases}$
Is it injective?
How about surjective?
 
Hello!

Thanks for the reply- the function is injective but not surjective. What about surjective from N to Z and is there some algorithm for generating a function satisfying such conditions?
 
Last edited:
Ciaran said:
Hello!

Thanks for the reply- the function is injective but not surjective. What about surjective from N to Z and is there some algorithm for generating a function satisfying such conditions?

Yes, it is injective... but isn't it also surjective? Doesn't every element in $\mathbb N$ have an original in $\mathbb Z$?
 
Oh I see, I was asking for 2 separate functions- I was asked by my instructor to find a solely injective function from Z to N and a solely surjective function from N to Z. I was struggling so wondered if there was some way of generating one such that I didn't just have to think of a function then see if it fits either category?
 
Ciaran said:
Oh I see, I was asking for 2 separate functions- I was asked by my instructor to find a solely injective function from Z to N and a solely surjective function from N to Z. I was struggling so wondered if there was some way of generating one such that I didn't just have to think of a function then see if it fits either category?

Ah. I suspect the intention is to make you familiar with what injectivity and surjectivity actually mean.
When you grasp the concept, there should be no need for any generating algorithm.
I suggest to draw what it means and then come up with a matching function.
Or otherwise try a couple of functions, see what they do, categorize them, and think up what you need to cover any missing category.
 
It's the conditions that are proving to be tricky to me- for the surjective function, does it mean my function can only generate integer values ?
 
I'm pretty sure g(x)= x! and f(x)=x^2 are injective and surjective, respectively
 
Ciaran said:
It's the conditions that are proving to be tricky to me- for the surjective function, does it mean my function can only generate integer values ?

Not precisely.
The fact that we're limiting ourselves to functions from Z to N, respectively N to Z, implies that the function can only generate integer values.
As yet that is unrelated to whether it is surjective or not.
Ciaran said:
I'm pretty sure g(x)= x! and f(x)=x^2 are injective and surjective, respectively

Sorry, but no.
For starters, I assume you are talking about functions from Z to N.
If so, then g is then undefined for negative values, meaning it is not a function from Z to N (depending on the definition of function you're using).

Another problem with g is the g(x)=1 has 2 originals, and is therefore not injective (see below).

And the problem with f is that f(x)=3 has no originals, and is therefore not surjective.

To be clear, injective means that every element in the codomain has at most 1 original.
And surjective means that every element in the codomain has at least 1 original.
 
  • #10
Ahhh, what about f(x) = x/2 if x is even, (1-x)/2 if x is odd. And g(x)=2x+1 for positive x, -2x for negative x?
 
  • #11
Ciaran said:
Ahhh, what about f(x) = x/2 if x is even, (1-x)/2 if x is odd. And g(x)=2x+1 for positive x, -2x for negative x?

Are we talking about functions from Z to N?
Because if so, then f is not a function, since an even negative x is not mapped to N.

As for g, did you mean it to be injective or surjective?
Or put otherwise, what do you think about it being either injective or surjective?
 
  • #12
My apologies, I have only now just noticed you replied! f(x) was meant to be surjective from N to Z and g(x) was meant to be injective from Z to N
 
  • #13
Ciaran said:
Ahhh, what about f(x) = x/2 if x is even, (1-x)/2 if x is odd. And g(x)=2x+1 for positive x, -2x for negative x?

Ciaran said:
My apologies, I have only now just noticed you replied! f(x) was meant to be surjective from N to Z and g(x) was meant to be injective from Z to N

What is N exactly? Does it include 0 or not?

Assuming that N is { 1, 2, 3, ... }, f is indeed surjective. Is f also injective?

As for g, what is the image of 0? You didn't specify.
It has consequences for whether g is injective or not.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
7K
Replies
4
Views
4K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K