Deterministically computing reduction numbers of polynomial ideals