Complexity bounds for solving some tridiagonal systems of equations