Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hw1/YushengZhao/p9_16.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# min(b') s.t A' x' + b' = b x'>= 0 and b' >= 0
# trivial solution is x' = 0 and b' = b
2 changes: 2 additions & 0 deletions hw1/YushengZhao/p9_6.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# standard DP problem
# needs $log(v_max)$ bits to describe $v_max$. Exponential time
7 changes: 7 additions & 0 deletions hw1/YushengZhao/p9_7.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# floor division of K rounds some weights to 0, such weights maybe added in correctly to solution
# very roughly
# ϵ ∝ Σ_i floor(v_i / K)
# ϵ ∝ floor(v_i / K) * l
# K ∝ l/ϵ
# but also need to supress v_max to be small, let
# K = v_max * l / ϵ
7 changes: 7 additions & 0 deletions hw2/YushengZhao/9_26.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# according to hint, when formula is satisfied, we have 1/2 - y_0/3 <= y_i <= 1/2 +y_0
# and to minimize f(x) need to maximize (y_i-1/2)^2, which is y_i at its upper bound and gives (y_i - 1/2)^2 = y_0^2, that gives lower bound of f(x) = -1/2y_0^2
# on the other hand if the formula is not satisfied, the bound of at least one y_i is 1/2 - y_0/3 <= y_i <= 1/2 +y_0, and the min f(x) is num unsat * y_0^2 - y_0^2/9 + sum_(sat clause) (y_0^2 - y_0^2) - y_0^2/2 + num_unsat * y_0^ / 2*n*9 which is at least 7/18 y_0^2

# using hint, if formula is satisfied, y^* cannot be local minimum because can slide over y_0 axis a little bit, epsilon, and get lower. this is in the neighborhood of y^* because y_i' 's difference from y_i = 1/2 is bounded by the epsilon. And f(x)'s min is -y_0^2/2 when formula is satisfied. This min is smaller than f(y^*) = 0.

# so x_i means is y_i >= 1/2 - y_0/3 ?
1 change: 1 addition & 0 deletions hw2/YushengZhao/9_27.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# x0 + sum ki vi where Avi = 0 and Ax0 = b , use https://en.wikipedia.org/wiki/Smith_normal_form to solve