BRAID GROUP COHOMOLOGIES AND ALGORITHM COMPLEXITY