Bag difference (−Bag) algorithm based on TPMMS