Question

In: Computer Science

Question 1 a) Determine whether the language {a n b m c n | n >...

Question 1
a) Determine whether the language {a n b m c n | n > 0} is regular or not using pumping Lemma.


b) Prove that the language
{(ai bn | i, n > 0, i = n or i = 2n} is not regular using the Pumping
Lemma.

Solutions

Expert Solution

For this question we can say that to solve this question we need to understand pumping lemma.

PUMPING LEMMA:

pumping lemma basically is used to prove that any provided language is regular or not.

now pumping lemma can be stated for every regular Language(if it is regular) L,there exist an integer /constant "C" such that for every string J in L will be |J| C (|x| means length of x)

we can deduce J into 3 strings

J=XYZ,such that

  • |Y| > 0
  • |XY|C
  • and last condition for all K0, string is also belongs to language L.

now comming to question:

part1.)the given language is

now we can take J as and let c=n where n is the number of states

now proving the three parts of lemma:

  • now J can be represented as J=XYZ where X=,Y=,and Z=
  • |Y|>0,if m0
  • now |XY|C
  • and let us take n=3 and k=m=2
  • which is,aaabbccc which belongs to the language L
  • hence proved language L is regular language

part 2.)

given language is

now we can represent this language as :

  • let J= .and this implies
  • by pummping lemma,let J=XYZ, where |XY| n
  • now let ,where n>0 .hence |Y|0
  • let us take K=3 , then our string will be =,which is not a part of language L
  • and thus this proves that language L is not regular.

Related Solutions

Prove the language of strings over {a, b} of the form (b^m)(a^n) , 0 ≤ m...
Prove the language of strings over {a, b} of the form (b^m)(a^n) , 0 ≤ m < n-2 isn’t regular. (I'm using the ^ notation but your free to make yours bman instead of (b^m)(a^n) ) Use the pumping lemma for regular languages.
( C language only )Generate a function  called randomnum(n,m,neg); where n and m are the lower and...
( C language only )Generate a function  called randomnum(n,m,neg); where n and m are the lower and upper bounds for the random number; the generated number is negative if a variable named neg is true .These numbers should be non-zero with a maximum absolute value of 15 . You must use bitwise arithmetic to calculate the modulus of the random numbers
1.            Determine whether the function f from { a, b, c, d } to {a,...
1.            Determine whether the function f from { a, b, c, d } to {a, b, c, d, e} is injective (one-to-one), surjective (onto) and/or bijective (one-to- one correspondence) : f(a) = a,            f(b) = c,            f(c) = b, f(d) = e a. Is this function injective?              . surjective?              . bijective?              . If your answer is no for any of the above, explain:             b. Is there an inverse for this function?              . c. Is the composition f...
Given two arrays: A[0..m-1] and B[0..n-1]. Find whether B[] is a subset of A[] or not....
Given two arrays: A[0..m-1] and B[0..n-1]. Find whether B[] is a subset of A[] or not. Both the arrays are not in sorted order. It may be assumed that elements in both array are distinct. Design an O(n) time algorithm that solves this problem. Provide pseudocode Ex: Input: A[] = {11, 1, 13, 21, 3, 7}, B[] = {11, 3, 7, 1} Output: B[] is a subset of A[] Input: A[] = {1, 2, 3, 4, 5, 6}, B[] =...
Determine whether the following statements describe Cell Respiration (C), Photosynthesis (P), Both (B), or None (N)....
Determine whether the following statements describe Cell Respiration (C), Photosynthesis (P), Both (B), or None (N). a. Uses a proton gradient to create ATP. b. Uses byproducts to oxidize NADH to NAD+ for reuse. 2. The thylakoid space of the choloroplast is: a. More acidic than the stroma b. More basic than the stroma c. Hypotonic to the stroma d. At equilibrium with the stroma e. Full of electrons from the stroma
Can you give me a turing machine for the language c* n b*2n a* n+2 for...
Can you give me a turing machine for the language c* n b*2n a* n+2 for n>=0 . Please give the entire diagram with states, transition function, alphabet. Can use either one-tape or two-tape (both infinite). Describe the logic used to build the machine. Run the TM that accepts for any string of length > 1. Also run for string cbba.
Prove that the language L={(M, N): M is a Turing machine and N is a DFA...
Prove that the language L={(M, N): M is a Turing machine and N is a DFA with L(M) =L(N)} is undecidable. You need to derive a reduction from Atm={(M, w)|Turing machine M accepts w} to L. (In layman's terms please, no other theorems involved)
Determine whether there is an integer n > 1 such that there is a projective plane...
Determine whether there is an integer n > 1 such that there is a projective plane of order n (i.e. with n + 1 points on each line) such that n ̸= pk for any prime number p and integer k ≥ 1.
Determine whether the series converges absolutely, conditionally, or not at all. ∞ n = 1 (−1)n...
Determine whether the series converges absolutely, conditionally, or not at all. ∞ n = 1 (−1)n 1 + n3
Evaluate if the followings are Cauchy sequences or not. (a) an= (-1)n (b) an= (-1)n/n (c)...
Evaluate if the followings are Cauchy sequences or not. (a) an= (-1)n (b) an= (-1)n/n (c) an = n/(n+1) (d) an = (cos n)/n
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT