For this let us think about the corresponding regular expression which makes the analysis easier :
The language description says : Each '1' in the string should be succeeded by '0' . So in other words , we can have any number of 0's but we have '1' in input , that should be succeeded by '0' .
Hence the regular expression is : (0 + 10)*
Now the task reduces to making cases based on number of '10' units in the string . There can be 0 ,1 or 2 such units in the string as if we have 3 1's , then we need to have 3 0's as well which will make the length of the string = 6 but we need required strings of length = 5 only.
Case 1 : Only 0's :
Now it is nothing permutation of 5 identical things which is done as : 5! / 5! = 1 way
Case 2 : 1 '10' unit , 3 0's :
So now we have 4 units ,with three identical units which are '0' in this case.Hence number of ways = 4! / 3! = 4 ways
Case 3 : 2 '10' units , 1 '0' :
So now we have 3 units with 2 identical units of '10's . Hence number of ways = 3! / 2! = 3 ways
Hence total number of required strings of length 5 = 1 + 4 + 3
= 8