2019 midterm sample solution
2019 final exam sample solution |
There will be one midterm and one final exam for the course. The midterm is worth 24% of your final grade, and the final exam is worth 40%.
The midterm will be held in class, scheduled for Tuesday March 5th, and will cover all material up to and including the labs and lectures on Marie/assembly language. The midterm will be closed book, closed notes, calculators and other electronics will not be permitted. A short reference sheet will be provided with the exam.
The final exam will be held in the VIU final exam period, on Tuesday April 23rd from 9am-noon in the gym. It will cover all course material, but will heavily focus on material not covered by the midterm. A short reference sheet will be provided with the exam. The final will be closed book, closed notes, calculators and other electronics will not be permitted.
You must pass the final exam to pass the course.
Practice midterms: version 1, version 2, some additional circuit practice, and the reference sheet
Practice finals: version 1, version 2, some additional discussion question practice, and the reference sheet
Programming practice for lisp and prolog
If you're looking for suitable small programming problems to practice on, try the ones below. Sample solutions for each of them can be found on the coding examples pages for lisp or prolog.
lisp: write functions to do each of the following
prolog: write sets of facts/rules to handle queries to do each of the following
Practice with finite state machines and regular expressions
Regex -> FSM For each of the regular expressions below, provide a finite state machine that recognizes the same language
(101 | 10101)+
(0 | 1(01*0)*1)*
FSM and regex For each of the languages described below, provide both a finite state machine and a regular expression for the language, where the alphabet used is [0-9A-F]
Practice with algorithm complexity For each of the code elements described below, explain whether their worst case complexity is constant-time, log-time, linear-time, quadratic-time, or exponential-time.