Proof by contradiction

[Home]   [Puzzles & Projects]    [Delphi Techniques]   [Math topics]   [Library]   [Utilities]

 

 

Search

Search WWW

Search DelphiForFun.org

As of October, 2016, Embarcadero is offering a free release of Delphi (Delphi 10.1 Berlin Starter Edition ).     There are a few restrictions, but it is a welcome step toward making more programmers aware of the joys of Delphi.  They do say "Offer may be withdrawn at any time", so don't delay if you want to check it out.  Please use the feedback link to let me know if the link stops working.

 

Support DFF - Shop

 If you shop at Amazon anyway,  consider using this link. 

     

We receive a few cents from each purchase.  Thanks

 


Support DFF - Donate

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

Mensa® Daily Puzzlers

For over 15 years Mensa Page-A-Day calendars have provided several puzzles a year for my programming pleasure.  Coding "solvers" is most fun, but many programs also allow user solving, convenient for "fill in the blanks" type.  Below are Amazon  links to the two most recent years.

Mensa® 365 Puzzlers  Calendar 2017

Mensa® 365 Puzzlers Calendar 2018

(Hint: If you can wait, current year calendars are usually on sale in January.)

Contact

Feedback:  Send an e-mail with your comments about this program (or anything else).

Search DelphiForFun.org only

 

 

 

The "Proof by Contradiction"  is  also known as reductio ad absurdum,  which is probably Latin for "reduce it to something absurd".

Here's the idea:

  1. Assume that a given proposition is untrue.
  2. Based on that assumption reach two conclusions that contradict each other.

This is based on a  classical formal logic construction known as Modus Tollens:  If P implies Q and Q is false, then P is false.   In this case, Q is a proposition of the form (R and not R) which is always false.   P is the negation of the fact that we are trying to prove and if the negation is not true then the original proposition must have been true.  If  computers are not "not stupid"  then they are stupid.  (I hear that "stupid computer!" phrase a lot around  here.)

Example:

Lets prove that there is no largest prime number (this is the idea of Euclid's original proof).  Prime numbers are integers with no exact integer divisors except 1 and themselves.

  1. To prove: "There is no largest prime number" by contradiction.  
  2. Assume: There is a largest prime number, call it p.
  3. Consider the number N  that is one larger than the product of all of the primes smaller than or equal to pN=2*3*5*7*11...*p + 1.  Is it prime? 
  4. N is at least as big as p+1 and so is larger than p and so, by Step 2, cannot be prime.
  5. On the other hand,  N has no prime factors between 1 and p because they would all leave a remainder of 1.  It has no prime factors larger than p because Step 2 says that there are no primes larger than p.  So N has no prime factors and therefore must itself be prime (see note below). 
  6. We have reached a contradiction (N is not prime by Step 4, and N is prime by Step 5) and therefore our original assumption that there is a largest prime must be false.    

Note: The conclusion in Step 5  makes implicit use of one other important theorem:  The Fundamental Theorem of Arithmetic:  Every integer can be uniquely represented as the product of primes.     So  if N had a composite (i.e. non-prime) factor, that factor would itself have prime factors which would also be factors of N.  

 

 
  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2018, Gary Darby    All rights reserved.