MichelleCorbettFacto..

advertisement
Purpose
How to guess which error someone made (from a given family of errors) when doing the
prime factorization algorithm, given their incorrect result as well as the known correct result.
Introduction
The Fundamental Theorem of Arithmetic states that every positive integer n > 1 can be
expressed as a unique product of primes. Prime factorization is an algorithm that computes this
unique product of primes for any positive integer n > 1 by using a factor tree. You begin with the
number in which you are trying to find its unique product of primes, n, and find two other
integers, a and b, such that ab=n. The integers a and b then create the two branches growing
from the original integer n. Prime factorization is a process consisting of that continual step for
each branch of the tree. The process stops for each branch when the factor is prime. For many
integers, there are multiple possibilities for this algorithm because there are multiple factors of
many integers. For example, 24 has factors 1, 2, 3, 4, 6, 8, 12, 24 and therefore has at least three
different factor trees for each pair of factors, excluding the trivial case of 1 and 21. The integer
could very well have more trees, depending on whether or not the factors of the initial iteration
have multiple pairs of factors to choose from, (or the second iteration, or the third..etc). For
example:
24
12
6
3
24
2
2
6
3
2
24
4
2 2
8
2
4
2
3
2
2
OR…12 has more factors
than 6 and 2…
24
12
3
2
4
2
2
Whichever factors one chooses to use for whichever iteration, the result will always be
the unique product of primes for the given positive integer. In conclusion, 24 = 2 βˆ™ 2 βˆ™ 2 βˆ™ 3 =
23 βˆ™ 3.
In general, every positive integer n is equal to a unique product of primes, 𝑛 =
𝑝1 𝑝2 𝑝3 β‹― π‘π‘š , where p is prime and m is an integer indicating the number of primes, including
the repeating primes. To simplify n, express the repeating primes exponentially; = π‘π‘–π‘ž π‘π‘—π‘Ÿ β‹― π‘π‘˜π‘  .
This implies that n is divisible by each prime, and more so by every combination of the product
of primes, where each individual π‘π‘š prime does not repeat itself. More explicitly, let’s use the
expanded version without simplifying the repeated primes with exponents. Say 𝑛 = 𝑝1 𝑝2 𝑝3 𝑝4 𝑝5
where any 𝑝𝑖 can equal𝑝𝑗 . So n is divisible by any 𝑝𝑖 as well as any combination of the products
of the primes without repeating 𝑝𝑖 . With brute force; 𝑝1 |𝑛, 𝑝2 |𝑛, 𝑝3 |𝑛, 𝑝4 |𝑛, 𝑝5 |𝑛, 𝑝1 𝑝2 |𝑛,
𝑝1 𝑝3 |𝑛, 𝑝1 𝑝4 |𝑛, 𝑝1 𝑝5 |𝑛, 𝑝2 𝑝1 |𝑛, 𝑝2 𝑝3 |𝑛, 𝑝2 𝑝4 |𝑛, 𝑝2 𝑝5 |𝑛, 𝑝3 𝑝1 |𝑛, 𝑝3 𝑝2 |𝑛, 𝑝3 𝑝4 |𝑛, 𝑝3 𝑝5 |𝑛,
𝑝4 𝑝1 |𝑛, 𝑝4 𝑝2 |𝑛, 𝑝4 𝑝3 |𝑛, 𝑝4 𝑝5 |𝑛, 𝑝5 𝑝1 |𝑛, 𝑝5 𝑝2 |𝑛, 𝑝5 𝑝3 |𝑛, 𝑝5 𝑝4 |𝑛, 𝑝1 𝑝2 𝑝3 |𝑛, 𝑝1 𝑝3 𝑝4 |𝑛,
𝑝1 𝑝4 𝑝5 |𝑛, 𝑝1 𝑝2 𝑝4 |𝑛, 𝑝1 𝑝2 𝑝5 |𝑛, 𝑝1 𝑝3 𝑝2 |𝑛, 𝑝1 𝑝3 𝑝4 |𝑛, 𝑝1 𝑝3 𝑝5 |𝑛, 𝑝1 𝑝4 𝑝2 |𝑛, … ,
𝑝2 𝑝3 𝑝4 𝑝5 |𝑛, and since 𝑝1 𝑝2 𝑝3 𝑝4 𝑝5 = 𝑛, then certainly 𝑝1 𝑝2 𝑝3 𝑝4 𝑝5 ∣ 𝑛. Of course, since
multiplication is commutative, there is repetition among this list of all of the divisors of n.
Error
Given the incorrect result of the prime factorization algorithm, we can use this idea of
divisibility of n by the combinations of n’s unique product of primes to guess where the mistake
occurred. For the incorrect result, one would simply go through all of the combinations of the
resulting primes, and for whichever products do not divide n, one or more of the factors of that
product will indicate where the mistake resulted. For example:
Correct result:
24 = 3 βˆ™ 2 βˆ™ 2 βˆ™ 2
So, without being redundant,
3|24, 2|24, 22 |24, 23 |24, 3 βˆ™ 2 = 6|24, 3 βˆ™
22 = 12|24, 3 βˆ™ 23 = 24|24
Incorrect result:
24 ≠ 3 βˆ™ 3 βˆ™ 2 βˆ™ 2 βˆ™ 2 βˆ™ 2
32 ∀ 24,
24 ∀ 24,
32 βˆ™ 22 ∀ 24
Since 3|24 and 2|24, this implies that there is
an extra prime factor of three and two.
Like suspected, every combination of the
products of primes divided 24.
To find the location of the error, consider the possible cases of what the factor tree may
have looked like by starting at the base of primes and working your way back up to n.
2
2
2
4
6
3
12
3
2
2
4
3
12
2
4
3
12
2
2
3
6
3
12
3
6
2
12
2
2
12
Now, by the structure of the tree, we must multiply 12 and 12, which is not 24. This seems like a
reasonable mistake, considering 12 + 12 = 24.
Download