There will be as many signals as there are ways of filling in 2 vacant places in succession by the 3 flags of different colours. The upper vacant place can be filled in 3 different ways by anyone of the 3 flags; following which, the lower vacant place can be filled in 2 different ways by anyone of the remaining 2 different flags. Hence, the required number of signals
=3×2=6.