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
construct a binary tree Construct the binary tree with prefix codes representing these coding schemes. a) a: 11, e: 0, t : 101, s: 100
Posted in Test #2 Review
2 Comments
Announcements from today’s class + OpenLab review assignment
- This Wednesday follows a Friday schedule, so I won’t see you again until Monday. Have a great weekend!
- Quiz #6/Homework #6 is due on Wednesday, March 30. Complete the following exercises to hand in:
- 11.2 #20, 38;
- 11.4 # 2, 6, 14, 16, 28;
- 11.5 # 1, 2, 6.
- Test #2 will cover material from chapter 11 and will be given in class on Monday, April 4. The last day to withdraw officially from the course is Monday, April 11; graded tests will be returned in class that morning.
- There is an OpenLab review exercise for Test #2, just like the one you had for Test #1. Choose any exercise from chapter 11 listed on the calendar or from the assigned homework, but make sure nobody has posted it yet. Don’t forget to select the “Test #2 Review” category from the right-hand-side of the screen before you publish your post. Your submission is due by 11:59pm on Friday, April 1. (This is not an April Fools joke!)
Posted in Homework, Quizzes, Test #2 Review
Leave a comment
Links for Monday’s class
Here are two links that will be useful to have handy for Monday’s class:
Something you can think about before Monday is why 2 might be better than 1. Does this remind you of something we’ve been talking about in class?
Posted in Discussion
Leave a comment
Homework due and quiz #5 – Wednesday, March 16
Section 11.2 #2, 4, 6, 8, 12
Posted in Homework, Quizzes
Leave a comment
Quizzes 1-4
There was a request from the audience to recap the quiz questions from the semester so far. If you were present for all 4 quizzes, your graded solutions are in your blue book and you can ignore the rest of this post. Here they are:
Quiz 1
Describe an algorithm that takes a list of distinct integers and finds the location of the largest even integer in the list or returns $0$ if there are no even integers.
Quiz 2
Show that is
but that
is not
.
Quiz 3
Pick one of the following pairs and show that and
have the same order.
and
and
and
and
and
Quiz 4 (team quiz)
(Teams were assigned either the bubble sort or the insertion sort algorithm)
- Determine the complexity of your team’s algorithm by counting the number of comparisons required. Ignore comparisons needed to determine whether the end of a loop has been reached.
- Apply your sorting algorithm to the set
. Show all the comparisons that are made and count the total number of comparisons. Check that this agrees with your answer from the first part.
Posted in Quizzes
Leave a comment