/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q22E Question: Compare two methods f... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

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 91Ó°ÊÓ!

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

Let \(A\) be any \(2 \times 3\) matrix such that \({\mathop{\rm rank}\nolimits} A = 1\), let u be the first column of \(A\), and suppose \({\mathop{\rm u}\nolimits} \ne 0\). Explain why there is a vector v in \({\mathbb{R}^3}\) such that \(A = {{\mathop{\rm uv}\nolimits} ^T}\). How could this construction be modified if the first column of \(A\) were zero?

Let be a linear transformation from a vector space \(V\) \(T:V \to W\)in to vector space \(W\). Prove that the range of T is a subspace of . (Hint: Typical elements of the range have the form \(T\left( {\mathop{\rm x}\nolimits} \right)\) and \(T\left( {\mathop{\rm w}\nolimits} \right)\) for some \({\mathop{\rm x}\nolimits} ,\,{\mathop{\rm w}\nolimits} \)in \(V\).)\(W\)

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]\).

Suppose the solutions of a homogeneous system of five linear equations in six unknowns are all multiples of one nonzero solution. Will the system necessarily have a solution for every possible choice of constants on the right sides of the equations? Explain.

In Exercise 1, find the vector x determined by the given coordinate vector \({\left( x \right)_{\rm B}}\) and the given basis \({\rm B}\).

1. \({\rm B} = \left\{ {\left( {\begin{array}{*{20}{c}}{\bf{3}}\\{ - {\bf{5}}}\end{array}} \right),\left( {\begin{array}{*{20}{c}}{ - {\bf{4}}}\\{\bf{6}}\end{array}} \right)} \right\},{\left( x \right)_{\rm B}} = \left( {\begin{array}{*{20}{c}}{\bf{5}}\\{\bf{3}}\end{array}} \right)\)

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.