【问题标题】:Generate truth tables in Maxima在 Maxima 中生成真值表
【发布时间】:2017-10-22 19:30:18
【问题描述】:

我知道 Maxima 可以评估逻辑表达式,例如:

false and true or not true

将评估为

false

这很好,但是我如何生成包含所有变量的所有解释的真值表

例如,我想要

A and B or not B

生成这样的表:

|  A  |  B  |  A and B or not B  |
+-----+-----+--------------------+
|  0  |  0  |         1          |
|  0  |  1  |         0          |
|  1  |  0  |         1          |
|  1  |  1  |         1          |

【问题讨论】:

标签: boolean-logic maxima truthtable


【解决方案1】:

truth_table(A and B or not B);

【讨论】:

    猜你喜欢
    • 2016-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-30
    • 1970-01-01
    • 2010-10-31
    • 2011-03-31
    相关资源
    最近更新 更多