How can we determine associativity of a binary structure from its Cayley table? [duplicate]

Solution 1:

Since the table is a two by two and associativity involves three elements, it is not as easy to check from the Cayley table. You could brute force it by checking every product of three elements. There is Light's associativity test: http://en.wikipedia.org/wiki/Light%27s_associativity_test

Solution 2:

Wikipedia says

It is not generally possible to determine whether or not an operation is associative simply by glancing at its Cayley table. [...] However, Light's associativity test can determine associativity with less effort than brute force.