9)
given L = {a^nb^n :0<=n}
i)
Given language is not regular
proof using pumping lemma:
let take a string w belongs to L
w = aabb
now divide w into xyz, such that 0<|y|
a|a|bb
x|y|z
x=a,y=a,z=bb
now by pumping lemma, for all 0<i, xy^iz belongs to L
let i=1, xy^1z = aabb belongs to L
i=2, xy^2z = xyyz = aaabb doesn't belongs to L
since, xy^2z doesn't belongs to L which violates pumping lemma,
hence L is not regular
ii)
yes it is recursively enumerable
given language is context free,
every context free language is recursive
and every recursive language is recursively enumerable
hence given language is recursively enumerable
Note: As per HOMEWORKLIB POLICY, I am allowed to answer only 1
question(including sub-parts)
on a single post, kingly post the remaining questions seperately
and i will try to answer them
Sorry for the inconvenience caused, thank you
Question 9. Consider the language {a"b" : n >0}. (i) Is this a regular language? Why...
Question 9. Consider the language {a^n b^n : n ≥ 0}. (i) Is this a regular language? Why or why not? (ii) Is this a recursively enumerable language? Why or why not?
Question 10. Consider the function defined by f(n) = 2n where n is a positive integer. (i) Can this function be computed by a Turing machine? Why or why not? ( ii) Is this function primitive recursive? Why or why not?
Consider the function defined by f(n) = 2 nwhere n is a positive integer. (i) Can this function be computed by a Turing machine? Why or why not? (ii) Is this function primitive recursive? Why or why not?
Consider the language { a nb n: n ≥ 0 } . (i) Is this a regular language? Why or why not? (ii) Is this a recursively enumerable language? Why or why not?
Let us consider the following three statements: I. Recursively enumerable languages are those that can be accepted by a Turing machine; II. Recursive languages are those that can be decided by a Turing machine; III. A recursively enumerable language accepted by a Turing machine that halts is recursive. Which of the following holds? a.Only I; b.Only II; c.Only I and II; d.Only II and III; e. All I, II, and III.
Determining whether languages are finite, regular, context free, or recursive 1. (Each part is worth 2 points) Fill in the blanks with one of the following (some choices might not be used): a) finite b) regular but not finite d) context-free but not deterministic context-free e) recursive (that is, decidable) but not context-free f) recursively enumerable (that is, partially decidable) but not recursive g) not recursively enumerable Recall that if M is a Turing machine then "M" (also written as...
Automata question Categorize the languages as I. Type 0 or Recursively Enumerable Languages II. Type 1 or CSL III. Type 2 or CFL IV. Type 3 or Regular in accordance to the Chomsky hierarchy (select only one of the answers designating the lowest level - Note that Type 3 is the lowest level and Type 0 is the highest level) over the alphabet {0,1} L = {0n10k |k, n is any integer} i think its type 0.. am i right ?...
Question 6 of 19 Python The factorial of a positive integer n, fact(n), is defined recursively as follows: fact(n) 51, when n51 fact(n) 5n * fact(n21), otherwise Define a recursive function fact that returns the factorial of a given positive integer.
7. Let Σ = {a}, and consider the language L = {a n : n is a prime number} = {a 2 , a3 , a5 , a7 , a11 , . . .}. Is L a regular language? Why or why not? (Hint: L contains a 11 , a 17 , a 23 , a 29, but not a 77 since 77 is divisible by 11. . . ) 8. Design a Turing machine that calculates the sum of...
Let Azfa"b"c" I n 0 }. Answer each of the following question: 1. 2. 3. 4. Is A a regular language? Is A a context free language? Is A Turing recognizable? Is A Turing decidable?