# Khan/khan-exercises

Hints for fractions_cut_and_copy_1

1 parent b8ff2a6 commit 2773cd90a0093e761352504c30ace580451de664 jpulgarin committed
Showing with 26 additions and 2 deletions.
1. +26 −2 exercises/fractions_cut_and_copy_1.html
28 exercises/fractions_cut_and_copy_1.html
 @@ -1,5 +1,4 @@ - - + Fractions cut and copy 1 @@ -20,6 +19,9 @@ N_PARENT / D_PARENT N_OFFSPRING / D_OFFSPRING OFFSPRING / PARENT + D_PARENT === 1 ? D_OFFSPRING : D_PARENT + N_PARENT * ( D_PARENT === 1 ? D : 1 ) + N_OFFSPRING * ( D_OFFSPRING === 1 ? D : 1 )
@@ -65,6 +67,28 @@
+ +
+

The starting block of length CODE_PARENT units + can be rewritten as fraction( N_PARENT_EXPANDED, D ).

+

The goal block of length CODE_OFFSPRING units + can be rewritten as fraction( N_OFFSPRING_EXPANDED, D ).

+

Cutting the starting block by x pieces is the same as dividing it by x.

+
+

Therefore cutting the starting block into N_PARENT_EXPANDED pieces is the same as:

+

\dfrac{N_PARENT_EXPANDED}{D} ÷ N_PARENT_EXPANDED = + \dfrac{N_PARENT_EXPANDED}{D} \cdot \dfrac{1}{N_PARENT_EXPANDED} = \dfrac{1}{D}

+
+

Copying the resulting block y times is the same as multiplying it by y.

+
+

Therefore copying the resulting block N_OFFSPRING_EXPANDED times is the same as:

+

\dfrac{1}{D} \cdot N_OFFSPRING_EXPANDED = \dfrac{N_OFFSPRING_EXPANDED}{D}

+
+
+

Notice that we end up with a block the same size as the goal block.

+

Therefore the solution is to cut the starting block into N_PARENT_EXPANDED pieces and copy the resulting block N_OFFSPRING_EXPANDED times.

+
+