You tell us For each expression, how would you pair the brackets using the criteria described in the question?
a.
())(()
012345
b.
()(())
012345
c.
)))(((
012345
b. is easy: \{(0,1),(2,5),(3,4)\} seems to fulfill all the criteria, to me ("(a,b)" means "pair the open bracket at index a with the closing bracket at index b").