Page 1 of 1

Problem 674

Posted: Mon Jun 24, 2019 1:34 am
by jpaulson
I am confused by this sentence: "Find the sum of least simultaneous values of all I-expressions pairs made of distinct expressions from file I-expressions.txt (pairs (e1,e2) and (e2,e1) are considered to be identical)."

1) One I-expression ("va") appears twice in that file. Am I meant to count I-expressions paired with "va" once or twice?
2) I think the parenthetical means that I shouldn't count (e1,e2) and (e2,e1) separately. Is that right? (the parenthetical defines what it means for pairs to be "identical" but this is not referenced elsewhere)

Re: Problem 674

Posted: Tue Jun 25, 2019 7:17 pm
by philiplu
My solution didn't look to see if any two lines were the same, so I'd say (1) you're to count the two lines of "va" as two distinct I-expressions and (2) order doesn't matter when pairing up lines, so only look at one of the two possible orderings.

Re: Problem 674

Posted: Tue May 17, 2022 3:26 pm
by pismobiker
I'm either getting a bad download or I'm not understanding something.
After the 6th expression, there is a line with just 'y'.
My reading of the problem would indicate that valid expressions begin with I( and ends with ). Also all variable values are preceded by ( or , and followed by , or ).
All this would indicate that a stand alone 'y' is invalid.
Further down in the file there are lines 'zb', 'la', 'va' and perhaps more.

Re: Problem 674

Posted: Tue May 17, 2022 7:31 pm
by neverforget
It says right there in the very first line of the problem:
We define $\mathcal{I}$-expressions as arithmetic expressions built only from variables names and applications of $\mathcal{I}$.
Ignoring the slight grammar issue, it is clear that lone variables are valid $\mathcal{I}$-expressions. Also beware that some variables have 2 or more characters.

Re: Problem 674

Posted: Tue May 17, 2022 7:58 pm
by pismobiker
Thank you. Miss read that.