If a class consits of 6 periods, then the number of ways in which 5 subjects can be taught such that each subject must be allotted at least one period and no period remains vacant is
Since, number of subjects are less than the number of periods. Then any one of the five subjects will occur twice.
The subject which has to be taught twice can be selected as 5C1=5 ways and the number of ways in which 6 subjects can be arranged is 6!2!.
∴ total number of required ways is 5×6!2!