Discrete Mathematics : Recitations

Contents

Session 1: Propositional logic

Conditionals everywhere

ExpressionEquivalent expression
$p \rightarrow q$$\equiv \sim p \lor q$
$p$ implies $q$$\equiv p \rightarrow q$
(Contrapositive of $p \rightarrow q$)$\equiv \sim q \rightarrow \sim p$
(Converse of $p \rightarrow q$)$\equiv q \rightarrow p$
(Inverse of $p \rightarrow q$)$\equiv \sim p \rightarrow \sim q$
$p$ is sufficient for $q$$\equiv p \rightarrow q$
$p$ is not sufficient for $q$$\equiv \sim (p \rightarrow q)$
$p$ is necessary for $q$$\equiv q \rightarrow p$
$p$ is not necessary for $q$$\equiv \sim (q \rightarrow p)$
$p$ if $q$$\equiv q \rightarrow p$
$p$ only if $q$$\equiv p \rightarrow q$
$p$ if and only if $q$$\equiv p \leftrightarrow q$
$p$ when/whenever $q$$\equiv q \rightarrow p$
$p$ unless $q$$\equiv \sim q \rightarrow p$
$p$ follows from $q$$\equiv q \rightarrow p$
$p$, provided that $q$$\equiv q \rightarrow p$

Construct the truth table for $(p \oplus q) \leftrightarrow (\sim q \rightarrow \sim r)$.

Solution

$p$$q$$r$$p \oplus q$$\sim q$$\sim r$$\sim q \rightarrow \sim r$$(p \oplus q) \leftrightarrow (\sim q \rightarrow \sim r)$
$T$$T$$T$$F$$F$$F$$T$$F$
$T$$T$$F$$F$$F$$T$$T$$F$
$T$$F$$T$$T$$T$$F$$F$$F$
$T$$F$$F$$T$$T$$T$$T$$T$
$F$$T$$T$$T$$F$$F$$T$$T$
$F$$T$$F$$T$$F$$T$$T$$T$
$F$$F$$T$$F$$T$$F$$F$$T$
$F$$F$$F$$F$$T$$T$$T$$F$

Use truth tables to check whether the following expressions are equivalent: $\sim p \rightarrow (q \land r)$ and $\sim p \lor (q \lor r)$.

Solution

$p$$q$$r$$\sim p$$q \land r$$q \lor r$$\sim p \rightarrow (q \land r)$$\sim p \lor (q \lor r)$
$T$$T$$T$$F$$T$$T$$T$$T$
$T$$T$$F$$F$$F$$T$$T$$T$
$T$$F$$T$$F$$F$$T$$T$$T$
$T$$F$$F$$F$$F$$F$$T$$F$
$F$$T$$T$$T$$T$$T$$T$$T$
$F$$T$$F$$T$$F$$T$$F$$T$
$F$$F$$T$$T$$F$$T$$F$$T$
$F$$F$$F$$T$$F$$F$$F$$T$

The 7th and 8th columns are different at rows 4, 6, 7, and 8.
So, $\sim p \rightarrow (q \land r) \not\equiv \sim p \lor (q \lor r)$.

Write the logical form of the argument. If it is valid, identify the rule of inference that guarantees its validity. Otherwise, state whether the converse or the inverse error is made.

Subproblem 1.
If Jules solved this problem correctly, then Jules obtained the answer 2.
Jules obtained the answer 2.
$\therefore$ Jules solved this problem correctly.

Subproblem 2.
This real number is rational or it is irrational.
This real number is not rational.
$\therefore$ This real number is irrational.

Subproblem 3.
If I go to the movies, I won't finish my homework.
If I don't finish my homework, I won't do well on the exam tomorrow.
$\therefore$ If I go to the movies, I won't do well on the exam tomorrow.

Subproblem 4.
If this number is larger than 2, then its square is larger than 4.
This number is not larger than 2.
$\therefore$ The square of this number is not larger than 4.

Solution (Subproblem 1)

Let $p$ denote ''Jules solved this problem correctly'' and $q$ denote ''Jules obtained the answer 2''.
Logical form: \begin{align*} & p \rightarrow q \\ & q \\ & \therefore p \end{align*} Invalid (Converse error). A conditional is not equivalent to its converse. When $p$ is false and $q$ is true, both premises are true but the conclusion is false.

Solution (Subproblem 2)

Let $p$ denote ''This real number is rational'' and $q$ denote ''This real number is irrational''.
Logical form: \begin{align*} & p \lor q \\ & \sim p \\ & \therefore q \end{align*} Valid (Elimination).

Solution (Subproblem 3)

Let $p$ denote ''I go to the movies'', $q$ denote ''I finish my homework'', and $r$ denote ''I do well on the exam tomorrow''.
Logical form: \begin{align*} & p \rightarrow \sim q \\ & \sim q \rightarrow \sim r \\ & \therefore p \rightarrow \sim r \end{align*} Valid (Transitivity). Here $\sim q$ plays the role of the middle statement in the rule.

Solution (Subproblem 4)

Let $p$ denote ''This number is larger than 2'' and $q$ denote ''The square of this number is larger than 4''.
Logical form: \begin{align*} & p \rightarrow q \\ & \sim p \\ & \therefore \sim q \end{align*} Invalid (Inverse error). A conditional is not equivalent to its inverse. When $p$ is false and $q$ is true, both premises are true but the conclusion is false. (For example, the number $-3$ is not larger than 2, but its square, 9, is larger than 4.)

Use a truth table to determine whether the following argument form is valid. Indicate which columns represent the premises and which represent the conclusion, and include a sentence explaining how the truth table supports your answer.
$p$
$p \rightarrow q$
$\sim q \lor r$
$\therefore r$

Solution

PremisesConclusion
$p$$q$$r$$\sim q$$p$$p \rightarrow q$$\sim q \lor r$$r$
$T$$T$$T$$F$$T$$T$$T$$T$
$T$$T$$F$$F$$T$$T$$F$$F$
$T$$F$$T$$T$$T$$F$$T$$T$
$T$$F$$F$$T$$T$$F$$T$$F$
$F$$T$$T$$F$$F$$T$$T$$T$
$F$$T$$F$$F$$F$$T$$F$$F$
$F$$F$$T$$T$$F$$T$$T$$T$
$F$$F$$F$$T$$F$$T$$T$$F$

A row in which all the premises are true is a critical row. An argument form is valid if the conclusion is true in every critical row.
Only row 1 (the highlighted row) is a critical row, and the conclusion $r$ is true in it.
So, the argument form is valid.

Session 2: Propositional logic

Use a truth table to determine whether the following argument form is valid. Indicate which columns represent the premises and which represent the conclusion, and include a sentence explaining how the truth table supports your answer.
$p \lor q$
$p \rightarrow \sim q$
$p \rightarrow r$
$\therefore r$

Solution

PremisesConclusion
$p$$q$$r$$\sim q$$p \lor q$$p \rightarrow \sim q$$p \rightarrow r$$r$
$T$$T$$T$$F$$T$$F$$T$$T$
$T$$T$$F$$F$$T$$F$$F$$F$
$T$$F$$T$$T$$T$$T$$T$$T$
$T$$F$$F$$T$$T$$T$$F$$F$
$F$$T$$T$$F$$T$$T$$T$$T$
$F$$T$$F$$F$$T$$T$$T$$F$
$F$$F$$T$$T$$F$$T$$T$$T$
$F$$F$$F$$T$$F$$T$$T$$F$

A row in which all the premises are true is a critical row. An argument form is invalid if the conclusion is false in at least one critical row.
Rows 3, 5, and 6 are critical rows. In row 6 ($p$ is false, $q$ is true, and $r$ is false), all the premises are true but the conclusion $r$ is false.
So, the argument form is invalid.

Use the valid argument forms (rules of inference) to deduce the conclusion from the premises, giving a reason for each step. Assume all variables are statement variables.
(a) $\sim p \lor q \rightarrow r$
(b) $s \lor \sim q$
(c) $\sim t$
(d) $p \rightarrow t$
(e) $\sim p \land r \rightarrow \sim s$
(f) $\therefore \sim q$

Solution

By the precedence of the logical operators, (a) is $(\sim p \lor q) \rightarrow r$ and (e) is $(\sim p \land r) \rightarrow \sim s$.

1. \begin{align*} & p \rightarrow t && \text{by (d)} \\ & \sim t && \text{by (c)} \\ & \therefore \sim p && \text{by modus tollens} \end{align*}

2. \begin{align*} & \sim p && \text{by the conclusion of (1)} \\ & \therefore \sim p \lor q && \text{by generalization} \end{align*}

3. \begin{align*} & (\sim p \lor q) \rightarrow r && \text{by (a)} \\ & \sim p \lor q && \text{by the conclusion of (2)} \\ & \therefore r && \text{by modus ponens} \end{align*}

4. \begin{align*} & \sim p && \text{by the conclusion of (1)} \\ & r && \text{by the conclusion of (3)} \\ & \therefore \sim p \land r && \text{by conjunction} \end{align*}

5. \begin{align*} & (\sim p \land r) \rightarrow \sim s && \text{by (e)} \\ & \sim p \land r && \text{by the conclusion of (4)} \\ & \therefore \sim s && \text{by modus ponens} \end{align*}

6. \begin{align*} & s \lor \sim q && \text{by (b)} \\ & \sim s && \text{by the conclusion of (5)} \\ & \therefore \sim q && \text{by elimination} \end{align*}

Thus, $\sim q$ follows from the premises.

Use the valid argument forms (rules of inference) to deduce the conclusion from the premises, giving a reason for each step. Assume all variables are statement variables.
(a) $\sim p \rightarrow r \land \sim s$
(b) $t \rightarrow s$
(c) $u \rightarrow \sim p$
(d) $\sim w$
(e) $u \lor w$
(f) $\therefore \sim t$

Solution

By the precedence of the logical operators, (a) is $\sim p \rightarrow (r \land \sim s)$.

1. \begin{align*} & u \lor w && \text{by (e)} \\ & \sim w && \text{by (d)} \\ & \therefore u && \text{by elimination} \end{align*}

2. \begin{align*} & u \rightarrow \sim p && \text{by (c)} \\ & u && \text{by the conclusion of (1)} \\ & \therefore \sim p && \text{by modus ponens} \end{align*}

3. \begin{align*} & \sim p \rightarrow (r \land \sim s) && \text{by (a)} \\ & \sim p && \text{by the conclusion of (2)} \\ & \therefore r \land \sim s && \text{by modus ponens} \end{align*}

4. \begin{align*} & r \land \sim s && \text{by the conclusion of (3)} \\ & \therefore \sim s && \text{by specialization} \end{align*}

5. \begin{align*} & t \rightarrow s && \text{by (b)} \\ & \sim s && \text{by the conclusion of (4)} \\ & \therefore \sim t && \text{by modus tollens} \end{align*}

Thus, $\sim t$ follows from the premises.

Session 3: Predicate logic

Session 4: Proof techniques

Prove that for every integer $n$, if $n$ is odd, then $3n+5$ is even.

Proof

Direct proof.
Formal statement: $\forall$ integer $n$, if $n$ is odd, then $3n+5$ is even.
Suppose $n$ is odd. Then: \begin{align*} & 3n + 5 \\ &= 3(2k+1) + 5 && \text{(defn. of odd, } n = 2k+1 \text{ for integer } k \text{)}\\ &= 6k + 8 && \text{(simplifying)}\\ &= 2(3k+4) && \text{(taking 2 as common factor)}\\ &= 2p && \text{(} p = 3k+4 \text{ and mult. and add. are closed on integers)}\\ &= \text{even} && \text{(defn. of even)}\\ \end{align*}

