Alterna · учебный материал
Tables of Truth
The algorithm for building tables of truth, tavtology and contradictions, the formula calculator.
Что в этом материале
- Building algorithm
- Tavtology, contradictions, feasibility
- Quantities and predators
- Truth/Last Marathon
- JNDF and SNPF
- Carno cards
Содержание и основные понятия
Back to the table of contents
Alterna · Chapter 15 · page 15.2
Tables of Truth
The construction algorithm, the tautology, the contradictions, the full formula calculator.
The Truth Table is
It's too much.
For n variables, there will be 2n lines. With the number of variables growing, the table is growing rapidly -- that's the complexity of logic problems.
GEF
PIF
OGE No. 3
EEG No. 2
01
Building algorithm
Calculate n
is the number of different variables in the formula.
Number of lines = 2n.
For example, for 3 variables, 8 rows.
Write Columns
For each variable (all 2n combinations).
Add Columns
For each subformula (by priority of operations).
Fill
by the rules of operations (, ,, B, , )
Example: build a table for (A~B)
A
B
A∨B
¬A
(A∨B)→¬A
0
0
0
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
0
0
Size of table
For five variables, the table already contains 32 lines. For 10 to 1024. For 20 to 1 million. For complex formulas, special methods are used (Carno maps, Quinna) - Chapter 27.
02
Tavtology, contradictions, feasibility
Tavtology (identified true)
F = 1 with
All
variable sets.
Examples: A.A., A. A., B.B.
Convergence (identified as false)
F = 0 with
All
I'm gonna need some kits.
Examples: A.A., (A.B.)
By performing (not tatology, not conflicting)
F = 1 for at least one set and F = 0 for one set.
Examples: A.B., A. B., B.
03
Quantities and predators
Quantors (, , ) are the logic of "for all" and "is present".
Preface
Preface
is an expression with a variable that becomes a statement (truth or false) when a particular value is set up.
Examples of pre-acts:
P(x): x > 5
- at x=7 true, at x =3 false
Q(n): n делится на 2
- at n=4 true, at n =7 false
R(a,b): a + b = 10
- at a=3,b=7 true
The Quanter of Universality
∀x P(x)
read "for all x is performed P(x)". Istinen when P(X) is true for
each
elements of the area of definition.
Example
Area: Natural numbers. & x (x > 0) -
True.
(all natural positive).
∀x (x² > x) —
It's false.
(at x=1: 12 = 1, not strictly more).
Existence Quantifier
∃x P(x)
is read "There is an x for which P(x) is present".
Just one.
The element satisfies P(x).
Example
Area: whole numbers. x (x2 = 16) -
True.
(x=4 or x=-4)
∃x (x² = −1) —
It's false.
(in real numbers there is no root).
Refusal of Quantors
¬(∀x P(x)) ≡ ∃x ¬P(x)
¬(∃x P(x)) ≡ ∀x ¬P(x)
The denial "for all" is "is real, for which it is not." The denial is "for everyone" is not.
Example
"Not all students passed the exam" ♪ "There is a student who failed."
For EGE No. 15
Quanter challenges are a typical theme of the EGE No. 15: the ability to deny Quantor speech is a key skill; remember: denial of ♪ and vice versa is denied.
🔍
Quantor Screen Checker
Enter the predice and the area — receive a check of the , and , with a detailed review
Area (in decimal place)
Condition P(x) on JS
Нажми «Проверить» или выбери пресет.
05
Truth/Last Marathon
30 quick-assessment allegations
⚡
Marathon: Is it a saying or not?
0/0
06
JNDF and SNPF
Standard forms: full, discretionary and full, non-negotiating normal forms
STAF (standard Procedural Normal Form)
NDLF
- it's a disjunction (or) of the conditions (and) of variables.
elementary situation
(all variables or B or no).
Building on the rows of the table where
F = 1
.
Find all the lines where F = 1
For each line, we write an agreement: if the variable is equal to 1 , we take it as it is, if it's equal to 0 , with denial.
Connecting all situations through .
SNCP (standard regulatory normal form)
SNCF
- it's the condition (I) of the disuctions (O) of variables.
Building on the rows of the table where
F = 0
.
Find all the lines where F = 0
For each line, we write a dissunction: if the variable is 0, take it as it is, if it's 1 , with denial
Connect all dysunctures through
Example 1: A B (XOR)
A
B
A⊕B
0
0
0
0
1
1
1
0
1
1
1
0
NDLF
(rows F=1): (BA\B) ♪ (A~B)
SNCF
(strings F=0): (A~B) ♪ (BA\B)
Example 2: A.B. (Implication)
A
B
A→B
0
0
1
0
1
1
1
0
0
1
1
1
NDLF
(F=1): (¬A∧¬B) ∨ (¬A∧B) ∨ (A∧B) =
¬A ∨ B
SNCF
(F=0): (A∨¬B)
Note that the NUFF can be simplified by BA and BA.B are grouped in BA, BAB and A.B. in B.
Why would you do that?
The NPF and the NSFS are used to: prove equivalence of the formulas (two formulas are equal if they have the same NPF), classifications (tautology if the NPFS is empty, the contradiction if the DPF is empty), the transfer between the forms (SNPF x NPF through the de Morgan law).
07
Carno cards
Visual method for minimizing boolean functions
What is Carno's map?
Carno map
This is a table in which the cells are located in such a way that the neighbors are different in just one variable. This allows for the visual "grouping" of the units and the minimum formula to be obtained.
For 2 variables (A, B) is a map of 2×2.
Minimum algorithm
Fill in the map with the function values (0 or 1)
Group related units into 2n rectangles (1, 2, 4, 8)
Groups should not overlap, but may overlap
Each group gives one set in the minimum formula
The change that changes within the group disappears
Example: F = A~(BA) = A\B
B=0
B=1
A=0
0
1
A=1
1
1
Group 1: (A=1, B=0) + (A =1, B =1)
A
(B changes)
Group 2: (A=0, B=1) + (A =1, B= 1) ♪
B
(A changes)
Result:
F = A ∨ B
🗺️
Carno interactive map
Enter the formula or fill in the cells manually — receive the minimization
Enter the formula of 2 variables (A, B) in the field below and press "Construct"
Or fill in the cells manually - press the card cells by switching 0/1
Press "Examples" for random formula
The map will show groups of units and the minimum formula
Formula (2 variables: A, B)
B=0
B=1
A=0
0
0
A=1
0
0
Press the box to switch 0/1