« nazaj
Diskretne strukture (FiM) - vaje 21.10.2020
Enakovrednost in poenostavljanje izrazov
Naloga 1
Poenostavi izjavna izraza:
- $\lnot (p \vee q \Rightarrow p) \vee \lnot p \wedge q$,
- $\lnot(\lnot(p \Leftrightarrow \lnot r \Leftrightarrow (q \Leftrightarrow r)) \Leftrightarrow p)$.
-
\[\begin{aligned}
\lnot (p \vee q \Rightarrow p) \vee \lnot p \wedge q
&\sim \lnot (\lnot (p \lor q) \lor p) \lor (\lnot p \land q) \\
&\sim ((p \lor q) \land \lnot p) \lor (\lnot p \land q) \\
&\sim (\lnot p \land q) \lor (\lnot p \land q) \\
&\sim \lnot p \land q
\end{aligned}\]
-
\[\begin{aligned}
\lnot(\lnot(p \Leftrightarrow \lnot r \Leftrightarrow (q \Leftrightarrow r)) \Leftrightarrow p)
&\sim p \iff \lnot r \iff q \iff r \iff p \\
&\sim p \iff p \iff q \iff r \iff \lnot r \\
&\sim 1 \iff q \iff 0 \\
&\sim \lnot q
\end{aligned}\]
Naloga 2
Poenostavi izraz $A_k \equiv a \uparrow a \uparrow \ldots \uparrow a$ ($k$ veznikov) za vsak $k \geq 1$.
- $A_{k+1} \sim A_k \uparrow a$
- $A_0 \sim a$
- $A_1 \sim a \uparrow a \sim \lnot (a \land a) \sim \lnot a$
- $A_2 \sim \lnot a \uparrow a \sim \lnot (\lnot a \land a) \sim 1$
- $A_3 \sim 1 \uparrow a \sim \lnot (1 \land a) \sim \lnot a$
- $A_k \sim \begin{cases} \lnot a & k \text{ lih} \newline 1 & k \text{ sod} \end{cases}$ ($k \ge 1$)
Naloga 3
S pomočjo izpeljevanja pokaži, da so naslednji pari izjavnih izrazov enakovredni:
- $(p\Rightarrow q)\wedge(p\Rightarrow r)$ in $(p\Rightarrow q\wedge r)$,
- $(p\Rightarrow q)\vee(p\Rightarrow r)$ in $(p\Rightarrow q\vee r)$,
- $(p\Rightarrow r)\wedge(q\Rightarrow r)$ in $(p\vee q\Rightarrow r)$,
- $(p\Rightarrow r)\vee(q\Rightarrow r)$ in $p\Rightarrow (q\Rightarrow r)$ in $(p\wedge q)\Rightarrow r$.
-
\[\begin{aligned}
(p\Rightarrow q)\wedge(p\Rightarrow r)
&\sim (\lnot p \lor q) \land (\lnot p \lor r) \\
&\sim \lnot p \lor (q \land r) \\
&\sim p \Rightarrow q \land r
\end{aligned}\]
-
\[\begin{aligned}
(p\Rightarrow q)\vee(p\Rightarrow r)
&\sim (\lnot p \lor q) \lor (\lnot p \lor r) \\
&\sim \lnot p \lor q \lor r \\
&\sim p \Rightarrow q \lor r
\end{aligned}\]
-
\[\begin{aligned}
(p\Rightarrow r)\wedge(q\Rightarrow r)
&\sim (\lnot p \lor r) \land (\lnot q \lor r) \\
&\sim (\lnot p \land \lnot q) \lor r \\
&\sim \lnot (\lnot p \land \lnot q) \Rightarrow r \\
&\sim p \lor q \Rightarrow r
\end{aligned}\]
-
\[\begin{aligned}
(p\Rightarrow r)\vee(q\Rightarrow r)
&\sim (\lnot p \lor r) \lor (\lnot q \lor r) \\
&\sim \lnot p \lor \lnot q \lor r
&&\sim \lnot p \lor (q \Rightarrow r) \\
&\sim \lnot (p \land q) \lor r
&&\sim p \Rightarrow (q \Rightarrow r)\\
&\sim p \land q \Rightarrow r
\end{aligned}\]
$q \land r \sim \lnot (\lnot q \lor \lnot r) \lor \lnot (q \downarrow r)$
Normalne oblike
- konjunktivna normalna oblika: $(p \lor \lnot q \lor r) \land (\lnot p \lor q \lor r) \land \dots$
- disjunktivna normalna oblika: $(p \land \lnot q \land \lnot r) \lor (\lnot p \land \lnot q \land r) \lor \dots$
Naloga 4
S pomočjo izpeljevanja zapiši izraz v konjunktivni normalni obliki ali v disjunktivni normalni obliki.
- $\lnot (p \vee q) \wedge (p \Rightarrow r)$
- $(p \uparrow q) \downarrow r$
- $((p \Rightarrow q) \vee \lnot r) \uparrow p$
-
\[\begin{aligned}
\lnot (p \vee q) \wedge (p \Rightarrow r)
&\sim (\lnot p \land \lnot q) \land (\lnot p \lor r) \\
&\sim \lnot p \land \lnot q \\
&\sim (\lnot p \land \lnot q \land r) \lor (\lnot p \land \lnot q \land \lnot r)
\end{aligned}\]
- disjunktivna normalna oblika
-
\[\begin{aligned}
(p \uparrow q) \downarrow r
&\sim \lnot (\lnot (p \land q) \lor r) \\
&\sim (p \land q) \land \lnot r \\
&\sim p \land q \land \lnot r
\end{aligned}\]
- disjunktivna normalna oblika
-
\[\begin{aligned}
((p \Rightarrow q) \vee \lnot r) \uparrow p
&\sim \lnot (((\lnot p \lor q) \lor \lnot r) \land p) \\
&\sim \lnot ((q \lor \lnot r) \land p) \\
&\sim \lnot (q \lor \lnot r) \lor \lnot p \\
&\sim (\lnot q \land r) \lor \lnot p \\
&\sim (p \land \lnot q \land r) \lor (\lnot p \land \lnot q \land r) \lor (\lnot p \land q \land r)\lor (\lnot p \land q \land \lnot r)\lor (\lnot p \land \lnot q \land \lnot r) \\
(\lnot q \land r) \lor \lnot p
&\sim (\lnot p \lor \lnot q) \land (\lnot p \lor r) \\
&\sim (\lnot p \lor \lnot q \lor r) \land (\lnot p \lor \lnot q \lor \lnot r) \land (\lnot p \lor q \lor r)
\end{aligned}\]