Part IV- Automata Theory, Grammars and Languages

Question # 00013740 Posted By: expert-mustang Updated on: 04/28/2014 12:44 AM Due on: 04/28/2014
Subject Mathematics Topic General Mathematics Tutorials:
Question
Dot Image

Part IV: Automata Theory, Grammars and Languages (There are 2 questions for this part)
(1) A gate with three rotating arms at waist height is used to control access to a subway in New York city. Initially, the arms of the gate are locked preventing customers from passing through. Unlocking the arms requires depositing a token in a slot, which allows the arms to rotate to a complete turn which allows one customer to push through and enter. Once the customer passes through the arms are then locked again until another customer deposits another token in the slot.
The gate has two states: LOCKED and UNLOCKED. It also has two inputs: TOKEN and PUSH. When the gate is locked, pushing the arm of the gate has no effect regardless of how many times it is pushed. The input TOXXXXX XXXXXes the state from LOCKED to UNLOCKED. When the gate is in the UNLOCKED state, inserting additional tokens has no effect on the state. But when in the UNLOCKED state, a PUSH input changes the state to LOCKED.
(i). Provide a transition table showing each state, the inputs, and the resulting new states for each input
(ii). Represent your transition table into a digraph (transition diagram)
(2) Here is a context-free grammar that can be used to generate algebraic expressions via the arithmetic operators (addition, subtraction, multiplication, and division), in the variables p, q, and r. The letter E stands for expression:
Rule 1: E —› p
Rule 2: E —› q
Rule 3: E —› r
Rule 4: E —› E + E
Rule 5: E —› E – E
Rule 6: E —› E X E
Rule 7: E —› E/E
Rule 8: E —›(E)
(i). Use the above grammar to derive the string given by the mathematical expression E = (p + q) X p – r X p/(q + q)
(ii). Provide a parse tree for this derivation.
Dot Image
Tutorials for this Question
  1. Tutorial # 00013299 Posted By: expert-mustang Posted on: 04/28/2014 12:45 AM
    Puchased By: 5
    Tutorial Preview
    state to LOCKED. (i). Provide a transition table showing each ...
    Attachments
    Part_IV_Individual_Assignment_-_Automata_Theory,_Grammars_and_Languages_Solution.docx (80.07 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    br...e44 Rating Always provide work on time and meet with expectations 04/21/2015
    sf...son Rating Well-written tutorials 04/16/2015
    e...nit Rating Zero-plagiarism and amazing work 09/08/2014

Great! We have found the solution of this question!

Whatsapp Lisa