⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fastest_mixing_mc.m

📁 斯坦福大学Grant和Boyd教授等开发的凸优化matlab工具箱
💻 M
字号:
% Section 4.6.3: Find the fastest mixing Markov chain on a graph% Boyd & Vandenberghe "Convex Optimization"% Jo雔le Skaf - 09/26/05%% The 'fastest mixing Markov chain problem' is to find a transition% probability matrix P on a graph E that minimizes the mixing rate r, where% r = max{ lambda_2, -lambda_n } with lambda_1>=...>=lambda_n being the% eigenvalues of P.% Generate input datan = 5;E = [0 1 0 1 1; ...     1 0 1 0 1; ...     0 1 0 1 1; ...     1 0 1 0 1; ...     1 1 1 1 0];% Create and solve modelcvx_begin    variable P(n,n) symmetric    minimize(norm(P - (1/n)*ones(n)))    P*ones(n,1) == ones(n,1);    P >= 0;    P(E==0) == 0;cvx_ende = flipud(eig(P));r = max(e(2), -e(n));% Display resultsdisp('------------------------------------------------------------------------');disp('The transition probability matrix of the optimal Markov chain is: ');disp(P);disp('The optimal mixing rate is: ');disp(r);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -