How do you take a set to the the power to another set? For example, if A = {0, 1, 2} and B = {a, b}, then what is A^B?
This is very standard notation. It is surely in your textbook and/or lecture notes.
The $\displaystyle A^B$ notation is the set of all functions from the set $\displaystyle B$ to the set $\displaystyle A$.
That means that if $\displaystyle f\in A^B$ then $\displaystyle f:B\to A$.
If $\displaystyle |X|$ stands for the cardinally of set $\displaystyle X$ then $\displaystyle \left| {A^B } \right| = \left| A \right|^{\left| B \right|} $.
$\displaystyle A^B$ denotes the set of all functions from B to A. These are
{
{(a,0), (b,0)}, {(a,0), (b,1)}, {(a,0), (b,2)},
{(a,1), (b,0)}, {(a,1), (b,1)}, {(a,1), (b,2)},
{(a,2), (b,0)}, {(a,2), (b,1)}, {(a,2), (b,2)}
}
Note that $\displaystyle \left| A^B \right| = |A|^{|B|}$