Homework 2
CSE 3502 - Theory of Computation
Assigned: September 8, 2015 Due on: September 17, 2015
Note: Please read the instructions for submitting homework and follow the homework policy
given on Hu
Homework 5
CSE 3502 - Theory of Computation
Assigned: October 13, 2015 Due on: October 22, 2015
Note: Please read the instructions for submitting homework and follow the homework policy
given on Husky
Homework 6
CSE 3502 - Theory of Computation
Assigned: October 20, 2015 Due on: October 29, 2015
Note: Please read the instructions for submitting homework and follow the homework policy
given on Husky
Homework 3
CSE 3502 - Theory of Computation
Assigned: September 15, 2015 Due on: September 24, 2015
Note: Please read the instructions for submitting homework and follow the homework policy
given on H
Sub-quadratic reductions
Detecting triangles = cycles of length 3
Input : G=(V,E)
Output: True if there is a triangle in G, False otherwise.
Example: (a,b,d) is a triangle in:
Using Matrix Multiplicat
Space Complexity
We consider space (a.k.a. memory, storage, etc.).
To consider space < n, we consider TM with:
Input tape: contains input, read-only
Work tapes: initially blank, read-write
Only work t
Divide and conquer
1) Divide your problem into subproblems
2) Solve the subproblems recursively, that is,
run the same algorithm on the subproblems
(when the subproblems are very small, solve them fro
Life can only be understood backwards;
but it must be lived forwards.
Soren Kierkegaard
Dynamic programming
It has nothing to do with programming languages
Problem: Input w1 w2 wn , t each 0 wi k
Outp
Homework 4
CSE 3502 - Theory of Computation
Assigned: September 22, 2015 Due on: October 1, 2015
Note: Please read the instructions for submitting homework and follow the homework policy
given on Husk
Homework 1
CSE 3502 - Theory of Computation
Assigned: January 23, 2017
Due on: January 30, 2017
Note: Please read the instructions for submitting homework and follow the homework
policy given on Husky
Circuit Variables
1
Assessment Problems
AP 1.1 Use a product of ratios to convert two-thirds the speed of light from meters
per second to miles per second:
2 3 108 m 100 cm
1 in
1 ft
1 mile
124,274.24
Homework 2
CSE 3502 - Theory of Computation
Assigned: January 30, 2017 Due on: February 6, 2017
Note: Please read the instructions for submitting homework and follow the homework policy
given on Husky
Randomized
Complexity
Classes
We allow TM to toss coins/throw dice etc.
We write M(x,R) for output of M on input x, coin tosses R
Def: L RP <=> poly-time randomized M :
x L => PrR [M(x,R)=1] 1/2
x L
Big-Oh
Definition:
f(n) = O(g(n) means
n0, c > 0 n N n n0,
f(n) cg(n)
Meaning: f grows no faster than g, up to constant factors
Big-Oh
Definition:
f(n) = O(g(n) means
n0, c > 0 n N n n0,
f(n) cg(n)
Lower bounds
We prove that SAT cannot be solved by an algorithm that runs
in space O(log n) and uses time nc for a constant c > 1.
This algorithm is allowed random-access to input.
(Without this, n2 t
Circuit Elements
2
Assessment Problems
a
AP 2.1
[a] Note that the current ib is in the same circuit branch as the 8 A current
source; however, ib is dened in the opposite direction of the current
sour
4
Techniques of Circuit Analysis
Assessment Problems
AP 4.1 [a] Redraw the circuit, labeling the reference node and the two node voltages:
The two node voltage equations are
v1
v1 v1 v2
+
+
=0
15 +
60
5
The Operational Amplier
Assessment Problems
AP 5.1 [a] This is an inverting amplier, so
vo = (Rf /Ri )vs = (80/16)vs ,
vs ( V)
0.4
2.0
vo ( V) 2.0 10.0
so
vo = 5vs
3.5 0.6 1.6 2.4
15.0
3.0
8.0
10.0
Circuits
TM: A single program that works for every input length
Circuits: A program tailored to a specific input length
Motivation:
-that's what computers really are
-cryptography: attackers focus on
Misc
What's a reduction?
Tapes,
NTIME, NEXP,
Padding,
PH
What is a reduction from A to B? It's the concept that if you
can do B, then you can also do A.
For example, buying a house reduces to becomin
Big picture
All languages
Decidable
Turing machines
NP
P
Context-free
Context-free grammars, push-down automata
Regular
Automata, non-deterministic automata,
regular expressions
Turing Machines
Like D
Data structures
Organize your data to support various queries using little
time and/or space
Given n elements A[1.n]
Support SEARCH(A,x) := is x in A?
Trivial solution: scan A. Takes time (n)
Best pos
Graph Algorithms
Representations of graph G with vertices V and edges E
V x V adjacency-matrix A: Au, v = 1 (u, v) E
Size: |V|2
Better for dense graphs, i.e., |E| = (|V|2)
Adjaceny-list, e.g. (v1 ,
Kolmogorov Complexity
Suppose I say I tossed a coin 40 times and got:
1010101010101010101010101010101010101010
Suppose I say I tossed a coin 40 times and got:
1010101010101010101010101010101010101010