I have presented below two interpretations of the problem. Take your pick! And feel free to comment on my solution, or offer an alternative solution accompanied by relevant logic.
(1) This problem is related apparently to a previous recent problem. If all 5 subjects are to appear in a working day, then we have to repeat just one subject. If Z represents that subject then we have to arrange 5 subjects (A, B, C, D, E) with Z where Z is one of these. So we have ABCDE+A, ABCDE+B, ABCDE+C, ABCDE+D, ABCDE+E, 5 combinations. There are 720 (6! meaning 6 factorial) ways to arrange 6 different objects so if one subject is repeated there are half as many: 360. The choice of 5 subjects to repeat means that there are 5*360=1800 ways to arrange ABCDE+Z into 6 periods.
(2) This solution is based on info given in the previous similar problem (but missing from the info in the current problem), where a subject can be repeated more than once. This invokes two different arrangements: combination of between 2 and 5 subjects out of five possible subjects; and arrangements (permutations) for assigning the subjects to 6 time slots.
First, choosing the combination of subjects: 2 out of 5: 10 ways; 3 out of 5: 10 ways; 4 out of 5: 5 ways; 5 out of 5: 1 way.
These figures arise from the logic: 5 ways to pick the first subject, leaving 4; 4 choices for the second subject, so 5*4=20 to pick 2 subjects out of 5. Similarly, to pick 3: 5*4*3=60; to pick 4: 5*4*3*2=120=5*4*3*2*1 to pick 5. These, however, are permutations, where order is significant. So we have to divide by the the number of ways of arranging the subjects so that the order doesn't matter, giving us respectively, 20/2=10; 60/6=10; 120/24=5; 120/120=1.
This is the combination formula nCr where n=5 and r is the number of subjects.
Now we need to fit the subjects into 6 periods. First, given two different subjects, how can we arrange them into 6 time slots? There are 6 possible positions for one subject (Z) and the other subject (Y) fills the remaining 5 positions. So that's 6 ways. That's for Z+5Y.
But we also have to consider for two subjects the way they can be repeated. With two subjects Z and Y we can also have combinations: 2Z+4Y; 3Z+3Y. That's 3 combinations in all (see previous paragraph).
If we considered the 6 periods as if they were different objects, there would be 6!=720 arrangements. For the combination Z+5Y the number of arrangements to accommodate the repetition is given by 6!/(1!*5!)=6. For 2Z+4Y it's 6!/(2!*4!)=720/48=15; for 3Z+3Y it's 6!/(3!*3!)=720/36=20. We multiply the number of ways of picking 2 subjects out of 5 (5C2) by the number of ways of fitting them into the periods: 10*(6+15+20)=410.
Then we move on to fitting 3 different subjects (X, Y, Z) into 6 periods. Let's adopt the same approach. Consider the combination Z+Y+4X. 720/(1!*1!*4!)=720/24=30; Z+2Y+3X: 720/(1!2!3!)=720/12=60; 2Z+2Y+2X: 720/8=90. So we have 30+60+90=180 arrangements multiplied by 10=5C3. That gives us 180*10=1800.
Now 4 different subjects. 5C4=5. Z+Y+X+3W: 720/6=120; Z+Y+2X+2W: 720/4=180. Total 5(120+180)=1500.
And 5 different subjects. 5C5=1. 2Z+Y+X+W+V: 720/2=360. Total 5*360=1800 (see also interpretation (1)).
So it would appear we have 410+1800+1500+1800=5510.
As an example and by way of illustration of just how many permutations there really are, the array below shows all the 90 possible period arrangements for three subjects represented by X, Y, and Z, such that there are two periods for each of the three subjects:
XXYYZZ XXYZYZ XXYZZY XXZYYZ XXZYZY XXZZYY
XYXYZZ XYXZYZ XYXZZY XYYXZZ XYYZXZ XYYZZX
XYZXYZ XYZXZY XYZYXZ XYZYZX XYZZXY XYZZYX
XZXYYZ XZXYZY XZXZYY XZYXYZ XZYXZY XZYYXZ
XZYYZX XZYZXY XZYZYX XZZXYY XZZYXY XZZYYX
YXXYZZ YXXZYZ YXXZZY YXYXZZ YXYZXZ YXYZZX
YXZXYZ YXZXZY YXZYXZ YXZYZX YXZZXY YXZZYX
YYXXZZ YYXZXZ YYXZZX YYZXXZ YYZXZX YYZZXX
YZXXYZ YZXXZY YZXYXZ YZXYZX YZXZXY YZXZYX
YZYXXZ YZYXZX YZYZXX YZZXXY YZZXYX YZZYXX
ZXXYYZ ZXXYZY ZXXZYY ZXYXYZ ZXYXZY ZXYYXZ
ZXYYZX ZXYZXY ZXYZYX ZXZXYY ZXZYXY ZXZYYX
ZYXXYZ ZYXXZY ZYXYXZ ZYXYZX ZYXZXY ZYXZYX
ZYYXXZ ZYYXZX ZYYZXX ZYZXXY ZYZXYX ZYZYXX
ZZXXYY ZZXYXY ZZXYYX ZZYXXY ZZYXYX ZZYYXX
Combine this with 5C3=10, and we have 900 period arrangements for all possible combinations of three subjects (2Z+2Y+2X).