Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91399

Re: Logic problem: need better logic for desired thruth table.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.088
X-Spam-Evidence '*H*': 0.82; '*S*': 0.00; 'puts': 0.07; 'logic': 0.09; 'algorithm': 0.13; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'wrote:': 0.16; 'subject:need': 0.18; '(not': 0.20; 'subject:problem': 0.22; 'tables': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'faster,': 0.29; 'operations': 0.31; 'form.': 0.34; 'message- id:@gmail.com': 0.35; 'to:addr:python-list': 0.35; 'done': 0.35; 'really': 0.35; 'expressed': 0.37; 'subject:: ': 0.37; 'received:org': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'yes': 0.60; 'map': 0.61; 'more': 0.62; 'email addr:gmail.com': 0.64; 'charset:windows-1252': 0.65; 'as:': 0.79; 'truth': 0.79; 'circuits': 0.84
X-Virus-Scanned amavisd-new at torriefamily.org
Date Thu, 28 May 2015 16:16:44 -0600
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Logic problem: need better logic for desired thruth table.
References <3794b$55678d83$5419aafe$56138@news.ziggo.nl> <67de616e-5af7-417d-88a9-db1c665df473@googlegroups.com>
In-Reply-To <67de616e-5af7-417d-88a9-db1c665df473@googlegroups.com>
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.143.1432851416.5151.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1432851416 news.xs4all.nl 2902 [2001:888:2000:d::a6]:57029
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:91399

Show key headers only | View raw


On 05/28/2015 03:58 PM, sohcahtoa82@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.  For more complicated truth tables you
can create a K map and then apply a reduction algorithm to it.  This is
commonly done in logic circuits to reduce the number of gates to the
minimum.  While not faster, it can be expressed as:

return BotWaitForCooldown or not BotWaitForCooldown and not
CooldownDectected

Order of operations puts the ands above the ors.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Logic problem: need better logic for desired thruth table. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-28 23:50 +0200
  Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-28 23:55 +0200
    Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 00:07 +0200
      Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 00:08 +0200
        Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 00:12 +0200
          Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 04:45 +0200
            Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 04:56 +0200
        Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) Grant Edwards <invalid@invalid.invalid> - 2015-05-28 22:13 +0000
          Re: Logic problem: need better logic for desired thruth table. (thruth table to logic/boolean operations generator sought/needed) Grant Edwards <invalid@invalid.invalid> - 2015-05-28 22:15 +0000
  Re: Logic problem: need better logic for desired thruth table. sohcahtoa82@gmail.com - 2015-05-28 14:58 -0700
    Re: Logic problem: need better logic for desired thruth table. Michael Torrie <torriem@gmail.com> - 2015-05-28 16:16 -0600
      Re: Logic problem: need better logic for desired thruth table. Grant Edwards <invalid@invalid.invalid> - 2015-05-28 22:54 +0000
        Re: Logic problem: need better logic for desired thruth table. Grant Edwards <invalid@invalid.invalid> - 2015-05-28 23:03 +0000
          Re: Logic problem: need better logic for desired thruth table. Michael Torrie <torriem@gmail.com> - 2015-05-28 18:52 -0600
      Re: Logic problem: need better logic for desired thruth table. sohcahtoa82@gmail.com - 2015-05-28 17:15 -0700
    Re: Logic problem: need better logic for desired thruth table. Denis McMahon <denismfmcmahon@gmail.com> - 2015-05-28 23:25 +0000
      Re: Logic problem: need better logic for desired thruth table. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-05-29 04:46 +0200
  Re: Logic problem: need better logic for desired thruth table. Grant Edwards <invalid@invalid.invalid> - 2015-05-28 22:01 +0000
    Re: Logic problem: need better logic for desired thruth table. Grant Edwards <invalid@invalid.invalid> - 2015-05-28 22:11 +0000
  Re: Logic problem: need better logic for desired thruth table. Tim Chase <python.list@tim.thechases.com> - 2015-05-28 17:02 -0500
  Re: Logic problem: need better logic for desired thruth table. Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2015-05-29 01:13 +0300
  Re: Logic problem: need better logic for desired thruth table. Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-05-28 18:39 -0400
    Re: Logic problem: need better logic for desired thruth table. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-28 23:56 +0100
  Re: Logic problem: need better logic for desired thruth table. Paul <nospam@needed.com> - 2015-05-28 19:21 -0400
  Re: Logic problem: need better logic for desired thruth table. M Philbrook <jamie_ka1lpa@charter.net> - 2015-05-29 19:07 -0400

csiph-web