EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 4
1. The Bellman-Ford algorithm. Consider a directed, weighted graph with vertex set
cfw_1, . . . , n. We can represent such a graph by a matrix W Rnn , where Wij is the
weight of the edge (i, j) if t

EE365: Shortest Path Example
1
Stochastic shortest path example
1
2
n1
n
chain of n = 100 nodes
move from node 10 to node 90 in T = 100 steps
can move forward one node, move backward one node, or stay put
at each time step, lightning strikes with probabil

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 7
1. The squared norm of a linear function. Download an updated version of the class le
linear_function.m from the course website.
(a) Let f (x) = Ax + b be a linear function. Show that g(x) = f (x) 2

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 8
1. Dijkstras Algorithm. In this problem, you will write an implementation of Dijkstras
algorithm, and use it to nd the shortest path in a social network.
Consider a weighted, directed graph with ver

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 6
1. LQR with random dynamics matrix. We consider the dynamical system
xt+1 = At xt + But + wt ,
t = 0, 1, . . . ,
where xt Rn , ut Rm . We assume that wt are IID, with wt N (0, W ). Unlike the
standa

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 5
1. A rened inventory model. In this problem we consider an inventory model that is
more rened than the one youve seen in the lectures. The amount of inventory at time
t is denoted by qt cfw_0, 1, .

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 3
1. Managing a data center. You are the manager of a data center oering a particular
service to customers (e.g., computing power, le retrieval, serving web pages). In this
problem we consider a very

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 2
1. Monte Carlo integration. Consider a unit circle inscribed in a square, as shown below.
+1
x2 0
1
0
x1
+1
Each of the small circles drawn on this gure represents a random point that was
generated

EE365, Spring 2013-14
Professor S. Lall
EE365 Homework 1
1. Optimal disposition of a stock. You must sell a total amount B > 0 of a stock in two
rounds. In each round you can sell any nonnegative amount of the stock; by the second
round all of the initial

Welcome to CS103!
Three Handouts
Syllabus
Mathematical Prerequisites
Course Information
(Also available online if you'd like!)
Today:
Course Overview
Introduction to Set Theory
The Limits of Computation
Are there laws of physics
in computer science?
Key Q