Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Math Expert


Home >> Math

1. Consider the following context free grammar G with start symbol S (we write E for the empty string, epsilon):

S ---> bB | aSS

A ---> aB | bAA

B ---> E | bA | aS

a. Describe L(G), i.e. complete the following definition: L(G) = { w ∈ {a, b}* | ...

b. Show that G is ambiguous.

2. Give a context free grammar for regular expressions over the alphabet Σ = {0, 1}.

Use the definition of a regular expression given on page 64 of the text.

3. Let L1 and L2 be regular languages and let L = {xy | x ∈ L1 and y ∈ L2 and |x| = |y|}.

a. Is L regular? Answer clearly YES or NO and justify/prove your answer.

b. Is L context free? Answer clearly YES or NO and justify/prove your answer.

4. Let L = {w ∈ {0, 1}* | (the number of 0's in w) mod 3 = 2}. Give a state diagram in the style of the text for a TM that recognizes, but does not decide, L.

5. Turing machines can be considered computers of functions and not just accepters of strings. The function parameter or input is what is written on the tape when the TM starts and its value or output is what is written on the tape when it halts. If it does not halt, the function it computes is not defined for that particular parameter.

Consider the function f(n) = 8n + 5. Assume that n is written on the tape in binary (just 0's and 1's, perhaps with leading 0's) and that the value computed is also written in binary. We don't care whether the value computed has unnecessary leading 0's or not. All numbers are considered unsigned.

Describe at a high level a TM to compute this function.

6. Let L = { | R is a regular expression describing a language that contains at least one string with the substring 111}.

Show that L is decidable.

Questions are shown in the order received.

1. Q: Should here be a * after the {0, 1} in question 2?

A: No. S is an alphabet, not a language. When we speak of a string over S that is the same as saying a string in S*

2. Q: In question 3, does "the number of 0's in w mod 3 = 2" mean you count the 0's in the string and mod that number by 3?

A: Yes. I've now put parentheses around part of it to make it clear; as in: (the number of 0's in w) mod 3

Math, Academics

  • Category:- Math
  • Reference No.:- M9526376

Have any Question?


Related Questions in Math

Clarity succinctness writing your name and netid1

Clarity, succinctness, writing your name and Netid: 1 Indistinguishability 1. If {X n }n is computationally indistinguishable from {Y n } n , {Y n } n is computationally indistin- guishable from {Z n } n, then (select th ...

Mathematics- algebraic geometry problemlet k denotes an

Mathematics- Algebraic Geometry Problem Let K denotes an algebraically closed field and let P 1 be constructed as in Example 5.5(a) in Gathmanns notes, i.e. P 1 is the gluing of X 1 = A 1 and X 2 = A 1 along  the open su ...

Assignment -question 1 let t and or 0 1 be a boolean

Assignment - Question 1. Let (T, ∧, ∨,', 0, 1) be a Boolean Algebra. Define ∗ : T × T → T and o : T × T → T as follows: x ∗ y := (x ∨ y)' x o y := (x ∧ y)' (a) Show, using the laws of Boolean Algebra, how to define x ∗ y ...

1 suppose that n 10088821 is a product of two distinct

1. Suppose that n = 10088821 is a product of two distinct primes, and Φ(n) = 10082272. Determine the prime factors of n. 2. It is easy to show that the converse of Fermat's Theorem does not hold; i.e., the congruence a n ...

Assessment taskpractical investigation- question 1 requires

Assessment Task Practical Investigation - Question 1 requires selecting reference points from the graph. It is expected that each student will choose different reference points to other students. Take note of the criteri ...

Question you will recommend a course of action regarding

Question: You will recommend a course of action regarding strategic planning in light of the issue the healthcare organization is facing. Be sure to address the following: 1. Provide a brief summary of the issue facing t ...

Maths assignment - 1 analysis of a data setusing a

Maths Assignment - 1. Analysis of a data set Using a continuous data set you are requested to collect in the types of data and gathering data section, perform a statistical analysis on your data. You have opportunities t ...

Question 1 - for the ivp of ode y t-1e-y y1 0 find an

Question 1 - For the I.V.P of ODE y' = (t-1)e -y , y(1) = 0, find an approximation to y(1.2) using the following numerical methods with Δt = 0.1. Compare the numerical solution with the exact solution and compute the err ...

Assignment - solving the five question in the very details

Assignment - Solving the five question in the very details, thanks a lot. Question - Let a ∈ P n be a point. Show that the one-point set {a} is a projective variety, and compute explicit generators for the ideal I p ({a} ...

Assignment - provide solution to the following questionsq1

Assignment - Provide solution to the following questions: Q1. Evaluate the following: ∫xsin3x dx Q2. If , then for what value of α is A an identity matrix? Q3. The line y = mx + 1 is a tangent to the curve y 2 = 4x. Find ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As