Главная » Просмотр файлов » Heath - Scientific Computing

Heath - Scientific Computing (523150), страница 20

Файл №523150 Heath - Scientific Computing (Heath - Scientific Computing) 20 страницаHeath - Scientific Computing (523150) страница 202013-09-15СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 20)

Sparse linear systems with more generalnonzero patterns, on the other hand, require more sophisticated algorithms and data structures in order to avoid storing or operating on the zeros in the matrix (see Section 11.4.1).The properties just defined for real matrices have analogues for complex matrices, butin the complex case the ordinary matrix transpose is replaced by the conjugate transpose,denoted by a superscriptH. If γ = α + iβ is a complex number, where α and β are real√numbers and i = −1, then its complex conjugate is defined by γ̄ = α − iβ. The conjugatetranspose of a matrix A is then given by {AH }ij = āji .

Of course, for a real matrix A,AH = AT . A complex matrix is Hermitian if A = AH , and positive definite if xH Ax > 0for all complex vectors x 6= o.2.5.1Symmetric Positive Definite SystemsIf the matrix A is symmetric and positive definite, then an LU factorization can be arrangedso that U = LT , that is, A = LLT , where L is lower triangular and has positive diagonal64CHAPTER 2.

SYSTEMS OF LINEAR EQUATIONSentries (but not, in general, a unit diagonal). This is known as the Cholesky factorization ofA, and an algorithm for computing it can be derived simply by equating the correspondingentries of A and LLT and then generating the entries of L in the correct order. In the 2 × 2case, for example, we have a11 a21l11 0l11 l21,=a21 a220 l22l21 l22which implies thatl11 =√a11 ,l21 = a21 /l11 ,l22 =q2 .a22 − l21One way to write the resulting general algorithm, in which the Cholesky factor L overwritesthe original matrix A, is as follows:for j = 1 to n{ for each column j }for k = 1 to j − 1{ loop over all prior columns k }for i = j to n{ subtract a multiple ofaij = aij − aik · ajkcolumn k from column j }endend√ajj = ajjfor k = j + 1 to n{ scale column j by squareakj = akj /ajjroot of diagonal entry }endendA number of facts about the Cholesky factorization algorithm make it very attractive andpopular for symmetric positive definite matrices:• The n square roots required are all of positive numbers, so the algorithm is well-defined.• No pivoting is required for numerical stability.• Only the lower triangle of A is accessed, and hence the upper triangular portion neednot be stored.• Only about n3 /6 multiplications and a similar number of additions are required.Thus, Cholesky factorization requires only about half as much work and half as muchstorage as are required for LU factorization of a general matrix by Gaussian elimination.Unfortunately, taking advantage of this gain in storage usually requires that one triangle ofthe symmetric matrix be packed into a one-dimensional array, which is less convenient thanthe usual two-dimensional storage for a matrix.

For this reason, linear algebra softwarepackages commonly offer both packed storage and standard two-dimensional array storageversions for symmetric matrices so that the user can choose between convenience and storageconservation.In some circumstances it may be advantageous to express the Cholesky factorization inthe form A = LDLT , where L is unit lower triangular and D is diagonal with positivediagonal entries. Such a factorization can be computed by a simple variant of the standardCholesky algorithm, and it has the advantage of not requiring any square roots.

The2.5. SPECIAL TYPES OF LINEAR SYSTEMS65diagonal entries of D in the LDLT factorization are simply the squares of the diagonalentries of L in the LLT factorization.Example 2.12 Cholesky Factorization. To illustrate the algorithm, we compute theCholesky factorization of the symmetric positive definite matrix5.0 0 2.5A =  0 2.50 .2.5 0 2.125The successive transformations of the lower triangle of the matrix will be shown, as thealgorithm touches only this portion of the matrix. The first columnhas no prior columns,√so it is merely scaled by the square root of the diagonal entry, 5, to give2.236 0.2.51.118 0 2.125The second column now requires updating by subtracting a multiple of the first column.But in this case the multiplier in the second row of the first column is zero, so that thesecond column is unaffected by the first column.Thus, the second column is simply scaled√by the square root of its diagonal entry, 2.5, to give2.236 0.1.5811.11802.125Finally, the third column must be updated by subtracting multiples of the previous twocolumns.

The multipliers for the first two columns, found in the third row, are 1.118 andzero, respectively. Updating the third column accordingly gives2.236 0.1.5811.11800.875Taking the square root of the third diagonal entry then yields the final result2.236.L= 01.5811.11800.9352.5.2Symmetric Indefinite SystemsIf the matrix A is symmetric but indefinite (i.e., xT Ax can take on both positive andnegative values), then Cholesky factorization is not applicable, and some form of pivoting isgenerally required for numerical stability.

