complexity theory definition