Draw a turing machine that decides the language

Assignment Help Theory of Computation
Reference no: EM131766799

Context-free Languages and Turing Machines

Question 1.(a) Consider the language

{aibkcm |i ≥ 0, k ≥ 0, m ≥ 0, k = i + m}

Give a word that is in the language and a word that is not in the language.

(b) Give a context-free grammar for the language above.

(c) Use the Cocke-Younger-Kasami algorithm to determine whether abbaa is a word of the language of the following grammar. Give the table. State in one sentence whether the word is a word of the language of the grammar and how you obtain this conclusion from the table.

S → AX | BY | SS | BA

X → AS

Y → BS

A → a

B → b

(d) Give a parse tree for the word aaba with respect to the grammar above (for part (c)).

(e) What is FIRST( SS) with respect to the grammar above (for part (c)).

Question 2. Consider the following two context-free grammars:

G1 : S → SaS | SbS | c

G2 : S → DAd
A → aS | ε

B → bD | ε

D → cB

(a) Draw two different parse trees for the word cacbc and the grammar G1.

(b) Give the LOOKAHEAD set for every rule of grammar G2.

(c) Is the grammar G2 LL(1) ?

(d) Give the set of nullable nonterminals for the grammar G2.

(e)Give the context-free grammar that you obtain from replacing all ε-rules in gram-mar G2

Question 3. (a) Consider the following Turing machine with input alphabet {a, b} and tape al- phabet {a, b, _}:

2105_turing machine.jpg

Give computations for the words ab and bb. State for each word whether the machine accepts it, rejects it or loops. If the machine loops, then give the first five configurations of the computation.

(b) Draw a Turing machine that decides the language of all words over the alphabet {a, b} that have an odd number of a's and an odd number of b's.

Verified Expert

The whole assignment is totally unique and is upto my specification. The assignment contains questions solved on formal automata and theory. The whole assignment have been solved particularly keeping relevant points in mind.

Reference no: EM131766799

Questions Cloud

Online news source that discusses the strike : Find an article from an online news source that discusses the strike.
Budgeted demand requires adding additional lines : Four existing assembly lines have the flexibility to handle two products, but a huge jump in budgeted demand requires adding additional lines.
Discuss an approach the rn can take to assist this patient : Discuss an approach the RN can take to assist this patient to understand his disease and comply with treatment.
Find the actual confidence level for the given interval : A hasty reader believes that the interval given in the report is a 95% confidence interval for the population mean. Find the actual confidence level.
Draw a turing machine that decides the language : CO519 Theory of Computing - Draw a Turing machine that decides the language of all words over the alphabet {a, b} that have an odd number of a's
Is nursing considered a science or an art : Is there a gap between nursing education and nursing practice? Please explain and support your answers with at least 5 references.
Huge jump in budgeted demand requires adding additional : Huge jump in budgeted demand requires adding additional lines.
Estimate the mean percent change in bmc in the population : Bone loss by nursing mothers Breast-feeding mothers secrete calcium into their milk. Some of the calcium may come from their bones, so mothers may lose bone.
How did your prior life experiences influence your attitude : Did the movement you selected influence your life and/or community? How? How did your prior life experiences influence your attitude toward this movement?

Reviews

len1766799

12/15/2017 12:26:23 AM

This assessment is built from past exam papers. So if you want to practice for the exam, you should do this assessment in ca. 90 minutes. Please submit your solution as a single PDF file on Moodle. The PDF file may be generated in various different ways; for example, you may use Word to write your solution or you may scan a hand-written solution. Note the statements on late submission and plagiarism on the Moodle module website. Am struggling with a theory of computation based on past paper exams. The assigment looks easy but am strugling with it. Can someone help with this assignment? It''s due in tomorrow at 23:30 UK time zone.

Write a Review

Theory of Computation Questions & Answers

  Finite-state machine design

Create a finite-state machine design to turn your FPGA development board into a simple programmable music box.

  Redundant sequence identi cation

Redundant sequence identi cation

  Compute a shortest superstring

Dynamic programming algorithm to compute a shortest superstring.

  Propositional and predicate logic

Write down a structural induction principle for the PlayTree free type

  Design a syntactic analyzer

Design a syntactic analyzer for the language specified by the grammar

  Design unambiguous grammar to parse expressions

Write a program would read two numbers and then print all numbers between the first and the second, inclusive. Design unambiguous grammar to parse expressions

  Consider a logic function with three outputs

Consider a logic function with three outputs,  A ,  B , and  C , and three inputs,  D ,  E , and  F . The function is defined as follows:  A  is true if at least one input is true,  B  is true

  Considering a single programmed operating system

Considering a single programmed operating system, what is the minimal total time required to complete executions of the two processes? You should explain your answer with a diagram.

  How to construct an nfa

Give a construction that assumes you are given a DFA for L and show how to construct an NFA (with or without ε-moves) to recognize sort(L).

  Equivalence classes to construct minimal dfa for language

How many equivalence classes does this relation have and what are they? Use these equivalence classes to construct the minimal DFA for the language.

  Impact of moore-s law on data center costs

Discuss the impact of Moore's law on data center costs on such things as servers and communications equipment. List at least 3 steps or recommendations your data center can take to offset some or all of the effect of Moore's law.

  Problem encountered in statements in predicate logic

How the problem would be encountered in attempting to represent the following statements in Predicate logic. it should be possible to: John only likes to see French movies.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd