## 4 Choosing a \(D\)-Optimal Subset of \(n\) Measurements
### Set
These calculations lead to a computationally efficient and numerically stable version (Algorithm 3) of Algorithm 2:```
Data: An \(m\times n\) observation matrix \(C\) such that the first \(n\) rows are full rank, and tolerance factor \(f>1\). Result: Index set \(I\subset\{i=1,\ldots,m\}\) where the first \(n\) elements specify \(C_{n}=C(I(1:n),:)\) such that no row interchange will increase the determinant of \(C_{n}\) by more that \(f\); matrices \(\left[ \begin{array}{cc}A&B\end{array} \right]\) storing the upper-triangular factor of \(C(I,:)^{\top}\). Steps: Partition \(C^{\top}=\left[ \begin{array}{cc}A&B\end{array} \right]\) and form \(F=A^{-1}B\). Initialise \(m\times 1\) index set \(I\) with \(I(i)=i\). while\(\max_{ij}|F_{ij}|>f\)do
1. Choose \((i,j)\) such that \(|F_{i,j}|\) is maximised. and store \(\mathbf{a}_{i}\) and \(\mathbf{b}_{j}\). 2. Apply permutation matrix \(\Pi_{i,n}\) to move the \(i\)th column of \(A\) to the \(n\)th column \(A:=A\Pi_{i,n}\). 3. Apply \(\Pi_{i,n}^{\top}\) to \(F\): \(F:=\Pi_{i,n}F\). 4. Determine \((n-i+1)\times(n-i-1)\) orthogonal matrix \(Q\) such that \(Q^{\top}A(i:n,i:n-1)\) is upper-triangular and update: \[A(i:n,i:n):=Q^{\top}A(i:n,i:n),\quad B(i:n,:):=Q^{\top}B(i:n,:).\]
5. Set \(\mathbf{a}_{n}=A(:,n)\), \(\mathbf{b}_{j}=B(:,j)\), \(\tilde{\mathbf{u}}=F(:,j)-\mathbf{e}_{n}\) and \[\mathbf{w}=-\frac{1}{F_{n,j}}(F(n,:)^{\top}+\mathbf{e}_{j}).\]
6. Interchange columns and update \(I\). \(A(:,n)=\mathbf{b}_{j}\), \(B(:,j)=\mathbf{a}_{j}\). Set \(i_{n}=I(n)\), \(i_{j}=I(n+j)\) and \(I(n)=i_{j}\), \(I(n+j)=i_{n}\). 7. Update \(F\): \(F:=F+\tilde{\mathbf{u}}\mathbf{w}^{\top}\). end while
```

**Algorithm 3**GE: efficient algorithm to determine a \(D\)-optimal subset of an observation matrix

The algorithm is a sequential descent algorithm, with each exchange producing a decrease in the determinant of the variance matrix by at least a factor of \(1/f^{2}<1\), ensuring that it stops in a finite number of steps. However, there is no guarantee that the algorithm will determine the globally D-optimal subset, only a locally D-optimal solution. A different ordering of the rows of the observation matrix is quite likely to produce a different solution. Consider the following matrix \(C(a)\):

\[C(a)=\left[ \begin{array}{rrrrr}1.00&0.00&0.00&0.00\\ 0.00&1.00&0.00&0.00\\ 0.00&0.00&1.00&0.00\\ 0.00&0.00&0.00&a\\ 0.50&0.50&0.50&0.50\\ 0.17&-0.83&0.17&0.50\\ 0.17&0.17&-0.83&0.50\\ -0.83&0.17&0.17&0.50\\ \end{array} \right]. \tag{9}\]

The bottom four rows form an orthogonal matrix \(Q\) with \(|Q|=1\). However, for \(a>0.5\), there is no row interchange that will allow the determinant of the first four rows to be increased, and the GE algorithms stops with the first four rows with determinant \(a\), sub-optimal if \(a<1.0\). For \(0.5<a<1.0\), the SSQR algorithm, by contrast, selects the bottom four rows, in this case, the globally optimal solution. ### Combined SSQR-GE Algorithm

An effective approach in practice is to combine the SSQR and GE algorithms, using the SSQR algorithm to find an initial selection of columns, and to use the GE interchange algorithm to improve on, if possible, this selection. This combined algorithm has the advantages of being largely independent of the row ordering and will deliver a local minimum based on the SSQR algorithm starting point. Again, there is no guarantee that the solution will be a global optimum, but the examples discussed in Section 5 show that the combined algorithm works well. ### Sequential Approach for Choosing a Set of Additional Observations

The algorithms described in Sections 4.1 and 4.2 are designed to determine a minimal set of observations that produce D-optimal estimates of the model parameters \(\mathbf{a}\). We now consider the case in which estimates of \(\mathbf{a}\) have already been established.