complexity derivation