Given a set of $Q = \{q_1, ..., q_n\}$, how many functions $\delta : Q \times \{0, 1\} \to Q$ are there?

33 Views Asked by At

Recently got this question wrong, and I still can't wrap my head around the answer. From my logic, every state has two transitions to every other state(including itself). This results in $Q\times 2Q$ which is $2Q^2$; however, apparently the answer is $Q^{2Q}$, and I'm obviously reading the problem incorrectly if this is the case, so I'd really appreciate any help in understanding where I'm going wrong.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $n = |Q|$. Your function takes two parameters, one takes $2$ values and another takes $n$ values, so there are a total of $2n$ different inputs. Each one can be mapped to any of the $n$ members of the resulting set, and so can produce $n^{2n}$ different outputs.