ECON 485 Problem Set 4Python

Java Python ECON 485

Problem Set 4

1. Consider a Stackelberg model of duopoly where p = 1 – q1 – q2, and firms have no cost of production.  Find the backwards induction outcome of the game.

2. Consider the following quantity-setting game with three firms i = 1,2 and 3.  The demand

function is P(Q) = 100 − Q, with Q = q1 + q2 + q3.  The production costs are: C(qi) = 20qi.

a.          Find the Nash equilibrium of this game when the firms choose their quantities simultaneously. Calculate each firm’sprofit.

b.          Find the Subgame Perfect Outcome if firm 1 is the leader and firms 2 and 3 move simultaneously after observing firm 1’s choice of q1 .  Calculate each firm’sprofit.

3. Reg is a key player for a basketball team owned by Geri.  Reg and Geri are embroiled in

negotiations over Reg’s salary for next year’s season. There are still three weeks remaining in the current year’s season, but Reg refuses to play until R ECON 485 Problem Set 4Python eg and Jerry have reached an agreement.

The following information is commonly known. Reg’s value to the team is $8 million, i.e., the team would lose that amount if Reg were to leave the team.  Each week Reg refuses to play, the team loses $200,000, and Reg separately loses $100,000 in penalties.  This is the last year of Reg’s contract, so if no agreement is reached, Reg will (starting next season) play for a different team, which has already offered Reg $3 million more than Reg’s current salary provides.  Should Reg indeed leave, Geri will acquire a new star player, who will add a value of $4 million to the team.  Reg and Geri are infinitely patient (so δ = 1).

a.          Suppose Geri and Reg take turns making a take-it-or-leave-it offer at the start of each of the three remaining weeks. What is the outcome of these negotiations if Geri gets to make the last offer?  Specifically, identify the increase in Reg’s next-season salary.  How does this amount change if Reg makes the last offer?

b         

### 曲线对齐概述 曲线对齐是指将两条或多条不同形式或位置的曲线通过某种变换使其尽可能重合的过程。这一技术广泛应用于计算机视觉、机器人学等领域,在处理三维点云数据时尤为重要。 #### Umeyama算法及其局限性 Umeyama算法是一种经典的用于估计两个点集之间刚体变换的方法,该方法能够有效地解决两组对应点之间的旋转和平移参数估计问题[^1]。然而,这种方法存在一些固有的缺陷: - 对噪声敏感; - 需要精确的一一对应的点匹配关系; - 只能处理无尺度变化的情况。 针对上述不足之处,研究者们提出了多种改进措施来增强鲁棒性和适用范围。 #### Horn四元数闭合求解算法 Horn提出的基于四元数表示的姿态估计算法提供了一种封闭式的解决方案,它不仅克服了传统矩阵分解方式可能遇到的小角度近似误差问题,而且能够在一定程度上缓解由于测量噪音带来的影响。具体来说,此方法利用四元数特性构建目标函数,并采用特征向量分析手段获得最优解。 ```python import numpy as np def horn_method(source_points, target_points): """ 使用Horn's Quaternion Method实现点云配准 参数: source_points (numpy.ndarray): 源点集合 target_points (numpy.ndarray): 目标点集合 返回: R (numpy.ndarray): 旋转变换矩阵 T (numpy.ndarray): 平移向量 """ # 计算质心 centroid_A = np.mean(source_points, axis=0) centroid_B = np.mean(target_points, axis=0) H = np.zeros((3, 3)) for i in range(len(source_points)): p_i = source_points[i] - centroid_A q_i = target_points[i] - centroid_B H += np.outer(p_i, q_i.T) U, _, V_T = np.linalg.svd(H) d = np.sign(np.linalg.det(V_T @ U.T)) S = np.diag([1., 1., d]) R = V_T @ S @ U.T T = centroid_B - R @ centroid_A return R, T ``` #### Marta Salas 的迭代最小二乘解法 Marta Salas等人引入了一种新的策略——迭代加权最小二乘法(IWLS),旨在进一步提高精度的同时保持较低的时间复杂度。IWLS通过对每次迭代过程中产生的残差赋予不同的权重因子w,使得那些更接近真实值的数据点具有更大的影响力,进而逐步逼近全局最优解。 ```matlab function [R,T]=iwls_registration(X,Y,maxIter,tolerance) % X: N-by-d matrix of points from the first set. % Y: N-by-d matrix of points from the second set. % maxIter: Maximum number of iterations allowed. % tolerance: Convergence criterion. N=size(X,1); d=size(X,2); weights=ones(N,1); % Initialize weights to one initially. for iter=1:maxIter W=sparse(eye(d)*diag(weights)); % Construct diagonal weight matrix. % Compute weighted centroids and covariance matrices. muX=sum(W*X)/sum(weights); muY=sum(W*Y)/sum(weights); SigmaXY=cov(X-muX',Y-muY','WeightVector',weights'); % Perform singular value decomposition on SigmaXY. [~,~,V]=svd(SigmaXY,'econ'); % Calculate rotation using orthogonal Procrustes problem solution. R=V(:,end:-1:1)'*(SigmaXY/V(:,end:-1:1)); % Update translation vector based on current estimate of R. T=muY'-R*muX'; % Recalculate residuals after applying estimated transformation. res=Y-(repmat(T,d,1)+R*X').'; % Adjust weights according to new residual values. sigma_sq=(res.^2)/(d*N-sum(~isfinite(res))); w_new=exp(-normpdf(res./sqrt(sigma_sq),0,1).^2/(2*d)); if norm(w_new-weights)<tolerance break; end weights=w_new; end ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值