wu :: forums
« wu :: forums - beginner qn - algorithm to simplify a fraction »

Welcome, Guest. Please Login or Register.
Nov 22nd, 2024, 4:03pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: Grimbal, ThudnBlunder, Eigenray, SMQ, towr, Icarus, william wu)
   beginner qn - algorithm to simplify a fraction
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: beginner qn - algorithm to simplify a fraction  (Read 814 times)
Valerfore
Guest

Email

beginner qn - algorithm to simplify a fraction  
« on: Aug 26th, 2004, 1:15am »
Quote Quote Modify Modify Remove Remove

Hi all
 
I hope this question doesnt insult your intelligence Tongue
given a fraction, say 6/12, how do you simplify it to its simplest term, 1/2?
 
Im a beginner cs student so would appreciate your help!
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: beginner qn - algorithm to simplify a fraction  
« Reply #1 on: Aug 26th, 2004, 1:33am »
Quote Quote Modify Modify

::divide both sides by their greatest common divisor
I think Euclid had a nice algorithm to find it..  
::
« Last Edit: Aug 26th, 2004, 1:35am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
John_Gaughan
Uberpuzzler
*****



Behold, the power of cheese!

5187759 5187759   john23874   SnowmanJTG
WWW Email

Gender: male
Posts: 767
Re: beginner qn - algorithm to simplify a fraction  
« Reply #2 on: Sep 7th, 2004, 8:13am »
Quote Quote Modify Modify

Can you find an algorithm that has a faster theta or omega time (not necessarily O()) than the one towr mentioned? There are algorithms that are faster in certain circumstances...
IP Logged

x = (0x2B | ~0x2B)
x == the_question
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board