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 HuskyCT; submissions not following these guidelines will
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 HuskyCT; submissions not following these guidelines will not
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 HuskyCT; submissions not following these guidelines will not
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
You don't believe me
Suppose I say I tossed a coin 40 t
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 time lower bounds hold for palindromes)
The best-known r
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)
Example 1:
10n = O(n log n) ?
c =?, n0= ? such that n n
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 => PrR [M(x,R)=1] = 0
Def: L BPP <=> poly-time random
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
Output: Number of inputs x cfw_0,1n : wi xi = t
Let's try a
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 from
scratch)
3) Combine the solutions to the subproblems
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 tapes counts towards space.
Configuration:
state,
conten
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 Multiplication
Input: Adjacency Matrix of G(V,E), M .
Recall: Mti,
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 , v5 ), (v1 , v17 ), (v2 , v3 )
Size: O(E)
Better for sp
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 possible given A, x.
What if we are first given A, are all
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 DFA but
Access to infinite tape,
1 0 0 1 .
initially con
Chapter 10
1. (a) After stage k the algorithm has generated a random permutation of 1, 2, ., k. It then puts element k + 1 in position k + 1; randomly chooses one of the positions 1, ., k + 1 and interchanges the element in that position with element k +
Julie Cappello
ECE 2001W 001
September 25, 2012
Computer Tools Session
E1. Resistive Circuit (DC Sweep Analysis)
Use a DC sweep of the voltage source and plot the resulting value of VX. (The voltage
source is called VSRC and it resides in the SOURCE libra
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 miles
=
3
1s
1m
2.54 cm 12 in 5280 feet
1s
Now set up
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
source. Therefore,
i b = 8 A
Next, note that the dependent
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 15
5
v2 v2 v1
5+
+
=0
2
5
Place these equations in sta
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
Two of the values, 3.5 V and 2.4 V, cause the op amp to
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 specific key length
-more combinatorial, should be easi
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 becoming
millionaire;
seeing the Colosseum reduces to flying t
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 HuskyCT; submissions not following these guidelines will no
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 HuskyCT; submissions not following these guidelines will
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 HuskyCT; submissions not following these guidelines will not