CSOR W4246 Fall 2017
Homework 4Theoretical part
Out: Saturday, Nov 11, 2017
Due: 11:59pm, Saturday, Nov 25, 2017
Please keep your answers clear and concise. For all algorithms you suggest, you must pr
AL FL
AL GA
AL MS
AL TN
AR LA
AR MO
AR MS
AR OK
AR TN
AR TX
AZ CA
AZ NM
AZ NV
AZ UT
CA NV
CA OR
CO KS
CO NE
CO NM
CO OK
CO UT
CO WY
CT MA
CT NY
CT RI
DC MD
DC VA
DE MD
DE NJ
DE PA
FL GA
GA NC
GA SC
GA
Algorithms for Data Science
CSOR W4246
Eleni Drinea
Computer Science Department
Columbia University
Lecture 8: Human coding
Outline
1 Recap
2 Data compression
3 Symbol codes and optimal lossless compr
Algorithms for Data Science
CSOR W4246
Eleni Drinea
Computer Science Department
Columbia University
Strongly connected components,
single-origin shortest paths in weighted graphs
Outline
1 Application
Search Trees and
Augmenting Data Structures
CS 4231, Fall 2017
Mihalis Yannakakis
1
Dictionary
Search/ Index structure
Maintain set S of items, each item has key and other info
Basic Operations:
Inser
Greedy Algorithms
CS 4231, Fall 2017
Mihalis Yannakakis
1
Optimization Problems
For given instance of the problem, there is a set
of feasible solutions, involving a number of
choices (or decisions)
CSOR S4231 Summer 2017
Homework 4
Out: Saturday, June 17, 2017
Due: 8pm, Monday, June 26, 2017
Please keep your answers clear and concise. For all algorithms you suggest, you must prove correctness an
Analysis of Algorithms, I
CSOR W4231
Eleni Drinea
Computer Science Department
Columbia University
Insertion sort, efficient algorithms
Outline
1 Overview
2 A first algorithm: insertion sort
3 Analysis
CSOR W4246Fall 2017
Homework 2 Solutions
1. Let P be a shortest u-v path passing through x. Note that, from x to v, P must necessarily
follow the shortest x-v path. Similarly, from u to x, P must foll
CSOR W4246 Fall, 2017
Homework 1
1. Solution
(a) The number of operations for this algorithm
P
Pn
Pn1 (ni)(ni+3)
T (n) = n1
< n3 for n 3
i=1
j=i+1 j i + 1 =
i=1
2
Hence, we can choose f (n) = n3 so th
4.1
Undirected graph
We would like to solve the s-t disjoint path problem for an undirected graph. The natural
approach is to duplicate every edge in the undirected graph G, and get a directed graph H
CSOR W4246 Fall 2017
Homework 2
Out: Monday, October 2, 2017
Due: 8pm, Monday, October 16, 2017
Please keep your answers clear and concise. For all algorithms you suggest, you must prove correctness a
CSOR W4246 Fall, 2017
HW1 Theoretical part (110 points)
Out: Friday, September 15, 2017
Due: 8pm, Tuesday, September 26, 2017
Please keep your answers clear and concise. For all algorithms you suggest
CSOR W4246 Fall, 2017
Homework 3 Theoretical part
Out: Friday, October 27, 2017
Due: 8pm, Friday, November 10, 2017
Please keep your answers clear and concise. For all algorithms you suggest, you must
Algorithms for Data Science
CSOR W4246
Eleni Drinea
Computer Science Department
Columbia University
Lecture 2: asymptotic notation, mergesort
Outline
1 Asymptotic notation
2 The divide & conquer princ
Algorithms for Data Science
CSOR W4246
Eleni Drinea
Computer Science Department
Columbia University
Shortest paths in weighted graphs (Bellman-Ford, Floyd-Warshall)
Outline
1 Shortest paths in graphs
Due: Thu Apr 16th at the start of class
Homework #4
CMSC351 - Spring 2013
PRINT Name
:
o Grades depend on neatness and clarity.
o Write your answers with enough detail about your approach and concepts
Data Structure and Algorithm
Homework #4
= Homework Reference Solution =
Problem 2.
(1)
Array extracted: 4 1 3 7 8 2
(2)
Icfw_
L0
num 0
/ record the value of the inserted numbers
/ record the number o
CSOR W4246 Fall, 2017
HW1 Theoretical part (110 points)
Out: Friday, September 15, 2017
Due: 8pm, Tuesday, September 26, 2017
Please keep your answers clear and concise. For all algorithms you suggest
Solving Recurrences and the
Master Theorem
CS 4231, Fall 2017
Mihalis Yannakakis
Recurrences
Arise in the analysis of recursive algorithms that reduce an
instance of a problem to smaller instances
F
Analysis of Algorithms and
Asymptotics
CS 4231, Fall 2017
Mihalis Yannakakis
Analysis of Algorithms
Correctness:
The algorithm terminates with the correct answer
Performance
Mainly Running time (Ti
Please supply the following information:
1. Name
2. Your UNI:
3. Program and year
4. List relevant background courses and where you have taken them (e.g. data structures, discrete
math, algorithms, ot
Homework Submission Guidelines
Please submit your homework in pdf form in Courseworks under Assignments.
The homework can be either typeset and converted to pdf, or it can be
handwritten and scanned t
COMS 4231: Analysis of Algorithms I, Fall 2017
Problem Set 1, due Thursday September 21, 11:59pm on Courseworks
Please follow the homework submission guidelines posted on
Courseworks.
For all algorith
Depth First Search
Acyclicity
Graph Components
CS 4231, Fall 2016
Mihalis Yannakakis
1
Depth-First Search from a source s
R
s
N-R
u
v
Policy: Choose edge (u,v) from R (reached nodes) to N-R
(unreache
Graphs
Representation
Breadth First Search
CS 4231, Fall 2016
Mihalis Yannakakis
1
Graphs
Graph G=(V,E)
set V of vertices or nodes represents collection of objects
set of edges (pairs of nodes) rep
Graphs
Representation
Breadth First Search
CS 4231, Fall 2016
Mihalis Yannakakis
1
Graphs
Graph G=(V,E)
set V of vertices or nodes represents collection of objects
set of edges (pairs of nodes) rep