你能再解释一下抽象的过程吗? (1 for i 1 to r (2) for j 1 to m (3) S=0 (4) for k 1 to n (5) SS A[i,k]B[k,j] (6] c[i,j]S How many multiplications (expressed in terms of r,m,and n)does this pseudocode carry out in total among all the iterations of Line 5? T =USj. =∑S=∑n=mn j- i 乘法原则是否是必须明确给出的呢?
你能再解释一下抽象的过程吗? 乘法原则是否是必须明确给出的呢?
(1) for i 1 to n-1 这个 (2) minval A[i] (3) minindex i (4) for j=ito n (5) if (A[j]<minval) 多 行 (6) minval A[j] (7) minindex =j (8) exchange A[i]and A[minindex] 次比 (9) bigjump =0 较操 (10) for i= 2 to n 作? (11) if(A[i]>2*A[i-1]) (12) bigjump bigjump 1 easily solvable pieces.If we can decompose the problem into smaller pieces and so the smaller pieces,then we may be able to ethr add or multiply soitosmaller problemsinrder to solve the larger problem.n this
这个 算法 需要 执行 多少 次比 较操 作?