Obviously, any pivoting must be symmetric—of66CHAPTER 2. SYSTEMS OF LINEAR EQUATIONSthe form P AP T , where P is a permutation matrix—if the symmetry of the matrix is tobe preserved.We would like to obtain a factorization of the form P AP T = LDLT , where L is unitlower triangular and D is diagonal.

Unfortunately, such a factorization, with diagonal D,may not exist, and in any case it generally cannot be computed stably using only symmetricpivoting. The best we can do is to take D to be either tridiagonal or block diagonal with1 × 1 and 2 × 2 diagonal blocks. (A block matrix is a matrix whose entries are partitionedinto submatrices, or “blocks,” of compatible dimensions. In a block diagonal matrix, all ofthese submatrices are zero except those on the main block diagonal.)Efficient algorithms have been developed by Aasen for the tridiagonal factorization, andby Bunch and Parlett (with subsequent improvements in the pivoting procedure by Bunchand Kaufman) for the block diagonal factorization (see [104]).

In either case, the pivotingprocedure yields a stable factorization that requires only about n3 /6 multiplications and asimilar number of additions. Also, in either case, the subsequent solution phase requiresonly O(n2 ) work. Thus, the cost of solving symmetric indefinite systems is similar to thatfor positive definite systems using Cholesky factorization, and only about half the cost fornonsymmetric systems using Gaussian elimination.2.5.3Band SystemsGaussian elimination for band matrices differs little from the general case—the only algorithmic changes are in the ranges of the loops. Of course, one should also use a datastructure for a band matrix that avoids storing zero entries. A common choice when theband is dense is to store the matrix in a two-dimensional array by diagonals.

If pivoting isrequired for numerical stability, then the algorithm becomes slightly more complicated inthat the bandwidth can grow (but no more than double). Thus, a general-purpose bandsolver for arbitrary bandwidth is very similar to a code for Gaussian elimination for generalmatrices.For a fixed small bandwidth, however, a band solver can be extremely simple, especiallyif pivoting is not required for stability. Consider, for example, the tridiagonal matrixb1a 2A= 0 . ..0c10b2c2......... an−1···0···......bn−1an0.. . .0 cn−1bnIf pivoting is not required for stability, which is often the case for tridiagonal systems arisingin practice (e.g., if the matrix is diagonally dominant or positive definite), then Gaussianelimination reduces to the following simple algorithm:d 1 = b1for i = 2 to nmi = ai /di−1di = bi − mi ci−1end2.6.

ITERATIVE METHODS FOR LINEAR SYSTEMS67and the resulting LU factorization of A is given by1 m2L= 0 . ..001......······......···......mn−101mn0.. ... ,.01U =d1c10......d2......···00···......c2...... dn−1···00.. . .0 cn−1dnIn general, a band system of bandwidth β requires only O(βn) storage, and the factorization requires only O(β 2 n) work, both of which represent substantial savings over fullsystems if β n.2.6Iterative Methods for Linear SystemsGaussian elimination is an example of a direct method for solving linear systems, i.e., onethat produces the exact solution (assuming exact arithmetic) to a linear system in a finitenumber of steps.

Iterative methods for solving linear systems begin with an initial estimatefor the solution and successively improve it until the solution is as accurate as desired. Intheory, an infinite number of iterations might be required to converge to the exact solution,but in practice the iterations terminate after the residual kb − Axk, or some other measureof error, is as small as desired. For some types of problems, iterative methods may havesignificant advantages over direct methods.

Iterative methods for solving linear systemswill be postponed until Chapter 11, where we consider the numerical solution of partialdifferential equations, which leads to sparse linear systems that are often best solved byiterative methods.2.7Software for Linear SystemsAlmost any software library for scientific computing contains routines for solving linearsystems of various types. Table 2.1 is a list of appropriate routines for solving real, general,dense linear systems, and also for estimating the condition number, in some widely availablesoftware collections. Some packages use different prefixes or suffixes in the routine namesto indicate the data type, typically s for single-precision real, d for double-precision real, cfor single-precision complex, and z for double-precision complex; only the single-precisionreal versions are listed here.

Характеристики

Тип файла
PDF-файл
Размер
1,88 Mb
Тип материала
Учебное заведение
Неизвестно

Список файлов книги

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6264
Авторов
на СтудИзбе
317
Средний доход
с одного платного файла
Обучение Подробнее