Question

In: Computer Science

Determine whether or not the following languages are regular. If the language is regular then give...

Determine whether or not the following languages are regular. If the language is regular then give an NFA or regular expression for the language. Otherwise, use the pumping lemma for regular languages or closure properties to prove the language is not regular.

1) L = { 0 n1 k : k ≤ n ≤ 2k}

2) L = { 0 n1 k : n > 0, k > 0 } È { 1 k0 n : k > 0, n > 0}

Solutions

Expert Solution

(1) L = { 0 n 1 k : k ≤ n ≤ 2k}

Finite automata is not having memory element so FA can not Perform any comparison so above languagr is not Regular laguage because comparison is envolved.

(2) L = { 0 n1 k : n > 0, k > 0 } È { 1 k0 n : k > 0, n > 0} // here meaning of E' is not given

Regular Expression for { 0 n1 k : n > 0, k > 0 } is 0+ 1+

Regular Expression for { 1 k0 n : k > 0, n > 0} is 1+ 0+

so operation between this is also regular hence its Regular

Note: here meaning of E' is not given so we can assume any normal decidable operation


Related Solutions

Formal Languages Give a regular expression for each of the following languages: L2a = {w ?...
Formal Languages Give a regular expression for each of the following languages: L2a = {w ? {0,1}* | w corresponds to the binary encoding of non-negative integers that are evenly divisible by 4 L2b = {w ? {a,b}* | w contains at least one 'a' and exactly two b's} L2c = {w ? {0, 1, 2}* | w starts with a 2, ends with a 1 and contains an even number of 0's}.
The first five questions give languages over {0,1}. In each case decide whether the language is...
The first five questions give languages over {0,1}. In each case decide whether the language is regular or not, and prove your answer is correct The set of all strings x beginning with a non-null string of the form ww.
The first five questions give languages over {0, 1}. In each case decide whether the language...
The first five questions give languages over {0, 1}. In each case decide whether the language is regular or not, and prove your answer is correct. 5. The set of strings in which the number of 0's is a perfect square.
Are the following languages over {a, b} regular? If they are then prove it. If they...
Are the following languages over {a, b} regular? If they are then prove it. If they are not prove it with the Pumping Lemma a) {ap | p is a prime number} b) {xax | x Î{a,b}*} (start by listing some strings in, not in, the language
Regular => Context-Free Give a proof by induction on regular expressions that: For any language A,...
Regular => Context-Free Give a proof by induction on regular expressions that: For any language A, if A is regular, then A is also context-free. You may assume that the statements from the previous Closure under Context-Free Languages problem are proved. R is a regular expression if RR is: a for some a∈alphabet Σ, the empty string ε, the empty set ∅, R​1​​∪R​2​​, sometimes written R​1​​∣R​2​​, where R​1​​ and R​2​​ are regular expressions, R​1​​∘R​2​​, sometimes written R​1​​R​2​​, where R​1​​ and...
a) Give 5 good examples of Regular language. b) Give 5 good examples of Regular Grammar.
a) Give 5 good examples of Regular language. b) Give 5 good examples of Regular Grammar.
Determine if the language ?={?^?∶?=?^3????????≥0}over Σ={?}is regular.
Determine if the language ?={?^?∶?=?^3????????≥0}over Σ={?}is regular.
5 Regular => Context-Free Give a proof by induction on regular expressions that: For any language...
5 Regular => Context-Free Give a proof by induction on regular expressions that: For any language A, if A is regular, then A is also context-free. You may assume that the statements from the previous Closure under Context-Free Languages problem are proved.
Use the pumping lemma to show that the following languages are not regular. A a. A1={0^n...
Use the pumping lemma to show that the following languages are not regular. A a. A1={0^n 1^n 2^n | n≥0} b. A2 = {www | w ∈ {a,b}∗} A c. A3 ={a^2^n | n≥0} (Here, a^2^n means a string of 2^n a’s.) A ={a3n |n > 0 }
Use the pumping lemma to show that the following languages are not regular (c) (5 pts)...
Use the pumping lemma to show that the following languages are not regular (c) (5 pts) Let Σ = {0, 1, −, =} and SUB = {x = y − z | x, y, z are binary integers, and x is the result of the subtraction of z from y}. For example: 1 = 1 − 0, 10 = 11 − 01 are strings in SUB but not 1 = 1 − 1 or 11 = 11 − 10.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT