104A Homework 4Python

Java Python 104A Homework 4

July 2024

1 Theory

1.1 Iterative

Consider the iterative scheme

Write the scheme in matrix form. Give the iterative matrix. What happens when ω = 1? (Optional: verify why convergence is guaranteed for 0 < w < 2).

1.2 Norms

a) Show ∥x∥∞ ≤ ∥x∥2 ≤ √ n∥x∥∞ for x ∈ R n.

b) Show that if ∥A∥ < 1 then ∥(I − A) −1∥ ≥ 1+∥A∥/1 for any induced norm.

c) Let ∥A∥2 = p ρ(AT A). Show that ∥A∥2 ≤ p ∥A∥1∥A∥∞.

2 Coding

2.1 Energy Minimization

Consider a graph (V, E) with vertices V = {v0, . . . , vn} ⊂ R 2 and edges E = {(i, j)} connecting the vertices. For example an edge (4, 7) would connect the vertices v4, v7. We fix the position of a subset of the vertices W ⊂ V . Use the built-in Conjugate Gradient, (Python or R), method to minimize the energy

or in other words, find the vertices coordinates to minimize E. Hint: write the norm and solve for x and y coordinates separately. Use the function signature:

miniEner(int n verts,int[][] edges,int[] ind fixVerts, double[][] fixVertsCoords)

return double[][] vertsCoords         

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值