

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The midterm exam for the cpsc 201: introduction to computer science course. The exam covers topics such as binary search trees, majority functions, and machine code. Students are required to write the type and function for a binary search tree, create a truth table and boolean expression for a majority function, construct a circuit using and and or gates, and understand machine code instructions.
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CPSC 201: Introduction to Computer Science Carsten Sch¨urmann Date: February 26, 2002
Friday, March 1, 2002.
Assume that we are given a binary search tree. A binary search tree
5
with the representation invariant that any tree of the form Node (left, x, right) satisfi It has the following form.
A majority function Mn(x 1 ,... , xn) is true if a majority of its inputs are true and f alse otherwise (assume n odd). In this assignment we study majority functions with three inputs.