Initial conditions for recurrence relation

In summary, the conversation discusses the initial conditions for a function that counts the number of ways to climb a flight of n stairs by taking 1, 2, or 3 steps at a time. The suggested initial conditions are a0 = 1, a1 = 1, and a2 = 2, but there is a discrepancy with a2 possibly being equal to 3. More information is needed about the definition of a "way" and whether order matters in the sequence of steps. The speaker also mentions that it is always valid to choose convenient initial values for this type of problem.
  • #1
Mr Davis 97
1,462
44

Homework Statement


If ##a_n## counts the number of ways to climb a flight of n stairs if one can take 1, 2, or 3 steps at a time, then ##a_n = a_{n-1} + a_{n-2} + a_{n-3}##. What are the three initial conditions?

Homework Equations

The Attempt at a Solution


I would say that ##a_0 = 1## since there is one way to do nothing (and that is to do nothing), ##a_1=1##, since there is one way to take one step, and ##a_2 = 2##, since I could either take 1 step twice, or take two steps once. However, apparently it is correct that ##a_2=3##. Where am I going wrong?
 
Physics news on Phys.org
  • #2
More information is needed about what a 'way' is. Is every stride in a trip required to encompass the same number of steps, or can one go 3,1,2,1,3 for instance? If the latter is true then a 'way' is a possibly empty sequence of elements from the set {1,2,3}, that adds to n, with the usual convention that an empty sequence adds to zero. If the former then we add the requirement that all elements in the sequence are equal.

Nevertheless, under either approach , it should be the case that ##a_2=2##. Most likely the source contains an error.
 
Last edited:
  • Like
Likes Mr Davis 97
  • #3
Seems to me that:

You cannot include 0 steps - after all you could take that number of steps any number of times*;

I cannot see that a anything could be 3. Well you could have a3 =3 if you say that the order of the steps doesn't matter. In that case the problem is identical with finding the number of ways you can get an by additions of 1's, 2's and 3's, order not mattering. But if that is the rule, then you don't get your recurrence relation whereas you do if order matters. To see this it suffices to look at a1,a2, a3, a4 in both cases.

* You just don't need to worry about this being "true" or not at all! Because it is always valid for this kind of problem to take whatever a's are convenient as initial values. I expect you know that this problem has a general solution.
 

1. What is a recurrence relation?

A recurrence relation is a mathematical equation that defines a sequence of numbers where each term is defined in terms of previous terms in the sequence.

2. What are initial conditions for a recurrence relation?

Initial conditions for a recurrence relation are the starting values of the sequence that are used to calculate subsequent terms. They are necessary because a recurrence relation alone cannot determine a unique sequence without these initial values.

3. Why are initial conditions important in recurrence relations?

Initial conditions are important because they provide a starting point for the sequence and without them, the recurrence relation would not be able to produce a unique sequence. They also allow for the calculation of specific terms in the sequence.

4. How are initial conditions used in solving recurrence relations?

Initial conditions are used to determine the values of the first few terms in the sequence. Once these values are known, the recurrence relation can be used to calculate subsequent terms in the sequence.

5. Can initial conditions be modified in a recurrence relation?

Yes, initial conditions can be modified in a recurrence relation to change the starting point of the sequence. However, this may result in a different sequence being produced.

Similar threads

Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
18
Views
2K
Replies
1
Views
797
  • Precalculus Mathematics Homework Help
Replies
7
Views
948
  • General Math
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
9
Views
2K
Back
Top