Re: help with a logic algorithm

Liste des GroupesRevenir à cl c  
Sujet : Re: help with a logic algorithm
De : thiago.adams (at) *nospam* gmail.com (Thiago Adams)
Groupes : comp.lang.c
Date : 03. Apr 2024, 14:32:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <31b9ca44-7c8e-43f2-afce-ee1adca1cc0b@gmail.com>
References : 1 2
User-Agent : Mozilla Thunderbird
On 03/04/2024 08:33, Anton Shepelev wrote:
Thiago Adams:
 
I need an algorithm that finds the possible states of
variables used in "ifs"
 The industrial approach (e.g. from digital circuitry) is to
convert the expression into a minimal sum of truth
constituents.  There are several algorithms to do so
efficiently, i.e. to find the minimal coverage of the truth
table by truth constituents. The only ones I know are by a
Russian author published in a Russian book by logic, so I
cannot provide a useful reference.
 A family of appraches is based on the Karnaugh map:
    https://en.wikipedia.org/wiki/Karnaugh_map
 If you expressions are simple, however, a direct enumaration
of 2^n combinations could work.
 
I think the number of variables will be small.
if (a) ...
if (a && b) ...
if (a || b) etc..
But even if I have let's say 10 variables, then 2^10 = 1024 still something fast to do.

Date Sujet#  Auteur
2 Apr 24 * help with a logic algorithm13Thiago Adams
3 Apr 24 +* Re: help with a logic algorithm3Thiago Adams
3 Apr 24 i+- Re: help with a logic algorithm1jak
3 Apr 24 i`- Re: help with a logic algorithm1Thiago Adams
3 Apr 24 +- Re: help with a logic algorithm1Janis Papanagnou
3 Apr 24 +* Re: help with a logic algorithm5Anton Shepelev
3 Apr 24 i+- Re: help with a logic algorithm1Thiago Adams
3 Apr 24 i`* Re: help with a logic algorithm3Thiago Adams
4 Apr 24 i `* Re: help with a logic algorithm2Paul
5 Apr 24 i  `- Re: help with a logic algorithm1Anton Shepelev
4 Apr 24 `* Re: help with a logic algorithm3jak
4 Apr 24  `* Re: help with a logic algorithm2Thiago Adams
7 Apr 24   `- Re: help with a logic algorithm1Anton Shepelev

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal