# Khan/khan-exercises

### Subversion checkout URL

You can clone with
or
.
Older
100644 81 lines (71 sloc) 3.64 kB
 319325c Add exercise -- simplifying fractions marcia authored May 31, 2011 1 2 3 4e4cb9b lint: tabs->spaces and jQuery->$for exercises beneater authored Apr 10, 2012 4 5 Simplifying fractions 6 319325c Add exercise -- simplifying fractions marcia authored May 31, 2011 7 8 4e4cb9b lint: tabs->spaces and jQuery->$ for exercises beneater authored Apr 10, 2012 9
10
11 randRange( 3, 15 ) 12 randRange(2, 10) * FACTOR 13 randRange(2, 10) * FACTOR 14 getGCD( NUM, DENOM ) 15 getPrimeFactorization( GCD ) 16 17 (function(){ 18 var factorValue = 1; 19 var factorDisplay = ""; 20 var hint = "\\dfrac{" + NUM + "}{" + DENOM + "}"; 21 $.each( GCD_FACTORS, function( index, value) { 22 factorValue *= value; 23 var dot = index === 0 ? "" : "\\cdot "; 24 factorDisplay += dot + value; 25 hint += "= \\dfrac{" + factorDisplay + "\\cdot" + NUM / factorValue + "}{" + factorDisplay + "\\cdot" + DENOM / factorValue + "}"; 26 }); 27 hint += "= \\dfrac{" + NUM / GCD + "}{" + DENOM / GCD + "}"; 41941b3 White space clean up marcia authored Jul 8, 2011 28 4e4cb9b lint: tabs->spaces and jQuery->$ for exercises beneater authored Apr 10, 2012 29 return hint; 30 })() 31 32
319325c Add exercise -- simplifying fractions marcia authored May 31, 2011 33 4e4cb9b lint: tabs->spaces and jQuery->$for exercises beneater authored Apr 10, 2012 34 35 36 Simplify to lowest terms. 37 \dfrac{NUM}{DENOM} 38 NUM / DENOM 39 40 319325c Add exercise -- simplifying fractions marcia authored May 31, 2011 41 4e4cb9b lint: tabs->spaces and jQuery->$ for exercises beneater authored Apr 10, 2012 42
43

There are several ways to tackle this problem.

075f731 Space/tab cleanup spicyj authored Jun 2, 2011 44 4e4cb9b lint: tabs->spaces and jQuery->$for exercises beneater authored Apr 10, 2012 45 What is the greatest common factor (GCD) of NUM and DENOM? 075f731 Space/tab cleanup spicyj authored Jun 2, 2011 46 4e4cb9b lint: tabs->spaces and jQuery->$ for exercises beneater authored Apr 10, 2012 47

NUM = getPrimeFactorization( NUM ).join( "\\cdot" )
48 DENOM = getPrimeFactorization( DENOM ).join( "\\cdot" )

d8a4f39 Issue #5950: Improve hints for simplifying fractions kd5bjo authored Nov 10, 2011 49 4e4cb9b lint: tabs->spaces and jQuery->$for exercises beneater authored Apr 10, 2012 50 \mbox{GCD}(NUM, DENOM) = GCD_FACTORS.join( "\\cdot" ) = GCD 075f731 Space/tab cleanup spicyj authored Jun 2, 2011 51 4e4cb9b lint: tabs->spaces and jQuery->$ for exercises beneater authored Apr 10, 2012 52

53 \dfrac{NUM}{DENOM} 54 = \dfrac{NUM / GCD \cdot GCD}{ DENOM / GCD\cdot GCD} 55

075f731 Space/tab cleanup spicyj authored Jun 2, 2011 56 4e4cb9b lint: tabs->spaces and jQuery->$for exercises beneater authored Apr 10, 2012 57 58 \hphantom{\dfrac{NUM}{DENOM}} 59 = \dfrac{NUM / GCD}{DENOM / GCD} \cdot \dfrac{GCD}{GCD} 60 075f731 Space/tab cleanup spicyj authored Jun 2, 2011 61 4e4cb9b lint: tabs->spaces and jQuery->$ for exercises beneater authored Apr 10, 2012 62

63 \hphantom{\dfrac{NUM}{DENOM}} 64 = \dfrac{NUM / GCD}{DENOM / GCD} \cdot 1 65

66

67 \hphantom{\dfrac{NUM}{DENOM}} 68 = \dfrac{NUM / GCD}{DENOM / GCD} 69

70
71

You can also solve this problem by repeatedly breaking the numerator and denominator into common factors.

72
73

For example:

74

HINT

75
76
77
78
319325c Add exercise -- simplifying fractions marcia authored May 31, 2011 79 cf02179 Strip trailing whitespace spicyj authored Jun 1, 2011 80
Something went wrong with that request. Please try again.