Aisenfield
April 16, 2024, 02:54:33 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Mods > Gods; Administration Center > Olympus
 
  Home Help Arcade Gallery Staff List Login Register  

Prime Factorization

Pages: [1]   Go Down
  Print  
Author Topic: Prime Factorization  (Read 288 times)
0 Members and 1 Guest are viewing this topic.
Paul the Abstinence Panther
Resident
*
Offline Offline

Gender: Male
Posts: 389


No, Paddleton, no!!!



Badges: (View All)
Sixth year Anniversary Fifth year Anniversary Level 4 Linux User Combination
« on: July 23, 2010, 05:50:42 pm »

Hey, decaying remnants of Aisenfield! Yesterday, I re-learned prime factorization and realized that I don't intuitively get it.

Basically, prime factorization is saying that any number can be represented by a product of prime numbers. In order to do this, you divide by the smallest prime number that will yield an integer result, then repeat.

60, for example.
60/ 2 = 30.
30/2  = 15
15/3  = 5.

5 is the greatest prime factor.

What I have trouble grasping, though, is how I know that simply dividing by 3 during the first step couldn't give me a bigger prime factor? Why is always dividing by the smallest option the best choice?
Report Spam   Logged

Share on Facebook Share on Twitter

CM
ovelrord
Resident
*
Offline Offline

Posts: 1211




Badges: (View All)
Search Nineth year Anniversary Eighth year Anniversary Seventh year Anniversary Linux User
« Reply #1 on: July 23, 2010, 06:53:55 pm »

Is it necessarily the best? If you keep dividing by prime factors in any order, you'll have a list of numbers among which the largest will be obvious.

Say, if we look at the number 210,
210 / 7 = 30
30 / 2 = 15
15 / 5 = 3
3 / 3 = 1

So my prime factors are 3, 7, 2, and 5. It's evident that 7 is the largest; what does the order really matter? Dividing a number n by the smallest factor each time just ensures that the last factor is the largest, because you'll have eliminated everything smaller than it. You don't know what the GPF is, and the lowest prime factor is the only number you know won't eliminate the GPF (unless n is a prime number).
Report Spam   Logged

pıɐs ǝɥs 'ɟɹɐ

suıɐɯop ʇuǝıqɯɐ ʎןɥbıɥ ɹǝɥʇo puɐ ǝɔuɐuosǝɹ ɔıʇɐɯoɹɥɔuɐd pǝssǝɹdǝp-ןɐpǝd uı ɹoıʌɐɥǝq uosɹǝd-ʇɹoɥs ɟo ǝɔuɐɔıɟıubıs ǝɥʇ pǝɹǝpuod 'uoıʇɐɔıɟıpoɯ ɹǝɥʇɹnɟ ǝuobɹǝpun buıʌɐɥ 'bop ɐ 'uʎןǝʌǝ
Paul the Abstinence Panther
Resident
*
Offline Offline

Gender: Male
Posts: 389


No, Paddleton, no!!!



Badges: (View All)
Sixth year Anniversary Fifth year Anniversary Level 4 Linux User Combination
« Reply #2 on: July 23, 2010, 11:52:40 pm »

That was remarkably clear. I pretty much get this now. CM, you are god.
Report Spam   Logged


Pages: [1]   Go Up
  Print  
 
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy