Z
Z
zergon3212017-05-19 15:45:38
Programming
zergon321, 2017-05-19 15:45:38

How to solve problems of this type?

Each of the logical expressions F and G contains 5 variables. There are exactly 5 identical rows in the truth tables of expressions F and G, and exactly 4 of them contain 1 in the value column.
How many rows of the truth table for the expression F v G contain 1 in the value column?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas, 2017-05-19
@zergon321

PS As far as I understood F and G consist of the same 5 variables. If this is not the case, then you can not read further.
Let's start from the beginning: what is a truth table is a list of all input sets and the resulting value: i.e.
for f = x & y
x | y | f
0 0 0
0 1 0
1 0 1
1 1 1
We are interested in the function H = F v G. Let's build a table for it:
F | G | H
0 0 0
0 1 1
1 0 1
1 1
0 H contains 1 when F = 1 G = 0 or when F = 0 G = 1 or when F = 1 G = 1.
Now look at the condition, it says that the functions match on 5 sets, of which F is satisfied on 4 sets = 1 G = 1, and hence H = 1.
On the remaining fifth set, it is obvious that F = 0, G = 0, which means that H = 0.
Now consider all other sets. It follows from the condition that F and G do not coincide on any of the sets, i.e., If F = 0, G = 1 or F = 1, G = 0. This means that on any of these sets, the value of H = F v G will be equal to 1.
That is, the answer is 2^5 -1 = 31.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question