Prove that if $a$ and $b$ are any odd integers, then $a^2 + b^2$ is even.

Proof

Direct proof.
Formal statement: $\forall$ integers $a, b$, if $a$ and $b$ are odd, then $a^2 + b^2$ is even.
Suppose $a$ and $b$ are odd. Then: \begin{align*} & a^2 + b^2 \\ &= (2m+1)^2 + (2n+1)^2 && \text{(defn. of odd; } a = 2m+1, b = 2n+1 \text{)}\\ &= 4m^2 + 4m + 1 + 4n^2 + 4n + 1 && \text{(expand)}\\ &= 2(2m^2 + 2m + 2n^2 + 2n + 1) && \text{(taking 2 as common factor)}\\ &= 2p && \text{(} p = 2m^2 + 2m + 2n^2 + 2n + 1 \text{ is an integer)}\\ &= \text{even} && \text{(defn. of even)}\\ \end{align*}

Prove that if an integer greater than $4$ is a perfect square, then the immediately preceding integer is not prime.

Proof

Direct proof.
Formal statement: $\forall$ integer $n \gt 4$, if $n$ is a perfect square, then $n-1$ is not prime.
Suppose $n \gt 4$ is a perfect square. Then: \begin{align*} & n = k^2 \text{ for some integer } k \ge 0 && \text{(defn. of perfect square; take } k \ge 0 \text{)}\\ & \implies k^2 \gt 4 && \text{(} n \gt 4 \text{)}\\ & \implies k \ge 3 && \text{(} k \text{ is a nonnegative integer)}\\ \end{align*} Now consider $n - 1$. \begin{align*} & n - 1 \\ &= k^2 - 1 && \text{(} n = k^2 \text{)}\\ &= (k-1)(k+1) && \text{(difference of two squares)}\\ &= \text{composite} && \text{(} 1 \lt k-1 \lt n-1 \text{ and } 1 \lt k+1 \lt n-1 \text{; see below)}\\ \end{align*} We have $1 \lt k-1$ and $1 \lt k+1$ since $k \ge 3$. Also, $k-1 \lt (k-1)(k+1) = n-1$ since $k+1 \gt 1$, and $k+1 \lt (k-1)(k+1) = n-1$ since $k-1 \gt 1$. So $n-1$ is a product of two natural numbers that are strictly between $1$ and $n-1$. Hence $n-1$ is composite, and so it is not prime.

Prove or disprove. For all real numbers $a$ and $b$, if $a^2 > b^2$, then $a>b$.

Solution

False!
Counterexample: $a = -3$ and $b = 2$.
In this example, $a^2 = 9 \gt 4 = b^2$ but $a \lt b$.

Rationals and irrationals

ExpressionResultProof technique
rational + rationalrationalDirect proof
rational + irrationalirrationalContradiction
irrational + irrationalrational or irrationalExamples: $\sqrt{2} + (-\sqrt{2}) = 0$ and $\frac{1}{\sqrt{2}} + \frac{1}{\sqrt{2}} = \sqrt{2}$
rational $\times$ rationalrationalDirect proof
rational $\times$ irrationalrational or irrationalExamples $0 \times \sqrt{2} = 0$ and $1 \times \sqrt{2} = \sqrt{2}$
irrational $\times$ irrationalrational or irrationalExamples $\sqrt{2} \times \sqrt{2} = 2$ and $\sqrt{2} \times \sqrt{3} = \sqrt{6}$
nonzero rational $\times$ irrationalirrationalContradiction
rational$^{\text{rational}}$rational or irrationalExamples $1^1 = 1$ and $2^{1/2} = \sqrt{2}$

Session 5: Proof techniques

Prove that for all positive real numbers $r$ and $s$, $\sqrt{r + s} \neq \sqrt{r} + \sqrt{s}$.

Proof

