Logic problem: need better logic for desired thruth table.
Grant Edwards
invalid at invalid.invalid
Thu May 28 18:54:23 EDT 2015
On 2015-05-28, Michael Torrie <torriem at gmail.com> wrote:
> On 05/28/2015 03:58 PM, sohcahtoa82 at gmail.com wrote:
>> I think the logic you're really looking for is:
>>
>> return BotWaitForCooldown or (not (BotWaitForCooldown or CooldownDetected))
>
> Yes this is the simplest form.
Not really.
In old school notation, that's
___
A + A+B
Apply De Morgan's law to the second term
_ _
A + (A * B)
Invert
________
_ _
A + (A*B)
Apply Demorgan's law once
_____
_ _ _
A * (A * B)
and again for the second term
_
A * (A + B)
Apply the distributive property:
_ _
A*A + A*B
The first term is always false, so we can drop it:
_
A*B
Now invert it again to cancel out the one we did back a few steps:
___
_
A*B
De Morgan one last time:
_
A + B
--
Grant Edwards grant.b.edwards Yow! Xerox your lunch
at and file it under "sex
gmail.com offenders"!
More information about the Python-list
mailing list