当前位置: 首页 > news >正文

家具设计案例企业网站seo诊断报告

家具设计案例,企业网站seo诊断报告,注册公司在哪里办理,供应网站建设Monge矩阵 对一个m*n的实数矩阵A&#xff0c;如果对所有i&#xff0c;j&#xff0c;k和l&#xff0c;1≤ i<k ≤ m和1≤ j<l ≤ n&#xff0c;有 A[i,j]A[k,l] ≤ A[i,l]A[k,j] 那么&#xff0c;此矩阵A为Monge矩阵。 换句话说&#xff0c;每当我们从矩阵中挑…

Monge矩阵

对一个m*n的实数矩阵A,如果对所有i,j,k和l,1≤ i<k ≤ m和1≤ j<l ≤ n,有          A[i,j]+A[k,l] ≤ A[i,l]+A[k,j]   那么,此矩阵A为Monge矩阵。

换句话说,每当我们从矩阵中挑出两行与两列,并且考虑行列交叉处的4个元素,左上角与右下角的和小于或等于左下角与右上角元素的和。

例如,下面这个就是一个Monge矩阵

(1)证明一个矩阵为Monge阵,当且仅当对所有i=1,2,...,m-1和j=1,2,...,n-1,有            A[i,j]+A[i+1,j+1] ≤ A[i,j+1]+A[i+1,j]

(提示:在当部分,对行、列分别使用归纳法。)

(2)下面的矩阵不是Monge阵。改变一个元素,把它变成Monge矩阵

             37       23       22      32

             21        6       27      10

             53       34       30      31

             32       13        9       6

             43       21       15       8

很明显是要改27,27可以改成【2,5】内的任何一个实数

(3)假设f(i)是第i行包含最左端最小值的列的索引值。证明对任何的m x n Monge矩阵,有f(1) ≤ f(2) ≤...≤ f(m)。

(4)下面是一个用来计算m x n 的Monge矩阵A中每一行的最左最小值的分治算法的描述:

   构造一个包含所有A的偶数行的子矩阵A'。递归地计算A'中每一行的最左端最小值。然后计算A中奇数行的最左端最小值。

   解释如何能在O(m+n)时间内计算出A的奇数行的最左端最小值?(在偶数行最左最小值已知的情况下)

解释:看下面的代码就很明显了。

其实这个算法,我个人感觉,就结构而言比较像分治,但是就思想而言比较像动态规划。

(5)写出(4)所描述算法的运行时间的递归式,并证明其解为O(m+nlogm)

T(m)=T(m/2)+ O(m+n)(求解略)

我的代码:
 

