布尔表达式和正则表达式

对偶原理 (Duality Principle)

According to this principle, if we have postulates or theorems of Boolean Algebra for one type of operation then that operation can be converted into another type of operation (i.e., AND can be converted to OR and vice-versa) just by interchanging '0 with 1', '1 with 0', '(+) sign with (.) sign' and '(.) sign with (+) sign'. This principle ensures if a theorem is proved using postulates of Boolean algebra, then the dual of this theorem automatically holds and we need not prove it again separately.

根据此原理,如果我们为一种类型的运算提供了布尔代数的假设或定理,则只需将“ 0”与“-”互换即可将其转换为另一种类型的运算(即, AND可以转换为OR,反之亦然 ) 。 1''1与0''(+)与(。)符号''(。)与(+)符号' 。 这个原理确保了,如果使用布尔代数的假设来证明一个定理,那么该定理的对偶就会自动成立,我们不需要再次证明它。

Some Boolean expressions and their corresponding duals are given below,

下面给出了一些布尔表达式及其对应的对偶,

Given Expression Dual Given Expression Dual
0 = 1 1 = 0 A. (A+B) = A A + A.B = A
0.1 = 0 1 + 0 = 1 AB = A + B A+B = A.B
A.0 = 0 A + 1 = 1 (A+C) (A +B) = AB + AC AC + AB = (A+B). (A+C)
A.B = B. A A + B = B + A A+B = AB + AB +AB AB = (A+B).(A+B).(A+B)
A.A = 0 A + A = 1 AB + A + AB = 0 ((A+B)).A.(A+B) = 1
A. (B.C) = (A.B). C A+(B+C) = (A+B) + C
给定表达 给定表达
0 = 1 1 = 0 A.(A + B)= A A + AB = A
0.1 = 0 1 + 0 = 1 AB = A + B A + B = A。 乙
A.0 = 0 A +1 = 1 (A + C)( A + B)= AB + A C AC + A B =(A + B)。 (A + C )
AB =B。 A + B = B + A A + B = AB + A B + A B AB =(A + B)。( A + B)。(A + B )
A. A = 0 A + A = 1 AB + A + AB = 0 (( A + B ))。 A。 (A + B)= 1
答:(BC)=(AB)。 C A +(B + C)=(A + B)+ C

减少布尔表达式 (Reducing Boolean Expressions)

Every Boolean expression must be reduced to its simplest form before realizing it because each logic operation in the expression is carried out using hardware. Thus, realizing the simplest expression requires less circuitry hence reduces the cost of the system. Also, it is highly reliable and less complex in nature. For reducing the Boolean expression, we use the axioms and laws of Boolean algebra (see them in our previous article). Some instructions for reducing the given Boolean expression are listed below,

在实现每个布尔表达式之前,必须将其简化为最简单的形式,因为表达式中的每个逻辑运算都是使用硬件执行的。 因此,实现最简单的表达需要较少的电路,从而降低了系统成本。 而且,它是高度可靠的并且本质上不太复杂。 为了简化布尔表达式,我们使用布尔代数的公理和定律(请参阅上一篇文章中的内容)。 下面列出了一些用于简化给定布尔表达式的说明,

  1. Remove all the parenthesis by multiplying all the terms if present.

    通过将所有项相乘(如果存在)来删除所有括号。

  2. Group all similar terms which are more than one, then remove all other terms by just keeping one.

    将所有不止一个的相似术语归为一组,然后仅保留一个就删除所有其他术语。

    Example: ABC + AB +ABC + AB = ABC +ABC + AB +AB = ABC +AB

    例如:ABC + AB + ABC + AB = ABC + ABC + AB + AB = ABC + AB

  3. A variable and its negation together in the same term always results in a 0 value, it can be dropped.

    在同一术语中,变量及其取反的结果始终为0,可以将其删除。

    Example: A. BCC + BC = A. 0 + BC = BC

    例如:A. BC C + BC = A. 0 + BC = BC

  4. Look for the pair of terms that are identical except for one variable which may be missing in one of the terms. The larger term can be dropped.

    寻找一对相同的术语,只是其中一个术语可能缺少一个变量。 较大的项可以删除。

    Example: ABCD + ABC = ABC(D + 1) = (ABC).1 = ABC

    例如:AB CD + AB C = AB C ( D + 1)=(AB C ).1 = AB C

  5. Look for the pair of terms that have the same variables, with one or more variables complimented. If a variable in one term of such a variable is complimented while in the second term it is not, then such terms can be combined into a single term with that variable dropped.

    查找具有相同变量的一对术语,并补充一个或多个变量。 如果在此变量的一个术语中对一个变量进行了补充,而在第二个术语中则没有,则可以将这些术语合并为一个单独的变量,并删除该变量。

    Example

    ABCD + ABCD = ABC(D + D) = (ABC).1 = ABC
    OR
    AB(C+D) + AB(C+D) = AB [(C+D) + (C+D)] = AB. 1 =AB

    AB CD + AB C D = AB C ( D + D)=(AB C ).1 = AB C
    要么
    AB(C + D)+ AB (C + D) = AB [(C + D)+ (C + D) ] = AB。 1 = AB

