TORONTO KIDS COMPUTER CLUB | admin
1
archive,paged,author,author-admin,author-1,paged-36,author-paged-36,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Author: admin

03 Jul Aurora Saturday 14:30 Python Practice 22.06.25.

Question:  Starting with x and repeatedly multiplying by x, we can compute x31 with thirty multiplications: x2 = x × x, x3 = x2 × x, x4 = x3 × x, …, x31 = x30 × x. The operation of squaring can be appreciably shorten the sequence of multiplications. The following is a way to compute x31 with eight multiplications: x2 = x × x, x3 = x2 × x, x6 = x3 × x3, x7 = x6 × x, x14 = x7 × x7, x15 = x14 × x, x30 = x15 × x15, x31 = x30 × x. This is not the shortest sequence of multiplications to compute x31. There are many ways with...

Read More