U.C. Berkeley CS270: Algorithms
Professor Vazirani and Professor Rao
Lectures 13, 14
Scribe: Anupam
Last revised
Lectures 13, 14
1
Streaming Algorithms
The streaming model is one way to model the problem of analyzing massive data. The
model assumes that t
CS 170
Fall 2014
Algorithms
David Wagner
HW 1
Due Sept. 5, 6:00pm
Instructions. This homework is due Friday, September 5, at 6:00pm electronically. It must be submitted
electronically via Pandagrader (not in person, in the drop box, by email, or any other
/-+(;21_)+ g L if V ,
: #E/L #93 m
sgwa htC'ID _
57MBC—Zj? *1 57%[0
(a+bi’) = Z, , 7
, 6295+ .6": az’ a 0+ i
nay—523315; «- 51.: L r ‘
a -é c0 5 2452';
' /
(131:5
"/1145 03/5 7 7 " W5 24:35:79/
7 , (1—1») a If 7 , , ,7 g
«all: 2» (a 9,05) i
' , A
Diagnosis and assessment
The what and the why of it
What?
The classification of disorders based on
symptoms (subjective) and signs (objective).
Why?
Facilitates communication among professionals
Demystifies deviant behavior for patient and
families
Current paradigms in
psychopathology
Scientific Paradigms
Conceptual framework that guides science
and scientists
Ontology: What is real?
Epistemology: How do we know things?
Methodology: How do we do science?
These beliefs are subjective and are
imm
Introduction and historical overview
1
A time of crisis
$79 billion
Annual indirect cost of mental illness to US economy (Office of the Surgeon
General, 1999)
24.4%
Americans who had a DSM-IV disorder in the past twelve months (WHO World
Mental Health S
Anokhi Kastia
25017423
GSI: Alice Hua
Friday 2-3 PM
Girl Interrupted (1999)
History: The primary character in the movie that we are analyzing is Susanna Kaysen played by
Winona Ryder. She is an eighteen year old, caucasian female from a privileged backgro
Multiplicative Weight Update Algorithm
or Learning with Experts
Notes adapted from cs270 lecture notes Rao & Vazirani, scribed by Anupam Prakash.
1
The multiplicative weights update (MWU) method
The multiplicative weights method is a very useful framework
U.C. Berkeley CS270: Algorithms
Professor Vazirani and Professor Rao
Lecture 15
Scribe: Anupam
Last revised
Lecture 15
1
Streaming Algorithms: Frequent Items
Recall the streaming setting where we have a data stream x1 , x2 , , xn with xi [m],
the availabl
Part b.) At each stage the problem gets split into 6 branches: a1b1, a2b2, a0b0, (a1 + a2)
(b1 + b2), (a0 + a2)(b0 + b2) and (a0 + a1)(b0 + b1). The problem size is cut by a third.
O(n) comes from adding up all the pieces together after the recursion is c
Problem Set 3 Solutions
1. The hats of n persons are thrown into a box. The persons then pick up their hats at random (i.e.,
so that every assignment of the hats to the persons is equally likely). What is the probability
that
(a) every person gets his or
Problem Set 1: Solutions
1. (a) A B C
(b) (A B c C c ) (Ac B C c ) (Ac B c C) (Ac B c C c )
(c) (A B C)c = Ac B c C c
(d) A B C
(e) (A B c C c ) (Ac B C c ) (Ac B c C)
(f) A B C c
(g) A (Ac B c )
A
A
B
C
(a)
A
B
C
C
(b)
(c)
A
B
A
B
B
C
(d)
A
B
A
C
C
(e)
(
Problem Set 10 Solutions
1.
or just use the formula for computing the random incidence pdf for a given
! !
interarrival pdf: ! ! = !
2.
3.
a) Using Markovs Inequality:
! !
for all a>0.
! ! 26
b) Using Chebyshevs Inequality:
we have
2
Problem Set 2: Solutions
1. (a) The tree representation during the winter can be drawn as the following:
0.8
Rain
0.2
No Rain
The forecast is
"Rain"
p
1-p
0.1
Rain
0.9
No Rain
The forecast is
"No Rain"
Let A be the event that the forecast was Rain,
let B
Problem Set 5: Solutions
1. (a) Because of the required normalization property of any joint PDF,
$
$
!
" 2 !" 2
" 2
23 13
2
2
2
1=
ax dy dx =
ax(2 x) dx = a 2 1
+
= a
3
3
3
x=1
y=x
x=1
so a = 3/2.
(b) For 1 y 2,
fY (y) =
"
y
a 2
3
(y 1) = (y 2 1),
2
4
ax
Problem Set 6: Solutions
1. Let us draw the region where fX,Y (x, y) is nonzero:
y
2
1
y-x=z
0
1
2
x
! x=2 ! y=x
The joint PDF has to integrate to 1. From x=1 y=0 ax dy dx = 73 a = 1, we get a = 37 .
!
9
2 3
x dx, if 0 y 1,
if 0 y 1,
14 ,
7
1
!
!2 3
3
Problem Set 4: Solutions
1. (a) From the joint PMF, there are six (x, y) coordinate pairs with nonzero probabilities of
occurring. These pairs are (1, 1), (1, 3), (2, 1), (2, 3), (4, 1), and (4, 3). The probability
of a pair is proportional to the sum of
Problem Set : Solutions
. We view the random variables T1 and T2 as interarrival times in two independent Poisson processes both with rate S as the interarrival time in a third Poisson process (independent from
the first two) with rate . We are interested