Proof by contradiction.
Negation. Suppose there are positive real numbers $r$ and $s$ such that $\sqrt{r+s} = \sqrt{r} + \sqrt{s}$. \begin{align*} & \sqrt{r+s} = \sqrt{r} + \sqrt{s} \\ & \implies r + s = r + 2\sqrt{r}\sqrt{s} + s && \text{(squaring on both sides)}\\ & \implies 0 = 2\sqrt{r}\sqrt{s} && \text{(subtracting } r + s \text{ from both sides)}\\ & \implies \sqrt{r}\sqrt{s} = 0 && \text{(dividing by 2)}\\ & \implies \sqrt{r} = 0 \text{ or } \sqrt{s} = 0 && \text{(a product is zero only if a factor is zero)}\\ & \implies r = 0 \text{ or } s = 0 && \text{(squaring)}\\ \end{align*} Contradiction! Both $r$ and $s$ are positive. Hence, the proposition is true.

Proof 2

Proof by contraposition.
Contrapositive. If $\sqrt{r+s} = \sqrt{r} + \sqrt{s}$, then $r$ and $s$ are not both positive. \begin{align*} & \sqrt{r+s} = \sqrt{r} + \sqrt{s} \\ & \implies r + s = r + 2\sqrt{r}\sqrt{s} + s && \text{(squaring on both sides)}\\ & \implies \sqrt{r}\sqrt{s} = 0 && \text{(subtracting } r + s \text{ and dividing by 2)}\\ & \implies r = 0 \text{ or } s = 0 && \text{(a product is zero only if a factor is zero)}\\ & \implies r \text{ and } s \text{ are not both positive} && \text{(} 0 \text{ is not positive)}\\ \end{align*} Hence, the proposition is true.

Prove that if $n^2+3n-7$ is even, then $n$ is odd.

Proof

Proof by contradiction.
Negation. Suppose $n^2 + 3n - 7$ is even and $n$ is even. \begin{align*} & n \text{ is even} \\ & \implies n = 2k && \text{(defn. of even, } k \in \mathbb{Z} \text{)}\\ & \implies n^2 + 3n - 7 = 4k^2 + 6k - 7 && \text{(substitute } n = 2k \text{)}\\ & \implies n^2 + 3n - 7 = 2(2k^2 + 3k - 4) + 1 && \text{(take 2 common)}\\ & \implies n^2 + 3n - 7 \text{ is odd} && \text{(defn. of odd, } 2k^2 + 3k - 4 \in \mathbb{Z} \text{)}\\ \end{align*} Contradiction! $n^2 + 3n - 7$ is even, but an integer cannot be both even and odd. Hence, the proposition is true.

Proof 2

Proof by contraposition.
Contrapositive. If $n$ is even, then $n^2 + 3n - 7$ is odd. \begin{align*} & n \text{ is even} \\ & \implies n = 2k && \text{(defn. of even, } k \in \mathbb{Z} \text{)}\\ & \implies n^2 + 3n - 7 = 4k^2 + 6k - 7 && \text{(substitute } n = 2k \text{)}\\ & \implies n^2 + 3n - 7 = 2(2k^2 + 3k - 4) + 1 && \text{(take 2 common)}\\ & \implies n^2 + 3n - 7 \text{ is odd} && \text{(defn. of odd, } 2k^2 + 3k - 4 \in \mathbb{Z} \text{)}\\ \end{align*} Hence, the contrapositive is true, and so the proposition is true.

For integers $a$, $b$, $c$, if $a^2 + b^2 = c^2$, then $a$ is even or $b$ is even.

Proof

Proof by contraposition and division into cases.
Contrapositive. For integers $a$, $b$, $c$, if $a$ and $b$ are odd, then $a^2 + b^2 \ne c^2$.
Suppose $a$ and $b$ are odd. Consider \begin{align*} & a^2 + b^2 \\ &= (2m+1)^2 + (2n+1)^2 && \text{(defn. of odd; } a = 2m+1, b = 2n+1 \text{)}\\ &= 4m^2 + 4n^2 + 4m + 4n + 2 && \text{(expand)}\\ &= 4(m^2 + n^2 + m + n) + 2 && \text{(take common factor)}\\ &\equiv 2 \bmod 4 && \text{(remainder is 2 when divided by 4)}\\ \end{align*} Now let $c$ be any integer. We know $c = 2k$ or $c = 2k+1$ (quotient-remainder theorem). So we have two cases:

In both cases, $c^2 \not\equiv 2 \bmod 4$ (remainder is never 2 when divided by 4). But $a^2 + b^2 \equiv 2 \bmod 4$. So $a^2 + b^2 \ne c^2$. Hence, the contrapositive is true, and so the proposition is true.

Given two nonnegative numbers $a$ and $b$, the arithmetic mean (AM) is defined as $(a + b) / 2$ and the geometric mean (GM) is defined as $\sqrt{ab}$. Prove that for all nonnegative real numbers $a$ and $b$, the AM of the two numbers is never smaller than the GM.

Proof

Direct proof.
Formal statement. $\forall$ nonnegative real numbers $a$ and $b$, $\frac{a+b}{2} \ge \sqrt{ab}.$
Since $a,b \ge 0$, the expression $(\sqrt{a} - \sqrt{b})^2$ is well-defined and nonnegative. Thus, $(\sqrt{a} - \sqrt{b})^2 \ge 0.$
We have

\begin{align*} &(\sqrt{a} - \sqrt{b})^2 \ge 0\\ &\implies a - 2\sqrt{ab} + b \ge 0 && \text{(expand)}\\ &\implies a + b \ge 2\sqrt{ab} && \text{(rewrite)}\\ &\implies \frac{a+b}{2} \ge \sqrt{ab} && \text{(divide by 2)} \end{align*}

Therefore, the arithmetic mean of two nonnegative real numbers is never smaller than the geometric mean.

Proof 2

Proof by contradiction.
Negation: Suppose that there exist nonnegative real numbers $a$ and $b$ such that $\frac{a+b}{2} < \sqrt{ab}.$ Then \begin{align*} &\frac{a+b}{2} < \sqrt{ab} && \text{(supposition of negation)}\\ &\implies a + b < 2\sqrt{ab} && \text{(multiply by 2)}\\ &\implies a + b - 2\sqrt{ab} < 0 && \text{(rewrite)}\\ &\implies (\sqrt{a} - \sqrt{b})^2 < 0 && \text{(simplify)} \end{align*} However, for all real numbers, a square is always nonnegative, so $ (\sqrt{a} - \sqrt{b})^2 \ge 0, $ which is a contradiction. Therefore, our assumption is false, and it must be that $ \frac{a+b}{2} \ge \sqrt{ab} $ for all nonnegative real numbers $a$ and $b$.

For every integer $n$, the product of three consecutive integers $n(n+1)(n+2)$ is divisible by $6$.

Proof

Proof by division into cases.
Let $n$ be any integer. By the quotient-remainder theorem, when $n$ is divided by $3$, exactly one of the following three cases occurs:

Therefore, in every case, one of the integers $n$, $n+1$, and $n+2$ is divisible by $3$.
Next, by the quotient-remainder theorem, every integer is either even or odd. So we consider two cases:

We have, $ 2 \mid n(n+1)(n+2) \text{ and } 3 \mid n(n+1)(n+2). $ Since $\gcd(2,3)=1$, it follows that $ 6 \mid n(n+1)(n+2). $ Therefore, the product of three consecutive integers is divisible by $6$.

Session 6: Sequences

Prove that $\displaystyle\sum_{i=1}^{n-1} i(i+1) = \frac{n(n-1)(n+1)}{3}$, for every integer $n \ge 2$.

Proof

Let $P(n)$ denote ''$\displaystyle\sum_{i=1}^{n-1} i(i+1) = \frac{n(n-1)(n+1)}{3}$.''
Prove that $\displaystyle\sum_{i=1}^{n} i(i!) = (n+1)! - 1$, for every integer $n \ge 1$.

