State mechines: what are the minimum number of bits used torepresent that state mechine from problem 6.

Problem 6: State mechines: A state mechine transitions bsed on asingle bit input. This mechine is looking for a simple pattern inthat input, 1001. upon seeing 1001 it should outout a 1. How manystates does this mechine have (assuming Moore Machine)?