http://www.perlmonks.org?node_id=41316


in reply to RE: Re: Boolean algebra
in thread Boolean algebra

Why is the second one (cb) and not (bc), since both orderings are in the input string? What permits me to pick one subexpression over the other? You still aren't clear, and the specification is still ambiguous to me.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: RE: Re: Boolean algebra
by le (Friar) on Nov 13, 2000 at 19:09 UTC
    Sorry for being ambigous.

    Let's start over:
    The whole expression ((...)(...)) can be simplified if the two partial expressions (inside the braces) differ in just one negated variable.

    If the whole expression can be simplified, then the result is the first partial expression without the variable that differs. (So have to pick first partial expression.)

    That's why (in these two examples) one output is (cb) and the other one is (bc)