 
  
  
   
  
 
      (The notation ``  '' denotes here and in the problems
      below base-2 logarithms.)
 '' denotes here and in the problems
      below base-2 logarithms.)
  
 
      (Hint: Construct an upper bound for the value of the sum
      using the   term, and a lower bound using the term
  term, and a lower bound using the term
        .)
 .)
 
           		 selectsort(  ):
 ):
      (  )		 		 for
 )		 		 for   to n-1 do
  to n-1 do
      (  ) 		 		 {
 ) 		 		 {   ;
 ;   ;
 ;
      (  ) 		 		 		    for
 ) 		 		 		    for   to n do
  to n do
      (  ) 		 		 		    		 if A[j] <  amin then
 ) 		 		 		    		 if A[j] <  amin then
      (  ) 		 		 		 		 		 {
 ) 		 		 		 		 		 {  ;
 ;   }
 }
      (  )
 ) 		 		 		   ;
 ;   }
  }
           		 		 }
  
 
 .
 .
       ,
 ,
 , in the case when n is a power of 2.
 , in the case when n is a power of 2.
      
          		 function   ;
 ;
          		 begin
     (  )		 		 if n=1 then return (A[1],A[1])
 )		 		 if n=1 then return (A[1],A[1])
          		 		 else begin
     (  )
 ) 		 		 		   ;
 ;
     (  )
 ) 		 		 		   
 
     (  ) 		 		 		 return
 ) 		 		 		 return   
 
          		 		 end
     		end   .
 .