Why is this logical expression using $P$, $Q$, $R$ logically equivalent to one using only $P$ and $Q$? Formula 1:
$$(¬P ∧ ¬Q ∧ ¬R) ∨ (¬P ∧ ¬Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧ Q ∧ R)$$
P   Q   R   F
0   0   0   1
0   0   1   1
0   1   0   0
0   1   1   0
1   0   0   0
1   0   1   0
1   1   0   1
1   1   1   1

Formula 2:
$$(¬P ∧ ¬Q) ∨ (P ∧ Q)$$
P   Q   ((¬P ∧ ¬Q) ∨ (P ∧ Q))
0   0              1
0   1              0
1   0              0
1   1              1

How are these two formulas logically equivalent? To my understanding when two formulas are logically equivalent, they have identical truth values under all interpretations, these 2 formulas produce completely different truth tables- formula 1 has 3 variables and formula 2 has 2 variables to start off with. I don't understand how they are logically equivalent?
 A: Actually, they both have the same truth table. They only look different because you omitted $R$ from the second one, presumably due to the fact that it does not appear in the second formula. If we include $R$ in the second truth table, it becomes
P   Q   R   ((¬P ∧ ¬Q) ∨ (P ∧ Q))
0   0   0              1
0   0   1              1
0   1   0              0
0   1   1              0
1   0   0              0
1   0   1              0
1   1   0              1
1   1   1              1

As you can see, this is the same as the first one.
A: Notice from your first truth table that the value of $F$ does not depend on $R$.  For each of the four possibilities for $(P,Q)$, the two formulas yield the same truth values.
Alternatively, you can show the equivalence directly without truth tables by manipulating the first formula to look like the second one:
$$
(¬P ∧ ¬Q ∧ ¬R) ∨ (¬P ∧ ¬Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧ Q ∧ R) \\
((¬P ∧ ¬Q) ∧ ¬R) ∨ ((¬P ∧ ¬Q) ∧ R) ∨ ((P ∧ Q) ∧ ¬R) ∨ ((P ∧ Q) ∧ R) \\
((¬P ∧ ¬Q) ∧ (¬R ∨ R)) ∨ ((P ∧ Q) ∧ (¬R ∨ R)) \\
((¬P ∧ ¬Q) ∧ 1) ∨ ((P ∧ Q) ∧ 1) \\
(¬P ∧ ¬Q) ∨ (P ∧ Q) \\
$$
A: Let the $3$-input function $F_1(P,Q,R)$ denote Formula 1's truth value, and likewise for Formula 2.

*

*The key insight is that in Formula 1, $R$ is a ‘bogus’
(propositional) variable: whatever $P$ and $Q$'s values are,
$F_1(P,Q,0)$ and $F_1(P,Q,1)$ are either both true or both false. So,
the input combination $(P,Q)$ fully determines the Formula 1's truth
value. To determine whether Formula 1 is true, there is never a need
to consider input $R$'s truth value. $$F_1(P,Q,R)=F_1(P,Q).$$

*And, since each choice of $(P,Q)$ returns the same truth value for
Formulae 1 and 2, these two formulae must therefore be logically
equivalent. $$F_2(P,Q)=F_1(P,Q)=F_1(P,Q,R).$$ In fact, Formula 2 is a
simplified version of Formula 1.

