# publicKhan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

file 105 lines (83 sloc) 4.196 kb
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105     Square roots of perfect squares

0            0            randRange( 2, 12 )            getPrimeFactorization( N )

If you can't think of that number, you can break down Q into                its prime factorization and look for equal groups of numbers.

Let's draw a factor tree.

init({                        range: [ [-1, FACTORIZATION.length + 2], [ -2 * FACTORIZATION.length - 1, 1] ],                        scale: [30, 30]                    });                    label( [cx + 1, y], curr );

path( [ [cx + 1, y - 0.5], [cx, y - 1.5] ] );                    path( [ [cx + 1, y - 0.5], [cx + 2, y - 1.5] ] );                    y -= 2;                    cx += 1;                    curr = curr / factor;                    label( [cx - 1, y], factor );                    circle( [cx - 1, y], 0.5);                    label( [cx + 1, y], curr );

circle( [cx + 1, y], 0.5);

So the prime factorization of Q is PRIMES.join( "\\times " ).

N * N                    getPrimeFactorization( Q )                    PRIMES.slice( 0, PRIMES.length - 1 )                    Q

\Large{\sqrt{Q} = \text{?}}

N

\sqrt{Q} is the number that, when                        multiplied by itself, equals Q.

We're looking for \sqrt{Q}, so we want to split the prime factors into two identical groups.

We only have two prime factors, and we want to split them into two groups, so this is easy.

Q = PRIMES.join( "\\times " ), so N^2 = Q.

Notice that we can rearrange the factors like so:

Q = PRIMES.join(" \\times ") = \left(F_N.join( "\\times " )\right) \times \left(F_N.join(" \\times ")\right)

So \left(F_N.join( "\\times " )\right)^2 = N^2 = Q.

So N^2 = Q.

So \sqrt{Q} is N.

Something went wrong with that request. Please try again.