Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Question:Compare two methods for finding the steady-state vector q of a regular stochastic matrix P: (1) computing q as in Example 5, or (2) computing\({P^k}\)for some large value of\(k\)and using one of the columns of\({P^k}\)as an approximation for q. [The Study Guidedescribes a program nulbasisthat almostautomates method (1).]

Experiment with the largest random stochastic matrices your matrix program will allow, and use\(k = 100\)or some other large value. For each method, describe the time you need to enter the keystrokes and run your program. (Some versions of MATLAB have commands flops and tic … toc that record the number of floating point operations and the total elapsed time MATLAB uses.) Contrast theadvantages of each method, and state which you prefer.

Short Answer

Expert verified

The second method is preferable.

Step by step solution

01

 Step 1: State the stochastic matrix

Use the MATLAB command to construct a random stochastic matrix as shown below:

\(\begin{array}{l} > > functionP = randstoc\left( n \right)\\ > > M = rand\left( n \right);\\ > > P = M/\left( {ones\left( {n,1} \right)*sum\left( M \right)} \right)\end{array}\)

Use the MATLAB command to construct a nulbasis as shown below:

\(\begin{array}{l} > > functionN = nulbasis\left( A \right)\\ > > \left[ {R,pivcol} \right]*rref\left( {A,sqrt\left( {eps} \right)} \right);\\ > > \left[ {m,n} \right] = size\left( A \right);\\ > > r = length\left( {pivcol} \right);\end{array}\)

02

Find the steady-state vector

Use the MATLAB command to construct a steady-state vector as shown below:

\(\begin{array}{c} > > A = randstoc\left( {32} \right);flops\left( 0 \right);\\ > > tic,x = nulbasis\left( {A - eye\left( {32} \right)} \right);\\ > > q = x/sum\left( x \right);toc,flops\end{array}\)

The elapsed time is 0.064004 seconds.

Use the MATLAB command to construct a steady-state vector by another method as shown below:

The elapsed time is 0.310368 seconds.

The second method (MATLAB command) is preferable.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

(M) Let \(H = {\mathop{\rm Span}\nolimits} \left\{ {{{\mathop{\rm v}\nolimits} _1},{{\mathop{\rm v}\nolimits} _2}} \right\}\) and \(K = {\mathop{\rm Span}\nolimits} \left\{ {{{\mathop{\rm v}\nolimits} _3},{{\mathop{\rm v}\nolimits} _4}} \right\}\), where

\({{\mathop{\rm v}\nolimits} _1} = \left( {\begin{array}{*{20}{c}}5\\3\\8\end{array}} \right),{{\mathop{\rm v}\nolimits} _2} = \left( {\begin{array}{*{20}{c}}1\\3\\4\end{array}} \right),{{\mathop{\rm v}\nolimits} _3} = \left( {\begin{array}{*{20}{c}}2\\{ - 1}\\5\end{array}} \right),{{\mathop{\rm v}\nolimits} _4} = \left( {\begin{array}{*{20}{c}}0\\{ - 12}\\{ - 28}\end{array}} \right)\)

Then \(H\) and \(K\) are subspaces of \({\mathbb{R}^3}\). In fact, \(H\) and \(K\) are planes in \({\mathbb{R}^3}\) through the origin, and they intersect in a line through 0. Find a nonzero vector w that generates that line. (Hint: w can be written as \({c_1}{{\mathop{\rm v}\nolimits} _1} + {c_2}{{\mathop{\rm v}\nolimits} _2}\) and also as \({c_3}{{\mathop{\rm v}\nolimits} _3} + {c_4}{{\mathop{\rm v}\nolimits} _4}\). To build w, solve the equation \({c_1}{{\mathop{\rm v}\nolimits} _1} + {c_2}{{\mathop{\rm v}\nolimits} _2} = {c_3}{{\mathop{\rm v}\nolimits} _3} + {c_4}{{\mathop{\rm v}\nolimits} _4}\) for the unknown \({c_j}'{\mathop{\rm s}\nolimits} \).)

The null space of a \({\bf{5}} \times {\bf{6}}\) matrix A is 4-dimensional, what is the dimension of the column space of A.

Verify that rank \({{\mathop{\rm uv}\nolimits} ^T} \le 1\) if \({\mathop{\rm u}\nolimits} = \left[ {\begin{array}{*{20}{c}}2\\{ - 3}\\5\end{array}} \right]\) and \({\mathop{\rm v}\nolimits} = \left[ {\begin{array}{*{20}{c}}a\\b\\c\end{array}} \right]\).

Question: Exercises 12-17 develop properties of rank that are sometimes needed in applications. Assume the matrix \(A\) is \(m \times n\).

13. Show that if \(P\) is an invertible \(m \times m\) matrix, then rank\(PA\)=rank\(A\).(Hint: Apply Exercise12 to \(PA\) and \({P^{ - 1}}\left( {PA} \right)\).)

Which of the subspaces \({\rm{Row }}A\) , \({\rm{Col }}A\), \({\rm{Nul }}A\), \({\rm{Row}}\,{A^T}\) , \({\rm{Col}}\,{A^T}\) , and \({\rm{Nul}}\,{A^T}\) are in \({\mathbb{R}^m}\) and which are in \({\mathbb{R}^n}\) ? How many distinct subspaces are in this list?.

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free