Sorry about taking so long to post this (last) week's post, everything got a little busy and I may have gotten a little lazy.
Last week, we continued working with proofs, moving on to big Oh and big omega. Big Oh is the upper bound; the worst case is better than big Oh, while big omega is the lower bound, the worst case is at least as bad as big omega. We're continuing in on that this week. I haven't really found much else new lately, just a lot of proof structure that I feel I've got down, and examples of proofs.
Studying how many steps a program takes to run, which we've been exploring using sorting algorithms, is really helpful when writing your own code. You want to take as few steps as possible so you don't slow down your program, but it still has to do everything you want. Nested while statements really pile on the steps, changing running times from linear (n) to exponential (n^2) or even quadratic (n^3). I remember working on this in CSC108 last year, and we mentioned it a couple times in 148. Figuring out how to calculate how many steps are being taken, with the right constants, may take me a bit longer than I've spent on it so far, but I'm pretty confident I can figure it out.
Hope everyone did well on the second midterm!
No comments:
Post a Comment