Page 1 of 4
Problem 089
Posted: Mon Feb 11, 2008 3:07 pm
by relue
I need some clarification for this problem. Is 49 = IL or IM = 999 ok? The rule says such expression is not prefered, but didn't say if it is allowed or not. Whether to abide by this rule makes a big differece for the answer.
Re: Problem 89
Posted: Mon Feb 11, 2008 4:08 pm
by hk
Problem 89
Posted: Sat Jul 05, 2008 2:18 pm
by Slin
As 3 people pointed out in the problem thread, and no one answered, there is nothing in the FAQ or problem description that disallows repeated subtractive pairs. E.g. IXIX as 18 instead of XVIII.
Re: Problem 89
Posted: Tue Oct 14, 2008 8:15 pm
by pavel
Need help.
I can't understand question. What does mean "characters saved by writing each in minimal form"?
May be I can't understand because my English is bad. May be someone can post example?
Re: Problem 89
Posted: Tue Oct 14, 2008 8:27 pm
by daniel.is.fischer
In the problem statement, there are given several ways to write 16.
Suppose in the textfile there appears the line
IIIIIIIIIIIIIIII (hope I didn't miscount)
the minimal form is XVI, which uses three characters, while the original used sixteen, so for this item, you could save thirteen characters.
For each item in the textfile, determine how many characters are used and how many are needed for the minimal representation of that value. Sum the differences of the character counts.
Re: Problem 89
Posted: Tue Oct 14, 2008 8:45 pm
by pavel
Thanks
Re: Problem 89
Posted: Thu Oct 16, 2008 12:28 pm
by DNS
Thank you, daniel.is.fischer!
With your tips I finished P89 (and P210, thanks one more time)!
First, I'd thought that symbols saved are symbols saved in file - length of the file saved.
My English is rather poor

Re: Problem 089
Posted: Sat Jan 31, 2009 12:11 am
by Phibonacci
the rules are not clear enough
my answer is 8841-8031 = 810
Are any of these legit
IM = 999
IXIX = 18
IXL = 1 10 50 = 9 50 = 41
Re: Problem 089
Posted: Sat Jan 31, 2009 4:36 am
by rayfil
In the second post, hk provided a link to some definitive rules. That link may have answered most, if not all, of your questions.

Re: Problem 089
Posted: Fri Mar 20, 2009 5:56 am
by Phibonacci
I have read through the FAQ numerous times but it doesn't make things any clearer. it says the only rule for SURE is that they are arranged in descending order of size. The rest of the rules they give us have either been added on in medieval times or that one way is preferred over another way, but it does not give concrete rules. Can I please PM or email someone my roman numerals from 1-1000 or maybe 1-10000 and have them point out which numeral is wrong. I'm not asking for the solutions just some direction.
thanks,
Phibonacci
Re: Problem 089
Posted: Fri Mar 20, 2009 3:42 pm
by rayfil
You can PM me your 1-1000 list.
Re: Problem 089
Posted: Thu May 28, 2009 1:52 pm
by jhgrc
I got the correct answer but I think it is not optimal.
I've got saving of [snip] chars by being more optimal and still by the rules (i.-iv.). You must consider shortening 8,80 and 800 to 'IIX', 'XXC' and 'CCM' which save 1 letter. Those are shorter by one but naturally you can complain about 3-practise in FAQ. With 3-practise I mean that shorten more than 3 consecutive letters (VIIII -> IX).
8: VIII -> IIX
80: LXXX -> XXC
800: DCCC -> CCM
For example from the provided file. [orig -> arabic -> optimized (saving)]
Read: MMMMDLXXXII -> 4582 -> MMMMDXXCII (1)
Read: MMCLXXXXVIII -> 2198 -> MMCXCIIX (4)
Read: MMMMDCVIII -> 4608 -> MMMMDCIIX (1)
Read: MMDCCCXLVIIII -> 2849 -> MMCCMXLIX (4)
Re: Problem 089
Posted: Thu May 28, 2009 1:56 pm
by jhgrc
Phibonacci wrote:
Are any of these legit
IXIX = 18
I'd say that this is not legit, but XIIX would be. Please see my post on this same problem.
XIIX=4 chars
XVIII=5 chars
Re: Problem 089
Posted: Thu May 28, 2009 2:34 pm
by daniel.is.fischer
But IIX violates rule ii: "I can only be placed before V and X."
If IIX is to be interpreted as 8, it would have to be a subtractive pair I(IX), which by rule ii isn't allowed.
The same applies to all other proposed transcriptions (with rules iii or iv if X or C are involved).
Re: Problem 089
Posted: Thu May 28, 2009 3:05 pm
by jhgrc
daniel.is.fischer wrote:
But IIX violates rule ii: "I can only be placed before V and X."
If IIX is to be interpreted as 8, it would have to be a subtractive pair I(IX), which by rule ii isn't allowed.
I see, I did not think it that literal. That 'I' can be placed in before 'I' as well. But I can agree with you.
Just for curiosity it was interesting to see what would be most compressed format which can still be parsed by my program. Naturally for humans interpreting these even more optimized romans are a bit harder as bigger number subtraction etc. is needed.
Read: MMMMDCCLXXXVII -> 4787 -> MMMMCCXIIIM (4000 plus 213 below 1000)
Read: MMDXCVIIII -> 2599 -> MMDIC (1 below 2600)
Read: MCMLXXXXIII -> 1993 -> MVIIM (7 below 2000)
Read: CMLXIX -> 969 -> XXXIM (31 below 1000)
Read: MMMMDCCCCXXXXVI -> 4946 -> MMMMLXMVI (60 below 5000 plus 6)
These are similar to example of 49 (IL vs. XLIX).
Re: Problem 89
Posted: Thu Dec 10, 2009 9:09 pm
by Mr.Fister
DNS wrote:Thank you, daniel.is.fischer!
With your tips I finished P89 (and P210, thanks one more time)!
First, I'd thought that symbols saved are symbols saved in file - length of the file saved.
My English is rather poor

I interpreted this the same way as you, and I would consider my English being quite above average for a non-native speaker. A better phrasing would have
saved me almost 2 hours... and this was my #100

Re: Problem 089
Posted: Wed Dec 16, 2009 3:58 pm
by babueter
I still don't have the answer, and this thread wasn't helpful so far.
I'm working on the assumption that IXIX is appropriate, since it conforms to the rules on the FAQ.
I don't want to give anything away, so if i could PM someone who has solved the problem some of my examples of reduction, it would be helpful to know if they could be reduced more, or if my reduction was not valid.
Thanks.
Re: Problem 089
Posted: Wed Dec 16, 2009 5:51 pm
by babueter
Never mind.... stpuid ^M skewed my data. The answer I had 10 minutes after I started the problem was the right one.
Thanks though.
Re: Problem 089
Posted: Thu Jan 28, 2010 10:10 pm
by vasilyev
Would you mind to put in the problem description, explicitly the following:
"Find the number of characters saved by writing each of these in their minimal form WHILE OBEYING ADDITIONAL RULES FROM FAQ",
or
"Find the number of characters saved by writing each of these in their minimal form DISREGARDING ADDITIONAL RULES".
The way it is phrased right now, it can be interpreted that (
http://projecteuler.net/about=roman_numerals) is just for our information, and the answer should be just minimal, so IM is fine.
Re: Problem 089
Posted: Sat Apr 10, 2010 12:38 pm
by estanford
So are we considering IIX to be a valid replacement for VIII? The rules page doesn't make it clear whether multiple numerals of the same kind can be placed before another in a subtractive pair. (I know it says I can only come before V and X, but I can't tell whether it applies in the VIII -> IIX case.)