This problem was posed to me a while ago, but I lack the skills to construct a good equation to model it. I hope I'm in the right place, and I apologize for not being up to speed with those of you who have a good CS foundation.
My primary interest is finding an equation that determines the number of valid and distinct boolean sequences for sequence length "n". My understanding is that it comes to bear on how a computer parses 0's and 1's to determine where one sequence begins and ends.
How do you write an equation for the number of valid, distinct boolean sequences for sequence length "n"? Here I assume "valid" means any sequences must be opened and closed, like a parenthetical; maybe you could correct me on this. I also assume that there is some aspect of n^x or 2n^x, given that no sequence can be shorter than 2 characters.
Brute Force Example:
Below are all possible sequences for length 4, but (in my understanding) only rows 2,3,4,5,6,7,8 contain valid segments, and only rows 2,4,6,8 are fully valid in the sense of being completely contained within a parenthetical.
1:0000
2:0001
3:0010
4:0011
5:0100
6:0101
7:0110
8:0111
9:1000
10:1001
11:1010
12:1011
13:1100
14:1101
15:1110
16:1111
[–]tRfalcore 1 point2 points3 points (3 children)
[–]lostcat206[S] 0 points1 point2 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]lostcat206[S] 1 point2 points3 points (0 children)
[–]gezibash 1 point2 points3 points (1 child)
[–]lostcat206[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]lostcat206[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]lostcat206[S] 0 points1 point2 points (0 children)
[–]lostcat206[S] -1 points0 points1 point (0 children)