Solving Permutation There are 5 positions on a flagstaff and 4 different colors of flags ( at least 5 of each color). How many different signals can be made by displaying 5 flags simultaneously?
 A: For each of the 5 positions on the flagpole, you have $4$ color possibilities:
$4*4*4*4*4=1024$
The 5th flags are there because we still say there are $4$ colors at the fifth position! Here we enumerate the color choice at each pole position.
If you had only $4$ flags, you have to remove the condition when all $5$ flags are the same colors in the first calculation, which occur only once for each color:
$(4*4*4*4*4)-4=1020$ (different codes with $4$ flags of each color only)
A: Like @Gwanguy said, 
The first position flag can have one of $4$ colors so $4$ possibilities. 
The next one can also have one of $4$ colors( since there are multiple flags of the same colors) and so on until the fifth spot. 
So if repetition of colors is allowed on different flag staffs then the answer is $4^5$. 
However, if it is required to have different colors of flags on different flag staffs then you can have $4$ for the first one, $3$ for the second Flagstaff, $2$ for the 3rd and $1$ for the 4th,followed by $4$ again on the next one(since one color would have to be repeated). 
So for the second case (where only one flag can be repeated) is = $4*4!$ or $4*\underbrace{4*3*2*1}$ = $96$ 
