Questioning Recurrence Relation: 3n-1 - an-1

In summary, the number of invalid strings of length n is 3n-1 - an-1 because for each invalid string of length n-1, there is exactly one way to add an nth term to make it valid. This is true for all three cases where the boxed portion of the solution is a string of length n-1 without any consecutive numbers. There is no requirement for the pair of consecutive numbers to be the first two terms, as shown by the example of 100 being a valid string with n=3. The reasoning in the attachment starts with an invalid string of length n-1 and calculates the total number of strings (3n-1) and the number of valid strings (an-1) for that
  • #1
Miike012
1,009
0
I boxed the portion of the solution that I am questioning.

How come the number of invalid strings is only 3n-1 - an-1 and not
3(3n-1 - an-1) ?

As you can see there are three cases (Which are to the right of the black box)

In all the three cases, the portion boxed in red is a string of length n-1 and does not have any consecutive numbers

Case 1:
The first number is a 1, then the second number must also be a 1
so that the string has a pair of consecutive numbers

Case 2
The first number is a 2, then the second number must also be a 2
so that the string has a pair of consecutive numbers

Case 3
The first number is a 0, then the second number must also be a 0
so that the string has a pair of consecutive numbers
 

Attachments

  • aaaa.jpg
    aaaa.jpg
    15.7 KB · Views: 449
Physics news on Phys.org
  • #2
Miike012 said:
I boxed the portion of the solution that I am questioning.

How come the number of invalid strings is only 3n-1 - an-1 and not
3(3n-1 - an-1) ?

As you can see there are three cases (Which are to the right of the black box)

In all the three cases, the portion boxed in red is a string of length n-1 and does not have any consecutive numbers

Case 1:
The first number is a 1, then the second number must also be a 1
so that the string has a pair of consecutive numbers

Case 2
The first number is a 2, then the second number must also be a 2
so that the string has a pair of consecutive numbers

Case 3
The first number is a 0, then the second number must also be a 0
so that the string has a pair of consecutive numbers
This is not true. There is no requirement that the "pair of consecutive numbers" be the first two. For example, 100 is a valid string with n= 3.
 
  • #3
HallsofIvy said:
This is not true. There is no requirement that the "pair of consecutive numbers" be the first two. For example, 100 is a valid string with n= 3.

The string of length n has the requirment that it must have a pair of consecutive numbers, so if the 2nd term through the nth term of the string don't have a pair of consecutive numbers then the first term and second term must be the same inorder to satisfy the requirement.
 
  • #4
Miike012 said:
I boxed the portion of the solution that I am questioning.

How come the number of invalid strings is only 3n-1 - an-1 and not
3(3n-1 - an-1) ?

As you can see there are three cases (Which are to the right of the black box)

In all the three cases, the portion boxed in red is a string of length n-1 and does not have any consecutive numbers
I don't understand your logic. The reasoning in the attachment starts with an invalid string length n-1. By definition there are an-1 valid strings of that length, and obviously there are 3n-1 total strings of that length. Therefore there are (3n-1 - an-1) invalid strings length n-1. For each such invalid string, there is exactly one way of tacking on an nth (at the given end) to produce a valid string length n.
If that doesn't help, I'll need you to spell out your own reasoning more clearly.
 

Related to Questioning Recurrence Relation: 3n-1 - an-1

1. What is a recurrence relation?

A recurrence relation is a mathematical equation that defines a sequence of numbers, with each term being defined in terms of one or more previous terms in the sequence.

2. How is the recurrence relation 3n-1 - an-1 related to the sequence 2, 5, 14, 41, ...?

The recurrence relation 3n-1 - an-1 is used to define the sequence 2, 5, 14, 41, ... where the first term is 2 and each subsequent term is found by multiplying the previous term by 3 and then subtracting 1.

3. What is the purpose of using a recurrence relation?

Recurrence relations are useful in solving problems that involve sequences of numbers or patterns. They can help establish relationships between terms in a sequence and can be used to predict future terms.

4. How do you solve a recurrence relation?

There are several methods for solving a recurrence relation, including substitution, iteration, and generating functions. The specific method used will depend on the complexity of the recurrence relation and the desired outcome.

5. Can recurrence relations be used in real-world applications?

Yes, recurrence relations can be used in various real-world applications, such as in finance, computer science, and physics. For example, they can be used to model population growth, analyze the efficiency of algorithms, and describe the motion of a pendulum.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • Precalculus Mathematics Homework Help
Replies
14
Views
3K
  • Precalculus Mathematics Homework Help
Replies
5
Views
672
  • Precalculus Mathematics Homework Help
Replies
10
Views
1K
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
2K
  • Precalculus Mathematics Homework Help
Replies
18
Views
861
  • Precalculus Mathematics Homework Help
Replies
3
Views
717
  • Precalculus Mathematics Homework Help
Replies
13
Views
2K
Back
Top