Two-State Turing Machine for Parenthesis Matching
Just a "source code" compendium of Raphael's answer: this a working version that uses the same trick (on state q1) and has tape alphabet:
_  ( ) [ { / \   (where $\_$ is the initial blank symbol) 

q0:  _ -&gt; accept  // accept on empty string and on balanced parenthesis
     ( -&gt; {,R,q1  // mark the first open "(" with "{" and goto q1
     ) -&gt; reject  // reject if found unbalanced ")"
     \ -&gt; /,L,q0  // go left
     / -&gt; \,R,q0  // go right

q1:  ( -&gt; [,R,q1  // replace "(" with "[" and continue ...
     ) -&gt; /,L,q1  // ... until first ")", replace it with "/" and goto left
     [ -&gt; \,R,q1  // found matching "(" bracket, goto right and search for another ")"
     _ -&gt; reject  // no ")" found for the first "{", reject
     { -&gt; \,R,q0  // this must be the last match, goto q0 and check if it is true
     \ -&gt; /,L,q1  // go left
     / -&gt; \,R,q1  // go right


You can see it at work using a Turing machine online simulator; the source code is:

0 _ Y r halt
0 ( { r 1
0 ) N r halt
0 \ / l 0
0 / \ r 0
1 ( [ r 1
1 ) / l 1
1 [ \ r 1
1 _ N r halt
1 { \ r 0
1 \ / l 1
1 / \ r 1


A final note: if you want to see how this technique can be pushed to the limit, read (and try to understand :-) the construction of the Universal Turing machine with 2 states and 18 symbols by Y. Rogozhin in "Small universal Turing machines"