StudySmarter AI is coming soon!

- :00Days
- :00Hours
- :00Mins
- 00Seconds

A new era for learning is coming soonSign up for free

Suggested languages for you:

Americas

Europe

Q9RE

Expert-verifiedFound in: Page 187

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-one**

**b) 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$.

**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.**

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.

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.

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)\Rightarrow \mathrm{a}=\mathrm{b}$

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

(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 $(a\notin {Z}^{+})$ and thus f is not onto.

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.

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.

94% of StudySmarter users get better grades.

Sign up for free