Write a BNF grammar of strings of 0's and 1's where number 01 and 10 substrings are equal. For instance : 1001,11001,00110...
Every rule in Backus- Naur form has the structure as follows:
name : : = expansion
where, "::=" means "may replace with" or "expand to"
Below image shows 3 methods to solve above question.

this image shows 3rd method.

Write a BNF grammar of strings of 0's and 1's where number 01 and 10 substrings...
BNF 5. Write a BNF grammar that accepts an unsigned decimal number. This number can contain a single decimal point, if it does it cannot be the first character in the string, nor may it be the last.
Write a context-free grammar for the language where all strings are of even length and the first half of the string is all 0’s, but it must be an odd number of 0’s
1. (15 pts) Consider the following BNF grammar: For each of the strings below, indicate whether or not the string can be derived from the grammar. ?f so, provide a derivation. (a) (5 pts) aabccd (b) (5 pts) accbcc (c) (5 pts) acccce
Find a regular grammar for each of the following : a. 1 + 01 b. 1*01* + 01 c. {00, 10, 01} d. {Λ, 0, 1, 00, 11, … 0n, 1n, (01)n, …} e. All strings which have an odd number of 1’s
Write a BNF grammar that accepts an unsigned decimal number.
This number can contain a single decimal point, if it does it
cannot be the first character in the string, nor may it be the
last.
5. Write a BNF grammar that accepts an unsigned decimal number. This number can contain a single decimal point, if it does it cannot be the first character in the string, nor may it be the last. [4 marks]
5. Write a BNF grammar...
Consider the following BNF grammar: S ::= A x | B y A ::= B y | C w B ::= x | B w C ::= y Which of the following regular expressions describes the same set of strings as the grammar? 1. xwxy + xww∗y + ywx 2. xwx + xww∗y + yw 3. xw∗y + xwxyx + ywx 4. xwy + xw∗xyx + ywx 5. xw∗y + xw∗yx + ywx 6. none of the above 7. all...
1) a. Write down an unambiguous grammar that generates the set of strings { s;, s;s, s;s;s;, . . . } b. Give a leftmost and rightmost derivation for the string s;s; using your grammar.
Question 1 Consider the following BNF grammar: Not complete Marked out of 3.00 p Flag question <letter> ::= "a" | "b" | "C" | "d" | "e" | "F" | "g" | "h" | "1" ";" | "K" | "1" | "m" | "n" | "0" | "p" | "q" | "r" | "S" | "t" || "u" | "V" | "W" | "x" | "y" | "z" <digit> ::= "O" | "1" | "2" | "3" | "4" |...
13.) Write a grammar for the language consisting of strings that have n copies of the letter a followed by one more number of copies of the letter b, where n>0. For example, the strings abb, aaaabbbbb, and aaaaaaaabbbbbbbbb are in the language but a, ab, ba, and aaabb are not. Answer the aaaaaabbbbbbbh are in the languagebr 14.) Draw parse trees for the sentences abb and aabbb, as derived from the grammar of Problem 13. Answer:
Write a Context-Free grammar in either one of the following way: 1. Use recursion method to define grammar inductively, 2. Use semantic meanning for non-terminals method For the following language: strings have equal numbers of 0 and 1. For example your language will accept following strings 01, 0101, 010101, 000111, 001011, but will reject 010, 00011, 001, 11000, ... . Also show that grammar you created is ambiguos or not by using parse tree approach