JOIN
 Select a Forum     Round Tables New Member Discussions News Discussions Algorithm Matches Marathon Matches NASA Tournament Lab TopCoder Cookbook High School Matches Sponsor Discussions Development Forums Design Forums Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings View: Flat (newest first)  | Threaded  | Tree Previous Thread  |  Next Thread Forums TopCoder Cookbook Algorithm Competitions - Rewriting Phase Iterating Over All Subsets of a Set << PREV    [ 1 2 ]
 Re: Iterating Over All Subsets of a Set (response to post by sjsupersumit) | Reply It's checking if bit k of i is set, since 1<
 Re: Iterating Over All Subsets of a Set (response to post by holomorph) | Reply How can we extend the idea of to generate subsets with k elements. I can simply iterate over all 1<<
 Re: Iterating Over All Subsets of a Set (response to post by d@rk_sh@dow) | Reply You can either use the method described above in Discussion (for m or less bits). Or you can use a more direct method described in NextBitPermutation here: http://graphics.stanford.edu/~seander/bithacks.html#NextBitPermutation
 Re: Iterating Over All Subsets of a Set (response to post by dimkadimon) | Reply the mapping from bit to subset is limited.when the set size is more than 32 or 64the subset number will be more than Integer.MIN_VALUE or Long.MAX_VALUE.
 Re: Iterating Over All Subsets of a Set (response to post by ZuBruce) | Reply You can always use a BigInteger. Anyway iterating over such large sets is going to be too slow.
 Forums TopCoder Cookbook Algorithm Competitions - Rewriting Phase Iterating Over All Subsets of a Set Previous Thread  |  Next Thread << PREV    [ 1 2 ]