An analysis of complexity