Added mdc for threshold (as opposed to graph size).