Professional Documents
Culture Documents
Formal Method Assigment I
Formal Method Assigment I
Give example
which exemplifies its importance in the software development life cycle.
DEF:
“Mathematically based techniques for the specification, development and verification of
software and hardware systems.”
Q2: Solve the Propositional Logic (PL) sentences and provide the truth-table. Is any of the PL
sentence a tautology or a contradiction?
1. ¬(P ^ ¬Q)
P Q ¬Q (P ^ ¬Q) ¬(P ^ ¬Q)
0 0 1 0 1
0 1 0 0 1
1 0 1 1 0
1 1 0 0 1
It is not tautology nor contradiction but contingency.
2. (P → Q) ^ (Q → P)
P Q P→Q Q→P (P → Q) ^ (Q → P)
0 0 1 1 1
0 1 1 0 0
1 0 0 1 0
1 1 1 1 1
It is not tautology nor contradiction but contingency.
3. (P ^ Q) → R
P Q R (P ^ Q) (P ^ Q) → R
0 0 0 0 1
0 0 1 0 1
0 1 0 0 1
0 1 1 0 1
1 0 0 0 1
1 0 1 0 1
1 1 0 1 0
1 1 1 1 1
It is not tautology nor contradiction but contingency.
4. P → (Q → R)
P Q R (Q → R) P → (Q → R)
0 0 0 1 1
0 0 1 1 1
0 1 0 0 1
0 1 1 1 1
1 0 0 1 1
1 0 1 1 1
1 1 0 0 0
1 1 1 1 1
It is not tautology nor contradiction but contingency.
There is no any PL sentence a tautology or contradiction. But almost all of them are contegency.