factorial complexity