Is it possible to simulate a fair coin with a finite number of tossing of a biased one?
No, it's not possible.  Suppose the bias of the coin is $1/3$, and suppose you could guarantee termination.  Then there would be some $n$ such that this always terminates after $n$ coin flips.  Let $S$ denote the set of flip-sequences that causes your algorithm to output 0 (so that $\overline{S}$ is the set of flip-sequences that causes your algorithm to output 1).  The probability of your algorithm outputting 0 is equal to the probability of getting a flip-sequence in $S$, which is a sum of the form

$$\sum_{x \in S} {a_x \over 3^n}$$

where each $a_x$ is an integer.  Thus the probability of outputting 0 has the form $b/3^n$ where $b$ is an integer.  We want this to be $1/2$, for your algorithm to produce an unbiased bit of output.  However since $3^n$ is odd, there is no integer $b$ such that $b/3^n = 1/2$.  Therefore, no such algorithm can exist.