Question

In: Computer Science

Prove that {0n1n2n:n≥1} is not a regular language. The decimal notation for a number is the...

  1. Prove that {0n1n2n:n≥1} is not a regular language.
  2. The decimal notation for a number is the number written in the usual way, as a string over the alphabet {0,1,⋯9}. For example, the decimal notation for 13 is a string of length 2. In unary notation, only the symbol “I” is used; thus 5 would be represented as IIIII in unary notation. Show that each of the following is or is not a regular language.

(For regular languages, write down its regular expression or describe the automata accepting it; for languages that are not regular, prove it using pumping lemma)

  1. {w: w is the unary notation for a number that is a multiple of 7}
  2. {w: w is the unary notation for 10n,n ≥1}

Solutions

Expert Solution

A) Given Language L = {0n1n2n:n≥1}

Pumping Lemma states that

For any language L, there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exists u,v, w ∈ Σ*, such that x = uvw, and
(1) |uv| ≤ n
(2) |v| ≥ 1
(3) for all i ≥ 0: uv^iw ∈ L

To prove that the language is not regular we have show that there exist alteast one string such that it is not in the language (i.e it has to fail pumping lemma Test

Let X=012∈ L (n=1) where the pumping length =3

we are spilting X into u ,v ,w such u = 0, v = 1 and w = 2

it satisfies all the conditions of the pumping lemma so it string which belong the language L

so here we will be pumping the v and see whether the obtained string is in language or not

if we find atleat one string which is not the language after pumping v then is the language won't be regular

and pumping v once (i.e i=2) then we get the string 0122 which doesn't belong the given langugage L becuase it the condition that all the power of the 0,1,2 should be same

so the given language is not regular

B)  language is {w: w is the unary notation for a number that is a multiple of 7}

here we will give the NFA that accepts only the string of the language

The NFA contains 7 states where each state represents a remainder and possible remainder of a number when divided by 7 are {0,1,2,3,4,5,6}

so the given language is regular

C) language is {w: w is the unary notation for 10n,n ≥1}

this language contains of strings which are multiples of 10

is it similar to the above problem instead of 7 states the NFA Contains 10 states where the starting state is the intial and final state

so this language is also regular

Hope it is helpful for you. If so please upvote and for any queries please drop a comment :-)


Related Solutions

Question 4 Prove that the following language is not regular. ? = { 0 ?1 ?...
Question 4 Prove that the following language is not regular. ? = { 0 ?1 ? | ?, ? ≥ 0, ? ≠ 2? + 1 } Question 5 Prove that the following language is not regular. ? = { ? ∈ { 0, 1, 2} ∗ | #0 (?) + #1 (?) = #2 (?) } where #? (?) denotes the number of occurrences of symbol a in string w.
Is the following language a regular language? ( Prove with pumping Lenma ) L = {...
Is the following language a regular language? ( Prove with pumping Lenma ) L = { o^n 1^n 2^n | n => 0} Define CFL pumping lemma
Convert the following to a decimal, scientific notation, and engineering notation Decimal to scientific and engineering...
Convert the following to a decimal, scientific notation, and engineering notation Decimal to scientific and engineering notation: 270, 14600, 0.000456, 0.022, 0.000000051, 66500000, 423000, 0.78 Scientific notation to decimal and engineering notation,4.5x10^4, 6.8x10^-8, 2.7x10^5, 7.22x10^-2, 9.52x10^-5, 1.89x10^2, 3.6x10^7, 8.62x10^-10 engineering notation to decimal and scientific notation,12k, 68p, 2.1G, 82T, 7.1n, 100m, 1.8k
Using Euclid's Propositions: 1. Prove that the regular octagon is constructible. 2. Prove that the regular...
Using Euclid's Propositions: 1. Prove that the regular octagon is constructible. 2. Prove that the regular decagon is constructible.
Using the pumping lemma, prove that the language {1^n | n is a prime number} is...
Using the pumping lemma, prove that the language {1^n | n is a prime number} is not regular.
Code in C-language programming description about convert binary number to decimal number.
Code in C-language programming description about convert binary number to decimal number.
HCS12 Assembly Language: 1. Write a program to convert a decimal number stored at memory location...
HCS12 Assembly Language: 1. Write a program to convert a decimal number stored at memory location $1010 into a binary number. Store the result in memory location $2000
Prove that the language consisting of all the words that have equal number of a's and...
Prove that the language consisting of all the words that have equal number of a's and c's and exactly twice as many b's is not context-free.
What is the advantage of using scientific notation over decimal notation? What is the difference between...
What is the advantage of using scientific notation over decimal notation? What is the difference between weight and mass?
Question 1) Given the byte value: 0xad a) What is the equivalent decimal notation as an...
Question 1) Given the byte value: 0xad a) What is the equivalent decimal notation as an unsigned value? b_ What is the equivalent decimal notation as a signed value? Question 2) Below are integer values and the location where each is stored, which may be an address in memory or a register: Value    Location 0xc       0x130 0x82     0x134 0x5       %rdi 0x134    %rsi What are the values of the following operands? You may answer in decimal or hexadecimal, but if you...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT