Asksia AI LOGO

Sia

Question
Computer Science
Posted 7 months ago
et 
𝐴
 be an 
𝑚
×
𝑛
 matrix. Determine the exact numbers of floating point additions, subtractions, multiplications, and divisions involved in computing the factorization 
𝐴
=
𝑄
𝑅
 by Algorithm 
1
0
.
1
 
(
Trefethen
)
.
Algorithm 
1
0
.
1
.
 Householder QR Factorization
|
)
|
𝑣
𝑘
|
|
2
|
𝐴
𝑘
:
𝑚
,
𝑘
:
𝑛
=
𝐴
𝑘
:
𝑚
,
𝑘
:
𝑛
-
2
𝑣
𝑘
(
𝑣
𝑘
*
*
𝐴
𝑘
:
𝑚
,
𝑘
:
𝑛
)

Algorithm 10.1. Householder QR Factorization
for k=1 to n
x = Ak:m,k
Uk =
Uk vk/lvk/2
Ak:m.k:n = Ak:m.k:n -
Sign in to unlock the answer
Answer from Sia
Posted 7 months ago
To determine the exact numbers of floating point additions, subtractions, multiplications, and divisions involved in computing the factorization A=QRA = QR by Algorithm 10.1 (Householder QR Factorization), we need to analyze each step of the algorithm.
The algorithm is as follows:


1. 
for k=1k = 1 to nn

2. 
x=Ak:m,kx = A_{k:m,k}

3. 
vk=sign(x1)x2e1+xv_k = -\text{sign}(x_1) \|x\|_2 e_1 + x

4. 
vk=vk/vk2v_k = v_k / \|v_k\|_2

5. 
Ak:m,k:n=Ak:m,k:n2vk(vkAk:m,k:n)A_{k:m,k:n} = A_{k:m,k:n} - 2v_k(v_k^* A_{k:m,k:n})
Let's break down the floating point operations (FLOPs) for each step:
Step 2: x=Ak:m,kx = A_{k:m,k}
This step involves copying a subvector of AA. No floating point operations are involved
Step 3: vk=sign(x1)x2e1+xv_k = -\text{sign}(x_1) \|x\|_2 e_1 + x
- Calculating x2\|x\|_2 involves mk+1m-k+1 multiplications and mkm-k additions
- Multiplying by sign(x1)-\text{sign}(x_1) involves 11 multiplication
- Adding xx to the scaled e1e_1 involves mk+1m-k+1 additions
Step 4: vk=vk/vk2v_k = v_k / \|v_k\|_2
- Normalizing vkv_k involves mk+1m-k+1 divisions
Step 5: Ak:m,k:n=Ak:m,k:n2vk(vkAk:m,k:n)A_{k:m,k:n} = A_{k:m,k:n} - 2v_k(v_k^* A_{k:m,k:n})
- Calculating vkAk:m,k:nv_k^* A_{k:m,k:n} involves (mk+1)(nk+1)(m-k+1)(n-k+1) multiplications and (mk)(nk+1)(m-k)(n-k+1) additions
- Scaling by 2vk2v_k involves (mk+1)(nk+1)(m-k+1)(n-k+1) multiplications
- Subtracting the result from Ak:m,k:nA_{k:m,k:n} involves (mk+1)(nk+1)(m-k+1)(n-k+1) subtractions
Summarizing the total FLOPs for each iteration of kk:
Additions: (mk)(nk+1)+(mk+1)+(mk+1)(nk+1)(m-k)(n-k+1) + (m-k+1) + (m-k+1)(n-k+1)
Subtractions: (mk+1)(nk+1)(m-k+1)(n-k+1)
Multiplications: (mk+1)+(mk+1)(nk+1)+(mk+1)(nk+1)(m-k+1) + (m-k+1)(n-k+1) + (m-k+1)(n-k+1)
Divisions: mk+1m-k+1
To get the total number of floating point operations, sum these over all iterations of kk from 11 to nn.
This provides a detailed breakdown of the floating point operations involved in the Householder QR Factorization algorithm.

Not the question you are looking for? Ask here!

Enter question by text

Enter question by image

Unlock Smarter Learning with AskSia Super!

Join Super, our all-in-one AI solution that can greatly improve your learning efficiency.

30% higher accuracy than GPT-4o
Entire learning journey support
The most student-friendly features
Study Other Question