TITLE: Splitting a string into 2 parts such that the number of 1's in part A are equal to the number of 0's in part B.
QUESTION [5 upvotes]: The full question is as follows. 
Prove that every binary string of length $n$ can be split down into 2 substrings where string $S = A.B$ such that the number of $0's$ in A is equal to the number of $1's$ in B. 
Example: 
a) String $010010$ can be split as $01.0010$. The number of $0's$ in A is $1$ and the number of $1's$ in B is $1$ too. 
b) String $11101000$ can be split as $1110.1000$
I am stumped, I don't know how to apply any of the classic proof techniques I usually use.

REPLY [2 votes]: A simpler argument:
The string can be split at the location where the length of A equals the number of 1s in S, and the length of B equals the number of 0s in S.
Let the number of 0s in S be $0_S$, the number of 0s in A be $0_A$, and the number of 0s in B be $0_B$, and define $1_S$, $1_A$ and $1_B$ similarly.
We know that $|A| = 0_A + 1_A$, but also $|A| = 1_S = 1_A + 1_B$
Therefore, $0_A + 1_A = 1_A + 1_B$, which implies that $0_A = 1_B$, as desired.