# Discrete maths

• August 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.
• August 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.

$f=\{ (n,n^3)|n\in \mathbb{N} \}$
$g=\{ (n,n^2)|n \in \mathbb{N}\}$
Then,
$fg=f(n^2), n\in \mathbb{N}=n^6, n\in \mathbb{N}$
Also,
$gf=g(n^3), n\in \mathbb{N}=n^6, n\in \mathbb{N}$
Thus,
$gf=fg$
Thus, saying that they are no equal is wrong.
• August 9th 2006, 03:37 AM
kodirl
Thanks
Is that the actual answer and how it should be wrtten?
• August 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!
• August 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???? ;)
• August 11th 2006, 05:26 AM
Soroban
Hello, Colette!

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

Quote:

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

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

We have: . $\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!

• August 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
• August 11th 2006, 07:02 AM
Soltras
Ahh there's a -2 that cropped up this time.

Let $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.

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

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

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

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

Ah, much better . . .

Quote:

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

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

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

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

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