I want to match strings that contain "k" number of 0's followed by "k+4" number of 1's where k is greater than or equal to zero
I tried the following grammar is this correct?
S->0S1|1111
I want to match strings that contain "k" number of 0's followed by "k+4" number of 1's where k is greater than or equal to zero
I tried the following grammar is this correct?
S->0S1|1111
Yes, this is correct. Though one would say that the grammar generates the strings, not match.