# Discrete maths

• Aug 8th 2006, 10:40 AM
kodirl
Discrete maths
suppose that f:N->N and g:N->N are defined by f(n)=nto the power of 3 and g(n)=n to the power of 2 for each natural number n.Show that gof not equal to fog.
• Aug 8th 2006, 11:15 AM
ThePerfectHacker
Quote:

Originally Posted by kodirl
suppose that f:N->N and g:N->N are defined by f(n)=nto the power of 3 and g(n)=n to the power of 2 for each natural number n.Show that gof not equal to fog.

$\displaystyle f=\{ (n,n^3)|n\in \mathbb{N} \}$
$\displaystyle g=\{ (n,n^2)|n \in \mathbb{N}\}$
Then,
$\displaystyle fg=f(n^2), n\in \mathbb{N}=n^6, n\in \mathbb{N}$
Also,
$\displaystyle gf=g(n^3), n\in \mathbb{N}=n^6, n\in \mathbb{N}$
Thus,
$\displaystyle gf=fg$
Thus, saying that they are no equal is wrong.
• Aug 9th 2006, 03:37 AM
kodirl
Thanks
Is that the actual answer and how it should be wrtten?
• Aug 9th 2006, 04:53 AM
OReilly
Quote:

Originally Posted by kodirl
Is that the actual answer and how it should be wrtten?

It should be writen as PerfectHacker wrote it!
• Aug 11th 2006, 02:21 AM
Colette
Hey you guys!!!!!
Suppose that f:N->N and g:N-> are defined by f(n)=n^3 and g(n)=n^2 for each natural number n.Show that gof is not equal fog???? ;)
• Aug 11th 2006, 05:26 AM
Soroban
Hello, Colette!

Is there a typo in the problem? . . . The statement is wrong.

Quote:

Suppose that $\displaystyle f\!:\!N \to N$ and $\displaystyle g\!:\!N \to N$ are defined by
$\displaystyle f(n)=n^3$ and $\displaystyle g(n)=n^2$ for each natural number $\displaystyle n.$

Show that $\displaystyle g\circ f \neq f\circ g$

We have: .$\displaystyle \begin{array}{ccc}g\circ f\:=\:g(f(n)) \:=\:g(n^3)\:=\:(n^3)^2\:=\:n^6 \\ \\ f\circ g\:=\:f(g(n)) \:=\:f(n^2)\:=\:(n^2)^3\:=\:n^6\end{array}$ . . . These are equal!

• Aug 11th 2006, 06:11 AM
Colette
oops sorry i left out part of the q
Suppose that f:N->N and g:N-> are defined by f(n)=n^3 and g(n)=n^2-2 for each natural number n.Show that gof is not equal fog???? thats the correct version
• Aug 11th 2006, 07:02 AM
Soltras
Ahh there's a -2 that cropped up this time.

Let $\displaystyle f(n) = n^3,\,g(n)=n^2-2$

Well the domain for both is the natural numbers, but I noticed that the you left off the codomain for the function g. I don't know why, but I would venture to guess because its codomain has to include -1, which isn't in the natural numbers.

$\displaystyle g(1) = 1^1-2 = -1$

So let $\displaystyle D$ be the codomain of g so that $\displaystyle g:N \to D$.

So in other words, the function g spits out something in $\displaystyle D$ but f can only handle things from $\displaystyle N$. So $\displaystyle f \circ g$ doesn't make sense because $\displaystyle D \not\subseteq N$.

(Note $\displaystyle g \circ f$ still can make sense, but it's certainly not possible that $\displaystyle f \circ g = g \circ f$)
• Aug 11th 2006, 08:19 AM
Soroban
Hello, Colette!

Ah, much better . . .

Quote:

Suppose that $\displaystyle f:N\to N$ and $\displaystyle g:N \to N$ are defined by
$\displaystyle f(n)=n^3$ and $\displaystyle g(n)=n^2-2$ for all natural numbers $\displaystyle n$.

Show that $\displaystyle g\circ f \neq f\circ g$

$\displaystyle g\circ f\;=\;g(f(n))\;=\;g(n^3)\;=\;(n^3)^2 - 2\;=\;n^6 - 2$

$\displaystyle f\circ g\;=\;f(g(n))\;=\;f(n^2-3) \;=\;(n^2-2)^3$ $\displaystyle \;=\;n^6 - 6x^4 + 12n^2 - 8$

Obviously, these two expression are equal for only specific values of $\displaystyle n$.
As it turns out, there are no real values of $\displaystyle n$ for which the two composites are equal.