home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.programming      Programming issues that transcend langua      57,431 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 56,831 of 57,431   
   Tim Rentsch to Tim Rentsch   
   Re: Another little puzzle   
   25 Dec 22 09:30:55   
   
   From: tr.17687@z991.linuxsc.com   
      
   Tim Rentsch  writes:   
      
   > Ben Bacarisse  writes:   
   >   
   >> Tim Rentsch  writes:   
      
   [pulled up from further on in the responded-to posting]   
      
   > [By "conventional average" I mean a time/direction A such that]   
   >   
   >     A that minimizes { Sum_{i=1,n} difference(A, t(i))^2 }   
   >   
   > where 'difference' means the shorter arc length.   
      
   [...]   
      
   >>> The "conventional average" metric can be calculated in O(n*n).   
   >>   
   >> By which I presume you mean and /not/ in O(n).  (Big O is just an   
   >> upper bound.)   
   >   
   > What I mean is I have an algorithm that runs in time proportional   
   > to n*n.  I suspect that there is an algorithm with better big-O   
   > behavior (probably O( n * log n )), but I don't actually have one   
   > to show, so I simply gave the best big-O result that I knew.   
      
   After some further thought I have convinced myself that there is   
   indeed an algorithm that is O( n * log n ).  The idea isn't that   
   complicated, but it's tedious, so I haven't actually implemented   
   it.  Perhaps someone will be interested to take that as a challenge   
   problem.   
      
   And who knows, maybe there is an algorithm with even better big-O   
   performance.  At least for now that's above my pay grade.   
      
   (and of course, Merry Christmas...)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca