你说计算机算法和数据结构和数学关系挺大的?我怎么没感觉呢?数据结构和数学有什么关系呢,

mswangqingpeng2022-10-04 11:39:541条回答

已提交,审核后显示!提交回复

共1条回复
wxkj 共回答了23个问题 | 采纳率91.3%
主要是因为你学的比较基础,没有设计深入的学习和应用.
更深入的学习的话(尤其搞深入算法研究而不是做题),你会发现数学学不好的人很吃亏.
比如,科研方面解决科学问题,必然是将实际问题建立数学模型,而后分析应该用哪几种数据结构,涉及哪些算法.一旦涉及建立模型就全是用数学的知识.
就算不搞理论研究,实际应用中的算法分析,尤其涉及海量数据的时候,甚至要结合特定机器的操作系统、网络环境、存储方式,如果要得出可靠的结论就要应用复杂的数值分析知识才行,远远不是一句"O(n)层次的时间复杂度"就可以了.
而且,入门时候所能学到的经典的初等算法比如KMP、Dijkstra、Kruskal都不是现在看到的这么简单,最初提出的时候要有严格而且精确的数学证明才行,读起来非常晦涩.还比如NP完全问题证明,不就是很明显的数学范十足么,基本可以当数学论文看.
说实话,一旦你考虑的多了,想总结一定的规律了,不是解了一道题就算了的话,就能发现其实最靠谱的还是数学,尤其是基本的数学原理.
1年前

相关推荐

计算机算法的题Develop an algorithm which takes as input a single 9-
计算机算法的题
Develop an algorithm which takes as input a single 9-digit integer representing a Social Insurance Numbers (SIN) and determines whether or not it is valid.The algorithm should output if the SIN is valid or not.The rules determining the validity of a SIN are best described in an example.Consider the number 620187252 as a possible SIN number.Positions specified below are read from right to left and counting starts from 1.
1.Multiply every even positioned digit by 2.
(2x2=4,1x2=2,7x2=14,5x2=10)
2.For each result from step 1 add all the digits from each result together.
(4+2+1+4+1+0 = 12)
3.Add the last 4 odd positioned digits of the SIN together.
(6+0+8+2 = 16)
Page 4 of 4
4.Add the results of steps 2 and 3 together.
(12+16 = 28)
5.Subtract the units digit of the total from step 4 from 10,unless the units digit is 0,in which case use it.
(10-8 = 2)
6.A SIN is valid if the digit from step 5 is the same as the least significant digit in the SIN and the most significant digit matches a used region digit according to the following list:
0 not used
1 Atlantic Provinces
2 Quebec
3 not used
4 Ontario
5 not used
6 Prairie Provinces
7 British Columbia
8 not used
9 not used
(in the example,the SIN is a valid number which was issued in the Prairie Provinces)
yicling1年前1
silencewx 共回答了21个问题 | 采纳率90.5%
#include
#include
#include
#define N 9
int main()
{
x05char *region[]={"not used",
x05x05"Atlantic Provinces",
x05x05"Quebec",
x05x05"not used",
x05x05"Ontario",
x05x05"not used",
x05x05"Prairie Provinces",
x05x05"British Columbia",
x05x05"not used",
x05x05"not used",
x05};
x05char SIN[N+1];
x05printf("input %d digit SIN #:",N);
x05fflush(stdin);
x05fgets(SIN,N+1,stdin);
x05
x05int i=0;
x05int step1_result[N/2];
x05char step1[N]={' '};
x05int step2_sum=0;
x05//step 1 偶数位上的数乘以2,保存在数组step1_result中
x05// 字符数组step1把上面的结果各位数字转换成对应数字字符保存起来
x05while(i
计算机算法是问题规模n的函数f(n),算法的时间复杂度也因此记做:T(n)=O(f(n))
计算机算法是问题规模n的函数f(n),算法的时间复杂度也因此记做:T(n)=O(f(n))
是吗也是.能解释下吗?我数学差的.
梦梦之1年前1
hhdty 共回答了17个问题 | 采纳率94.1%
还少了一点,是n趋于无穷大时的无穷大阶次
【急】计算机算法问题求解答!如图:已知A、B为圆上两点,已知A点坐标为(X,Y)和两半径夹角β的值,求B点坐标.
【急】计算机算法问题求解答!

如图:已知A、B为圆上两点,已知A点坐标为(X,Y)和两半径夹角β的值,求B点坐标.
写出算法设计,要高效简单容易实现的.
没事找话说1年前1
xcx6522 共回答了20个问题 | 采纳率70%
A点的坐标先变换成极坐标,然后A的角度加上β的角度,就得到了B的极坐标,之后把B的极坐标变换回来就行了.附上变换公式:
直角坐标换极坐标:
r = sqrt(x^2 + y^2),
θ= arctan y/x
极坐标换直角坐标:
x = r*cos(θ),
y = r*sin(θ),
五个名词解释:(1) 计算机算法(2) 最好情况(3) 分治法(4) 图的着色问题(5) 最坏情况(6) 旅行售货员问题
涛241年前1
xuhengzhang 共回答了19个问题 | 采纳率89.5%
(1)计算机算法
计算机算法是以一步接一步的方式来详细描述计算机如何将输入转化为所要求的输出的过程,或者说,算法是对计算机上执行的计算过程的具体描述.
http://baike.baidu.com/view/1337026.htm?fr=ala0
(2) 最好情况和(5) 最坏情况
参看http://baike.baidu.com/view/396887.html
(3) 分治法
http://baike.baidu.com/view/1583824.htm
(6) 旅行售货员问题
旅行售货员问题是图论中非常著名的一个问题,用图论的语言描述:即求一个正权完全图的权值最小的哈密顿回路(H―回路).