Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why prime factorization ?

Why prime factorization ?

Scheduled Pinned Locked Moved The Lounge
questionhtmlcom
70 Posts 25 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    ihoecken wrote:

    That means that the empty set is part of prime numbers (as it's part of every other set), by meaning of vacuous truth.

    Ok, obviously

    ihoecken wrote:

    That doesn't mean it contains only prime numbers.

    Why not?

    R Offline
    R Offline
    randomusic
    wrote on last edited by
    #50

    Here is another true funny one: "The set of non-primes does not contain only prime numbers" :)

    1 Reply Last reply
    0
    • V Vijay Rajanna

      Hi, This is basically a math question, but very much applicable to many of the computer algorithms. I know the fact that, - Any integer can be expressed as product of prime factors. - Prime factors can be used to find LCM and HCF - Prime factors can be used to check whether a number divides "N" ( N - Integer ) - Etc.. Etc... My question is.. Why this unique ability for prime numbers ? How is it possible that, any number can be expressed as product of prime factors ? What is it, which makes these prime numbers special ? I just found this article on web, which was informative, but was little hard to understand. Can someone explain me this mystery behind prime numbers, any links web resources is much appreciated.

      Regards, Vijay Blog : Amusement of a speculative mind...[^] Projects : Amusement of a dilettante mind...[^]

      S Offline
      S Offline
      Stefan_Lang
      wrote on last edited by
      #51

      What is your question? The definition of primes is that they cannot be divided (within the set of whole numbers) by any other whole number other than 1 or the number itself. Everything else you write is an immediate consequence of that definition. Ok, a bit more in detail: - Any non-prime can be expressed as product of prime factors. With the correction, this is really an immediate consequence and occasionally used as an alternate definition of what is a prime (as in: any number not expressable in that way is a prime) - Prime factors can be used to check whether a number divides "N" ( N - Integer ) Lets say that N=n1*n2*n3, where n1, n2, n3 are the prime factors of N. If a number M is divisible by N, then there is some integer K, so that K=M/N or: K=M/(n1*n2*n3) Now multiply both sides with (n2*n3), and you get K*n2*n3 = M/n1 As you can see there is an integer K1=K*n2*n3 for which K1=M/n1, and therefore n1 is a divisor of M. The same is true for n2 and n3 - both are divisors of M. Now that you know that if N is a divisor of N, then its prime factors are also divisors, you can turn that knowledge around: You test whether M is divisable by n1! If you find out that M is not divisible by n1, it means that it cannot be divisible by N either! - Prime factors can be used to find LCM and HCF Given two numbers N and M, you may express them as a product of prime factors N=n1*n2*...*nk and M=m1*m2*...*ml. (if N or M is a prime, there will only be one number n1 or m1 respectively. But that doesn't stop the following conclusion) HCF is the product of the factors you get from intersecting the two sets of prime factors. If you multiply that number by anything else, it will either no longer be a divisor of N, or of M. LCM is pretty similar, but I'm running out of time at this point ;) In any case, this property follows from the definition as well.

      1 Reply Last reply
      0
      • V Vijay Rajanna

        Hey Rage, That was a sharp, and precise reply. Thanks. The link for "Euclid's lemma" was helpful, however it builds other theorems based on the fundamental fact that " Any non prime number can be expressed as product of prime numbers". Lastly, what an explanation..

        Rage wrote:

        As you have pointed out, their properties can be used in a lot of algorithms. But this is the case for other "type" of numbers having other properties used in other type of algorithms. So your question is no easy to answer... It is like asking why knives are useful to cut something.

        I just loved it, But sadly.. This is what I want someone to answer for me.. :thumbsup:

        Regards, Vijay Blog : Amusement of a speculative mind...[^] Projects : Amusement of a dilettante mind...[^]

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #52

        Vijay Sringeri wrote:

        The link for "Euclid's lemma" was helpful, however it builds other theorems based on the fundamental fact that " Any non prime number can be expressed as product of prime numbers".

        There is nothing in mathematics that is not based on other proofs, assumptions and/or definitions. And there is a proof for that lemma.

        1 Reply Last reply
        0
        • V Vijay Rajanna

          Hi, This is basically a math question, but very much applicable to many of the computer algorithms. I know the fact that, - Any integer can be expressed as product of prime factors. - Prime factors can be used to find LCM and HCF - Prime factors can be used to check whether a number divides "N" ( N - Integer ) - Etc.. Etc... My question is.. Why this unique ability for prime numbers ? How is it possible that, any number can be expressed as product of prime factors ? What is it, which makes these prime numbers special ? I just found this article on web, which was informative, but was little hard to understand. Can someone explain me this mystery behind prime numbers, any links web resources is much appreciated.

          Regards, Vijay Blog : Amusement of a speculative mind...[^] Projects : Amusement of a dilettante mind...[^]

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #53

          Vijay Sringeri wrote:

          Why this unique ability for prime numbers ?

          Because God made it so.

          Vijay Sringeri wrote:

          How is it possible that, any number can be expressed as product of prime factors ?

          Because the big bang for this universe of all the multiverses made it so.

          Vijay Sringeri wrote:

          What is it, which makes these prime numbers special ?

          Gaea is the answer.

          Vijay Sringeri wrote:

          Can someone explain me this mystery behind prime numbers

          Classic logic. All of mathematics and many of the theoretical parts of sciences are based on proofs, assumptions and/or definitions. There is nothing else. You can look to basic philosophy for the answer but it will not provide one. But it might provide a better understanding of why there is no answer.

          1 Reply Last reply
          0
          • B BillWoodruff

            The complete lack of any mention of Zero in this discussion has sucked out all meaning for me, and left me inside a total vacuum. Since Zero multiplied, or divided (except of course Zero divided by Zero), by any number, natural perverted, or even fractional, will always be Zero: therefore Zero is the Prime of Primes, not to mention that Zero raised to any power remains Zero, not to mention that subtracting Zero from, or adding Zero to, any number leaves the number unchanged ! That any number divided by Zero is an infinity (whose ordinality, or Aleph, among other possible infinities: is ultimate ?) which cannot be conceptualized within linearly digital Turing/Von Neumann theoretical computational design, and must be expressed by some "place-holder" like "undefined," or "NaN," or will, on a practical level, in many circumstances crash a computer: is proof of its sacred power. Zero is the unique singularity of the transition between positive and negative numbers, thus equivalent to the Omphalos, the stone of the navel of the geo-body of the cosmos, which for the ancient Greeks was located at the shrine of the oracle at Delphi. I propose to you that the infinite set of all possible prime numbers is contained within the infinity created by Zero divided by Zero like a tiny foot in a huge shoe: lots of wiggle-room no matter what #1 does, or does not, do. best, Bill

            "Takuan Sōhō died in Edo (present-day Tokyo) in December of 1645. At the moment before his death, Takuan painted the Chinese character 'meng' ("dream"), laid down his brush and died."

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #54

            BillWoodruff wrote:

            That any number divided by Zero is an infinity

            Normal mathematics defines that as undefined, not infinity. A divisor that approaches an infinitely small value produces a value that approaches infinity.

            S 1 Reply Last reply
            0
            • R Ravi Bhavnani

              That is indeed the definition of a prime (a number with no +ive divisors other than 1 and itself). But the OP wrote "Any integer can be expressed as product of prime factors." and 1 is not a prime. /ravi

              My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

              K Offline
              K Offline
              KP Lee
              wrote on last edited by
              #55

              Actually, when I went to school, I was taught that 1 WAS a prime number because a prime number is one that can't be divided by any other number other than itself or 1. 1 was excluded from the rules defining additional prime numbers because if it wasn't, there would only be one prime number: 1. It comes in handy to remember 1 is a prime number when playing Ken-Ken. (IE 4 squares in 6X6 array multipled together is 24. That's [1,1,4,6], [1,2,2,6]), or [1,2,3,4]. You can't have any more combinations because of the rules of Ken-Ken.

              R 1 Reply Last reply
              0
              • V Vijay Rajanna

                Hi, This is basically a math question, but very much applicable to many of the computer algorithms. I know the fact that, - Any integer can be expressed as product of prime factors. - Prime factors can be used to find LCM and HCF - Prime factors can be used to check whether a number divides "N" ( N - Integer ) - Etc.. Etc... My question is.. Why this unique ability for prime numbers ? How is it possible that, any number can be expressed as product of prime factors ? What is it, which makes these prime numbers special ? I just found this article on web, which was informative, but was little hard to understand. Can someone explain me this mystery behind prime numbers, any links web resources is much appreciated.

                Regards, Vijay Blog : Amusement of a speculative mind...[^] Projects : Amusement of a dilettante mind...[^]

                K Offline
                K Offline
                KP Lee
                wrote on last edited by
                #56

                Vijay Sringeri wrote:

                What is it, which makes these prime numbers special ?

                A prime number is one that can't be divided by any other number other than itself or 1. I learned 1 was a prime, but excluded from the rules defining additional prime numbers because if it wasn't, there would only be one prime number: 1. The definition of a prime number makes it special.

                Vijay Sringeri wrote:

                How is it possible that, any number can be expressed as product of prime factors?

                One of the prime factors is 1. 1*3 is 3. ALL prime numbers can be multiplied by 1, therefore they are a product of prime factors. The rest of the numbers are products of prime numbers. (That you can then multiply 10 billion times by 1 if you want.) Actually, not any number is a product, any INTEGER number is a product of primes. You can never get 3.14157 as a product of primes. I take it back, ONLY positive numbers can be derived from prime products. 0 is not a prime, nor is -1. You can forget about immaginary numbers too. In the lexicon of numbering systems, primes are really limited.

                Vijay Sringeri wrote:

                Why this unique ability for prime numbers ?

                It's defined this way. (These statements also implies all the restrictions I mentioned.)

                1 Reply Last reply
                0
                • K KP Lee

                  Actually, when I went to school, I was taught that 1 WAS a prime number because a prime number is one that can't be divided by any other number other than itself or 1. 1 was excluded from the rules defining additional prime numbers because if it wasn't, there would only be one prime number: 1. It comes in handy to remember 1 is a prime number when playing Ken-Ken. (IE 4 squares in 6X6 array multipled together is 24. That's [1,1,4,6], [1,2,2,6]), or [1,2,3,4]. You can't have any more combinations because of the rules of Ken-Ken.

                  R Offline
                  R Offline
                  Ravi Bhavnani
                  wrote on last edited by
                  #57

                  See this definition[^] of a prime number.  According to this[^] source, 1 was considered a prime number in pre-19th century. /ravi

                  My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                  K 1 Reply Last reply
                  0
                  • R Ravi Bhavnani

                    See this definition[^] of a prime number.  According to this[^] source, 1 was considered a prime number in pre-19th century. /ravi

                    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                    K Offline
                    K Offline
                    KP Lee
                    wrote on last edited by
                    #58

                    In your first link it says :Many questions around prime numbers remain open, such as Goldbach's conjecture, which asserts that every even integer greater than 2 can be expressed as the sum of two primes, and the twin prime conjecture, which says that there are infinitely many pairs of primes whose difference is 2. It doesn't say all primes, but that wouldn't be true for 2. I could believe it's true for all odd prime numbers. Also, your first link is Wikipedia which is well known to have misstatements posted in it. Back to Golbach, if 1 isn't prime, his conjecture is kind of screwed with 4 and 6, no? Your second link is interesting, but the same quote that says that pre 19th century 1 was prime also lists several sources that printed 1 as a prime number up to 1956. I'd say that was post 19th century, but I don't know when it was published. If 1 isn't prime you can't reach a prime number by multiplying two numbers together, which gets back to your Wiki link which makes a point of saying natural numbers can be reached by multiplying prime numbers. Which is kind of weird because that is the definition of what IS a natural number. Like I said, I was TRAINED that 1 is a prime number, that was more than a decade after that book was printed. Of course we weren't known for being current, I don't know how many 48 star flags I saw. I remember our first 50 star flag being brought into school with teachers being really relieved to finally get a current flag. (No , I wasn't born pre 20th century. :) Almost middle.)

                    R 1 Reply Last reply
                    0
                    • K KP Lee

                      In your first link it says :Many questions around prime numbers remain open, such as Goldbach's conjecture, which asserts that every even integer greater than 2 can be expressed as the sum of two primes, and the twin prime conjecture, which says that there are infinitely many pairs of primes whose difference is 2. It doesn't say all primes, but that wouldn't be true for 2. I could believe it's true for all odd prime numbers. Also, your first link is Wikipedia which is well known to have misstatements posted in it. Back to Golbach, if 1 isn't prime, his conjecture is kind of screwed with 4 and 6, no? Your second link is interesting, but the same quote that says that pre 19th century 1 was prime also lists several sources that printed 1 as a prime number up to 1956. I'd say that was post 19th century, but I don't know when it was published. If 1 isn't prime you can't reach a prime number by multiplying two numbers together, which gets back to your Wiki link which makes a point of saying natural numbers can be reached by multiplying prime numbers. Which is kind of weird because that is the definition of what IS a natural number. Like I said, I was TRAINED that 1 is a prime number, that was more than a decade after that book was printed. Of course we weren't known for being current, I don't know how many 48 star flags I saw. I remember our first 50 star flag being brought into school with teachers being really relieved to finally get a current flag. (No , I wasn't born pre 20th century. :) Almost middle.)

                      R Offline
                      R Offline
                      Ravi Bhavnani
                      wrote on last edited by
                      #59

                      You make several good points.  I was also born close to the middle of the 20th century and was taught that 1 wasn't a prime number.  I leave it to the mathematicians to cast the deciding vote. /ravi

                      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                      1 Reply Last reply
                      0
                      • L Lost User

                        Math is broken.

                        ihoecken wrote:

                        This is no equivalence, because there are no members and so both statements are correct: It contains no non-prime member AND it contains no prime members.

                        Why is that a problem? That's just the result of a vacuous truth. ∀x∈X:P(x) and ∀x∈X:¬P(x) can both be true, that just implies that X is the empty set. No problems there. And the equivalence ∀x∈X:P(x) = ¬∃x∈X:¬P(x) is a real thing. So there you go, the statements are equivalent, but that means that an empty set can be typed (because a type is just a predicate as well - the elements of the empty set are of all types simultaneously but lets not get hung up on that, they don't exist anyway), and thus math is broken. QED.

                        S Offline
                        S Offline
                        Sentenryu
                        wrote on last edited by
                        #60

                        harold aptroot wrote:

                        and thus math is broken

                        yes, we know math is broken since the russell paradox.

                        harold aptroot wrote:

                        but that means that an empty set can be typed (because a type is just a predicate as well - the elements of the empty set are of all types simultaneously

                        you really want to get on the Principia mathematica? we both know that Kurt Gödel was the only one crazy enough to ready and understand it all.

                        I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                        L 1 Reply Last reply
                        0
                        • L Lost User

                          I don't get any of these arguments. There is nothing in it, yes, so what? "The nothing" can, so far, still be "zero prime numbers". Or zero of anything else for that matter because the same vacuous truth of "all elements are of type t" is true for all t. The definition of the empty set doesn't say anything about that.

                          ihoecken wrote:

                          Mathematically it's not true that it contains prime numbers. The definition says: There is nothing in it.

                          It doesn't have to contain prime numbers, it only has to contain only prime numbers, which is the same as saying that all numbers in it are prime, which is vacuously true.

                          S Offline
                          S Offline
                          Sentenryu
                          wrote on last edited by
                          #61

                          harold aptroot wrote:

                          because the same vacuous truth of "all elements are of type t" is true for all t.

                          yes, but that statement only holds true if there is an element. the empty se contains none.

                          I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                          E 1 Reply Last reply
                          0
                          • L Lost User

                            ihoecken wrote:

                            That means that the empty set is part of prime numbers (as it's part of every other set), by meaning of vacuous truth.

                            Ok, obviously

                            ihoecken wrote:

                            That doesn't mean it contains only prime numbers.

                            Why not?

                            S Offline
                            S Offline
                            Sentenryu
                            wrote on last edited by
                            #62

                            harold aptroot wrote:

                            ihoecken wrote:

                            That doesn't mean it contains only prime numbers.

                            Why not?

                            I'm no mathematician, but i guess it's because the empty set is also a subset of the set of all prime numbers. The thing is: as the empty set contains no elements, you can't proof nothing about the type of it's elements. This is one of the problems the Principia Mathematica had, that led Kurt Gödel to state that mathematica is incomplete.

                            I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                            1 Reply Last reply
                            0
                            • M Member 2053006

                              Vijay Sringeri wrote:

                              Why this unique ability for prime numbers ?

                              It is not a unique ability for prime numbers, it is just that these numbers can not be sub-divided any further. You can find the LCM and HCF using any numbers, but they will always be a combination of prime factorials, so using prime numbers is far easier.

                              Vijay Sringeri wrote:

                              How is it possible that, any number can be expressed as product of prime factors ?

                              Essentially because a prime number can not be divided and a non prime number can be. Any number n that is not prime has at least two divisors that are not 1 and n. These divisors are either prime or non prime. If they are non prime then by definition they follow the same rule as n. These numbers are smaller then n, so repeating this rule will always result in only prime divisors.

                              Vijay Sringeri wrote:

                              What is it, which makes these prime numbers special ?

                              The fact that they are prime and can not be divided.

                              S Offline
                              S Offline
                              Sentenryu
                              wrote on last edited by
                              #63

                              Member 2053006 wrote:

                              Any number n that is not prime has at least two divisors that are not 1 and n.

                              what about 4 ? AFAIK, for has only one divisor thats not 1 or 4, and it's 2...

                              I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                              1 Reply Last reply
                              0
                              • S Sentenryu

                                harold aptroot wrote:

                                and thus math is broken

                                yes, we know math is broken since the russell paradox.

                                harold aptroot wrote:

                                but that means that an empty set can be typed (because a type is just a predicate as well - the elements of the empty set are of all types simultaneously

                                you really want to get on the Principia mathematica? we both know that Kurt Gödel was the only one crazy enough to ready and understand it all.

                                I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #64

                                No, really, let's not get into that, it's a bit too crazy for me :)

                                1 Reply Last reply
                                0
                                • J jschell

                                  BillWoodruff wrote:

                                  That any number divided by Zero is an infinity

                                  Normal mathematics defines that as undefined, not infinity. A divisor that approaches an infinitely small value produces a value that approaches infinity.

                                  S Offline
                                  S Offline
                                  Sentenryu
                                  wrote on last edited by
                                  #65

                                  I think he was talking about Lim(1/0), that is infinity. for any other operation, 1/0 is undefined, just because no one can think what would be the result.

                                  I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                                  J 1 Reply Last reply
                                  0
                                  • S Sigismondo Boschi

                                    Because the "secret" factors A*B = C, with A prime and B prime, are the holy grail to break RSA, the asymmetric keys algorithm used world while to enforce security, with SSL, HTTPS, VPNs... Ruffly speaking, in RSA itself, C is "the public key" and its factorization, A and B "the private key". It is straightforward to find the factors for small numbers, but it happens that it is very hard to find such factors for large numbers (indeed - you need to extensively search for them). To date it has been possible to break up to a 768 bit RSA key (C is 768 bits long) by using a cluster of many hundred servers. Larger keys (1024, 2048 bits) are still considered secure (needed hundred years of cluster computing time for one single key) - and they will, until some strong improvement will be performed in number theory.

                                    S Offline
                                    S Offline
                                    Sentenryu
                                    wrote on last edited by
                                    #66

                                    +5 for a Computer Science answer.

                                    I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                                    1 Reply Last reply
                                    0
                                    • S Sentenryu

                                      I think he was talking about Lim(1/0), that is infinity. for any other operation, 1/0 is undefined, just because no one can think what would be the result.

                                      I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                                      J Offline
                                      J Offline
                                      jschell
                                      wrote on last edited by
                                      #67

                                      Limit(lim) is still a convergence sequence. Which is the same as what I said. And equating it to infinity is a misrepresentation of what it means mathematically.

                                      S 1 Reply Last reply
                                      0
                                      • B BobJanova

                                        Uh, I know what the empty set is. But the statement 'set S contains only thing X' is equivalent to 'set S has no members which are not X': in this case 'the empty set contains only primes' is equivalent to 'the empty set has no non-prime members'. And since it has no members at all, that is clearly true! The empty set also only contains blue items, non-prime items, even numbers, or any other set. Empties are weird like that, a bit like zero being divisible by everything.

                                        I Offline
                                        I Offline
                                        IndifferentDisdain
                                        wrote on last edited by
                                        #68

                                        I don't think those statements are equivalent, hence the issue. This is somewhat tangential to my favorite mind-bender: you're in a room with an angel, a devil and two doors, one leading to heaven, the other to hell. You don't know which being is the angel or devil, nor do you know which door leads the way. The angel will always tell the truth, and the devil will always lie. You can ask one being one question in order to save your soul; what do you ask? The answer to this question is similar to the issue of asserting those two statements are equal.

                                        1 Reply Last reply
                                        0
                                        • J jschell

                                          Limit(lim) is still a convergence sequence. Which is the same as what I said. And equating it to infinity is a misrepresentation of what it means mathematically.

                                          S Offline
                                          S Offline
                                          Sentenryu
                                          wrote on last edited by
                                          #69

                                          yes, you are right, i couldn't remember of the correct simbol to use, so i used equals, as that was what my mathematical analysis (that's how it's called in my universsity) used.

                                          I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups