Design the DFA machine for a simple calculator, where ? = {0, 1, 2, 3, 4, 5, 6,
ID: 3736946 • Letter: D
Question
Design the DFA machine for a simple calculator, where
? = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ., =, , , , , [, ] }. “[ ]” is used
for only one operation each time (e.g, [3.1 4.2] 5 [12 4.8]),
embedded [[...]] is not allowed.
Steps of the project:
(1)Design a regular expressionrfor real number expression. A real number can be negative orpositive (e.g., – 2.5 and 0.52). A real number expression is an expression of real numbers connected by four arithmetic operations +, -, ×, , / and priority [] .
(2)Design a DFA for accepting the regular languageL(r). You can first design a NFA and then conve it to a DFA.
Desis er exevessiona +Ci) ledto realla opi(l@te ) tO/@i FreaExplanation / Answer
NFA NDTM
DTM
DPDA NPDA LBA
Fig. 4.2. The binary relation Power is shown. The dotted edges are some
of the edges implied by transitivity. Undotted and dotted means the same in
this diagram. Therefore, Power actually contains: (i) the pairs corresponding
to the solid edges, (ii) the pairs indicated by the dotted edges, (iii) and those
pairs indicated by those dotted transitive edges not shown.
An example that nicely demonstrates the versatility of preorders is the
one that defines the “power” of computing machines. Let
MT = {dfa, nfa, dpda, npda, lba, dtm, ndtm}
represent the set of machine types studied in this book. These acronyms
stand for deterministic finite automata, nondeterministic finite au-
tomata, deterministic push-down automata, nondeterministic push-
down automata, linear bounded automata, deterministic Turing ma-
chines, and nondeterministic Turing machines, respectively. A binary
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.