I think we can rule out one of the 7 situations: a(bcd).

{EDIT} BOY! Was I wrong on this one!!! Read below... {/EDIT}

Why? Follow me...
We can have one of 4 operators between 'a' and the rest of the expression.

code:
a+(bcd) -> (bcd)+a  : does not matter what ops are inside as
+ is low precedence

a-(bcd) -> nothing! : What kind of expression would you need
inside parens to get 24 by subtracting
to 0..9?? Yes, I know that 0-(-something)
will be positive, but we can't have another
negative number inside the parens!!!
{edit} Actually, we can, but it does not create a solution! {/edit}
{edit} And it can be rewritten as not to need the parens! {/edit}

a/(bcd) -> nothing! : Again, what kind of number would we need
inside parens to get 24? A very small number!
In order to be so, we'd need something like
a/(b/c/d) because a/(b+c/d) or a/(b/c+d) would
not give a number below 1 unless the added item
was 0 and even then it would not be "small enough"
to get 24... (hope you're still following me!)
If we did not use a / inside the parens, then
the number would not be between 0 and 1 and so,
dividing a number from 1 to 9 by it would not
yield the needed result! Finally, a/(b/c/d) can
be simplified as a/b/c/d !!!

a*(bcd) -> (bcd)*a : We will arrive at this test case sooner or later!
So, no need to handle it in here.

Please check my assumptions, but I do believe that a(bcd) can be safely
left out of the game as we're not trying to get ALL solutions but just
ONE!

The same may hold true for more cases, but I have to go now. I'll check
the others later...

[ 18. September 2002, 02:06: Message edited by: Fernando Madruga ]
_________________________
Later,   [b]Mad[/b]ruga