Problem Set 3
Due at gradescope, Tuesday November 8, 2016
Problems 5 and 6 are team work (usual rules apply) and problems 1 to 4
are individual.
1. Weisberg 4th edition, 2.12.
2. These observations are from a time series. Answer a, b below ignoring
that.
CS224n is in this interstice
cartoon from xkcd.com
Natural Language Processing
CS224N/Ling284
Christopher Manning
Lecture 1
Lecture Plan
1. Human Language and Natural Language Processing: Their
nature and goals (10 mins)
2. Why is langu
CS224N/Ling284NaturalLanguageProcessing
Home Syllabus Textbook and Readings Grading Piazza OpenEdX
Calendar
Calendar
Mo
n
Tue
We
d
Thu
Fri
Se
p
21
Sep 22
Lecture 1: Introduction
Se
p
23
Sep 24
Lecture 2: Word
Alignment Models for
Statistical MT PA1 out
S
CS 161: Recitation 1 (Fall 2016) Solutions
Note: These are sketches for solutions to the problems planned for the recitation sections. Some of these
solutions may be incomplete or not entirely formal, but they should be detailed enough to allow you to com
CS 161: Homework 2 Solutions
Question 1
a. Let us first consider only horizontal lines. Although there are an infinite number of candidate horizontal
lines, we notice that if we consider only the top and bottom tangent lines (lets call them boundary
lines
CS 161: Homework 1 Solutions
Question 1
1. Consider the mapping between subsets of cfw_1, 2, ., and -bit binary strings where the element is
included in the subset if and only if the corresponding bit string has a 1 in the th position. This
mapping is bo
CS 161: Recitation 1 (Fall 2016)
Question 1
1. Order the following functions so that 1 = (2 ), 2 = (3 ), . . . , 6 = (7 ):
2
log 2
2 log
1/4
(log )4
4
100
2100
2. Each row in the following table describes the running time of two different algorithms tha
CS 161: Recitation 3 (Fall 2016) Solutions
Note: These are sketches for solutions to the problems planned for the recitation sections. Some of these
solutions may be incomplete or not entirely formal, but they should be detailed enough to allow you to com
CS 161: Recitation 2 (Fall 2016) Solutions
Note: These are sketches for solutions to the problems planned for the recitation sections. Some of these
solutions may be incomplete or not entirely formal, but they should be detailed enough to allow you to com
CS 161: Recitation 2 (Fall 2016)
Question 1
Given two arrays and of size and a number , determine whether there is a pair of indices (, ) such
that [] + [] = .
Question 2
Suppose you have sorted arrays, each with elements, and you want to combine them int
A Statistical MT Tutorial Workbook
Kevin Knight
prepared in connection with the JHU summer workshop
April 30, 1999
1
The Overall Plan
We want to automatically analyze existing human sentence translations, with an eye toward building
general translation ru
CS 161: Recitation 3 (Fall 2016)
Question 1
We are given a sorted list of values and a target value , and we wish to find an index * such that
[* ] = . Suppose our computer can only compare elements in the following way: given two values and
, we can tell
For clarification on notation, notes in red have been made throughout
this document. In PA1, we are using notation that is mostly consistent
with this handout (pg. 6-16) but in other parts, there are discrepancies.
Do not be alarmed :)
Statistical Machine
CS 161: Recitation 4 (Fall 2016)
Most of this recitation will focus on review of red-black trees and universal hashing.
Question 1
Consider a hash table with buckets and elements. We assume that each element has a distinct key and
the simple uniform hashi
CS161, Lecture 4
Median, Selection, and the Substitution Method
Scribe: Albert Chen and Juliana Cook (2015), Sam Kim
Date: October 5, 2016
1
Introduction
Last lecture, we covered the master theorem,
which can be used for recurrences of a certain form. Re
CS 161, Lecture 5
Scribe: Sam Keller (2015), Seth Hildick-Smith (2016)
1
Quicksort
Date: October 10, 2016
Introduction
Today well study another sorting algorithm. Quicksort was invented in 1959 by Tony Hoare. You may
wonder why we want to study a new sort
CS 161: Homework 1
Due by October 7, 2016 at noon
Instructions: Please answer the following questions to the best of your ability. Provide full and rigorous
proofs and include all relevant calculations. When writing proofs, please strive for clarity and b
CS161 Lecture 7
Scribes: Ilan Goodman, Vishnu Sundaresan (2015),
Virginia Williams (2016), and Wilbur Yang (2016)
1
Binary Search Trees
Date: October 17, 2016
Binary Search Trees
Definition 1.1. A binary search tree (BST) is a data structure that stores e
Lecture 8
Scribes: Luke Johnston, Moses Charikar
1
Hash Tables, Universal Hash Functions, Balls and Bins
Date: October 19, 2016
Hash tables
A hash table is a commonly used data structure to store an unordered set of items, allowing constant time
inserts,
CS 161: Homework 3
Due by October 21, 2016 at noon
Instructions: Please answer the following questions to the best of your ability. Provide full and rigorous
proofs and include all relevant calculations. When writing proofs, please strive for clarity and
CS 161: Homework 4
Due by October 28, 2016 at noon
Instructions: Please answer the following questions to the best of your ability. Provide full and rigorous
proofs and include all relevant calculations. When writing proofs, please strive for clarity and
CS 161: Homework 2
Due by October 14, 2016 at noon
Instructions: Please answer the following questions to the best of your ability. Provide full and rigorous
proofs and include all relevant calculations. When writing proofs, please strive for clarity and
CS 161, Lecture 1
Scribes: Virginia V. Williams and Jessica Su
Edited by Wilbur Yang, Moses Charikar, and Ofir Geri
Introduction
Date: September 26, 2016
Optional reading for this lecture: Kleinberg-Tardos: p. 278-280 Sec 5.5, 6.9
1
Course information
Th
CS161, Lecture 2
Scribe: Michael P. Kim
Edited by Ofir Geri
1
MergeSort, Recurrences, Asymptotic Analysis
Date: September 28, 2016
Introduction
Today, we will introduce a fundamental algorithm design paradigm, Divide-And-Conquer, through a case
study of t
In this homework, we consider two tasks: word segmentation and vowel insertion. Word segmentation
often comes up in processing many non-English languages, in which words might not be flanked by
spaces on either end, such as in written Chinese or in long c
Welcome to your first CS221 assignment! The goal of this assignment is to sharpen your math and
programming skills needed for this class. If you meet the prerequisites, you should find these problems
relatively innocuous. Some of these problems will occur
Advice for this homework:
1. Words are simply strings separated by whitespace. Don't normalize the capitalization of words
(treat great and Great as different words).
2. You might find some useful functions in util.py. Have a look around in there before y
Stanley J Johnson
STATS216 Homework 4
March 12 2014
Problem 1(a)
getwd()
load("STATS216 Inclass session 2014-02-12 - body.RData")
#
# Setup training and test sets
set.seed(1240)
test = sort(sample(1:nrow(X), 200)
train = (1:nrow(X)[-test]
#
# Bind Y respo