• :00Days
• :00Hours
• :00Mins
• 00Seconds
A new era for learning is coming soon

Suggested languages for you:

Americas

Europe

Q9RE

Expert-verified
Found in: Page 187

### Discrete Mathematics and its Applications

Book edition 7th
Author(s) Kenneth H. Rosen
Pages 808 pages
ISBN 9780073383095

# a) Define what it means for a function from the set of positive integers to the set of positive integers to be one-to-oneb) Define what it means for a function from the set of positive integers to the set of positive integers to be onto.c) Give an example of a function from the set of positive integers to the set of positive integers that is both one-to-one and onto.d) Give an example of a function from the set of positive integers to the set of positive integers that is one-to-one but not onto.e) Give an example of a function from the set of positive integers to the set of positive integers that is not one-to-one but is onto.f) Give an example of a function from the set of positive integers to the set of positive integers that is neither one-to-one nor onto.

a) Function f is one-one if $\mathrm{f}\left(\mathrm{a}\right)=\mathrm{f}\left(\mathrm{b}\right)$ implies that $\mathrm{a}=\mathrm{b}$ for all and in the domain.

b) Function $\mathrm{f}:\mathrm{A}\to \mathrm{B}$ is onto if for every element there exist an element $a\in A$ such that $\mathrm{f}\left(\mathrm{a}\right)=\mathrm{b}$

c) Required answer is $\mathrm{f}\left(\mathrm{n}\right)=\mathrm{n}$.

d) Required answer is $\mathrm{f}\left(\mathrm{n}\right)=2\mathrm{n}$

e) Required answer is $f\left(n\right)=\left\{\begin{array}{l}\left(\frac{n}{2}\right)\text{if}n\text{even}\\ \left(\frac{n+1}{2}\right)\text{if}n\text{odd}\end{array}\right\$

f) Required answer is $\mathrm{f}\left(\mathrm{n}\right)=1$.

See the step by step solution

## Step 1:Definition of funtion

A function ${\mathbf{f}}{\mathbf{:}}{\mathbf{A}}{\mathbf{\to }}{\mathbf{B}}$ has the property that each element of a has been mapped to exactly one element of B.

## Step 2: One-One function

a) The function $f:A\to B$ is one to one if and only if $f\left(a\right)=f\left(b\right)$ implies that a=b for all a and b in the domain.

## Step 3: Onto function

b) The function $f:A\to B$ is onto if and only if for every element $b\in B$ there exist an element $a\in A$ such that $f\left(a\right)=b$

Also, function f is onto if range of function is equal to co-domain of function.

## Step 4: One-One and onto function

c) We need to find a function from the positive integers to the positive integers $\mathrm{f}:{\mathrm{Z}}^{+}\to {\mathrm{Z}}^{+}$

such that function is both one –one and onto.

For example,

$f\left(n\right)=n$

is one to one let $\mathrm{f}\left(\mathrm{a}\right)=\mathrm{f}\left(\mathrm{b}\right)⇒\mathrm{a}=\mathrm{b}$

Is onto since for all $b\in {Z}^{+}$, there exists $a\in {Z}^{+}:f\left(a\right)=b$

## Step 5: One-One and but not onto function

(d) We need to find a function f from the set of positive integers to the set of positive integers $f:{Z}^{+}\to {Z}^{+}$

such that function is one –one but not onto.

For example,

$f\left(n\right)=2n$

f is one to one let $\mathrm{f}\left(\mathrm{a}\right)=\mathrm{f}\left(\mathrm{b}\right)$,by definition of $f:2a=2b$. Dividing each side of the equation by 2, we get a=b

is not onto: let $\mathrm{b}\in {\mathrm{z}}^{+}$, then we $a=\frac{b}{2}$ is the only value with the property$f\left(a\right)=f\left(\frac{b}{2}\right)=2\left(\frac{b}{2}\right)=b$

However, if b is odd, then $a=\frac{b}{2}$ is not a positive integer $\left(a\notin {Z}^{+}\right)$ and thus f is not onto.

## Step 6: Not one-one but onto function

e)

We need to find a function f from the set of positive integers to the set of positive integers

$f:{Z}^{+}\to {Z}^{+}$

such that function is not one –one but onto.

For example,

$f\left(n\right)=\left\{\begin{array}{l}\left(\frac{n}{2}\right)\text{if}n\text{even}\\ \left(\frac{n+1}{2}\right)\text{if}n\text{odd}\end{array}\right\$

Thus, the image of and is then, the image of and is , the image of and is , the image of and is , and so on.

is not one to one because n=1,2 have the same image.

is onto since range is equal to co-domain.

## Step 7: Neither one-One and onto function

f)

We need to find a function f from the set of positive integers to the set of positive integers such that

$f:{Z}^{+}\to {Z}^{+}$

And f is neither one-one nor onto.

For example, let

$f\left(n\right)=1$

is not one to one because all positive integers have the same image.

is not onto because all positive integers (except for 1) are not in the range.