When we say arithmetic expression, we mean a kind of expression you can type in a very basic desk calculator. That is, neither variables nor brackets are allowed. It contains only numbers and four arithmetic operators, +, -, *, and /.
The following are some examples of arithmetic expression:
Any number string with or without signs - e.g. 3, -1, +10, 3.14, -0.70 and 099.
Number strings mixed with arithmetic operators - e.g. 3+5, -1+2*3, 7/10-0.7, and -1.4-+8.2.
An example of FA diagram for recognising a non-negative integer is given below. You may use it as a start point. You need to add a few more states and transitions to handle numbers with decimal point and signs (e.g. -5, +2, 0.21, -32.6, +99.05, but not the form 1.0E-3). Most importantly, you also need to add a few more things to deal with the arithmetic operators +, -, *, /.
Transcribed Image Text:AutoSave OFF
Home Insert Draw Design Layout
A A
Paste
Page 1 of 1
92.
Times New... V 12 V
B I
222 words
✓ ab x₂ x² A
v
References
Aa ✓
V
Mailings Review
=-=-1¹5 E
= = =
English (United Kingdom)
V
View
V
start
# A↓
W= worksheet2
Tell me
Accessibility: Investigate
In this work, we ask you to design a deterministic Finite Automaton (FA) to
recognise arithmetic expressions.
The following are some examples of arithmetic expression:
AaBbCcDdE
Emphasis
When we say arithmetic expression, we mean a kind of expression you can type in a
very basic desk calculator. That is, neither variables nor brackets are allowed. It
contains only numbers and four arithmetic operators, +, -, *, and /.
+, -
0-9
., +, -, *₂/
1 AaBbC 1.1 AaBb
Heading 1 Heading 2
1.
Any number string with or without signs - e.g. 3, -1, +10, 3.14, -0.70 and 099.
2. Number strings mixed with arithmetic operators - e.g. 3+5, -1+2*3, 7/10-0.7,
and -1.4-+8.2.
An example of FA diagram for recognising a non-negative integer is given below. You
may use it as a start point. You need to add a few more states and transitions to handle
numbers with decimal point and signs (e.g. -5, +2, 0.21, -32.6, +99.05, but not the form
1.0E-3). Most importantly, you also need to add a few more things to deal with the
arithmetic operators +, -, *,/.
AaBb CcDdF
Heading 3
AaBbCcDdEe
Heading 4
digit
0-9
Focus
AaBb CcDdF
Heading 5
E
Comments
Styles
Pane
I
Editing
Dictate
Editor
Share
+ 175%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.