Question

In: Computer Science

Let L = {0 r | r = s 2 , s a positive integer}. Give...

Let L = {0 r | r = s 2 , s a positive integer}. Give the simplest proof you can that L is not regular using the pumping lemma.

Solutions

Expert Solution

First see what is pumping lemma:

pumping lemma is used for proof of irregularity of language.Thus, if language is regular then it always satisfies pumping lemma.

If there exist at least one string made from pumping which is not in L(Language) then we can say that L is surely not a regular language.but the vice vers is not true always, example > if pumping lemma true , does not mean language is regular.

we have given L : {0 r|r = s2, s a positive integer}

for giving proof for L in not regular we can use proof by contradiction, Here are steps:

>suppose L is regular

>since L is regular we can apply pumping lemma and assert existence of number n > 0 it can satisfy the property.

>give particular number such that

s belongs to positive integer

>by pumping lemma , there are string u, v, w.pick particular number s in N and argue that uv does not belong to L

so we can defined that language is not regular by pumping lemma.


Related Solutions

L = {a r b s | r, s ≥ 0 and s = r 2}....
L = {a r b s | r, s ≥ 0 and s = r 2}. Show that L is not regular using the pumping lemma
Let n be a positive integer. Let S(n) = n sigma j=1 ((1/3j − 2) −...
Let n be a positive integer. Let S(n) = n sigma j=1 ((1/3j − 2) − (1/3j + 1)). a) Compute the value of S(1), S(2), S(3), and S(4). b) Make a conjecture that gives a closed form (i.e., not a summation) formula for the value of S(n). c) Use induction to prove your conjecture is correct.
Let L = {x = a^rb^s | r + s = 1mod2}, I.e, r + s...
Let L = {x = a^rb^s | r + s = 1mod2}, I.e, r + s is an odd number. Is L regular or not? Give a proof that your answer is correct.
Let L = {x = a r b s c t | r + s =...
Let L = {x = a r b s c t | r + s = t, r, s, t ≥ 0}. Give the simplest proof you can that L is not regular using the pumping lemma.
rogram that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary.
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:As long as x is greater than 0    Output x % 2 (remainder is either 0 or 1)    x = x // 2Note: The above algorithm outputs the 0's and 1's in reverse order. You will need to write a second function to reverse the string.Ex: If the input is:6the output is:110Your program must define and call the following two functions. The function integer_to_reverse_binary() should return a string of 1's...
6. Let t be a positive integer. Show that 1? + 2? + ⋯ + (?...
6. Let t be a positive integer. Show that 1? + 2? + ⋯ + (? − 1)? + ?? is ?(??+1). 7. Arrange the functions ?10, 10?, ? log ? , (log ?)3, ?5 + ?3 + ?2, and ?! in a list so that each function is big-O of the next function. 8. Give a big-O estimate for the function ?(?)=(?3 +?2log?)(log?+1)+(5log?+10)(?3 +1). For the function g in your estimate f(n) is O(g(n)), use a simple function g...
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:
USE Coral Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:As long as x is greater than 0    Output x % 2 (remainder is either 0 or 1)    x = x / 2Note: The above algorithm outputs the 0's and 1's in reverse order.Ex: If the input is 6, the output is:011(6 in binary is 110; the algorithm outputs the bits in reverse).
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:
In Java  Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:As long as x is greater than 0    Output x % 2 (remainder is either 0 or 1)    x = x / 2Note: The above algorithm outputs the 0's and 1's in reverse order.Ex: If the input is:6the output is:0116 in binary is 110; the algorithm outputs the bits in reverse.
[C] Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:
6.19 LAB: Convert to binary - functionsWrite a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:As long as x is greater than 0    Output x % 2 (remainder is either 0 or 1)    x = x / 2Note: The above algorithm outputs the 0's and 1's in reverse order. You will need to write a second function to reverse the string.Ex: If the input is:6the output is:110Your program must define and call the following two functions. The IntegerToReverseBinary function...
(Python) Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:
In Python8.21 Program: Convert to binary. Sections 2.7, 3.8, 5.2. Functions.Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is:As long as x is greater than 0    Output x % 2 (remainder is either 0 or 1)    x = x // 2Note: The above algorithm outputs the 0's and 1's in reverse order. You will need to write a second function to reverse the string.Your program must define and call the following two functions. The function integer_to_reverse_binary() should return...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT