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
Author Archives: Kate Poirier
Two equivalent formulations of the binary search algorithm
First version: procedure binary search (: integer, : increasing integers) while if then else if then location else location return location Second version: procedure binary search (: integers, , : increasing integers) if then return else if ( and … Continue reading
Posted in Discussion
Leave a comment
Homework due and quiz #8 – Wednesday, April 20
Section 8.2 #11 Section 8.3 #8, 10, 11, 12, 13
Posted in Homework, Quizzes
Leave a comment
Homework due and quiz #7 – Wednesday, April 13
Section 8.1 #2a, 8, 14, 28, 30 Section 8.2 #4, 8
Posted in Homework, Quizzes
Leave a comment
Quizzes #5 and #6
For those of you who would like a reminder about the questions from Quiz #5 and #6… Quiz #5 (Rosen 11.2 #2) Build a binary search tree for the words oenology, phrenology, campanology, ornithology, ichthyology, limnology, alchemy and astrology using … Continue reading
Posted in Quizzes
Leave a comment
March 30 Exercise (b) and (c) from lecture
Exercise: Complete parts (b) and (c) below for your team. Team parentheses: Let be the number of ways of parenthesizing a product of numbers. Team binary rooted trees: Let be the number of full, binary, rooted trees with leaves. Team … Continue reading
Posted in Discussion
Leave a comment
March 30 exercise (a) from lecture
Exercise: Complete part (a) below for your team. Team parentheses: Let be the number of ways of parenthesizing a product of numbers. Team binary rooted trees: Let be the number of full, binary, rooted trees with leaves. Team triangulated polygons: … Continue reading
Posted in Discussion
Leave a comment
March 28 exercise from lecture
In the following exercise, you will be defining sequences of numbers recursively. That means that a number in the sequence is defined in terms of the numbers coming before it. Exercise 1: Complete parts (a), (b), and (c) below for … Continue reading
Posted in Discussion
Leave a comment
Homework and quizzes
As announced today in class: You will no longer be permitted to use your homework during quizzes. You will still be able to hand in your homework for extra credit, but you must hand in your homework before a quiz … Continue reading
Posted in Homework, Quizzes
Leave a comment
Test 1 #8 (Version A)
Give a big-O estimate for the number of operations (where an operation is an addition or a multiplication) used in this segment of an algorithm: for to Explain your answer. Here there is one loop. In this loop, … Continue reading
Posted in Test #1 Solutions
1 Comment
Test 1 #7 (Version A)
Give a big-O estimate for the number of operations (where an operation is an addition or multiplication) used in this segment of an algorithm: for to for to Explain your answer. There are two loops: the loop and the … Continue reading
Posted in Test #1 Solutions
1 Comment