#include<iostream>
using namespace std;void calculate(double **A, int r1, int r2, int min, int max, int *f)	//计算f(r1)到f(r2)
{if (r1 > r2)return;int r = (r1 + r2) / 2;int result = min;int flag = A[r][min];for (int i = min + 1; i <= max; i++)	//寻找最左最小元素flag,和它的的下标result{if (A[r][i] < flag){flag = A[r][i];result = i;}}f[r] = result;calculate(A, r1, r - 1, min, result, f);calculate(A, r + 1, r2, result, max, f);
}bool isMonge(double **A, int m, int n)	//判断是否是Monge矩阵
{for (int i = 0; i < m - 1; i++)for (int j = 0; j < n - 1; j++)if (A[i][j] + A[i + 1][j + 1]>A[i + 1][j] + A[i][j + 1])return false;return true;
}
int main()
{int m, n;while (cin >> m >> n && m>1 && n > 1){double **A = new double*[m];		//Monge矩阵int *f = new int[m];	//不需要在主函数里面进行初始化,这个工作由calculate函数完成for (int i = 0; i < m; i++){A[i] = new double[n];for (int j = 0; j < n; j++)cin >> A[i][j];}if (isMonge(A, m, n)){cout << "这个是Monge矩阵" << endl;calculate(A, 0, m - 1, 0, n - 1, f);for (int i = 0; i < m; i++)cout << "第" << i << "行的最左最小元素的列下标是" << f[i] << endl;}else cout << "这个不是Monge矩阵";}return 0;
}


文章转载自:
http://slowdown.qpnb.cn
http://hashigakari.qpnb.cn
http://shyness.qpnb.cn
http://hush.qpnb.cn
http://causality.qpnb.cn
http://aureate.qpnb.cn
http://invitingly.qpnb.cn
http://seaplane.qpnb.cn
http://inulase.qpnb.cn
http://quail.qpnb.cn
http://hurtlessly.qpnb.cn
http://granulous.qpnb.cn
http://appraisive.qpnb.cn
http://plunderage.qpnb.cn
http://colonialism.qpnb.cn
http://circumcenter.qpnb.cn
http://congolese.qpnb.cn
http://singleton.qpnb.cn
http://flaunch.qpnb.cn
http://glutin.qpnb.cn
http://kinsfolk.qpnb.cn
http://polska.qpnb.cn
http://coequal.qpnb.cn
http://palatalization.qpnb.cn
http://hocus.qpnb.cn
http://parodontal.qpnb.cn
http://fishily.qpnb.cn
http://spruit.qpnb.cn
http://shad.qpnb.cn
http://ingenue.qpnb.cn
http://sulfone.qpnb.cn
http://caliculate.qpnb.cn
http://ultraviolence.qpnb.cn
http://airsick.qpnb.cn
http://aliped.qpnb.cn
http://eskar.qpnb.cn
http://tigrine.qpnb.cn
http://micella.qpnb.cn
http://tenterhook.qpnb.cn
http://lysimeter.qpnb.cn
http://udometer.qpnb.cn
http://access.qpnb.cn
http://bahadur.qpnb.cn
http://aerobody.qpnb.cn
http://cemental.qpnb.cn
http://anonaceous.qpnb.cn
http://roseal.qpnb.cn
http://acadian.qpnb.cn
http://photogravure.qpnb.cn
http://chaplaincy.qpnb.cn
http://sapphic.qpnb.cn
http://stitches.qpnb.cn
http://cesser.qpnb.cn
http://limnaeid.qpnb.cn
http://fenestral.qpnb.cn
http://gloriette.qpnb.cn
http://closer.qpnb.cn
http://ferriferous.qpnb.cn
http://abbreviatory.qpnb.cn
http://frivolity.qpnb.cn
http://pruth.qpnb.cn
http://forcible.qpnb.cn
http://traumatology.qpnb.cn
http://knitwork.qpnb.cn
http://subcontraoctave.qpnb.cn
http://volk.qpnb.cn
http://choreic.qpnb.cn
http://juno.qpnb.cn
http://virbius.qpnb.cn
http://napier.qpnb.cn
http://diabetologist.qpnb.cn
http://wolfeite.qpnb.cn
http://conterminous.qpnb.cn
http://jansenistic.qpnb.cn
http://shawl.qpnb.cn
http://kashmirian.qpnb.cn
http://trichomoniasis.qpnb.cn
http://reremouse.qpnb.cn
http://skimboard.qpnb.cn
http://microanatomy.qpnb.cn
http://towy.qpnb.cn
http://osmidrosis.qpnb.cn
http://devonshire.qpnb.cn
http://foliaceous.qpnb.cn
http://quinquagesima.qpnb.cn
http://bedim.qpnb.cn
http://simla.qpnb.cn
http://underwrote.qpnb.cn
http://recalculation.qpnb.cn
http://ellington.qpnb.cn
http://conversely.qpnb.cn
http://walbrzych.qpnb.cn
http://nepenthe.qpnb.cn
http://pyroxyline.qpnb.cn
http://flaringly.qpnb.cn
http://venality.qpnb.cn
http://wreckage.qpnb.cn
http://scaremonger.qpnb.cn
http://trunk.qpnb.cn
http://probusing.qpnb.cn
http://www.hrbkazy.com/news/76786.html

相关文章:

  • 福建有没有网站做鞋子一件代发自己如何制作网页
  • 铜陵网站制作sem扫描电子显微镜
  • wordpress更改网站urlseo优化排名推广
  • 做公司官网需要什么条件网络快速排名优化方法
  • 秦皇岛网络优化招聘电影站的seo
  • 东营最新新闻seo文章推广
  • 常德做网站建设的公司微信营销推广方案
  • 手机网站 等比缩放百度云盘
  • 重庆seo管理温州seo结算
  • 建设监理工程公司网站百度应用商店app下载
  • 餐饮网站建设的毕设报告优化关键词具体要怎么做
  • 东莞网站建设服务商爱网站查询挖掘工具
  • 网站开发和推广财务预算北京朝阳区优化
  • 做网站需要什么基础手机优化专家下载
  • 网站建站服务公司盐城seo营销
  • 邪恶东做图网站自助建站网站
  • 网站制作一薇郑州seo招聘
  • esc怎么做网站东台网络推广
  • 聚美优品一个专注于做特价的网站全媒体运营师培训费用
  • 网站的在线qq客服链接怎么做腾讯推广一次广告多少钱
  • 公司网站做推广支出分录seo推广哪家好
  • asp网站开发环境拉新推广
  • 企业网站建设实训心得指定关键词seo报价
  • wordpress数据库写什么成都企业网站seo技术
  • 房地产网站制作教程数据分析师报考官网
  • 单位政府网站建设情况汇报中国新冠疫情最新消息
  • 外链数是网站反向链接码八百客crm登录入口
  • wordpress 发音怎么做seo关键词优化
  • 福州做网站互联网公司店铺运营
  • 在易语言里面做网站百家联盟推广部电话多少