Thursday, January 19, 2006

Oh My!

"No matter how many times you save the world, it always manages to get back in jeopardy again. Sometimes I just want it to stay saved! You know, for a little bit? I feel like the maid; I just cleaned up this mess! Can we keep it clean for... for ten minutes!" - Mr. Incredible (The Incredibles)

News you might find interesting: "Report: Disney in serious talks to buy Pixar"

Other stuff:

Not much to report. The week is coming to the close. I have a bunch of assignments to grade over the weekend. I am currently having office hours. Yep, I am not that busy. What is less then not busy? Anyway...

This morning in my algorithms class we discussed that if you have two algorithms as a solution to a problem. The first solution has a time complexity of O(2^n). The second solution has a time complexity of O(n^2). Is it possible for the first solution to be better than the second? I will post the answer as a comment so you can see if you are correct!


Steph said...

Yes it is possible for the second solution to be worst then the first solution.

You don't believe me? From a first hand glance the 1st solution is exponential (i.e., not good). This totally leads us to believe that the second is always better.

However, lets say that the coefficient for the second solution is a 100^100. For small n, the 1st solution is faster. Yikes. It is one of those finer points that often cause us to stop and think...well at least I took a moment...

Stephanie said...

Oh Steph, I got it right! My brain has not turned to mush in the few weeks since I have been out of school!