Skip to content
UoL CS Notes

Catch-up Session 2

COMP109 Catch-up+Sessions

Methods of Proof

  • Counter Example Method
    • Prove that a statement is false by use of a counter-statement.
  • Universal Proof
    • Applies to all integers e.g. odd if $a=2k+1$

Example

\((a+b)^2=a^2+b^2\)

Holds for:

  • Some integers
  • All integers
  • No integers

The answer is that it holds for some integers as when $a=0,\ b=0$. \((0+0)^2=0^2+0^2\) This also follows for $a\neq0,\ b=0$.

The two proofs I gave as answers to the question count for both a counter example proof and a universal proof.

Example of Proof by Contradiction

Suppose for a proof by contradiction that $P_n$ is the largest prime number. Therefore, $P_1\ldots P_n$ are all the primes.

Consider $P=P_1\times P_2\ldots P_n+1$

Case 1: $P_p$ is prime

Case 2: $P_p$ not prime. Then $P$ must have prime member.