p
CS106X Winter 2008
Handout 29
CS106X Midterm Examination
February 19, 2008
This is an opennote, openbook, opencoursereader exam. You can refer to any course handouts, handwritten lecture no
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 7
Counting practice
You can leave your answers as (tidy) expressions involving factorials, binomial coecients, etc.,
rath
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 7
Counting practice
You can leave your answers as (tidy) expressions involving factorials, binomial coecients, etc.,
rath
CS106X
Handout 27S
February 5th, 2011
Winter 2011
CS106X Midterm Examination Solution
Thanks to the herculean efforts of a dedicated TA and seven wonderful section leaders, your
exams are graded and s
Programming Methodology and Abstractions (Accelerated)
CS 106X

Winter 2011
CS107
J Zelenski
Handout #4
May 2, 2011
Solutions to midterm practice
Midterm Exam: Friday, May 6th 11am12:15pm
Nvidia Auditorium (if your last name begins with AL)
Cubberly Auditorium (if your last
Programming Methodology and Abstractions (Accelerated)
CS 106X

Winter 2011
CS107
J Zelenski
Handout #3
April 29, 2011
Midterm practice
Midterm Exam:
Friday, May 6th 11am12:15pm
Nvidia Auditorium (if your last name begins with AL)
Cubberly Auditorium (if your last name begi
CS106X Winter 2008
Handout 37
CS106X Practice Final
March 13, 2008
Exam Facts: When: Friday, March 21st at 8:30 a.m. in 260113 When: Friday, March 21st at 3:30 p.m. in Gates B03 You can take the
CS106X
Handout 30
February 16th, 2011
Winter 2011
Assignment 5: Huffman Encoding
Assignment was pulled together by Owen Astrachan (of Duke University)
and polished by Julie Zelenski.
Huffman encoding
CS106X
Handout 19
January 19th, 2011
Winter 2011
Assignment 3: Boggle
Thanks to Todd Feldman for the original idea behind the Boggle assignment.
The Game of Boggle
Those of you fortunate enough to hav
CS61C Spring 2013
Section 4 (Video Notes)
MIPS Procedures
Overview:
There are only two instructions necessary for creating and calling functions: jal
and jr. If you
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
Section 4
1. (a) What is the inverse of 5 modulo 7?
(b) Do the following numbers have inverses modulo 3580225?
5, 16, 10
Give a sho
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 4
Set Theory and Logic
A set is a collection, or family, of objects called elements.
Two sets are equal if they contain t
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Discussion Section 2
Bad Proofs
Consider the following false statement and its (necessarily!) erroneous proof.
Theorem 1 2=1.
Pro
CS70 Discrete Mathematics for Computer Science, Spring 2013
Section 1
1. Use truth tables to show that (A B ) A B and (A B ) A B . These two equivalences
are known as DeMorgans Law.
2. Which of the fo
GDB Tutorial
A Walkthrough with Examples
CMSC 212  Spring 2009
Last modied March 22, 2009
GDB Tutorial
What is gdb?
GNU Debugger A debugger for several languages, including C and C+ It allows you to
Chapter 10
Storage Management
[These notes are slightly modified from notes on C storage allocation from the Fall 1991 offering of CS60C. The language used is C, not Java.]
10.1
Classification of stor
GDB QUICK REFERENCE
GDB Version 5
Essential Commands gdb program [core] debug program [using coredump core] b [le:]function set breakpoint at function [in le] run [arglist] start your program [with ar
inst.eecs.berkeley.edu/~cs61c
UCB CS61C : Machine Structures
Lecture 12 Caches I
20130220
Lecturer SOE
Dan Garcia
Midterm exam in 12 days!
A Mountain View startup promises to do
Dropbox one better.
Section 4 Brief Solutions
1) a) 3  use extended gcd or by inspection
b) N, Y, Y  only numbers that are coprime with 3580225 have inverses
2) a) x = 8, y = 5  multiply the second equation by 5, subt
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 5
Divisibility Tests
Let a N be a natural number, and dene the sign of a to be the quantity formed by alternatively
addin
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
Section 9 Supplement
Note that some of these problems are drawn from and inspired by a book by Frederick Mosteller,
Fifty Challengi
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 14
AC Transit
You arrive at the bus stop at a uniformly distributed random time in the morning.
1. The 51B comes by this
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 14
AC Transit
You arrive at the bus stop at a uniformly distributed random time in the morning.
1. The 51B comes by this
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 13
Carpets
The length of a carpet produced by a textile mill is uniformly distributed between 20 feet and 25
feet, while
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 13
Carpets
The length of a carpet produced by a textile mill is uniformly distributed between 20 feet and 25
feet, while
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 12
Joint distribution
Mr and Mrs Brown decide to continue having children until they either have their rst girl or until
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 12
Joint distribution
Mr and Mrs Brown decide to continue having children until they either have their rst girl or until
CS 70
Discrete Mathematics and Probability Theory
Fall 2012
Vazirani
1
Section 11
Indicator Variables.
Denition. An indicator variable for an event A is a random variable 1A : cfw_0, 1, such
that for