Question: Write a regular expression that matches prices, i . e . , a $ symbol, followed by at least one digit. If there is a

Write a regular expression that matches prices, i.e., a $ symbol, followed by at least one digit. If there
is a decimal point, there must be at least one digit before it, and exactly two digits after it. There are no
commas. Draw the corresponding finite automaton.
Improve your regex such that it accepts $0 and $0.00 but rejects all other inputs that start with $0 and
continue with other symbols, e.g., $00,$01,$00.00. Draw the corresponding finite automaton.
Improve your regex such that it also accepts commas in the thousands, millions places, etc. For example,
$1,000,$1,000,000.00 are accepted.
A matrix M has 7 rows and 3 columns.
(a) what is its dimension?
(b) what is the dimension of M^(TT), the transpose of M ?
(c) what is the dimension of M^(TT)M ?
(d) what is the dimension of MM^(TT)?
Write a regular expression that matches prices, i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!