Student Corner:
[Submit Sec2]

[Lecture Notes]
[Discussion Board]

Course Info:
[Description]
[Course Outcomes]
[Outcomes Matrix]
[Course Schedule]
[Requirements/HW/Quizzes]
[Class Protocols]
[Exam Info]
[University Policies]
[Announcements]

HW Assignments:
[Hw1] [Hw2] [Hw3]
[Hw4] [Hw5] [Quizzes]

Practice Exams:
[Midterm] [Final]

# CS256 Fall 2021 Practice Midterm

Studying for one of my tests does involve some memorization. I believe this is an important skill. Often people waste a lot of time and fail to remember the things they are trying to memorize. Please use a technique that has been shown to work such as the method of loci. Other memorization techniques can be found off the Wiki Page for Moonwalking with Einstein. Given this, to study for the midterm I would suggest you:

• Know how to do (by heart) all the practice problems.
• Go over your notes at least three times. Second and third time try to see how much you can remember from the first time.
• Go over the homework problems.
• Try to create your own problems similar to the ones I have given and solve them.
• Skim the relevant sections from the book.
• If you want to study in groups, at this point you are ready to quiz each other.

The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

3. Let alpha=1.5. Suppose our current weight vector is [6,4,2] and theta=1. The training example x=[0.5,1,1] is a false positive. How would the perceptron rule update vec w and theta? How would the Winnow rule updatevec w and theta?
4. Let f be the Nested Boolean Function x_1 vv neg x_2 vv neg x_3 vv cdots vv neg x_n (only the first input is unnegated). Explictly compute the w_i's needed to show that f can be represented by a boolean threshold function
w_1x_1 + cdots w_nx_n geq theta_n,
with theta_n = k +1/2 for some integer k, w_i = \pm 2^{i-1}, and sum_{w_i<0}w_i < theta_n < sum_{w_i>0}w_i.
5. Write a Python function num_examples(n, k, epsilon, delta) which computes the number of training examples needed to PAC-learn an n-bit threshold function from a class of gradual threshold functions to within epsilon-error at least 1-delta fraction of the time.
7. Argue every polynomial time 1-tape Turing Machine algorithm can be computed by a threshold circuit of size at most O(p(n)^2).