Number of signals possible with one flag is 6.
Number of signals possible with 2 flags is 6P2 .
Number of signals possible with 3 flags is 6P3 .
Similarly with 4 flags 6P4, 5 flags is 6P5 and with all 6 flags 6P6 .
∴ Total number of signals = 6P1 + 6P2 + 6P3 + 6P4 + 6P5 + 6P6
= 6 + 30 + 120 + 360 + 720 + 720 = 1956