Boolean Functions and Their Representations
[10/100%]Which subsets of the vertices of correspond to the following Boolean functions:
;
;
;
or ?
Construct the truth tables for the following Boolean functions:
;
the sum is even;
;
For each of the following formulas, determine its depth and construct the table of the function it defines:
;
;
;
;
.
Call the tuples and neighboring if they occur in adjacent rows of the table for a function of variables, that is, they represent the binary expansions of numbers and for which .
Find the number of functions in that take, on every pair of neighboring tuples,
equal values;
different values.
Call the tuples and opposite if for every (in other words, if and only if ).
Find the number of functions in that take different values on every pair of opposite tuples.
Let . Call a tuple paired if for all , that is for some tuple of size . Find the number of functions in that take the same value on all paired tuples.
A database administrator discovered that one or more of the three records and in his database is erroneous. He established that
if record is correct, then is erroneous;
at least one record of the pair is correct, and at least one record of the pair is correct;
if is erroneous, then exactly one of the records or is correct (but not both). Express the administrator's knowledge as a formula of propositional logic. Can he conclude that record is erroneous? Can it be reliably asserted that the erroneous record is unique?
The programmer Pyotr used three integer variables in his C program. At a certain point in the program he placed the conditional statement:
Having analyzed his program, Pyotr established that before this statement is executed the following conditions hold:
if , then or ;
or ;
if , then exactly one of the variables or is negative, but not both. Express Pyotr's knowledge as a formula of propositional logic. Can he optimize the program by replacing the given conditional statement with the assignment ; or with the assignment ;? If ``yes'', with which one?
A committee consists of five members. Decisions are made by majority vote; however, if the chairman votes against'', the decision is not adopted. Construct a formula of propositional logic depending on five propositional variables $x_{1}, x_{2}, x_{3}, x_{4}, y$ ($x_{i}$ means that the $i$-th committee member votes for'', means that the chairman votes ``for''), whose value equals 1 if and only if the decision is adopted as a result of the vote.
In each of the following texts, pick out the elementary statements, denote them with propositional variables, and write down a formula of propositional logic that captures the content of the text.
Misha decided to do a small renovation in his apartment and either put up new wallpaper or repaint the floor. Along with the wallpaper he will need to replace the laminate flooring, change the door, and replace the window's double-glazed unit. After repainting the floor he needs to install a stretch ceiling, a new chandelier, and new furniture. If the laminate is replaced, new furniture will also have to be bought. Old wallpaper cannot be left with old furniture, and old furniture cannot be left with an old chandelier.
If it is frosty, it will be sunny, or if it is overcast it will snow; and if it is not frosty, it will be sunny, or if it is overcast it will rain. In case of rain or snow it will be damp, and in case of rain it will also be muddy. If it is sunny, there will be neither dampness nor mud.
When Vova is home, his cat eats or sleeps, and when Vova is away, it also plays. If the cat eats, food needs to be bought. If the cat plays, new furniture or new wallpaper will have to be bought. For food one must go to the Everything for Cats'' pet shop, and for furniture or wallpaper to the Everything for the Home'' hardware store. Either shop requires taking a taxi. Vova will not take a taxi to the ``Everything for the Home'' shop.