From 7beb630a66d464f0a217c40c0507e9c71aa27f52 Mon Sep 17 00:00:00 2001 From: Zunaid Ahmed Date: Mon, 16 Sep 2024 01:58:07 -0500 Subject: [PATCH 1/2] removed induction and proof --- source/relations/ch-relations.ptx | 1 - source/relations/sec-proofs-inductions.ptx | 107 --------------------- 2 files changed, 108 deletions(-) delete mode 100644 source/relations/sec-proofs-inductions.ptx diff --git a/source/relations/ch-relations.ptx b/source/relations/ch-relations.ptx index 1f331aa..9d50e30 100644 --- a/source/relations/ch-relations.ptx +++ b/source/relations/ch-relations.ptx @@ -16,5 +16,4 @@ - \ No newline at end of file diff --git a/source/relations/sec-proofs-inductions.ptx b/source/relations/sec-proofs-inductions.ptx deleted file mode 100644 index d024eda..0000000 --- a/source/relations/sec-proofs-inductions.ptx +++ /dev/null @@ -1,107 +0,0 @@ -
- Proof and Induction - -

- Proofs are fundamental to mathematics and computer science, providing the means to demonstrate the truth of statements. One powerful proof technique is mathematical induction, which is especially useful for proving properties about integers, sequences, and recursive structures. Induction allows us to prove that a statement holds for all natural numbers by first proving it for a base case and then showing that if it holds for an arbitrary case, it must also hold for the next case. -

-
- - - Direct Proofdirect proof -

- A direct proof is a straightforward method of proving a statement by assuming the premises and logically deriving the conclusion. For example, let’s prove that the sum of two even integers is always even. -

- - - # Direct proof in Sage: Checking the sum of two even numbers - - def is_even(n): - return n % 2 == 0 - - a, b = 4, 6 # Two even numbers - is_even(a + b) - - -

- This simple example shows that the sum of two even numbers a and b is also even, as their sum can be divided evenly by 2. -

-
- - - Mathematical Inductioninductionmathematical induction -

- Mathematical induction is a proof technique used to prove statements about natural numbers. It consists of two steps: -

-
    -
  • -

    - Base Case: Prove that the statement holds for the first value (usually 0 or 1). -

    -
  • -
  • -

    - Inductive Step: Prove that if the statement holds for some arbitrary value k, then it also holds for k+1. -

    -
  • -
-

- Together, these steps show that the statement holds for all natural numbers. Let’s use induction to prove that the sum of the first n positive integers is \frac{n(n + 1)}{2}. -

- - - # Proof by induction: Sum of first n positive integers - - def sum_n(n): - return sum(range(1, n+1)) - - def induction_step(k): - return sum_n(k) + (k + 1) - - base_case = (sum_n(1) == 1 * (1 + 1) // 2) - inductive_step = (induction_step(3) == 3 * (3 + 1) // 2) - - base_case, inductive_step - - -

- In the base case, for n = 1, we check that the sum is 1, and for the inductive step, we assume the statement holds for some k and show it holds for k + 1. In this example, we check for k = 3. -

-
- - - Strong Inductionstrong induction -

- Strong induction is similar to regular induction, but in the inductive step, we assume the statement is true for all values up to some k (not just k itself) and use this to prove it for k+1. This method is particularly useful when proving statements about recursive structures or algorithms. -

-

- Let’s prove that any integer greater than 1 can be written as a product of prime numbers using strong induction. -

- - - # Example: Strong induction to prove prime factorization - - def is_prime(n): - if n < 2: - return False - for i in range(2, int(n ** 0.5) + 1): - if n % i == 0: - return False - return True - - def factorize(n): - factors = [] - for i in range(2, n + 1): - while n % i == 0: - factors.append(i) - n //= i - return factors - - strong_induction_example = factorize(12) - strong_induction_example - - -

- Using strong induction, we can show that any number n > 1 can be factorized into primes. In this example, we factorize 12 as 2 \times 2 \times 3, all of which are prime numbers. -

-
-
From ace63a6249195f3003997dbb77f992036675fad7 Mon Sep 17 00:00:00 2001 From: Zunaid Ahmed Date: Mon, 16 Sep 2024 02:05:44 -0500 Subject: [PATCH 2/2] Corrected name order in frontmatter --- source/frontmatter.ptx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/source/frontmatter.ptx b/source/frontmatter.ptx index 303eb74..c5770dc 100644 --- a/source/frontmatter.ptx +++ b/source/frontmatter.ptx @@ -47,16 +47,16 @@

We would like to acknowledge the following peer-reviewers:

    -
  • -

    - Ken Levasseur, University of Massachusetts Lowell -

    -
  • -
  • Moty Katzman, University of Sheffield

    +
  • + +
  • +

    + Ken Levasseur, University of Massachusetts Lowell +

  • @@ -70,10 +70,9 @@

    We would like to acknowledge the following proof-readers:

      -
    • -

      - Fabio Re, Rosalind Franklin University - +

    • +

      + Ted Jankowski, Wright College

    • @@ -85,21 +84,22 @@
    • - Ted Jankowski, Wright College + Yolanda Nieves, Wright College

    • -
    • -

      - Tineka Scalzo, Wright College +

    • +

      + Fabio Re, Rosalind Franklin University +

    • - Yolanda Nieves, Wright College + Tineka Scalzo, Wright College

      -
    • +