Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 2 Given a language,L 1 = { x m y m x n z n | m , n 0}. Choose the suitable machine

QUESTION 2

Given a language,L1 = {xmymxnzn| m, n 0}.

  1. Choose the suitable machine and language type of L1.
    1. A DFA - regular expression
    2. A PDA - context free grammar
    3. A Turing machine - not context free
  2. Design the DFA/ PDA/ TM of L1as answered in (a).
  3. Discuss how the machine match any dependent parts of the string in the languageL1.

QUESTION 3

Construct a Turing Machine copy(x) = x-x, where x {a, b}*and - is a special character. Basically, the machine will start with the tape having the form BxB and terminate with the tape Bx-xB where B is the blank symbol. For example, if the input is abba, so the output will be abba-abba.

  1. Give a high-level descriptionof the TMcopy(w).
  2. Draw the state diagramof the TMcopy(w)

6.Given a TM transition table with strings of 0s and 1s. The tape head will stop anywhere within the string when finishing its execution.

Symbols

State

0

1

B

q1

(q2, B, R)

(q3, B, R)

(q4, B, R)

q2

(q2, 0, R)

(q3, 0, R)

(q4, 0, R)

q3

(q2, 1, R)

(q2, 1, R)

(q3, 1, R)

q4*

-

-

-

  1. Based on the table above, draw the transition diagram of the TM.
  2. Based on the transition table given, explain what this Turing Machine does?
  3. Modify the above TM so that the head will be back to the starting position after the execution is finished.

QUESTION 7

  1. Finite automata (FA) can only accept regular language. Context free language requires push down automata (PDA) to be recognized. Give one example of context free language, explain why Push down Automata (PDA) can recognize this language and show how it works. (Hint: no need to formally define or draw the state diagram. Just describe the implementation).
  2. The language L = {anbncn | n 0} is not recognizable by a PDA. Explain why this language cannot be recognized by a PDA.
  3. Give another language that is not recognizable by PDA.

QUESTION 8

Given the language, () = {0j1k0n| = ( + ); , > 0}answer the following questions:

  1. Describe in words what the above language does.
  2. Design the Turing Machine that accept the above language. (Tips: if the input string is 011000, change this input to XYYZZZ)
  3. Trace the computation for the input string011000.

QUESTION 9

  1. Discuss the differences between Pushdown Automata (PDA) and Turing Machine (TM) in terms of their transition function and acceptance criteria.
  1. Give one example of language that can be accepted/represented by both PDA and TM machines. Choose one valid string of the language and show the computation of the string on both PDA and TM.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions