Solving Recurrence Relation for Letter Sequences with A, B, C

Click For Summary
SUMMARY

The discussion focuses on deriving a recurrence relation for the number of n-letter sequences composed of the letters A, B, and C, with the constraint that every A not in the last position must be followed by a B. The proposed relation is A(n) = A(n-1) + 2*A(n-1), which simplifies to A(n) = 3*A(n-1). The initial conditions are established with N(1) = 3 and N(2) = 7, confirming the approach to count valid sequences based on the last letter.

PREREQUISITES
  • Understanding of recurrence relations
  • Familiarity with combinatorial counting techniques
  • Basic knowledge of sequence notation (e.g., A(n) for terms)
  • Concept of constraints in sequence formation
NEXT STEPS
  • Research "advanced recurrence relations" for deeper insights
  • Study "combinatorial sequence generation" techniques
  • Explore "dynamic programming" for efficient sequence calculations
  • Learn about "constraint satisfaction problems" in combinatorial contexts
USEFUL FOR

Mathematicians, computer scientists, and students studying combinatorics or algorithm design, particularly those interested in sequence generation and recurrence relations.

bodensee9
Messages
166
Reaction score
0
Hello:

I am asked to find a recurrence relation for the number of n letter sequences composed of A, B, C where every A that is not in the last position is followed by a B.

So, would this be:

A| (we have A(n-2) sequences) + 0 if A is in the last position
B| we have A(n-1)
C| we have A(n-1)

So does this mean that A(n) = A(n-1) + 2*A(n-1)? But this seems simplistic ...

Thanks.
 
Physics news on Phys.org
hi bodensee9

I'm not too sure what you mean by A(n), if we let N(n) be number of terms given n letters, i would start by looking at n=1, and would take it to mean you can have:
A or
B or
C
so N(1) = 3, with 1 term ending in A

then for n=2
AB only (1)
BA, BB, BC (3)
CA, CB, CC (3)
so N(2) = 7, with 2 terms ending in A...
 
Hello:

Thanks, I solved it I think.

A(n-1) means "a sub n-1" because I don't know how to type subscript on here.

I took your approach, and broke things down into
A
B
C, etc.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
Replies
8
Views
3K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K