Comparing Algorithms

5 views
Skip to first unread message

Afif Khaja

unread,
May 11, 2013, 8:04:57 PM5/11/13
to MCS 260 Google group
Hi Jeremy,
 
There are 2 questions that I'm still working on. I think Lowman gave notes on these but I can't understand what I wrote.
 
1. What happens when doubling the size for a sorting algorithm that is O(logn)?
   
     T of 2n / n = log(2n) / log(n). How do I simplify this? I think we have to use the lim at n --> infinity but I
                                                                                                  haven't figured out how to work this to completion.
 
1. What happens when doubling the size for a sorting algorithm that is O(nlogn)?
 
        T of 2n / n = (2n)log(2n) / (n)log(n). Same issue
 
The question is how to get the 2 out of the log() term. I tried looking up properties of logarithms but didn't find anything useful.
 
Thanks,
Afif

Jeremy Kun

unread,
May 12, 2013, 1:06:20 PM5/12/13
to Afif Khaja, MCS 260 Google group
This is middle school algebra. The log of the product is equal to the sum of the logs, etc. etc. This is why we learn math.

Jeremy Kun
Mathematics Graduate Student
University of Illinois at Chicago


--
You received this message because you are subscribed to the Google Groups "uic-mcs260-s13" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uic-mcs260-s1...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Afif Khaja

unread,
May 12, 2013, 1:23:03 PM5/12/13
to MCS 260 Google group
Good point. I'll tell my teachers that
Reply all
Reply to author
Forward
0 new messages