0% found this document useful (0 votes)
16 views

Application Power Method

The document discusses using the power method algorithm to determine the stable distribution of a population structured by age groups. It describes formulating the problem by providing the population structure and transition probabilities between age groups. It then outlines implementing an efficient version of the power method in MATLAB by taking advantage of the sparse structure of the given transition matrix between age groups. The key steps are initializing a vector, iteratively computing the matrix-vector product while only considering non-zero elements, and normalizing to obtain the dominant eigenvector.

Uploaded by

Alina Nedelciu
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Application Power Method

The document discusses using the power method algorithm to determine the stable distribution of a population structured by age groups. It describes formulating the problem by providing the population structure and transition probabilities between age groups. It then outlines implementing an efficient version of the power method in MATLAB by taking advantage of the sparse structure of the given transition matrix between age groups. The key steps are initializing a vector, iteratively computing the matrix-vector product while only considering non-zero elements, and normalizing to obtain the dominant eigenvector.

Uploaded by

Alina Nedelciu
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.1.

Formularea problemei
Clasa Varsta

Evolutia populatie pe o durata determinata. Fie structura dupa varsta a unei populatii de sex feminin, dintr-o regiune de suprafata arbitrara: 0 10 10 20 20 30 30 40 40 50 50 60 60 70 70 80 80 90 90 100

Nr. Mediu copii pe o perioada de 10 ani

Probabilitatea de supravietuire pana in urmatoarea clasa de varsta

0.000 0.174 0.782 0.263 0.022 0.000 0.000 0.000 0.000 0.000

0.985 0.996 0.994 0.990 0.975 0.940 0.866 0.680 0.361 0.000

Cerinta: Determinati o distributie stabila pentru aceasta populatie.

1.2. Formularea problemei


Fie matricea de tranzitie intre varste: 0.000 0.985 0 0 0 0 0 0 0 0 0.174 0 0.996 0 0 0 0 0 0 0 0.782 0 0 0.994 0 0 0 0 0 0 0.263 0 0 0 0.990 0 0 0 0 0 0.022 0 0 0 0 0.975 0 0 0 0 0.000 0 0 0 0 0 0.940 0 0 0 0.000 0 0 0 0 0 0 0.866 0 0 0.000 0 0 0 0 0 0 0 0.680 0 0.000 0 0 0 0 0 0 0 0 0.361 0.000 0 0 0 0 0 0 0 0 0

Gasiti vectorul propriu maximal (vectorul propriu asociat valorii proprii dominante).

2. Gasirea unui algoritm adecvat


Metoda puterii algoritm numeric specializat in determinarea vectorului propriu maximal asociat unei matrici date. 1. 2. Se da matricea . Se initializeaza procedura cu un vector arbitrar 0 . Generam secventa iterativa: +1 = , unde =
1

Observatie: In cazul in care matricea prezinta o structura rara, este esential ca implementarea metodei sa faca uz de aceasta structura.

3. Implementare eficienta in Matlab


function [x] = powmet_struct (A,x0,epsilon,maxiter)

[n n]=size(A); x=x0/norm(x0); y=zeros(n,1); e=1; iter=0; while ((e>epsilon)&(iter<maxiter))


y=A*x; y=y/norm(y); e=abs(1-abs(y'*x)); x=y; iter=iter+1; end end

3. Implementare eficienta in Matlab


function [x] = powmet_struct (A,x0,epsilon,maxiter) [n n]=size(A); x=x0/norm(x0); y=zeros(n,1); e=1; iter=0; while ((e>epsilon)&(iter<maxiter)) y(1)=A(1,:)*x; for i=2:n y(i)=A(i,i-1)*x(i-1); end y=y/norm(y); e=abs(1-abs(y'*x)); x=y; iter=iter+1; end end

4. Discutie
Exemplu In urma modificarii operatiei centrale de inmultire matrice-vector din cadrul Metodei Puterii clasice, am facut uz de structura matricii date in urmatorul mod: Operatia y=A*x a fost inlocuita cu o secventa de cod: y(1)=A(1,:)*x; for i=2:n y(i)=A(i,i-1)*x(i-1); end ce realizeaza inmultirea matrice vector fara a lua in considerare elementele nule ale matricii A.

You might also like