If I have a word that consists of letters I, V, X, L, C, D, M, how can I tell whether it is a valid roman numeral? For example, how do I tell that IXXL is not valid?
2026-03-31 19:16:10.1774984570
Given a word, how to tell whether it is a Roman numeral?
136 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
To ease the description you can consider the pairs "IV", "IX", "XL", "XC", "CD" and "CM" as single symbols.
That is, the roman numerals are sequences made of these symbols: I, IV, V, IX, X, XL, L, XC, C, CD, D, CM, M.
The sequences must hold these rules:
This way, your example is not legal because IX < XL, or because after IX there must not be any letter X.