# How many ways does the following tasks can be accomplished?

There are seven tasks $(1,2,3,4,5,6,7)$ which have to done by seven people $(A,B,C,D,E,F$ and $G)$.Each person can do only one task. Task $1$ must be done by $A,B$ or $C$.Task $4$ and $5$ cannot be done by either $F$ or $G$.In how many ways can the tasks be accomplished?

I need some ideas/hints for solving this problem.

-
What have you tried? –  Qiaochu Yuan Aug 31 '11 at 16:31
@Qiaochu Yuan:I was following in the same lines of Thijs Laarhoven however I didn't realized that computing the factors of tasks with constraints would help.I was trying to find all possible ways and then subtract the complementary number,but not reaching to the solution :/ –  Quixotic Aug 31 '11 at 17:02

In this particular problem, I guess the simplest strategy would be to factor how many people can do each task, but starting at task $1$, then $4$ and $5$, and then the rest. This way you don't have to do any case analysis, and you can just factor the numbers.
So using your ideas the number should be $3 \times 4 \times 3 \times 4 \times 3 \times 2\times 1 = 864$! –  Quixotic Aug 31 '11 at 16:59