note
primo
<p>I've managed to reduce the <b>Hospelian Arabic to Roman Transform</b> by one byte.</p>
<p>As a lead-in, I've read most of your nodes at some point (always good reading, btw), and when I first saw Ton's amazing formula, I spent a few moments dissecting it to figure out how it did what it did. Recently, while working on a [href://http://codegolf.stackexchange.com/q/9198/4098|similar problem], I decided to see if I could <i>reproduce</i> his formula, armed with the knowledge of how it worked.</p>
<p>A few hours of brute forcing later, and I had a result. Naturally, I wanted to check back here to see how I had done. I was pleasantly surprised to find that I had stumbled upon a formula that was one byte shorter!</p>
<p><b>Ton's original formula:</b><br>
<code>y/CLXVI6240-9/MDCLXXVI/dfor$$_.=5x$&*8%29628</code></p>
<p><b>The one byte improvement:</b><br>
<code>y/CLXVI60-9/MDCLXVIX/dfor$$_.="32e$&"%72726</code></p>
<p><b>Alternative:</b><br>
<code>y/CLXVI0-9/MDCLXIXV/dfor$$_.="57e$&"%474976</code></p>
<p>Even though <code>"32e$&"%72726</code> is one byte longer than Ton's <code>5x$&*8%29628</code>, it saves 2 bytes in the transliteration, because <code>01</code> is transliterated with <code>IX</code>. The alternative transliterates <code>012</code> with <code>IXV</code>, saving yet another byte, but it uses a modulus that's one digit longer.</p>
<p><b>Update:</b><br>
Since originally posting, I've found several more alternatives of the same length, using multiple substitutions for <code>I</code> and/or <code>V</code>:
<code>y/CLXVI0-9/MDCLXIVXI/dfor$$_.="49e$&"%87971
y/CLXVI0-9/MDCLXIIXIV/dfor$$_.="7e$&"%10606 #
y/CLXVI0-9/MDCLXIIXIV/dfor$$_.="7e$&"%15909 #
y/CLXVI0-9/MDCLXIIXIV/dfor$$_.="7e$&"%31818 # These are all essentially the same
y/CLXVI0-9/MDCLXIIX V/dfor$$_.="8e$&"%61535 # Doesn't contain 3 anywhere
# although this is one byte longer, it saved a byte in the challenge I was working on
y/CLXVI60-9/MDCLXXI V/dfor$$_.="37e$&"%97366 # Doesn't contain 1 anywhere</code></p>
594299
594299