Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: Re: Boolean algebra

by le (Friar)
on Nov 13, 2000 at 13:41 UTC ( [id://41313]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Boolean algebra
in thread Boolean algebra

Maybe I wasn't clear.
  • The order of variables in the output string had to be the same as the input string.
This means that
(abc)(b-ac)
and
(cb-a)(bca)
are equally correct input strings (they are even the same expression since (a AND b AND c) OR (b AND NOT a AND c) is the same as (c AND b AND NOT a) OR (b AND c AND a)).

But the output of the first reduction would be

(bc)
and of the second reduction
(cb)


Of course there can be many negated variables like this:
(-a-b-c-d)(-c-da-b)
which would result in
(-b-c-d)

Replies are listed 'Best First'.
RE: RE: Re: Boolean algebra
by merlyn (Sage) on Nov 13, 2000 at 13:52 UTC
    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

      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)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://41313]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.