Quantcast
Channel: VBForums - Maths Forum
Viewing all articles
Browse latest Browse all 118

Permutations and Combinations

$
0
0
Hi, I have a couple of basic math questions - regarding permutation and combination.

I have an 8x8 Grid, where each cel can have a binary value; 0 or 1.

If I want to find out how many variations there are, I would use the following.

8 x 8 = 64

2^64 = 18446744073709551616

First question: Did I do that correctly, to find out how many possible variations there are?

2nd question - more advanced:

Since this is a Grid, which is a square, there are four possible rotations. So after I find all the variations, I would like to remove all duplicates per rotation.

So if I take all the variations: 18446744073709551616 and say I rotate it right 90 degrees and compare the 2 result sets, then I should just be able to divide by 2 correct?

So since I have 4 rotations, then I would do: 18446744073709551616 / 4. The result of that is 4611686018427387904 unique variations.

Now once I have that done, the numbers seem simple. The big problem is knowing what pattern to keep. In other words, I believe the number is completely correct,

but with the result set of 4611686018427387904 variations, I would like to generate all the patterns that were not duplicates.

The reason for this is, that if I go through all the variations 18446744073709551616, then doing a comparison on the fly would be very time consuming. I am trying to figure

out, what the best on the fly comparison would be if I start at 0 and move all the way up to 4611686018427387904, skipping what I would discard and only saving the correct

patterns. I know there must be some simplification system, based on 4 that I can use to skip while I increment and keep only the unique patterns, but my math level is not very extensive, so I am trying to

figure out what that simplified method might be.

If you can help, thank you very much.

Viewing all articles
Browse latest Browse all 118

Trending Articles