Header Image
Creative Commons image courtesy of Flickr user StormPetrel1-
Recent Posts
Recent Comments
- In the Spotlight: MAT2540 – Discrete Structures and Algorithms II – The Open Road on Links
- OpenLab Workshop for Opening Gateways Fellows | 2018-2019 Opening Gateways Faculty Seminar on Final Exam Review
- Eric on Eric’s Final Review
- Kate Poirier on Hints/reminders from today’s class
- Kate Poirier on Final Exam Review
Archives
Categories
Meta
Test #1 Review 3.3 #1– Mark Evertson
This entry was posted in Uncategorized. Bookmark the permalink.
Hi Mark. You’ve got the correct big-O complexity, but your explanation isn’t quite correct. You’re right that there are 3 possible values of . Similarly, there are 4 possible values of . For a fixed pair , is computed as . This means that for a fixed pair , there are two operations: one multiplication and one addition. So the total number of operations is , not . This is still a constant, so it’s as you said.
It turns out that this constant is also . Almost the same proof that $24$ is shows that it’s also .