Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

need to solve in matlab help! 3) In Detroit, Hertz Rent-A-Car has a fleet of abo

ID: 2901830 • Letter: N

Question

need to solve in matlab help!

3) In Detroit, Hertz Rent-A-Car has a fleet of about 2 000 cars. The pattern of rental and return locations is given by the fractions in the matrix P P 9.01.09; .01.90.01: .09.09 .9l or Cars rented from City Down- Metro Cars Returned Airport town Airport 0.9000 0.0100 0.0900 City Airport P 0.0100 0.9000 0.0100 Downtown 0.0900 0.0900 0.9000 J Metro Airport a. A numerical vector with non-negative entries that add up to 1 is called a probability vector. A stochastic matrix is a square matrix whose columns are probability vectors. Using MATLAB, verify that P is a stochastic matrix. b. If P is a stochastic matrix, then a steady-state vector (or equilibrium vector) for P is a probability vector q such that Pq q. What does the equation Pq q tells you about one of the eigenvalues of P and its associated eigenvector? c. Using Matlab, find the eigenvalues and eigenvectors of P. d. point above, find of corresponding to q If is probability vector, then vis the steady-state vector for P, if not, scale v by the sum of its entries to obtain the steady-state vector q. e. In our problem, the entries in the steady state vector q shows the fractions of the cars rented or ready to rent on a typical day from each of the locations (City Airport, Downtown, Metro Airport). On a typical day, about how many cars will be rented or ready to rent from the Downtown location? Explain any approximation you make

Explanation / Answer

sol)

a)

code for checking if it a stochastic matrix or not:

m.file

function [retur]=recur (A)

retur=1;
for i=1:1:3
  
  
pp=sum(A(:,i));
if pp ~= 1
retur=0;
end
end
end

execute this in main window:

A=[0.9,0.01,0.09;0.01,0.9,0.01;0.09,0.09,0.9];

[retur]=recur(A);

if retur =1 it is stohastic matrix if not its not.

b)

it tell us one of the eigen value is 1;

c)

code:

[V,D]=eig(A)

which gives:

eigen values(diagional values)
D =

1.0000 0 0
0 0.8100 0
0 0 0.8900

eigen vectors

V =

-0.6701 -0.7071 0.7071
-0.1399 0.0000 -0.7071
-0.7290 0.7071 -0.0000

d)

code:

pp=sum(V(:,1));

v=V(:,1)/pp;

v =

0.4354
0.0909
0.4737

e)

v =

0.4354
0.0909
0.4737

down town=2000*0.0909=181.8 = aprr (182)

therefore 182 cars will be rented or ready to rent the downtown