Rule Based System 1. Given the rule following rules from the class notes on production rules to...

60.1K

Verified Solution

Question

Advance Math

Rule Based System

1. Given the rule following rules from the class notes onproduction rules to convert an Arabic number less than 40 to aroman numeral. USING LOGIC

Rule 1: if x is null then prompt the user and read x

Rule 2: if x is higher than 999 then print “too Big” and make xnull

Rule 3: if x is between 10 and 39 then print “X” and reduce x by10

Rule 4: if x is equal to 9 then print “IX” and reduce x to 0

Rule 5: if x is between 5 and 8 then print “V” and reduce x by5

Rule 6: if x is equal to 4 then print “IV” and reduce x to 0

Rule 7: if x is between 1 and 3 then print “I” and reduce x by1

Rule 8: if x is equal to 0 then print “end-of-line” and STOP

A. What additional rules are needed to convert an Arabic numberless than 1000?

* notice rule 2 has already been changed

** hints: 50 is L; 100 is C; 500 is D; 1000 is M

B. Show the rules fired and the working memory to convert 864into a roman numeral.

Answer & Explanation Solved by verified expert
4.2 Ratings (732 Votes)
SOLUTION A RULE 9 if x is between 40 and 49 then print XL and reduce x by 40 RULE 10 if x is between 50 and 89 then print L and reduce x by 50 RULE 11 if x is between 90    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students