How did you attached primes to this problem?
May be you have mixed up some problems?
You are right. I mixed up this problem with another one I saw. And misreading this one, I assumed one has to form a list of prime numbers in ascending order of B(n). That was confusing me a lot. :)
Now that the ...
Search found 6 matches
- Wed Nov 13, 2002 3:01 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10232 - Bit-wise Sequence
- Replies: 12
- Views: 5559
- Tue Nov 05, 2002 9:37 am
- Forum: Algorithms
- Topic: Generating Combinations
- Replies: 5
- Views: 4478
- Tue Nov 05, 2002 8:22 am
- Forum: Algorithms
- Topic: Generating Combinations
- Replies: 5
- Views: 4478
- Sat Nov 02, 2002 5:10 am
- Forum: Algorithms
- Topic: Generating Combinations
- Replies: 5
- Views: 4478
Generating Combinations
I usually generate combinations using this method:
If I have to generate combinations of k out of n elements, I loop from 0 to 2^n-1 and count the number of 1s in each iteration's bin. representation. If the number of 1s=k, I pick it and the positions with 1s are considered IN and others OUT. This ...
If I have to generate combinations of k out of n elements, I loop from 0 to 2^n-1 and count the number of 1s in each iteration's bin. representation. If the number of 1s=k, I pick it and the positions with 1s are considered IN and others OUT. This ...
- Sat Nov 02, 2002 2:08 am
- Forum: Volume 102 (10200-10299)
- Topic: 10232 - Bit-wise Sequence
- Replies: 12
- Views: 5559
10232 -- is this the method?
I've been thinking about 10232 (Bitwise Sequence), and the only way I could think of doing it was to
Taking 2 to be the only prime number with one 1 in its bin. representation,
1. generate all combinations of two 1s (with 1 in the last placeholder, as even numbers are not to be checked), and ...
Taking 2 to be the only prime number with one 1 in its bin. representation,
1. generate all combinations of two 1s (with 1 in the last placeholder, as even numbers are not to be checked), and ...
- Mon Oct 28, 2002 7:25 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10232 - Bit-wise Sequence
- Replies: 12
- Views: 5559