recursion sbut there are still six to go howeverwe now have new number to work with so we try * = this uses four (because each is two multiplied togetherwe need to use up four more sbut now we have to work withand * = uses exactly eight (because each has four sso we've found the answer to with only three multiplications instead of seven that' (log ntime instead (ncan we make this process into an algorithm that computer can executethe scheme is based on the mathematical equality xy ( ) / in our example ( ) / or ( ) this is true because raising power to another power is the same as multiplying the powers howeverwe're assuming our computer can' raise number to powerso we can' handle ( ) let' see if we can transform this into an expression that involves only multiplication the trick is to start by substituting new variable for let' say that = then equals ( ) which is howeveraccording to the original equalitya can be written ( ) so ( ) again we substitute new variable for say =cthen ( ) can be written ( ) which also equals now we have problem we can handle with simple multiplicationc times you can imbed this scheme in recursive method--let' call it power()--for calculating powers the arguments are and yand the method returns xy we don' need to worry about variables like and anymore because and get new values each time the method calls itself its arguments are * and / for the = and = the sequence of arguments and return values would be = = = = = = = = returning = = returning = = returning = = returning = = when is we return the answer is passed unchanged back up the sequence of methods we've shown an example in which is an even number throughout the entire sequence of divisions this will not usually be the case here' how to revise the algorithm to deal with the situation where is odd use integer division on the way down and don' worry about remainder when dividing by howeverduring the