Calculating Possible Sequences with Constraints

  • Thread starter Thread starter pennypenny
  • Start date Start date
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?
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...

Similar threads

Replies
2
Views
2K
Replies
15
Views
2K
Replies
18
Views
2K
Replies
5
Views
2K
Replies
5
Views
1K
Replies
1
Views
1K
Back
Top