Two cofactors are given as truth tables. Write the function they come from.
Shannon expansion rebuilds a function from its two cofactors on one variable: f = x ? f1 : f0, which is x & f1 | ~x & f0. It holds on every row: where x is 1 the right-hand side is f1, and where x is 0 it is f0. So a function is known once both of its cofactors on one variable are known.
f = x ? f1 : f0
x & f1 | ~x & f0
x
f1
f0
A function h of w and v has these cofactors on w: with w = 0 it is 1 at v = 0 and 0 at v = 1; with w = 1 it is 1 at both values of v.
h
w
v
w = 0
v = 0
v = 1
w = 1
Read each table as an expression: the first is ~v, the second is the constant 1.
~v
Join them with Shannon expansion: h = w ? 1 : ~v.
h = w ? 1 : ~v
Simplify if you wish: w ? 1 : ~v is w | ~v.
w ? 1 : ~v
w | ~v
Check every row: with w = 0, w | ~v is ~v, which is 1 at v = 0 and 0 at v = 1, as the first table says; with w = 1 it is 1, as the second says.
Given: order: x y z;
order: x y z;
A function g of x, y and z is unknown, but its two cofactors on x are given below as truth tables over y and z.
g
y
z
Write g.
One definition, g = expression;, using only the variables x, y and z. Any operator of the language is allowed, the conditional p ? q : r included. For example, a function of other variables might read k = u ? v : ~v;.
g = expression;
p ? q : r
k = u ? v : ~v;
g is the function whose cofactors on x are the two tables.
g uses only the variables x, y and z.
Under the diagram, the truth table of your g shows the rows with x = 0 and the rows with x = 1 as two halves: compare each half with the matching table in the task.
x = 0
x = 1
In the diagram, follow the else edge out of the node on x to the diagram of g with x = 0, and the then edge to the diagram with x = 1.
Kata 1.2 of Binary Decision Diagrams with CUDD on formal.org. The site checks the answer when you press Check answer; sign in to keep your progress.