A new flag has been designed with 6 vertical strips using some or all of the colors yellow,green,blue and red.In how many ways this can be done so that no 2 adjcent strips have same colour.
First strip can be colored by = 4ways
2nd strip can be colored by = 3ways
3rd strip can be colored by = 3ways
4th strip can be colored by = 3ways
5th strip can be colored by = 3ways
6th strip can be colored by = 3ways
Then total ways = 4×3×3×3×3×3=12×3^4=12×81= 972