Proof

Let $P(n)$ denote ''$\displaystyle\sum_{i=1}^n i(i!) = (n+1)! - 1$.''
Prove that $\displaystyle \frac{1}{1^2} + \frac{1}{2^2} + \cdots + \frac{1}{n^2} < 2 - \frac{1}{n}$ for all natural numbers $n \ge 1$.

Proof

Let $P(n)$ denote $\displaystyle \sum_{i=1}^n \frac{1}{i^2} < 2 - \frac{1}{n}$ for $n \ge 2$.
Prove that $5^n - 1$ is divisible by $4$, for every integer $n \ge 0$.

Proof

Let $P(n)$ denote ''$5^{n} - 1$ is divisible by $4$.''
For any integer $n \ge 0$, $x^n - y^n$ is divisible by $x - y$, where $x$ and $y$ are any integers with $x \ne y$.

Proof

Let $P(n)$ denote ''$x^{n} - y^{n}$ is divisible by $x - y$, s.t. $x \ne y$.''
Prove that $n^3 - n$ is divisible by $6$, for each integer $n \ge 0$.

Proof

Let $P(n)$ denote ''$n^{3} - n$ is divisible by $6$.''

Session 7: Sequences

Suppose that $e_0, e_1, e_2, \ldots$ is a sequence defined as follows: $e_0 = 12$, $e_1 = 29$,
$e_k = 5e_{k-1} - 6e_{k-2}$ for each integer $k \ge 2$.
Prove that $e_n = 5 \cdot 3^n + 7 \cdot 2^n$ for every integer $n \ge 0$.

Proof

Let $P(n)$ denote ''$e_n = 5 \cdot 3^n + 7 \cdot 2^n$.''
Problem: Suppose $x \in \mathbb{R}^+$ and $(x + 1/x) \in \mathbb{Z}$. Prove using strong induction that $(x^n + 1/x^n) \in \mathbb{Z}$ for all natural numbers $n$.

Solution

Let $P(n)$ denote $(x^n + 1/x^n) \in \mathbb{Z}$ for $n \ge 1$.
Problem: Prove that breaking a chocolate bar with $n \ge 1$ pieces into individual pieces requires $n - 1$ breaks.

Solution

Let $P(n)$ denote ''Breaking a chocolate bar with $n$ pieces into individual pieces requires $n - 1$ breaks''.
chocolatebar: a bar of k+1 pieces split into a part with j pieces (j-1 breaks) and a part with k+1-j pieces (k-j breaks)
Let $c_0, c_1, c_2, \ldots$ be defined by the formula $c_n = 2^n - 1$, for every integer $n \ge 0$. Show that this sequence satisfies the recurrence relation $c_k = 2c_{k-1} + 1$, for every integer $k \ge 1$.

Solution

Let $k \ge 1$ be an integer. By the given formula, $c_{k-1} = 2^{k-1} - 1$. Then, \begin{align*} & 2 c_{k-1} + 1 \\ &= 2 (2^{k-1} - 1) + 1 && (\because \text{substitute } c_{k-1} = 2^{k-1}-1) \\ &= 2^{k} - 2 + 1 && (\because \text{simplify}) \\ &= 2^k - 1 \\ &= c_k && (\because \text{by the given formula}) \end{align*} So $c_k = 2c_{k-1}+1$ for every integer $k \ge 1$, and the sequence satisfies the given recurrence relation.

A sequence is defined recursively: $h_k = 2^k - h_{k-1}$, for each integer $k \ge 1$, $h_0 = 1$. Use iteration to guess an explicit formula for the sequence.

Solution

Session 8: Midterm

Cover the common mistakes from all topics for the midterm from Common Mistakes file.

Session 9: Sets

Session 10: Functions

Session 11: Functions

Session 12: Relations

Session 13: Final

Cover the common mistakes from all topics for the final from Common Mistakes file.