summaryrefslogtreecommitdiff
path: root/3827/CH3/EX3.9/Ex3_9.sce
blob: 1282ce08d3baf560980527d495793ca0ad9e28c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//EX3_9: Show that
//A'BC'D + (A' + BC)(A + C'D') + BC'D + A'BC' 
//                  = ABCD + A'C'D' + ABD + ABCD' + BC'D

//clears the screen
clc

//clears already existing variables
clear

//First, we will reduce the left side
disp('LHS = A''BC''D + (A'' + BC)(A + C''D'') + BC''D + A''BC''')
//Eliminate A''BC''D'' using absorption law
disp('= (A'' + BC)(A + C''D'') + BC''D + A''BC''')
//multiply out using (3-3)
disp('= ABC + A''C''D'' + BC''D + A''BC''')
//eliminate A''BC'' by consensus
disp('= ABC + A''C''D'' + BC''D')
//Now, we will reduce right side
disp('RHS = ABCD + A''C''D'' + ABD + ABCD'' + BC''D')
//Combining ABCD and ABCD'
disp('= ABC + A''C''D'' + ABD + BC''D')
//eliminate ABD by consensus
disp('= ABC + A''C''D'' + BC''D')
//Because both sides of the original equation were independently reduced to the same expression, the original equation is valid.