Artificial intelligent assistant

Giving 4 types of presents to 5 children. I have five children: Jackie, Tito, Jermaine, Marlon and Michael. I am going to give each of them a present. The available presents are: A candy, a paperback, a dolly, or a Mercedes. I can't give Michael and Jermaine the same gift I can't give Tito and Michael the same gift I can't give Tito a paperback In how many ways can I give each of my children a gift? I was thinking 4^5 for total number of ways to give gifts with no restrictions. Then subtracting 4^4 the number of times michael and jermaine have the same gift and 4^4 for the number of times tito and michael have the same gift. 4^4 for the number of times tito has a paperback. Not sure what to add back on to the end to account for the double counting. Will this work to start, and how can I finish?

We can try doing this with a direct counting argument.

Let's start with Tito. He can have any gift other than the paperback, which leaves us with three choices for him. Michael cannot have the same gift as Tito, which means that once Tito's gift is decided, we have 3 choices for Michael. Jermaine should not get the same gift as Michael, which means Jermaine has 3 possibilities. Jackie and Marlon have no constraints which means they have 4 possible gifts each. The total number of ways to give the children gifts is $4^2 \times 3^3=432$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 02ca69ff36543264447dd1699ad52eb2