i all first thought how DFA will know what is pattern for a given language because it has to see in partitions which require counting, which is not possible with a DFA....than intituinally i observe that every string can be partitioned in two parts to follow above conditions, hence it is (a+b)*