An implementation of dynamic programming algorithm for computing a maximum-weight independent set of a path graph