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

  Part -1q1 what do you consider were the three most

part -1q1 what do you consider were the three most important things planned or unplanned that you learned last year?

  Write down a 2 page research paper excluding the title page

write a 2 page research paper excluding the title page on the turing and von neumann models. compare and contrast each

  Perform acl test and prepare a report with conclusions

Perform the ACL test and prepare a report with your conclusions. Document your report with ACL printouts showing details of test results and the command log - Identify an operational concern related to the revenue procedures.

  Truth table exercises

Translate the following argument and use truth tables to test for validity.

  Implementation of both the algorithms using cc code 1

implementation of both the algorithms using cc code 1. roommates problem 2. intern problem1. the roommate problemthe

  Express set as regular expression

Express the following set as a regular expression: The set of all strings of length at least three over {0,1} such that every three consecutive.

  Manipulation and simplification of logic predicates

How is the principle of inclusion and exclusion related to the rules for manipulation and simplification of logic predicates?

  A turing machine for f(x)=2x

Construct a turing machine to compute the product x*y of any two positive integers x and y.

  Discuss the process you used in making the decision

Discuss the process you used in making the decision. What ethical theory best reflects the foundation you used to make the decision.

  Show each of these specifications using predicates

For every security breach there is at least one mechanism that can detect that breach if and only if there is a process that has not been compromised

  1 discuss which university has the more effective strategyi

1. discuss which university has the more effective strategy?i. provide example of effective hr planning.ii. what are

  Find cfgs for the languages

Find CFGs for the languages over the alphabet sigma = {a   b}:

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