Need a help in bit-masks in TSP.

Revision en1, by Naithani, 2020-10-15 19:06:18

I want to iterate on masks such that all combinations of masks with only 1 bit missing first, then all combinations of masks such that 2bits are missing, and so on. This trick I need in TSP and I have used O(2^n) space. Is there any better way to do it in O(1).

Code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Naithani 2020-10-15 19:06:18 2096 Initial revision (published)