Guaranteed Higher Grade!

Free Quote
MATLAB and Discrete-Time Dynamical Systems Homework

I need the answers generated for this HW in a latex file so I will need the original .tex file and the pdf. It involves the use of MATLAB and code needs to be included in the report. For reference purposes, I have attached a previous HW and HW submission report. A lot of MATLAB files need to be used for this assignment therefore they are attached too.

1. (25 pts) (Modified from Leon.pdf) Consider a Web network of four sites linked together as shown below. If the Google PageRank algorithm is used to rank these pages, what is the transition matrix A. Assume that the Web surfer will follow a link on the current page 80 percent of the time. What will be the Google ranking of these pages?

2. (25 pts) In this problem we will modify our Hertz Car Rental Modeling example from Lecture 7 and model the resulting revised model as a non-homogeneous discrete-time dynamical system. Set-up is as before similar. Hertz has three locations around Detroit: City Airport (CA), Downtown (DT), and Metropolitan Airport (MA). But return patterns are different. It is observed that in a given month, 85% of the cars rented from CA are returned back to CA, 5% to DT, and 5% to MA. As you can see this does not add up to 100%.

This means that 5% of the cars rented from CA are returned to locations outside the larger Detroit area. Similarly, 90% of the cars rented from DT are returned back to DT, 1% to CA, and 5% to MA. And finally 85% of the cars rented from MA are returned back to MA 1% to DT, and another 9% to to CA. However, it was also observed that every month, a certain number of cars rented outside the Detroit area (rented in locations other than these three) are returned to these three Detroit Hertz locations. CA receives 10 such additional cars every month, DT receives 2, and MA receives 50.

(a) Let xca(k), xdt(k), and xma(k) denote the number of cars in CA, DT, and MA in

month t. Define the state-vector as x(k) =xca(k))xdt(k)

xma(k) and model this problem in

the form of nonlinear discrete-time dynamical systems x(k + 1) = Ax(k) + b. What is A and what is b? What do A and b represent?

(b) Assume that initially there were 500 cars in every location. Write a Matlab code to simulate the evolution of the number of cars in these three locations for 5 years. (be careful about the time unit in your model). Your Matlab code should take the initial condition provided in the question. Plot the evolution of the number of cars in every location using the subplot command. Make sure to label the all the axes 2 appropriately. The file lake−simul.m on Canvas is a good guide/help with this coding question.

(c) Repeat the previous part assuming initially there were 250 cars in CA, 250 cars in DT, and 1000 cars in MA.

(d) ) Parts (b) and (c) simulated the dynamics using different initial conditions. What do you observe about the steady-state behavior in each case? Is this what you have expected? Prove/show theoretically that this observed behavior is exactly what one should expect. Compute the steady-state values for the number of cars in every location. (You might end up with non-integer numbers; this is OK. Our models are

not exact.)

3. (25 pts) Contributions to Saving/Retirement Accounts: Assume that you have a monthly salary of S(k). For the sake of this question, let us assume that as opposed to annual raises, your employee gives smaller, but monthly raises. Your monthly raise rate is r%. Your employee offers a 401k Retirement Plan and contributes, every month, to your retirement account e% of your monthly salary. And your retirement plan gains, on average, g% per month, following the gains in the stock market. You are also allowed to make pre-taxed monthly contributions to your plan. Assume that you make monthly

contributions of $m(k). Your initial retirement account has zero balance and your initial salary is $S0.

(a) Let R(k) denote your monthly Retirement Account balance and let x(k) = R(k)S(k)

∈

R

2 be the state-vector. Construct the discrete dynamical system x(k + 1) = Ax(k) + b(k), x(0) = x0, k = 0, 1, 2, . . . ,(months), where b(k), x0 ∈ R

and A ∈ R

2×2 that models the monthly evolution of R(k) and S(k) in terms of your monthly raise of r%, your employee’s monthly contribution rate e%, the monthly gain g%, and your monthly contribution of $m(k). Note that this dynamical system has a “forcing term” b(k).

(b) Take S0 = 4, 000, m(k) = 1.005k × 50 (you start with an initial contribution of $50 and increase it every month by 0.5%), r = 0.5%, e = 2%, and g = 1%. Assume that you work for 360 months (30 years). Write a Matlab script that simulates the evolution of R(k) and S(k) during your employment. How much savings will you have in the end? How much of this was your own contribution?

(c) You have decided that you can indeed start with an initial monthly contribution of $100 instead, i.e., m(k) = 1.005k × 100. Repeat Part (a). How much savings do you have now after 30 years? You might think that “of course I have more in my savings, because I have contributed more”. You are right. But, that is not the

whole story. Compute the difference in your savings and compute the difference in your own contributions? Are they the same? How do you explain this?

4. (25 pts) Let λ be an eigenvalue of A with the corresponding eigenvector v.

(a) Let α be a scalar. Show that λ − α is an eigenvalue of A − αI with the same eigenvector v. Our eigenvalue proof for I − A in Lecture Notes 10 should help a lot for this question.

(b) Let µ be a scalar such that λ 6= µ. Show that 1 λ − µ is an eigenvalue of (A − µI)−1 with the same eigenvector v.

(c) Show that the eigenvalue λ is given by

λ =

v

TAv

vT v

Therefore, if we are given an eigenvector of a matrix, we can easily find the corresponding eigenvalue by this simple operation. Note that in this formula both v

TAv

and v

T v are scalars.