# Complete the table given h(x)=g(f(x)) ?

## I'm really confused on how to use composition of functions to complete the table. I was only able to fill in one blank. I would much appreciate some help with steps on how to solve this table. Jun 28, 2018

{: ("|",ul(x),"||",ul(f(x)),"|",ul(g(x)),"|",ul(h(x)=g(f(x))),"|"), ("|",0,"||",2,"|",color(red)1,"|",color(red)3,"|"), ("|",1,"||",color(red)1,"|",0,"|",0,"|"),("|",2,"||",color(red)4,"|",3,"|",color(red)2,"|"),("|",3,"||",0,"|",color(red)4,"|",1,"|"), ("|",4,"||",3,"|",2,"|",4,"|") :}

#### Explanation:

Given (with identification variables added for later reference):
{: ("|",ul(x),"||",ul(f(x)),"|",ul(g(x)),"|",ul(h(x)=g(f(x))),"|"), ("|",0,"||",2,"|",color(red)(ul(" A ")),"|",color(red)(ul(" B ")),"|"), ("|",1,"||",color(red)(ul(" C ")),"|",0,"|",0,"|"),("|",2,"||",color(red)(ul(" D ")),"|",3,"|",color(red)(ul(" E ")),"|"),("|",3,"||",0,"|",color(red)(ul(" F ")),"|",1,"|"), ("|",4,"||",3,"|",2,"|",4,"|") :}

$h \left(0\right) = g \left(f \left(0\right)\right) = g \left(2\right) = 3$
$\textcolor{red}{B} = \textcolor{red}{3}$

$h \left(4\right) = g \left(f \left(4\right)\right) = g \left(3\right)$
but we are also told that $h \left(4\right) = 4$ so $g \left(3\right) = 4$
$\textcolor{red}{\text{F}} = \textcolor{red}{4}$

$h \left(3\right) = g \left(f \left(3\right)\right) = g \left(0\right)$
$\textcolor{red}{\text{A}} = \textcolor{red}{1}$
but we are also told that $h \left(3\right) = 1$ so $g \left(0\right) = 1$

From here on, I am not certain that any unique solution is possible $\underline{\text{unless}}$ we make some assumptions.

I have assumed that the functions are one-to-one and the range is limited to $\left\{0 , 1 , 2 , 3 , 4\right\}$

If this is the case, the only value remaining for $h \left(x\right)$ is
$\textcolor{red}{\text{E}} = \textcolor{red}{2}$
and
since $g \left(4\right) = 2$ and $g \left(f \left(2\right)\right) = 2$
$f \left(2\right) = 4$ ...if one-to-one functions
$\textcolor{red}{\text{D}} = \textcolor{red}{4}$

and this only leaves
$\textcolor{red}{C} = \textcolor{red}{1}$