title: algorithm - How would you determine the minimum number of multiplications to evaluate X to the power 30?
body: <p>In the book <a href="http://www.algorithmsforinterviews.com/" rel="nofollow">Algorithms for interviewers</a>, there is such a question:</p>
  
  <blockquote>
    <p>How would you determine the minimum number of multiplications to evaluate X to the power 30?</p>
  </blockquote>
  
  <p>Can anyone tell me what this question means? </p>
  
  <p>What means "evaluate X to the power 30"?</p>
  
  <p>There are two possible meanings, i guess:</p>
  
  <ol>
  <li>we have a X, then this question asks me "how many multiplications do I need to calculate X^30?". </li>
  <li>We have a X, then it asks me "What y is so that y^30 = X, and how many multiplications do you need to calculate y?"</li>
  </ol>
  
  <p>I don't know which of what I guess is correct, or it has a 3rd meaning?</p>
  
  <p>Thanks</p>