필터 지우기
필터 지우기

Computing number of flops

조회 수: 3 (최근 30일)
Pascale Bou Chahine
Pascale Bou Chahine 2020년 9월 23일
Let A in R^{nxn}.
(a) Compute the number of flops needed to compute A^k using matrix-matrix multiplications.
(b) Assuming that A = VDV ^{-1} where V^{-1} is given and D is a diagonal matrix, propose a different procedure to compute A^k that requires less flops. Compute the number of flops.
a) So we have k square matrices. Computing element aij of A^k requires taking the dot product of row i in the first matrix A and column j in the subsequent matrix A. Computing the dot product requires n multiplications and n1 additions. Since there are n^2 elements, the dot product must be computed n^2 times.
Thus the total number of operations is n^2(n+(n1))=2n^3n^2=O(n3). But since we are doing the procedur k-times, then the number of flops = k(2n^3 - n^2). Is it correct?
b) what about it? What is the answer?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by