algorithm invention