Calculating Possible Sequences with Constraints

  • Context: Undergrad 
  • Thread starter Thread starter pennypenny
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around calculating the number of valid sequences of length N that can be formed using the letters S, F, and T, with the constraint that F and T cannot be adjacent. The conversation explores various methods and approaches to solve this combinatorial problem.

Discussion Character

  • Exploratory
  • Mathematical reasoning

Main Points Raised

  • One participant introduces the problem of counting sequences of length N filled with S, F, or T, emphasizing the constraint that F and T cannot be next to each other.
  • Another participant suggests a step-by-step approach to calculate the number of valid sequences by considering the endings of the sequences for different lengths.
  • A different approach is proposed that involves calculating total permutations and then adjusting for the constraint by treating F and T as a single unit, while also considering their internal arrangements.
  • One participant requests a detailed explanation to avoid double-counting in the proposed method of fixing F and T together.

Areas of Agreement / Disagreement

Participants present multiple competing views on how to approach the problem, with no consensus reached on a single method or solution.

Contextual Notes

The discussion does not resolve the mathematical steps involved in the proposed methods, and assumptions regarding the definitions of valid sequences may vary among participants.

Who May Find This Useful

Individuals interested in combinatorial mathematics, sequence generation, or those facing similar constraints in sequence problems may find this discussion relevant.

pennypenny
Messages
2
Reaction score
0
Suppose there are N positions.

For each position, one can fill it with S,F or T.

There is one constraint that F and T cannot be next to each other. This means that a filling with FT in the sequence or TF in the sequence is not allowed.

For example, if N = 5. We have FSSTT, SFSTT are valid sequences, but SFTFS is not.

Can anyone help me with calculating the number of possible sequences?
 
Physics news on Phys.org
Here is a possible way to solve this:
For N=1, how many strings ending with S are possible?
For N=1, how many strings ending with F or T are possible?
For N=2, how many strings ending with S are possible, and how does that follow from the previous values?
For N=2, how many strings ending with F or T are possible, and how does that follow from the previous values?
...
 
Thank! This helps:)
 
Find total number of permutations first.
Now fix F and T together as 1 letter.Now total number of letters is 4 (in the case where N = 5).Find total number of cases for this (note that F and t can permute among themselves in 2 factorial ways so multiply your answer by 2) and subtract this from the total number of permutation you obtained the first case.
 
Can you show how you would do this in detail, to avoid double-counting of strings like TFSFT?
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K