|
Answer: If a language has a regular expression it is said to be regular. Given language L can be expressed with regular expression (1 + 01*0)*1. So L is regular. |
|
Explanation: Given language L can be expressed with regular expression (1 + 01*0)*1. As string can either start with 1 or 0 but should end with 1 and contain even number of zeros. As it can either start with 1 or 0 we can express it as 1+0. but Regular expression for even number of zeros is 01*0. Together it will be (1 + 01*0)*. As it needs to be end with 1. Whole expression will be (1 + 01*0)*1. If a language has a regular expression it is said to be regular. So L is regular. |
| ***Please upvote*** |
Show that the language L defined below is regular: L={w/ w has an even number of...
Consider the language L below. (a) Is L a regular language? –
Yes, or No. (b) If L is a regular language, design the DFA (using a
State Table) to accept the language L, with the minimum number of
states. Assume , (c) Suppose the
input is “101100”. Is this input string in the language L?
Σ = {0,1} L={w l w has both an even number of O's and an odd number of 1's}
Write a legal regular expression for the following regular language. L = { w | w ∊ (0 + 1)* and w contains an even number of 1’s AND an even number of 0’s}.
Let Σ {0, 1, 2} Use the Pumping Lemma to show that the language L defined below is not regular L-(w: w Σ*, w is a palindrome} Note that a palindrome is a word, number, or other sequence of characters which reads the same backward as forward, such as mom or eye.
Write a right-linear CFG for the regular languages: (∑={0,1}) a. L = { w | w is a binary string which starts and ends with the same symbol} b. L = { w | w is a binary string with at least three 0’s } c. L = { w | w is a binary string with odd number of 0’s and even number of 1’s}
Let S = {a, b}. Show that the language L = {w EX : na(w)<n(w) } is not regular.
Let ?= (a, b). The Language L = {w E ?. : na(w) < na(w)) is not regular. (Note: na(w) and nu(w) are the number of a's and 's in tw, respectively.) To show this language is not regular, suppose you are given p. You now have complete choice of w. So choose wa+1, Of course you see how this satisfies the requirements of words in the language. Now, answer the following: (a) What is the largest value of lryl?...
(d) Let L be any regular language. Use the Pumping Lemma to show that In > 1 such that for all w E L such that|> n, there is another string ve L such that lvl <n. (4 marks) (e) Let L be a regular language over {0,1}. Show how we can use the previous result to show that in order to determine whether or not L is empty, we need only test at most 2" – 1 strings. (2...
For a regular language below, write an equivalent regular expression and draw an FA that accepts the language. L = {w ∈ {a,b}*:w contains the substring aba}
Prove that the following language is not regular: L = { w | w ∈ {a,b,c,d,e}* and w = wr}. So L is a palindrome made up of the letters a, b, c, d, and e.
1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w | the length of w is at least 2 and has the same symbol in its 2nd and last positions} (b)Draw the state diagram for an NFA for accepting the following language over alphabet {0,1} (Use as few states as possible): {w | w is of the form 1*(01 ∪ 10*)*} (c)If A is a language with alphabet Σ, the complement of A is...