
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given the sets $A = \{a_1, a_2, a_3, a_4\}$, $B = \{0, 1, 2, 3\}$, and $f$ is a mapping from $A$ to $B$.

(1) If every element in $B$ has a pre-image, how many different $f$ are there?

(2) If the element 0 in $B$ must not have a pre-image, how many such $f$ are there?

(3) If $f$ satisfies $f(a_1) + f(a_2) + f(a_3) + f(a_4) = 4$, how many such $f$ are there?

Present the answer in LaTex format: \boxed{Your answer}
user