Question

need your help with question 2

Your solutions must be submitted as JFLAP solution files for full credit on questions 1, 2 and 5. A 10 % penalty will be asse

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

Question 2:

Here what I am doing in Turing Machine is that appending X to the string in start.

Then we changes all A's to Y in original string and for each A append A in the end by replacing blank symbol.

Now when all A's are shifted we know focus on B.

Now B are replaced by Y and for each B append B in the end by replacing blank symbol.

Now when all B's are shifted we know focus on C.

Now C are replaced by Y and for each C append C in the end by replacing blank symbol.

After whole original string symbol becomes Y, we change the Y to blank symbol and X to blank symbol and reach final state.

if we could not reach final state, string given is invalid.

If we could reach the final state, string is as per requirement in the tape as A*B*C*.

I could not attach jflap file but i can attach screenshots.

JFLAP v8.0 (Beta)(1jflap) File Input Help X Multiple Run Automaton Editor Table Text Size Input Outout Result A; A, L B; B O

Initial steps and final steps Execution trace for string ACBA is as follows:

You can dry run for some string if you want. It is doing the desired function only.

You could easily understand.

Traceback X BADOOOD BADOOD0 OOODOA nnnnnAC 0pggDAC BAODOOD DOOD ODOODACBA ql ODOODACR q2 00000ACBYXOOOO OOODOACBYXDDO0 O000OATraceback X DOOODYYYYXAA BCO qs OoDOOY YYXAAB C D YYYXAABCO ПООД YYYYXAABCO oOooD YYXAABC T2 ODOO00 YYXAAB CD 412 YХААВСО q12 Alright Dude, If that worked for you... don't forget to give THUMBS UP.(that will work for me!)

Add a comment
Know the answer?
Add Answer to:
need your help with question 2 Your solutions must be submitted as JFLAP solution files for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 5. Two tape Turing machine both tapes initially contain (A+B+C)* each tape is read sequentially at...

    5. Two tape Turing machine both tapes initially contain (A+B+C)* each tape is read sequentially at the same time, e.g. position 0 on both tapes, then position 1 on both tapes etc. if the characters match on both tapes at one specific position then nothing is changed if the characters do not match then the characters are swapped.

  • . Please design a standard TM (i.e., a single semi-infinite tape, deterministic) for the laın gua...

    . Please design a standard TM (i.e., a single semi-infinite tape, deterministic) for the laın guage of all palindromes over alphabet {a, b} . Please give both the high-level description (text description or pseudo-code algorithm) and the low-level state transition diagram. Please analyze how many steps (one transition is considered as a step) it takes to accept an input palindrome with n symbols . Please design a deterministic Turing machine with two semi-infinite tapes for the same language. Please give...

  • in python and according to this #Creating class for stack class My_Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def Push(self, d): self.items.append(d) def Po...

    in python and according to this #Creating class for stack class My_Stack: def __init__(self): self.items = [] def isEmpty(self): return self.items == [] def Push(self, d): self.items.append(d) def Pop(self): return self.items.pop() def Display(self): for i in reversed(self.items): print(i,end="") print() s = My_Stack() #taking input from user str = input('Enter your string for palindrome checking: ') n= len(str) #Pushing half of the string into stack for i in range(int(n/2)): s.Push(str[i]) print("S",end="") s.Display() s.Display() #for the next half checking the upcoming string...

  • I need help with this code This is what I need to do: Implement the Stack...

    I need help with this code This is what I need to do: Implement the Stack Class with an ArrayList instead of an array, including the following functions: • empty • push • peek • pop • overrided toString( ) function which returns all of the stack’s contents Things to note: • You no longer need a size. • You no longer need to define a constant DEFAULT_CAPACITY. Since ArrayLists grow dynamically. • Whenever possible, use ArrayList functions instead of...

  • In c++ Section 1. Stack ADT – Overview  Data Items The data items in a stack...

    In c++ Section 1. Stack ADT – Overview  Data Items The data items in a stack are of generic DataType. This means use should use templating and your Node class. Structure  The stack data items are linearly ordered from the most recently added (the top) to the least recently added (the bottom). This is a LIFO scheme. Data items are inserted onto (pushed) and removed from (popped) the top of the stack.  Operations  Constructor. Creates an empty stack.  Copy constructor....

  • Stack help. I need help with my lab assignment. Complete a method for a class named...

    Stack help. I need help with my lab assignment. Complete a method for a class named Palindrome that evaluates a string phrase to determine if the phrase is a palindrome or not. A palindrome is a sequence of characters that reads the same both forward and backward. When comparing the phrase to the same phrase with the characters in reverse order, an uppercase character is considered equivalent to the same character in lowercase, and spaces and punctuation are ignored. The...

  • You will write the following files: mystack.h - contains the class definition for the mystack class....

    You will write the following files: mystack.h - contains the class definition for the mystack class. mystack.cpp - contains the definitions for member functions of the mystack class. inpost.cpp - contains your convert() function. inpost.h - contains the function prototype for convert() so that the main() can call it. Each of the files (with the exception of inpost.h) is described in more detail below. All header files should contain header guards to prevent them from being included multiple times in...

  • The last 3 cases are tests .cpp files to test the code. The language of this...

    The last 3 cases are tests .cpp files to test the code. The language of this code must be C++ because that is the only I am familiar with. Soreland, a software company, is planning on releasing its first C++ compiler with the hopes of putting MiniSoft's Visual C++ out of business (that reminds me of another story). Consequently, Soreland has contracted with the Fruugle Corporation to design and build part of their compiler. Of course, since Fruugle gets all...

  • inMACII Page 1: Question 4 (1 point) 2 3 1 The aluminum cup inside your calorimeter...

    inMACII Page 1: Question 4 (1 point) 2 3 1 The aluminum cup inside your calorimeter weighs 41.55 g. You add 59.21 g of 1.0 M acetic acid solution and 50.03 g of 1.0 M sodium hydroxide solution to the calorimeter. Both solutions have an initial temperature of 19.9 °C, and the final 5 4 temperature after addition is 26.8 °C. What is the molar enthalpy of neutralization, in units of kJ/mol? Assume that: the calorimeter is completely insulated the...

  • C++: Learning Outcomes Implement two stacks and use them to implement an infix to prefix expression...

    C++: Learning Outcomes Implement two stacks and use them to implement an infix to prefix expression convertor Stacks A stack is an abstract data type which uses a sequential container and limits access to that container to one end. You may enter or remove from the container, but only at one end. Using the Linked List data structure from your last homework assignment, implement a Stack of type string. The Stack should only have one data member: the Linked List....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT