程序代写代做代考 Assignment 1 – History of Computing

Assignment 1 – History of Computing

1) Roman numerals were the numerical system of the Roman Empire. They use the letters I,V,X,L,C,D,M to represent positive integers. The Wikipedia entry on roman numerals http://en.wikipedia.org/wiki/Roman_numerals describes rules for converting back and forth between Roman numerals and Arabic numerals.
Write a list set of Lisp functions to convert between the two numeric representations:
· roman-to-arabic – to convert a Roman numeral – given as the list of its letters- to the corresponding Arabic numeral
· arabic-to-roman – to convert an Arabic numeral – given as a regular number – to the corresponding Roman numeral – represented as a list of its letters.
For example:
(roman-to-arabic ‘(M M X I I)) → 2012 (arabic-to-roman 1977) → (M C M L X X V I I)
NOTE: Your implementation must be consistent with the rules described in the Wikipedia’s roman numerals entry.