THINGS TO KNOW ABOUT PRIME NUMBERS:
(courtesy of factmonster.com: View Website)
- The only even prime number is 2. All other even numbers can be divided by 2.
- If the sum of a number's digits is a multiple of 3, that number can be divided by 3.
- No prime number greater than 5 ends in a 5. Any number greater than 5 that ends in a 5 can be divided by 5.
- Zero and 1 are not considered prime numbers.
- Except for 0 and 1, a number is either a prime number or a composite number. A composite number is defined as any number, greater than 1, that is not prime.
To find out if a number is prime or not, you should try dividing it by 2, and see if you get a whole number. If you do, then it is not a prime number. If you don't get a whole number, next try dividing it by prime numbers: 3, 5, 7, 11 (9 is divisible by 3) and so on, always dividing by a prime number.
POLARIZATION:
Polarization is a term used to describe what happens to light as it travels through a filter. Only light rays that have a certain characteristic get through the filter. We can take the same term and apply it to a set of numbers, or anything that can be converted to a number.
In this case, polarization is the process of filtering the data set to get a subset containing only the ones with a certain characteristic. We'll call anything in that set as having been polarized with respect to that rule. For example, a set of numbers between one and ten, and we modulus 3 as the rule.
If we filter those numbers to a set with the characteristic of having modulus 3 equal to 1 you have the set 1, 4,7 ., and 10 So we can say the set is polarized with respect to 1. The set polarized using this rule with respect to zero is 0,3, 6, and 9. So a set is polarized with respect to N if when you filter it you end up with the same set.
When we say the data is "polarized with respect to", we are describing what has happened to the data as it goes through the Hash Split node. The Hash Split node contains the polarization rule and works off two rules:
* A feature of the Hash Split node is that if the node splits 4 ways, the output of the pins are polarized with respect to 4, but also with respect to 2 because 2 is a factor of 4. Because it has this feature, the Hash Split node uses a modulus (remainder) function internally.
* The other part of the rule is the number of pins, and the column or expression the Hash Split node is operating on to determine which pin the data goes out on. Just like with light polarization, if you filter it twice with a polarized filter and the second filter is set up in the same direction as the first, the second filter does nothing. The light is already polarized with respect to that direction.
Likewise, if something is polarized with respect to 2 it is not at all polarized with respect to 3. If you run the 2 polarized data sets through a 3 way Hash Split node, then it becomes polarized to both 2 and 3, so it is polarized with respect to 6 (3 * 2) also.
EXAMPLE:
Let's say you split some data six ways (2 * 3 = 6, a non-prime number). Then you take any of the outputs and run them through a Hash Split node using the same key but 3 ways. You'll find that each one of those records goes to the same output pin. But take the same data and split it 7 ways (a prime number) and then run that output through a 3 way Hash Split the same way as you did with the one with 6 and you'll find that the records are distributed randomly as you'd expect.
Comments
0 comments
Please sign in to leave a comment.