Number of $n$ lettered words made out of $n$ A's and $n$ B's with specified conditions. 
Number of $n$ lettered words made out of $n$ A's and $n$ B's such that the number of A's from the left is at all times greater than the number of B's from the left. String needs to contain both letters $A$ and $B$.

From my understanding there has to be a minimum value for $n$ which goes at three and includes both A and B as 3:
$$AAB$$
For $n$ with a value of 4:
$$AAAB$$
$$AABA$$
For $n$ with value 5:
$$AAAAB$$
$$AAABA$$
$$AABAA$$
$$AAABB$$
$$AABAB$$
And so on...
From this we know that the minimum value of A in a string of $n$ letters is $\frac{(n+1)}{2}$ and a max value of B is $\frac{(n-1)}{2}$ for an odd integer $n$. A min value of A is $\frac{(n+2)}{2}$ and a max value of $\frac{(n-2)}{2}$ for an even integer $n$. And the string has to start with two A's.
.....
I am having trouble approaching the problem. Any hints appreciated(algebraic hints preferred).
Edit:

*

*I seemed to have misunderstood the condition specified to be followed in chunks of $A$ and $B$. The conditions do not apply in chunks.


*The string has to include both letters $A$ and $B$.


*The statement "$n$ $A$'s and $n$ $B$'s" is trivial and holds not value. Only the fact that both $A$ and $B$ have to be included in the string is necessary.
 A: Just to shorten my preceding answer, and to explicitly give you the mathematical expression, for words of length $n$ the answer is just the binomial coefficient
$$\left(n-1 \atop \lfloor\frac{n-1}2\rfloor\right)$$
where $\lfloor\cdot\rfloor$ is just the floor function, or in this case just integer division truncating the fractional part. (And I added that to my copy of the preceding answer's code, and it indeed checks. I can re-post that code if you actually want it for anything.)
Edit --   Oops, I hadn't noticed @ayan3095's Edit to his question, where he explicitly adds the constraint "2.The string has to include both letters A and B."    So I added that constraint to the code in the preceding answer, and the new numerically-generated results are simply one less than they were without the constraint.
So the new-and-improved (but very little changed) mathematical expression is that for words of length $n$ the answer is
$$\left(n-1 \atop \lfloor\frac{n-1}2\rfloor\right) - 1$$
By the way, as posted in the preceding answer, this is just (an alternative definition of) the central binomial coefficient, as discussed in detail at, e.g.,
    https://mathworld.wolfram.com/CentralBinomialCoefficient.html 
    https://archive.lib.msu.edu/crcmath/math/math/c/c178.htm 
And note that I never rigorously set up @ayan3095's problem and derived this solution. Instead, I just programmed the problem, generating a sequence of answers for $n=1,2,\ldots,20$ and then just googled that sequence of numbers, immediately finding the above links. Kind of like googling the answer to find the question, or something like that. So is this the new "new math"??? :)
In any case, this still leaves the issue of rigorously deriving the above answer ab initio from @ayan3095's question, which I have no idea how to approach. Maybe somebody else might care to take a stab at that.
