Proof by induction - Really confused

Click For Summary

Discussion Overview

The discussion revolves around proving two statements by induction: one concerning the number of operations required to sort an array and the other about the expression \(7n - 1\) being a multiple of 6 for \(n \geq 1\). Participants express confusion about the induction process and how to formulate the statements correctly.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant introduces the problem and expresses confusion about how to state the question clearly.
  • Another participant proposes defining \(O_n\) as the number of operations to sort an array of \(n\) elements and states the base case and induction hypothesis.
  • Participants discuss the induction step and how to derive \(O_{n+1}\) from \(O_n\) using the relationship \(O_{n+1} - O_n = 2n + 1\).
  • There is an exploration of whether substituting values for \(n\) or rearranging formulas is the correct approach to prove the statements.
  • One participant realizes that factoring helps in deriving the next step in the induction process, leading to a clearer understanding of the proof.

Areas of Agreement / Disagreement

Participants generally agree on the approach to proving the first statement by induction, but there is uncertainty and confusion about the process and how to apply it correctly. The second statement regarding \(7n - 1\) is not discussed in detail, leaving its proof unresolved.

Contextual Notes

Participants express limitations in understanding the induction process, particularly in applying it to the sorting algorithm problem. There are unresolved steps in the discussion, particularly regarding the second statement.

Tvtakaveli
Messages
5
Reaction score
0
Hi again. I have one other problem I'm puzzled about.

(a) A sorting algorithm takes one operation to sort an array with one item in it.
Increasing the number of items in the array from n to n + 1 requires at most an
additional 2n + 1 operations. Prove by induction that the number of operations
required to sort an array with n > 0 items requires at most n^2 operations.
(b) Show by induction that if n ≥ 1, then 7n − 1 is a multiple of 6.

So I'm confused to what the question even is and how to put it into a statement. Thank you.
 
Physics news on Phys.org
Tvtakaveli said:
Hi again. I have one other problem I'm puzzled about.

(a) A sorting algorithm takes one operation to sort an array with one item in it.
Increasing the number of items in the array from n to n + 1 requires at most an
additional 2n + 1 operations. Prove by induction that the number of operations
required to sort an array with n > 0 items requires at most n^2 operations.
(b) Show by induction that if n ≥ 1, then 7n − 1 is a multiple of 6.

So I'm confused to what the question even is and how to put it into a statement. Thank you.

(a) I would let \(O_n\) be the number of operations it takes to sort an array containing \(n\) elements. Now, we are told:

$$O_1=1$$

And so this satisfies our base case, \(P_1\). We are given the induction hypothesis \(P_n\):

$$O_n=n^2$$

And we are told:

$$O_{n+1}-O_n=2n+1$$

This can serve as our induction step, because we can add this to our induction hypothesis. What do we get?
 
Ohhh okay that makes a lot more sense. See the induction examples I find online aren't very helpful because they were just substituting n values.

I'm guessing now we would try to get both sides to be equivalent. So either by substituting a value for n that's greater than 0.
Or by just rearranging the formula so that both have the same.

Again I am missing something I just can't work it out.
So
On+1−On=2n+1
n^2+1 - n^2=2n+1
But that wouldn't make sense because
1^2+1 - 1^2 =0. 2*1+1=3

Thanks in advance.
 
Tvtakaveli said:
Ohhh okay that makes a lot more sense. See the induction examples I find online aren't very helpful because they were just substituting n values.

I'm guessing now we would try to get both sides to be equivalent. So either by substituting a value for n that's greater than 0.
Or by just rearranging the formula so that both have the same.

Again I am missing something I just can't work it out.
So
On+1−On=2n+1
n^2+1 - n^2=2n+1
But that wouldn't make sense because
1^2+1 - 1^2 =0. 2*1+1=3

Thanks in advance.

If we start with our induction hypothesis:

$$O_n=n^2$$

And add to this the induction step implied by the problem statement:

$$O_{n+1}-O_n=2n+1$$

We get:

$$O_{n+1}=n^2+2n+1$$

And upon factoring the RHS, we have:

$$O_{n+1}=(n+1)^2$$

And now we find that we've derived \(P_{n+1}\) from \(P_n\), thereby completing the proof by induction.

Does that make sense?
 
Ahhhh so it proves the hypothesis. I see now factorising was the way to do it. It's a lot more clear now thank you for the assistance. I really appreciate it.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K