翻译自: https://www.includehelp.com/basics/duality-principle-and-rules-for-reduction-of-boolean-expressions.aspx

布尔表达式和正则表达式

布尔表达式和正则表达式_布尔表达式约简的对偶原理和规则相关推荐

  1. 布尔表达式和正则表达式_简化布尔表达式的实例

    布尔表达式和正则表达式 Example 1: Simplify the given Boolean Expression to minimum no. of variables or literals ...

  2. 布尔表达式和正则表达式_仅使用通用门实现布尔表达式

    布尔表达式和正则表达式 We already know that NAND and NOR are recognized as the universal gates using which we c ...

  3. 【机器学习】粗糙集属性约简—Attribute Reduction

    介绍 RoughSets算法是一种比较新颖的算法,粗糙集理论对于数据的挖掘方面提供了一个新的概念和研究方法.本篇文章我不会去介绍令人厌烦的学术概念,就是简单的聊聊RoughSets算法的作用,直观上做 ...

  4. python遗传算法_基于Python的遗传算法特征约简(附代码)

    导言 在某些情况下,使用原始数据训练机器学习算法可能不是合适的选择.该算法在接受原始数据训练时,必须进行特征挖掘,以检测不同组之间的差异.但这需要大量的数据来自动执行特征挖掘.对于小数据集,数据科学家 ...

  5. python实现遗传算法实例_基于Python的遗传算法特征约简(附代码)

    作者:Ahmed Gad 翻译:张睿毅 校对:丁楠雅 本文4700字,建议阅读15分钟. 本教程主要使用numpy和sklearn来讨论如何使用遗传算法(genetic algorithm,GA)来减 ...

  6. 条件信息熵的决策表约简

    条件信息熵的决策表约简 文章目录 条件信息熵的决策表约简 写在前面 信息论观点描述 定义1:P,Q 概率分布 定义2:熵 H( P ) 定义 定义3:条件熵`H(Q|P)`定义 定理1:条件熵`H(Q ...

  7. 粗糙集 遗传matlab,一种基于遗传算法和粗糙集的属性约简方法及精神状态评估方法...

    一种基于遗传算法和粗糙集的属性约简方法及精神状态评估方法 [专利摘要]本发明公开了一种基于遗传算法和粗糙集的属性约简方法及精神状态评估方法,该基于遗传算法和粗糙集完成了粗糙集属性约简方法通过设定合适的 ...

  8. 独家 | 基于Python的遗传算法特征约简(附代码)

    作者:Ahmed Gad 翻译:张睿毅 校对:丁楠雅 本文4700字,建议阅读15分钟. 本教程主要使用numpy和sklearn来讨论如何使用遗传算法(genetic algorithm,GA)来减 ...

  9. 利用开区间覆盖的约简给出$\bf{Lindelöf}$覆盖定理的一个新证明

    $\bf{Lindelöf}$覆盖定理:假定$A\subseteq \mathbb{R}$,并设$F$是$A$的一个无限开覆盖,则存在$F$的可数子集也覆盖$A$. 本文给出与数学分析(Tom M.A ...

最新文章

  1. android存储器,Android——寄存器和存储器的区别
  2. 有糖接入云信,实现完整的虚拟社区搭建和运营
  3. 304 vue 启动项目打开页面_Vue搭建项目工程(续)
  4. Android USB转串口通信开发基本流程
  5. JS中的兼容问题总结
  6. MySQL 基准测试(mysqlslap)出现 Using a password on the command line interface can be insecure 警告
  7. 各大媒体优劣对比_主流酱油选购对比
  8. app:利用HBuilder打包webpack项目
  9. nginx config的多个config配置
  10. requests+正则表达式爬取豆瓣读书top250
  11. SECS/GSM 测试工具
  12. 电脑使用变慢七大原因全解析
  13. 知识图谱:【图数据库Nebula(一)】——Nebula简介
  14. 路演 - roadshow
  15. 习题5-5 使用函数统计指定数字的个数(15 分)
  16. 如何下载酷6、土豆、优酷、56视频并转化格式进行播
  17. 萤石android播放成功没画面,Android-再次解读萤石云视频
  18. 基于STC89C51单片机,CH340芯片的下载电路
  19. 微信小程序开发价格标准是什么?
  20. imovie的快速入门

热门文章

  1. go atomic 原子操作
  2. mysql存储过程练习题,2016年计算机二级考试MySQL数据库练习题模拟
  3. 20届社招(Java岗);杭州网易最新二面面经分享
  4. java 复杂json的操作
  5. archlinux 安装ssh
  6. pip安装pandas
  7. c语言栈内存和堆内存大小,堆内存和栈内存及C++内存分配
  8. SVN: File ‘xxxx‘ is locked in another working copy解决办法
  9. 也说TCP/IP之OSI七层模型
  10. Dom学习之设置超链接获取焦点和失去焦点