\documentclass[twoside]{article}
\usepackage{graphicx}
\usepackage{theorem}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{array}
\usepackage{makeidx}
\usepackage{latexsym}

\def\gam{$\gamma$}
\def\Lam{$\Lambda$}
\def\Rarrow{$\longrightarrow$}

\raggedbottom

\newenvironment{proof}{\textbf{Proof:} \textmd}{$\Box$}


\newtheorem{lemma}{Lemma}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{conjecture}{Conjecture}[section]
\newtheorem{proposition}{Proposition}[section]

\begin{document}
\title{\bf \Huge On Solving the Inverse Conductivity Problem for Annular Networks}
\author{\Large Ernie Esser \\ University of Washington}
\date{August 2000}
\maketitle \vspace{.3in}
\begin{abstract}
This paper discusses the inverse conductivity problem for annular
networks, those networks that are defined inside an annulus.  In
particular, we examine networks formed by intersecting lines with
concentric circles.  A simple recovery algorithm that calculates
the conductances, \gam, directly from the response matrix, \Lam,
has been produced for the network with twice as many rays as
circles. This network appears to be the cutoff point for
recoverable annular networks. Conductivities from graphs with
fewer rays were not necessarily recoverable from the response
matrix.  A detailed analysis is given for the network with three
rays intersecting two circles. It can be shown that this is a
non-recoverable network and numerical evidence suggests that the
map \gam \Rarrow \Lam\ is in fact infinite to one. Several methods
are given for finding relations in the response matrix, and a
characterization of this network's response matrix is also
suggested. Finally there is a brief discussion on how methods for
analyzing these annular networks might prove useful for analyzing
other planar, non-circular planar graphs.
\end{abstract}
\pagebreak

\tableofcontents
\pagebreak

\section{Introduction}\footnote{Background information for forward and inverse problems is taken from \cite{book}.}
The purpose of this research is to find methods for analyzing the
inverse conductivity problem for annular networks with circular
symmetry and to see if these methods can be generalized. Since
the shape of  the graph is determined by the number of rays and
circles, specific annular graphs will be referred to as
$G(rays,circles)$.

The forward problem is to produce the response matrix from known
conductors. For a network with $n$ nodes, the Kirchhoff matrix $K$
is an $n \times n$ symmetric matrix formed by taking for $i \neq
j$
\[ K(i,j) = \left \{ \begin{array}{ll} -\gamma(i,j) & \mbox{if there is
an edge from i to j} \\ 0 & \mbox{if no such edge exists}
\end{array} \right\} \] Then the diagonal entries are chosen such
that each row sums to zero. $K$ operates on the vector of
potentials $u$ to give a vector of currents $\phi$ coming out of
each node. ($Ku = \phi$)\  Naturally the current out of interior
nodes is set to zero to agree with Kirchhoff's Law. It's useful
to write the  Kirchhoff matrix in the following block form:
\[ K = \left[ \begin{array}{ll} A & B \\ B^{T} & C \end{array} \right] \]
If all interior nodes are numbered such that they appear in the
$C$ block  and all boundary nodes are in the $A$ block, then the
response matrix is just the Schur Compliment of $K$ in $C$.
\[ \Lambda = A - BC^{-1}B^{T} \] It is shown in \cite{book} that C is invertible because K is positive semi-definite.
\Lam\ acts on the vector of boundary potentials to give the
vector  of boundary currents. This is the Dirichlet to Neumann map.

The inverse problem is to see if $K$, which contains all the
information about the network, can be recovered from \Lam\ and the
shape of the graph.  One of the most useful tools for doing this
is the averaging property for \gam-harmonic networks, which
follows directly from Kirchhoff's Law.  (A \gam-harmonic function in this discrete case is one that satisfies Kirchhoff's Law at each interior node.) If $p$ is any interior
node and q is a neighboring node, then \begin{equation} u(p) =
\frac{\displaystyle \sum_{q \in N(p)}
\gamma(p,q)u(q)}{\displaystyle \sum_{q \in N(p)} \gamma(p,q)}
\label{average} \end{equation} This formula is used extensively
both in creating current patterns in a network and in showing that
imposed boundary conditions are legal. It is used repeatedly, for
example, in the recovery algorithm for all networks of the form
$G(2n,n)$\ that appears in the next section.%refer to proof
%about legal boundary conds in 2n,n case

The other main tool is the formula which relates connections in
the graph to sub-determinants of the response matrix.  If $P =
(p_{1},...,p_{k})$\ and $Q = (q_{1},...,q_{k})$\  are two sets of
disjoint boundary nodes, a $k$-connection from $P$\  to $Q$\ is
the set of all disjoint paths $\alpha =
(\alpha_{1},...,\alpha_{k})$\ through the graph where each element
in $P$\ is connected to a different element in $Q$.  For every $1
\leq i \leq k$, $\alpha_{i}$\ is the path from $P_{i}$\ to
$Q_{\tau (i)}$\ where $\tau$ is a permutation of $Q$ in the
permutation group $S_{k}$.  Then for each $k$-connection in the
set of connections from $P$\ to $Q$\ :  $\tau_{\alpha}$\ is the
permutation of the nodes $(q_{1},...,q_{k})$\ that matches the
endpoints of the paths $(\alpha_{1},...,\alpha_{k})$;
$E_{\alpha}$\ is the set of edges in $\alpha$; $J_{\alpha}$\ is
the set of interior nodes which are not endpoints of any edge in
$\alpha$; I is the set of all interior nodes; and $D_{\alpha} =
detK(J_{\alpha};J_{\alpha})$. Then \begin{equation}  det \Lambda
(P;Q) \cdot detK(I;I) = (-1)^{k} \sum_{\tau \in S_{k}} sgn(\tau)
\left\{
\begin{array}{ll} \displaystyle \sum_{\alpha}
\prod_{e \in E_{\alpha}} \gamma(e) \cdot D_{\alpha} \\
\tau_{\alpha} = \tau \end{array} \right\} \label{perm}
\end{equation}



The network $G(3,2)$, discussed in sections 2 and 3,  is
interesting because in many ways it behaves similarly to a graph
that has two edges in series but is not $Y-\Delta$\ equivalent to
any such graph.  $G(3,2)$\ is an unrecoverable network despite
the fact that there are as many edges in the network as parameters in
\Lam, which is 15.  In fact strong numerical evidence suggests
that although $\Lambda \subseteq \Re^{15}$, \Lam\ is actually 14 dimensional.
This is consistent with the discovery of a determinantal relation among the 15 parameters in
\Lam\ that along with some sign conditions may characterize this
response matrix.

Section 4 examines ways in which some of the methods used might be
generalized and also includes some conjectures about annular
networks not discussed in detail.  Included in Appendix A is
some of the MATLAB code used to produce the numerical results.
\pagebreak


\section{Generally Recoverable Annular Networks}
\subsection{Current Patterns for the Network with Twice as Many Rays as Circles}
All $G(n,n/2)$\ networks are completely recoverable. $(n =
4,6,8,...)$ The current patterns used in the recoverability
algorithm are identical for any size of these networks.  Figure
\ref{G(n,n/2)} shows the numbering of the nodes as well as the
conditions that are imposed on the boundary to produce the
general current patterns. Although $n=6$\ in that example, the
numbering is left in terms of $n$\ to show the general numbering
system. Parenthesis signify current conditions. A potential of
zero and a current of zero are both imposed at boundary nodes one
through $n$. Potentials of zero and then one are imposed at nodes
$4+n$\ and $5+n$\ respectively. In the most general case those
nodes would be labeled $1+3n/2$\ and $2+3n/2$.
     \begin{figure}[h]
     \begin{center}
     %\includegraphics[width=12cm]{c:/c/ernstuff/2nn.eps}
    \includegraphics[width=12cm]{2nn.eps}

     \caption{$G(6,3)$} \label{G(n,n/2)}
     \end{center}
     \end{figure}
When Kirchhoff's Law is forced to be true at all interior nodes,
the zero potentials propagate through the network as shown in
figure \ref{ps}. Most of the zeros follow directly from the
averaging property. The zero potentials at nodes relabeled p1
through p5 follow in a slightly less direct manner.
\begin{lemma}
Given the initial boundary conditions of figure \ref{G(n,n/2)},
the voltage potentials at nodes labeled $(p_{1},...,p_{5})$\ in
figure \ref{ps} must be identically zero.
\end{lemma}
\begin{proof}
By equation \ref{average}, if $u_{1}$\ is the voltage at $p_{1}$,
$u_{1}u_{2} \leq 0$. Otherwise zero could not be the average of
the surrounding potentials weighted against all positive
conductors. Similarly $u_{2}u_{3} \leq 0$, $u_{3}u_{4} \leq 0$,
$u_{4}u_{5} \leq 0$ and $u_{1}u_{5} \leq 0$. But $0 \leq
u_{1}u_{2}u_{2}u_{3}u_{3}u_{4}u_{4}u_{5}u_{1}u_{5} \leq
0$\ because it is both a product of squares and a product of 5
non-positive numbers. Therefore $(u_{1},...,u_{5}) = 0$.
\end{proof}
\begin{figure}[h]
     \begin{center}

     %\includegraphics[width=12cm]{c:/c/ernstuff/pots.eps}
    \includegraphics[width=12cm]{pots.eps}
     \caption{All zero potentials for $G(n,n/2)$} \label{ps}
     \end{center}
     \end{figure}
\subsection{Existence and Uniqueness of Unknown Boundary
Potentials} The unknown boundary potentials of figure \ref{ps} are
labeled A,B,C,D and E. They need to exist for the imposed
boundary conditions to be legal and they should be unique if this
current pattern is to be useful in recovering the conductances.
\begin{theorem}
If the boundary conditions described in figure \ref{G(n,n/2)} are
imposed on any size annular network $G(n,n/2)$, then all the
unknown boundary potentials exist and are uniquely determined.
\end{theorem}
\begin{proof}
\linebreak
1.  One proof of this fact is by way of the averaging property
(equation \ref{average}). By applying this equation at
$p_{2+n/2+(n/2+1)n}$, the potential on the same circle but one ray
counterclockwise is determined by the surrounding conductivities.
(The specific number of that node depends on the size of the
network.) From $p_{2+n/2 + (n/2+1)n}$, move in one circle and
counterclockwise one ray.  Applying the averaging property at
this new node will again determine another node in terms of its
surrounding conductivities.  Continuing in this fashion will
eventually determine $u_{1}$.  (The numbering is now the numbering of the nodes in figure \ref{G(n,n/2)}.) At this point,
$(u_{1},...,u_{n})$\ and $(u_{1+2n},...,u_{4n})$\ will all be
determined.  Now with the potentials on the inside two circles
determined, there is only one way to determine the rest of the
potentials.  Applying the averaging property at any node $p$\ on
the outermost circle to be completely determined will yield the
potential on the same ray as $p$\ but one circle outward.
Proceeding in this fashion will determine the potentials at all
the nodes. Thus the imposed boundary conditions are legal because
it's possible to satisfy Kirchhoff's Law at each interior node.
All unknown potentials are also uniquely determined because there
is only one way to express them in terms of the conductances.

2.  Another interesting proof of the same fact goes by way of
equation \ref{perm}. Let $Q$\ be the boundary nodes at which the
potential is unknown and $P$\ be the boundary nodes for which
known currents are imposed.  The boundary potentials can be found in the following way:
\[ U(Q) = \Lambda (P;Q)^{-1} \cdot -\Lambda (P;p_{2+3n/2}) \] It only needs to be shown that
$ \Lambda (P;Q) $ is non-singular.   By equation \ref{perm},
\linebreak $\det \Lambda (P;Q) \neq 0 $ if for all $\tau \in S_{k}
$\ $sgn(\tau)$\ remains the same.  For $G(n,n/2)$, there are only
two connections from $P$\ to $Q$. The path $\alpha_{1}$\ that
starts at $P_{1}$\ must terminate at either $p_{2}$\ or $p_{n}$,
which correspond to the two possible permutations of $Q_{1}$.
With $n$\ rays, there will always be $n-1$\ unknown potentials.
The other paths are all determined by $\alpha_{1}$. With $n-2$\
remaining paths and only $n/2 - 1$\ remaining circles, half the
paths must go to one side of $\alpha_{1}$\ while the other half
goes to the other side. Since the only possible permutation shifts every element in $Q$\  by one, it will always take $n-2$\ permutations to get
from one connection to the other.  Since $n$\ is an even number,
$sgn(\tau)$\ is the same for both connections. So $\Lambda
(P;Q)$\ is invertible and $U(Q)$\ can be uniquely solved for.
\end{proof}
\subsection{Recoverability Algorithm}
The following is a sketch of the recovery algorithm for
$G(n,n/2)$\ networks:
\begin{itemize}

\item[$\bullet${\bf 1}] The first step is to calculate the unknown potentials as
done in the previous section. $ U(Q) = \Lambda (P;Q)^{-1} \cdot
-\Lambda (P;p_{2+3n/2}) $
\item[$\bullet${\bf 2}] Then calculate the conductance of the
boundary spike which has a potential difference of one.
\[ \gamma(2+3n/2,2+n(n/2+1)) = \phi(2+3n/2) \]
\linebreak \[ \phi(2+3n/2) = \Lambda(2+3n/2;p_{1},...,p_{2n})
\cdot U(p_{1},...,p_{2n})
\]
\item[$\bullet${\bf 3}] Rotate the current patterns and follow the
previous steps to calculate all the boundary conductors
(conductors on the first layer).
\item[$\bullet${\bf 4}] Use Ohm's Law, ($u = \phi/\gamma$), to
calculate the potentials one circle in (the second layer).
\item[$\bullet${\bf 5}] Now on this circle there are two edges for
which the potential difference and current are known.  Again, use
Ohm's Law to calculate the conductances there and rotate the
current patterns to get solve for all edges on that circle.
\item[$\bullet${\bf 6}] At each node on the circle, the current
that flows towards the center of the network can be found by
applying Kirchhoff's Law. Then there are two edges on the third
layer for which the current flow and potential difference are
known. Again, solve for all conductances on this layer by
rotating current patterns.
\item[$\bullet${\bf 7}] Repeat steps 4,5, and 6 until more than
half of the conductances have been recovered.
\item[$\bullet${\bf 8}] Invert the current pattern and follow the
same sequence of steps to solve the rest of the network.
\end{itemize}

%PUT EXAMPLE HERE
\pagebreak
\section{Annular Network with Three Rays and Two Circles}
\subsection{Recovering Conductances When One Boundary Conductor is
Known} When the conductance of a boundary spike is known for
$G(3,2)$, the remaining conductances are recoverable.  Figure
\ref{fig32} shows all the imposed conditions and the zero
potentials that propagate inside the network.  In the case of
Figure \ref{fig32}, $\gamma(4,10)$\ is known to equal $a$.
Setting the current equal to the conductance forces the voltage
difference to be one, but since $u_{4}$\ already equals one,
$u_{10}$\ becomes zero.
\begin{figure}[h]
     \begin{center}

     %\includegraphics[width=12cm]{c:/c/ernstuff/fig32.eps}
    \includegraphics[width=12cm]{fig32.eps}
     \caption{$G(3,2)$} \label{fig32}
     \end{center}
\end{figure}
Equation \ref{3P} shows how the three unknown potentials can be found:
\begin{equation} \label{3P} \left[
\begin{array}{l} u_{1} \\ u_{2} \\ u_{3} \end{array} \right] =
\left[ \begin{array}{lll} \lambda_{4,1} & \lambda_{4,2} &
\lambda_{4,3} \\ \lambda_{5,1} & \lambda_{5,2} & \lambda_{5,3}
\\ \lambda_{6,1} & \lambda_{6,2} & \lambda_{6,3} \end{array}
\right]^{-1} \left[ \begin{array}{c} a - \lambda_{4,4} \\
-\lambda_{5,4} \\ -\lambda_{6,4} \end{array} \right]
\end{equation}
The above matrix $\Lambda(4,5,6;1,2,3)$\ is invertible because
there is only one connection from $(p_{4},p_{5},p_{6})$\ to
$(p_{1},p_{2},p_{3})$.  Therefore by equation \ref{perm}\ we see
that \linebreak  $\det \Lambda(4,5,6;1,2,3) \neq 0$. So the
potentials exit for the given boundary conditions and are
uniquely determined.  It is then simple to solve for the boundary
conductances.  For example:
\[ \gamma(2,8) = \frac{1}{u_{2}} \left[ \lambda_{2,4} +
u_{1}\lambda_{2,1} + u_{2}\lambda_{2,2} + u_{3}\lambda_{2,3}
\right] \]
\[ \gamma(3,9) = \frac{1}{u_{3}} \left[ \lambda_{3,4} +
u_{1}\lambda_{3,1} + u_{2}\lambda_{3,2} + u_{3}\lambda_{3,3}
\right] \] The current pattern can be rotated and inverted as
long as the conductor that must be known corresponds to one that
has been solved for.  Once all the boundary conductors have been
found, Ohm's Law can be used to determine for any rotation or
inversion the voltage at the one interior node which wasn't
determined at the start.  In figure \ref{fig32} that node is
$p_{7}$. The complete recoverability algorithm can be found in Appendix A.
\subsection{Non-Recoverability of G(3,2)}
Numerically, it's possible to find multiple sets of conductivities
for $G(3,2)$\ that result in the same response matrix, thus
proving that the conductivities are not recoverable.

\textbf{Example 1:} \textmd Let $ (\gamma_{1}(4,10), \gamma_{1}(6,12), \gamma_{1}(5,11), \gamma_{1}(10,11), \gamma_{1}(10,12), \gamma_{1}(11,12),...$ $ \gamma_{1}(7,10),\gamma_{1}(8,11), \gamma_{1}(9,12), \gamma_{1}(7,8), \gamma_{1}(7,9), \gamma_{1}(8,9), \gamma_{1}(1,7), \gamma_{1}(2,8), \gamma_{1}(3,9))$ \linebreak $ = (1,1,1,2,2,2,3,3,3,4,4,4,5,5,5) $\ be a set of conductivities for $G(3,2)$\ as numbered in figure \ref{fig32}. When the recovery algorithm is run with $\gamma(4,10) = 1$\ replaced by $\gamma(4,10) = 7$, the set of $\gamma_{2}$s is \[(7,7,7,\frac{14}{241},\frac{14}{241},\frac{14}{241},\frac{210}{241},\frac{210}{241},\frac{210}{241},\frac{2800}{241},\frac{2800}{241},\frac{2800}{241},\frac{70}{17},\frac{70}{17},\frac{70}{17}) \]
Now by a symbolic calculation with all rational numbers,
\[ \Lambda_{\gamma1} = \Lambda_{\gamma2} = \frac{1}{4393} \left[ \begin{array}{llllll} \ 11765 & -4450 & -4450 & -1185 & -840 & -840 \\
-4450&\ 11765&-4450&-840&-1185&-840 \\
-4450&-4450&\ 11765&-840&-840&-1185 \\
-1185&-840&-840&\ 3577&-356&-356 \\
-840&-1185&-840&-356&\ 3577&-356 \\
-840&-840&-1185&-356&-356&\ 3577
\end{array} \right] \]
To illustrate that the conductances are all found in terms of the known conductor, here is the MATLAB output for when $\gamma(4,10) = 1$\ is replaced by $\gamma(4,10) = a$. $\Lambda_{\gamma1}$\ is used.

\begin{verbatim}
» symgetcond(L,a);
gamma4_10 =
a
gamma6_12 =
a
gamma5_11 =
a
gamma10_11 =
4*a^2/(-150*a+89*a^2+63)
gamma10_12 =
4*a^2/(-150*a+89*a^2+63)
gamma11_12 =
4*a^2/(-150*a+89*a^2+63)
gamma7_10 =
3*(-21+23*a)*a/(-150*a+89*a^2+63)
gamma8_11 =
3*(-21+23*a)*a/(-150*a+89*a^2+63)
gamma9_12 =
3*(-21+23*a)*a/(-150*a+89*a^2+63)
gamma7_8 =
2*(-21+23*a)^2/(-150*a+89*a^2+63)
gamma7_9 =
2*(-21+23*a)^2/(-150*a+89*a^2+63)
gamma8_9 =
2*(-21+23*a)^2/(-150*a+89*a^2+63)
gamma1_7 =
5/2*(-21+23*a)/(14*a-13)
gamma2_8 =
5/2*(-21+23*a)/(14*a-13)
gamma3_9 =
5/2*(-21+23*a)/(14*a-13)
\end{verbatim}

It is important that this calculation was done symbolically.  \Lam\ changes so little when conductances are changed that  even with double precision roundoff error would normally make it difficult to see that $\Lambda_{\gamma1}$\ and $\Lambda_{\gamma2}$\ are exactly the same.

Appendix A includes MATLAB programs that execute the following
series of steps:
\begin{itemize}
\item[$\bullet${\bf 1}] Compute $K$\ and $\Lambda$\ from a known set
of conductivities.
\item[$\bullet${\bf 2}] Choose a conductance for $a$\ (see figure
\ref{fig32})\ and compute the other 14 conductors based on \Lam.
\item[$\bullet${\bf 3}] Make a new Kirchhoff matrix $K'$\ and
calculate the new response matrix $\Lambda'$.
\item[$\bullet${\bf 4}] Compare $\Lambda$\ and $\Lambda'$.
\end{itemize}
In every instance, the two response matrices have been identical
with no upper bound on the choice for $a$.  However, if the
conductors are forced to be positive as they should be, there is
then a range that the choice of $a$\ must fall into.
\begin{conjecture}
The map $\gamma \longrightarrow \Lambda$\ is infinite to one.
Starting with known $K$\ and $\Lambda$, any choice of a boundary
conductor within some range about the original value will lead to
a new set of conductors for the network which will then have the
same $\Lambda$. \label{14D}
\end{conjecture}

This behavior is similar to the example of two edges connected in
series.  When one edge changes within a small enough range, the
other edge can adjust itself in order to keep the same response
matrix.  Similarly, for $G(3,2)$\ it appears that for any choice
of a boundary conductance within a certain range, the other 14
conductors can adjust themselves to again retain the same
response matrix.

This is especially interesting in the layered case.  When the
initial set of conductivities are equal on each of the
five layers, the response matrix always has a special form.  There
are blocks which have the same value.
\begin{figure}[h]
\begin{center}
\[ \Lambda = \left[
\begin{array}{llllll} \Sigma & \alpha & \alpha & \beta & \delta &
\delta \\ \alpha & \Sigma & \alpha & \delta & \beta &
\delta \\ \alpha & \alpha & \Sigma & \delta & \delta & \beta \\
\beta & \delta & \delta & \Sigma & \epsilon & \epsilon \\ \delta
& \beta & \delta & \epsilon & \Sigma & \epsilon \\ \delta &
\delta & \beta & \epsilon & \epsilon & \Sigma \end{array} \right]
\]
\end{center}
\caption{Response matrix for layered network} \label{layer}
\end{figure}
When one of the boundary conductors is altered and used to compute
the other 14, they all vary the same amount on each layer without
being restricted equal on layers.  This has already been shown in example 1. Although not quite a proof,
this seems to indicate that only layered networks can have that
special form.

\begin{conjecture}
Any response matrix which has the form shown in figure \ref{layer} and satisfies all sign conditions listed in section 4.1 is a response matrix for $G(3,2)$\ with
conductivities equal on layers.
\end{conjecture}
\pagebreak
\section{The Response Matrix for G(3,2)}
\subsection{Sign Conditions and Legal Perturbations}

For any response matrix for $G(3,2)$, there are 13 sign
conditions which come in the form of determinantal inequalities.
According to equation \ref{perm}, whenever there is only one
connection from two sets of nodes $P$\ and $Q$\ it must be true
that $\det \Lambda(P,Q) \neq 0$.  There are only four such sets of nodes in $G(3,2)$\ that are not equivalent under rotations or inversions of the network. They are
\begin{enumerate}
\item $\det \Lambda(1,2,3;4,5,6) < 0$
\item $\det \Lambda(1,2,5;3,4,6) > 0$
\item $\det \Lambda(1,2;4,5) > 0$
\item $\det \Lambda(1,4;2,5) > 0$
\end{enumerate}
Taking all rotations and inversions of these four types of determinants yields the complete set of determinantal inequalities listed below.
\begin{enumerate}
\item $\det \Lambda(1,2,3;4,5,6) < 0$
\item $\det \Lambda(1,2,5;3,4,6) > 0$
\item $\det \Lambda(2,1,4;3,5,6) > 0$
\item $\det \Lambda(2,3,5;1,4,6) > 0$
\item $\det \Lambda(2,3,6;1,5,4) > 0$
\item $\det \Lambda(1,3,4;2,5,6) > 0$
\item $\det \Lambda(1,3,6;2,4,5) > 0$
\item $\det \Lambda(1,2;4,5) > 0$
\item $\det \Lambda(2,3;5,6) > 0$
\item $\det \Lambda(1,3;4,6) > 0$
\item $\det \Lambda(1,4;2,5) > 0$
\item $\det \Lambda(1,4;3,6) > 0$
\item $\det \Lambda(2,5;3,6) > 0$
\end{enumerate}
These determinants, however, aren't enough to characterize \Lam.
It's simple to find response matrices that satisfy these
conditions yet don't belong to the space of response matrices for
$G(3,2)$. For example, one can slightly perturb a single entry
and then correct \Lam\ to maintain symmetry and row sums equal to
zero.  This usually continues to satisfy the sign conditions
without being a valid response matrix for this network. The
criterion for being a valid response matrix assumes the validity
of Conjecture \ref{14D}.  The same MATLAB programs already used
check if any new \Lam\ satisfies that conjecture.

However, there are three entries in \Lam\ that can be multiplied
by any constant c, $c \geq 1$, such that when corrections are
made to maintain the characteristics of a response matrix, \Lam\
stays in the space of valid response matrices for $G(3,2)$. The
entries are $\lambda_{1,4},\lambda_{2,5}$, and $\lambda_{3,6}$\
based on the numbering in figure \ref{fig32}.  These represent
lines along which \Lam\ can vary.  They will prove useful in
section 4.2.
\subsection{Existence of a Relation}
Given the success at finding multiple solutions of the inverse
problem for $G(3,2)$\ and the difficulty in staying in the space
of valid response matrices when entries in \Lam\ are perturbed, it is
initially assumed that \Lam\ is 14 dimensional.  Since there are 15
parameters in \Lam, there should be a polynomial relation among
these terms that reduces the dimension by one.
\begin{theorem}
Any relation among the 15 parameters in \Lam\ must be of the same
degree. \label{same}
\end{theorem}
\begin{proof}
In general, any response matrix can be multiplied by a scalar,
$t$, and still be a response matrix for the same type of network.
Suppose the relation, $R = 0$, consists of a sum of polynomials of
different degree.  Let $P4$\ and $P3$\ represent polynomials of
degrees 4 and 3 and let $R = P3 + P4$.  Now if \Lam\ is multiplied
by $t$, $R = t^{3}*P3 + t^{4}*P4$.  $R$\ must be zero in $t$, so
both $P3$\ and $P4$\ are zero.
\end{proof}
\begin{theorem}
Any relation among the 15 parameters in \Lam\ cannot include the
following terms: $\lambda_{1,4}$, $\lambda_{2,5}$, or
$\lambda_{3,6}$.
\end{theorem}
\begin{proof}
It has been shown numerically that $\lambda_{1,4}$\ can be
multiplied by any number $c$, $c > 1$, and the adjusted response
matrix is still a response matrix for $G(3,2)$. Let all powers of
$\lambda_{1,4}$\ be factored out of the relation.  $R$\ can be
written as \[ R = c\lambda_{1,4}(R1) + c^{2}\lambda_{1,4}^{2}(R2)...
+ (R3) \] Since $R$\ is zero in $c$, $R1 = 0$, $R2 = 0$, and $R3
= 0$. Thus $\lambda_{1,4}$\ doesn't appear in $R$.  Similarly,
$\lambda_{2,5}$\ and $\lambda_{3,6}$\ are also not included in
$R$.
\end{proof}
\begin{theorem}
Let $R$\ be a polynomial relation in \Lam\ be of degree $d$. For
any d, there are two possible choices of a basis of polynomials such that $R$ must be a linear combination of the polynomials in one of the bases. One basis the set of polynomials of degree $d$\ that are
invariant under rotations and inversions of $G(3,2)$. The other
is the set of polynomials of degree $d$\ that are invariant under
rotations but change sign under inversions. \label{basis}
\end{theorem}
\begin{proof}
By Theorem \ref{same}, the only relations of degree $d$\ are multiples of $R$.
Let $G_{R}$\ be the operator that performs rotations on $P$, where $P$\ is a polynomial of degree $d$, and let $G_{I}$\ be the operator that performs inversions on $P$.  There must be a relation for each rotation and inversion.  If $P$\ is to appear in the relation, then
\[ G_{R}P = t_{R}P\  \mbox{and}\  G_{I}P = t_{I}P \]
where $t_{R} \in \Re$\ and $t_{I} \in \Re$.  $P$\ is an eigenvector and the $t$'s are eigenvalues. The characteristic equations come directly from $G$.  Since $G_{R}$\ is a third
order operation, its corresponding eigenvalues, $t_{R}$, are the three
roots of unity.  The only real root is 1. $G_{I}$\ is a second order operation so $t_{I}$\ can be $1$\ or $-1$.  Therefore
\[ Basis1_{d} = \left\{ P: G_{R}P = P,\  G_{I}P = P \right\} \]
\[ Basis2_{d} = \left\{ P: G_{R}P = P,\  G_{I}P = -P \right\} \]
These correspond to the two possible choices of basis described in the theorem statement.
\end{proof}

\subsection{Finding the Relations}
One method used to find the relation is a brute force MATLAB
program that for any degree $d$\ finds all polynomials of that
degree which satisfy either $G_{I}P = P$\ or $G_{I}P = -P$. ($G_{R}P = P$\ must always be satisfied.)

\textbf{Example 2} \textmd
The following MATLAB output is a basis for $G_{I}P = P$\ where $P$\ is of degree two.
\Lam\ is labeled as in equation \ref{L}.
\begin{verbatim}

Basis =

[ a^2+f^2+b^2+t^2+v^2+u^2]
[ a*b+f*a+b*f+t*u+v*t+u*v]
[ a*d+f*p+b*q+t*g+v*r+u*e]
[ a*e+f*g+b*r+t*q+v*d+u*p]
[ a*g+f*r+b*e+t*d+v*p+u*q]
[ a*p+f*q+b*d+t*r+v*e+u*g]
[ a*q+f*d+b*p+t*e+v*g+u*r]
[ a*r+f*e+b*g+t*p+v*q+u*d]
[       2*a*t+2*f*v+2*b*u]
[ a*u+f*t+b*v+t*b+v*a+u*f]
[ d^2+p^2+q^2+g^2+r^2+e^2]
[ d*e+p*g+q*r+g*q+r*d+e*p]
[       2*d*g+2*p*r+2*q*e]
[ d*p+p*q+q*d+g*r+r*e+e*g]

\end{verbatim}
Those two cases $G_{I}P = P$\ and $G_{I}P = -P$\ are dealt  with
separately. The first step is to numerically compute a random
response matrix and substitute the values into the set of
polynomials.  This appears as the first row in a matrix $P^{*}$.
The process is repeated until $P^{*}$\ is a square matrix.  Then
the nullspace $N(P^{*})$\ is calculated.  Every column in the
nullspace represents a combination of polynomials that is zero.
Algebraic identities do exist that make a combination of
polynomials equal to zero, but these can easily be weeded out
because the coefficients change every time new numbers are
substituted into the polynomials.  The relation found was of
degree 3 and occurred among elements of the basis for $G_{I}P =
-P$. If the response matrix is represented as
\begin{equation} \Lambda = \left[
\begin{array}{llllll} \Sigma & a & b & c & d &
e \\ a & \Sigma & f & g & h &
p \\ b & f & \Sigma & q & r & s \\
c & g & q & \Sigma & t & u \\ d
& h & r & t & \Sigma & v \\ e &
p & s & u & v & \Sigma \end{array} \right]
\label{L} \end{equation}
Then the relation can be expressed as
\begin{equation} R = aqv + fdu + bpt - tef - vgb - ura - dpq + gre = 0 \label{R}  \end{equation}

\begin{theorem}
For any \Lam\ for $G(3,2)$\ labeled as in equation \ref{L}, equation \ref{R} is true.
\end{theorem}
\begin{proof}
Equation \ref{R} is equivalent to saying
\[ R = \det(\Lambda(1,2,4;3,5,6)) - \det(\Lambda(1,4,5;2,3,6)) = 0\]
Examining these determinants by way of equation \ref{perm} shows R always holds for $G(3,2)$.  The set of paths in the
connection $(p_{1},p_{2},p_{4};q_{3},q_{5},q_{6})$ are exactly the
same as the set of paths in the connection
$(p_{1},p_{4},p_{5};q_{2},q_{3},q_{6})$.  In equation \ref{perm}
this means that $\prod_{e \in E_{\alpha}} \gamma(e)$\ is the same
for each connection.  Since $D_{\alpha}$\ and $\det K(I;I)$\ are
also the same, the determinants corresponding to each connection
must be equal.
\end{proof}
\begin{theorem}
There is no relation in $G(3,2)$\ that has degree less than three.
\label{no21}
\end{theorem}
\begin{proof}
The numerical method used to produce $R$\ also produced to sets of bases each for degrees one and two.  If $R$\ were to be of degree one or two, it would have to be a linear combination of terms in one of those four bases.  No such relation exists because for degrees one and two, $N(P^{*}) = \oslash$.
\end{proof}


Another useful method for finding $R$\ involves setting conductances to zero.
\begin{figure}[h]
\begin{center}
\includegraphics[width=10cm]{CP.eps}
\caption{$G'$: ($G(3,2)$\ with two edges removed)} \label{CP}
\end{center}
\end{figure}
Any relation $R$\ in $G(3,2)$\ with $\gamma > 0$\ will persist in the new
graph.  As shown in figure \ref{CP}, setting two
conductances to zero can reduce the graph to a circular planar
one.  The only relations that can equal zero in the circular planar case are determinants.  These determinants can be found in a straightforward way.  Setting $\gamma(1,3) = 0$\ and $\gamma(4,6) = 0$\ results in the graph seen in figure \ref{CP}. Let the new graph be called $G'$.  There are two three by three determinants $D1$\ and $D2$\ in $G'$\ which equal zero.
\[ D1 = \det \Lambda(1,2,4;3,5,6) = 0 \]
\[ D2 = \det \Lambda(1,4,5;2,3,6) = 0 \]
The relation in $G$\ must be a combination of the relations in $G'$. $R = \alpha_{1}D1 - \alpha_{2}D2 = 0$, where $\alpha_{1}$\ and $\alpha_{2}$\ are allowed to be polynomials. As it turns out,
\[ R = D1 - D2 \]
\begin{theorem}
$R$\ is the only possible polynomial relation in \Lam\ for $G(3,2)$.
\end{theorem}
\begin{proof}
It has already been shown that $R = D1 - D2$.  Suppose there exists another relation $S$.  Then
$S = \alpha_{1}D1 + \alpha_{2}D2$\ where $\alpha_{1}$\ and $\alpha_{2}$\ are polynomials.  With a change of basis this can be rewritten as $S = \delta R + \beta D2$.  If $S$\ is to be zero for $G(3,2)$, then $\beta D2$\ must be zero.  However, $D2 \neq 0$\ for $G(3,2)$. In fact, $D2 < 0$. (See the list in Section 4.1.)  Therefore $\beta$\ must be a polynomial relation that equals zero.  But since $D2$\ has degree three, the degree of $\beta$\ must be three less than that of $S$.  Every relation $S$\ implies the existence of a polynomial relation that has degree three less than it.  According to Theorem \ref{no21}, we can't have polynomial relations of degree one or two.  Therefore, any relation $S$\ must be of degree $3n$; $n = (0,1,2,...)$.  By the above argument, there must be a relation $\beta ' $\ of degree three.  This can be written as $\beta ' = \delta_{1}R + \beta '' D2$, which implies that $\beta ''$\ is the number zero and that $\beta '  = \delta_{1}R$.  So $S = (\delta_{2} + \delta_{1}D2)R$\ if $S$\ is degree six. By induction, $R$\ can be factored out of any relation $S$.  Thus $R$\ is the only polynomial relation in \Lam\ for $G(3,2)$.
\end{proof}

\begin{conjecture}
The relation
\[ R = \det (\Lambda(1,2,4;3,5,6)) - \det (\Lambda(1,4,5;2,3,6)) =
0\] combined with the 13 previously mentioned sign conditions
constitutes  a characterization of the response matrix for
$G(3,2)$.
\end{conjecture}

It has been shown that these conditions are true for valid
response  matrices but it remains to be proven that response
matrices for other graphs couldn't possibly satisfy these 14
conditions.  Even so, this is a good candidate for a
characterization. The relation shows it's
possible to have one parameter in \Lam\ determined by fourteen
others.  Also, it has been proven that $R$\ is the only relation in \Lam.


\section{Methods that can be Generalized}
A recovery algorithm for $G(n,n/2)$\ has already been discussed,
and annular networks with more rays than twice the number of
circles are also recoverable.  Additional rays only make it
easier to zero out the desired part of the network.


Although $G(3,2)$\ is clearly non-recoverable, larger networks of
the same  type have not been examined here in detail.  However,
it has been verified that the same current pattern can be
produced for graphs $G(2n-1,n)$. Therefore it should also be
possible to construct an algorithm that computes the conductances
when one boundary conductor is known.  The similarity with the
$G(3,2)$ case suggests that the general network of this type
should be non-recoverable in the same manner, but this has not
been verified.  The means to check this exist, however, because the same type of algorithm used to
find counterexamples in $G(3,2)$ can be used again.


It is difficult to say anything about other graphs such as
$G(2n-2,n)$.   Since these have even less boundary information
than cases which already appear to be non-recoverable, it seems
that they too  should be non-recoverable.  This may not be true, however. Although for $G(4,3)$\ with layered conductivities the conductors can be calculated from one known boundary conductance,
only with the correct value of that conductor has the algorithm been able to
produce the same response matrix. This suggests that $G(4,3)$\ with layered conductivities might be recoverable.  The graph certainly merits further attention.


Some of the methods used to find relations in $G(3,2)$\ may work
in a more general setting.  Producing a basis of all polynomials of a certain degree that are invariant or change signs under rotations and inversions is probably not a good method to
use.  Unless a supercomputer is handy, the computation time required for
large networks and/or polynomials of high degree will make the process infeasible.

Using equation \ref{perm} is also not an obvious way to proceed for finding relations
because the larger the graph, the more shrewdness is required to
find the combinations of connections whose paths overlap in just
the right way.

The most promising method seems to be to set conductances equal
to zero and find relations  in the new graph. For $G(2n-1,n)$, n conductances must be set to zero to produce a circular planar graph.  This method suggests that if
there is a relation for $G(2n-1,n)$\ that the degree is $n+1$. A
program can be used to check determinants and find all relations in the new graph.  It can then
substitute values in as was done with the more general basis of
polynomials.  One can then produce a square matrix with values
substituted into the relations and compute the nullspace.
Any relation that exists should appear.

\pagebreak
\appendix
\section{Example Network whose \gam \Rarrow \Lam\ Map is
Two to One}

\subsection{Summary}
The network shown in Figure 6 is not recoverable but it has the
interesting property that its \gam \Rarrow \Lam\ map is two to
one.  This cannot happen for circular planar networks.  If a
circular planar network is not recoverable, it is $Y - \Delta$
equivalent to a graph with a series or parallel connection, which
means it's \gam \Rarrow \Lam\ map is infinite to one.  So for a
circular planar network, that map from the conductances to the
response matrix is either one to one or infinite to one.  The
network in Figure 6 shows that networks defined on an annulus do
not share this property.  In fact, when trying to solve for the
conductances in that example, for each conductor there is a
corresponding quadratic equation relating it to entries in the
response matrix. For example, if \Lam\ is symbolically defined as
in Equation 7, then the quadratic equation for the conductor from
node six to node nine, denoted $ \gamma_{6,9} $, is

\begin{multline}
\gamma_{6,9}^{2}q(ch-dg)+\gamma_{6,9}(2q(ch-dg)(e+u)+(q+u)(qhe+sch-rpc-sgd))
\\
+q(ch-dg)(e+u)^{2}+(q+u)(e+u)(qhe+sch-rpc-sgd)+e(sh-rp)(q+u)^{2}
=0
\end{multline}

By the quadratic formula there are two solutions for $
\gamma_{6,9} $.  Example A1 takes a specific \Lam\ and shows there
are two sets of positive conductors which produce that response
matrix.  Thus for the network in Figure 6 there are two solutions
to the inverse problem.

\subsection{Description of the Network and Determinantal Relations}

\begin{figure}[h]
\begin{center}
\includegraphics[width=12cm]{example1.eps}
\caption{}
\end{center}
\end{figure}

The network in Figure 6 has nine nodes and twelve edges.  The
nodes numbered one through six are the boundary nodes.  This graph
can be thought of as being on a cylinder with nodes one through
three at one end of the cylinder and nodes four through six at the
other end.

There are three determinantal relations in this network:

\begin{enumerate}
\item $\det \Lambda(1,4;2,5) = 0 \ \ \ \ \ (at - dg = 0)$
\item $\det \Lambda(1,4;3,6) = 0 \ \ \ \ \ (bu - eq = 0)$
\item $\det \Lambda(2,5;3,6) = 0 \ \ \ \ \ (fv - pr = 0)$
\end{enumerate}

The equations in parenthesis follow from the symbolic definition
of \Lam\ in Equation 7.

There is obviously a lot of symmetry in this network.  One
especially useful property is that the edges are topologically
indistinguishable from each other. Each edge connects a boundary
node to an interior node.  Many operations can be performed on the
network without changing it.  It can be rotated, inverted and even
flipped across several possible lines. With just these three
operations, any edge can be moved into the position of another
edge without changing the network.  This symmetry means that
solving for any one conductor is the same as solving for all the
others.  For example, to move $ e_{6,9} $ to $ e_{2,8} $, $
e_{6,9} $ can be moved to $e_{5,8}$ by rotation and then to
$e_{2,8}$ by inversion.  Applying these operations to all the
terms in Equation 1 will yield a similar equation in the variable
$\gamma_{2,8}$.

Another property of the network that makes it simpler to deal with
is the fact that no interior node is directly connected to
another.  This means that in the Kirchhoff matrix, the C block is
diagonal.  This makes taking the Schur Complement much simpler
since it is not difficult to take the inverse of a diagonal
matrix. It is therefore reasonable to symbolically calculate the
response matrix in terms of the conductances.


\subsection{Solving for \gam\ in terms of the \Lam\ Entries}
Let $\Lambda_{\gamma}$ be the response matrix calculated
symbolically from the conductances and let \Lam\ be defined as in
Equation 7.

\begin{equation} \Lambda = \left[
\begin{array}{llllll} \Sigma & a & b & c & d &
e \\ a & \Sigma & f & g & h &
p \\ b & f & \Sigma & q & r & s \\
c & g & q & \Sigma & t & u \\ d & h & r & t & \Sigma & v \\ e & p
& s & u & v & \Sigma \end{array} \right]
\end{equation}

Since $\Lambda_{\gamma}$ is easy to compute, the most
straightforward way to solve for \gam\ is to set $\Lambda_{\gamma}
= \Lambda$ and use the equations generated by the entries to solve
for the conductances in terms of the entries of \Lam.  There are
15 parameters in \Lam\ so there are initially 15 equations to work
with. Below the equations are listed next to the entries they
correspond to above the main diagonal.

\begin{description}
\item[$\Lambda(1,2)$] \[\frac{-\gamma_{1,7}\gamma_{2,7}}{\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7}} = a\]
\item[$\Lambda(1,3)$] \[\frac{-\gamma_{1,9}\gamma_{3,9}}{\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9}} = b\]
\item[$\Lambda(2,3)$] \[\frac{-\gamma_{2,8}\gamma_{3,8}}{\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8}} = f\]

\item[$\Lambda(1,4)$] \[\frac{-\gamma_{1,7}\gamma_{4,7}}{\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7}}
+\frac{-\gamma_{1,9}\gamma_{4,9}}{\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9}}
= c\]

\item[$\Lambda(2,4)$] \[\frac{-\gamma_{2,7}\gamma_{4,7}}{\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7}} = g\]
\item[$\Lambda(3,4)$] \[\frac{-\gamma_{3,9}\gamma_{4,9}}{\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9}} = q\]

\item[$\Lambda(1,5)$] \[\frac{-\gamma_{1,7}\gamma_{5,7}}{\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7}} = d\]

\item[$\Lambda(2,5)$] \[\frac{-\gamma_{2,7}\gamma_{5,7}}{\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7}}
+\frac{-\gamma_{2,8}\gamma_{5,8}}{\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8}}
= h\]

\item[$\Lambda(3,5)$] \[\frac{-\gamma_{3,8}\gamma_{5,8}}{\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8}} = r\]
\item[$\Lambda(4,5)$] \[\frac{-\gamma_{4,7}\gamma_{5,7}}{\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7}} = t\]

\item[$\Lambda(1,6)$] \[\frac{-\gamma_{1,9}\gamma_{6,9}}{\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9}} = e\]
\item[$\Lambda(2,6)$] \[\frac{-\gamma_{2,8}\gamma_{6,8}}{\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8}} = p\]

\item[$\Lambda(3,6)$] \[\frac{-\gamma_{3,8}\gamma_{6,8}}{\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8}}
+\frac{-\gamma_{3,9}\gamma_{6,9}}{\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9}}
= s\]

\item[$\Lambda(4,6)$] \[\frac{-\gamma_{4,9}\gamma_{6,9}}{\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9}} = u\]
\item[$\Lambda(5,6)$] \[\frac{-\gamma_{5,8}\gamma_{6,8}}{\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8}} = v\]
\end{description}

It is possible to verify by hand the entries in
$\Lambda_{\gamma}$. For example, suppose there is a boundary
potential of one at node two and boundary potentials of zero
everywhere else. $\Lambda(1,2)$ is the current at node one and
that current is easy to calculate. By the averaging property, the
potential at node seven is $\gamma_{2,7}$ divided by the sum of
the four conductors neighboring node seven. Be Ohm's law the
current at node one is negative one times the potential at node
seven times $\gamma_{1,7}$. This is indeed $\Lambda(1,2)$, which
is in the first equation listed above.

There are still fifteen equations in only twelve unknowns because
the three determinantal relations haven't yet been taken into
account.  Three equations are redundant and there is considerable
freedom in deciding which three.  Since c, h, and s don't appear
in the determinantal relations, any three equations except for the
$\Lambda(1,4)$, $\Lambda(2,5)$ and $\Lambda(3,6)$ equations can be
eliminated.  As an example, equations $\Lambda(4,5)$,
$\Lambda(4,6)$ and $\Lambda(5,6)$ can be eliminated from the above
list.  Now there are twelve equations in twelve unknowns. MATLAB's
symbolic solver can now be used to solve for \gam. Surprisingly,
two solutions are found for each conductor. Unfortunately, the
expressions are large and difficult to analyze. For example, when
the starting set of equations is changed slightly, the two
solutions should be the same as before.  But MATLAB's
simplification functions fail to recognize that the expressions
are equal (which they should be).

Fortunately, the above list of equations can be simplified further
and solved by hand.  This method sheds more light on why there are
two solutions because it generates a quadratic equation for each
conductor.  As an example, the above set of equations will be used
to calculate $\gamma_{6,9}$. Equations $\Lambda(4,5)$,
$\Lambda(4,6)$ and $\Lambda(5,6)$ have already been eliminated. It
is possible to shrink the list further by noting that some of the
\Lam\ entries are nearly identical. For example, the equations for
$\Lambda(1,5)$ and $\Lambda(4,5)$ are so similar that when the
first is divided by the latter, the resulting equation is simple.
\[ \gamma_{1,7} = \gamma_{4,7}\frac{d}{t} \]
The expression on the right can then be substituted for
$\gamma_{1,7}$ in all the equations and the equation for
$\Lambda(4,5)$ can be eliminated.  All the conductors in the
network that switch places under inversion have the same type of
relationship that $\gamma_{1,7}$ and $\gamma_{4,7}$ have. So five
more equations can quickly be generated:
\[ \gamma_{1,9} = \gamma_{4,9}\frac{e}{u} \]
\[ \gamma_{2,8} = \gamma_{5,8}\frac{p}{v} \]
\[ \gamma_{2,7} = \gamma_{5,7}\frac{g}{t} \]
\[ \gamma_{3,9} = \gamma_{6,9}\frac{q}{u} \]
\[ \gamma_{3,8} = \gamma_{6,8}\frac{r}{v} \]
And there is of course some freedom in eliminating five more
equations from the list. For the sake of this example, the six
equations that will be kept are those for $\Lambda(1,4)$,
$\Lambda(1,5)$, $\Lambda(2,5)$, $\Lambda(1,6)$, $\Lambda(2,6)$ and
$\Lambda(3,6)$. With the substitutions that have taken place the
new list of equations is
\begin{enumerate}
\item \[ \frac{-\gamma_{4,7}^{2}d}{\gamma_{4,7}d+\gamma_{5,7}g+\gamma_{4,7}t+\gamma_{5,7}t}
       + \frac{-\gamma_{4,9}^{2}e}{\gamma_{4,9}e+\gamma_{6,9}q+\gamma_{4,9}u+\gamma_{6,9}u} = c \]

\item \[ \frac{-\gamma_{4,7}\gamma_{5,7}d}{\gamma_{4,7}d+\gamma_{5,7}g+\gamma_{4,7}t+\gamma_{5,7}t} = d \]

\item \[ \frac{-\gamma_{5,7}^{2}g}{\gamma_{4,7}d+\gamma_{5,7}g+\gamma_{4,7}t+\gamma_{5,7}t}
       + \frac{-\gamma_{5,8}^{2}p}{\gamma_{5,8}p+\gamma_{6,8}r+\gamma_{5,8}v+\gamma_{6,8}v} = h \]

\item \[ \frac{-\gamma_{4,9}\gamma_{6,9}e}{\gamma_{4,9}e+\gamma_{6,9}q+\gamma_{4,9}u+\gamma_{6,9}u} = e \]

\item \[ \frac{-\gamma_{5,8}\gamma_{6,8}p}{\gamma_{5,8}p+\gamma_{6,8}r+\gamma_{5,8}v+\gamma_{6,8}v} = p \]

\item \[ \frac{-\gamma_{6,8}^{2}r}{\gamma_{5,8}p+\gamma_{6,8}r+\gamma_{5,8}v+\gamma_{6,8}v}
       + \frac{-\gamma_{6,9}^{2}q}{\gamma_{4,9}e+\gamma_{6,9}q+\gamma_{4,9}u+\gamma_{6,9}u} = s \]
\end{enumerate}

These equations can be simplified further.  Equations two and four
above can be substituted into equation one.  The d can be
cancelled from both sides of equation two.  When similar
simplifications are applied to the other equations the resulting
list is simple enough to see how they can be solved.

\begin{enumerate}
\item \[ \frac{\gamma_{4,7}d}{\gamma_{5,7}} + \frac{\gamma_{4,9}e}{\gamma_{6,9}} = c \]
\item \[ -\gamma_{4,7}\gamma_{5,7} = \gamma_{4,7}d + \gamma_{5,7}g + \gamma_{4,7}t + \gamma_{5,7}t \]
\item \[ \frac{\gamma_{5,7}g}{\gamma_{4,7}} + \frac{\gamma_{5,8}p}{\gamma_{6,8}} = h \]
\item \[ -\gamma_{4,9}\gamma_{6,9} = \gamma_{4,9}e + \gamma_{6,9}q + \gamma_{4,9}u + \gamma_{6,9}u \]
\item \[ -\gamma_{5,8}\gamma_{6,8} = \gamma_{5,8}p + \gamma_{6,8}r + \gamma_{5,8}v + \gamma_{6,8}v \]
\item \[ \frac{\gamma_{6,8}r}{\gamma_{5,8}} + \frac{\gamma_{6,9}q}{\gamma_{4,9}} = s\]
\end{enumerate}

The process for solving for $\gamma_{6,9}$ is to first solve the
first equation for the fraction
$\frac{\gamma_{5,7}}{\gamma_{4,7}}$.  This can then be substituted
into the third equation, which can be solved for the fraction
$\frac{\gamma_{6,8}}{\gamma_{5,8}}$.  This can be substituted into
the last equation, which has only the variables $\gamma_{6,9}$ and
$\gamma_{4,9}$.  The fourth equation in the list can be solved for
$\gamma_{4,9}$ and substituted into the equation just created. The
result is the quadratic equation listed in the summary.

\begin{multline}
\gamma_{6,9}^{2}q(ch-dg)+\gamma_{6,9}(2q(ch-dg)(e+u)+(q+u)(qhe+sch-rpc-sgd))
\\
 +q(ch-dg)(e+u)^{2}+(q+u)(e+u)(qhe+sch-rpc-sgd)+e(sh-rp)(q+u)^{2}
= 0 \label{quad}
\end{multline}

So by the quadratic formula there are two solutions for $\gamma_{6,9}$.
%way too big!
%\begin{equation}
%\gamma_{6,9} =
%\frac{-(2q(ch-dg)(e+u)+(q+u)(qhe+sch-rpc-sgd))}{2q(ch-dg)}
%\end{equation}
%\[
%\pm \frac{\sqrt{(2q(ch-dg)(e+u)+(q+u)(qhe+sch-rpc-sgd))^{2} -
%4q(ch-dg)(q(ch-dg)(e+u)^{2}+(q+u)(e+u)(qhe+sch-rpc-sgd)+e(sh-rp)(q+u)^{2})}}{2q(ch-dg)}
%\]

\[ \gamma_{6,9} = \frac{-B \pm \sqrt{B^{2} - 4AC}}{2A} \]

where
\[
\begin{array}{l}
 A = q(ch-dg) \\
 B = 2q(ch-dg)(e+u)+(q+u)(qhe+sch-rpc-sgd) \\
 C =
q(ch-dg)(e+u)^{2}+(q+u)(e+u)(qhe+sch-rpc-sgd)+e(sh-rp)(q+u)^{2} \\
\end{array}
\]
As explained above, operations to rotate, flip or invert the
network can be applied to the formula to generate the solutions
for all the other conductors.

Conductances must be real and positive to count as a solution, so
it's important to check that the quadratic equation isn't always
generating a bad solution. First of all, a solution obviously
can't be imaginary.  That would mean the discriminant is negative
and both sets of solutions are imaginary. But any measured or
created \Lam\ must come from a network with real positive
conductors, which means at least one of the solutions should be
real and positive.  So the discriminant will not be negative.  It
can however be zero, and this is explored a little in Example A2.
As for the possibility of one solution always being negative,
Example A1 shows this is not so. It produces two positive
solutions of the conductors for a specific \Lam.

\subsection{Examples}
\textbf{Example A1} \textmd
Let
\[ \Lambda = \left[
\begin{array}{llllll} \frac{31}{20} & \frac{-1}{4} & \frac{-1}{5} & \frac{-9}{20} & \frac{-1}{4} &
\frac{-2}{5} \\
\frac{-1}{4} & \frac{3}{2} & \frac{-1}{4} & \frac{-1}{4} & \frac{-1}{2} &
\frac{-1}{4} \\
\frac{-1}{5} & \frac{-1}{4} & \frac{31}{20} & \frac{-1}{5} & \frac{-1}{4} &
\frac{-13}{20} \\
\frac{-9}{20} & \frac{-1}{4} & \frac{-1}{5} & \frac{31}{20} & \frac{-1}{4} &
\frac{-2}{5} \\
\frac{-1}{4} & \frac{-1}{2} & \frac{-1}{4} & \frac{-1}{4} & \frac{3}{2} &
\frac{-1}{4} \\
\frac{-2}{5} & \frac{-1}{4} & \frac{-13}{20} & \frac{-2}{5} & \frac{-1}{4} &
\frac{39}{20} \\
\end{array} \right] \]

(This response matrix was actually generated from a network that has all conductors equal to one
except for $\gamma_{6,9}$, which has a conductance of two.)

Substituting the entries from this response matrix into the formulas for the conductors yields two
sets of positive real solutions:

\[ \gamma_{1,7} = 1 \ \mbox{or}\  \frac{19}{21} \]
\[ \gamma_{1,9} = 1 \ \mbox{or}\  \frac{23}{21} \]
\[ \gamma_{2,7} = 1 \ \mbox{or}\  \frac{19}{17} \]
\[ \gamma_{2,8} = 1 \ \mbox{or}\  \frac{15}{17} \]
\[ \gamma_{3,8} = 1 \ \mbox{or}\  \frac{15}{13} \]
\[ \gamma_{3,9} = 1 \ \mbox{or}\  \frac{23}{26} \]
\[ \gamma_{4,7} = 1 \ \mbox{or}\  \frac{19}{21} \]
\[ \gamma_{4,9} = 1 \ \mbox{or}\  \frac{23}{21} \]
\[ \gamma_{5,7} = 1 \ \mbox{or}\  \frac{19}{17} \]
\[ \gamma_{5,8} = 1 \ \mbox{or}\  \frac{15}{17} \]
\[ \gamma_{6,8} = 1 \ \mbox{or}\  \frac{15}{13} \]
\[ \gamma_{6,9} = 2 \ \mbox{or}\  \frac{23}{13} \]

So the set of conductors which generated \Lam\ is a solution as
well as another set which happens to generate the same response
matrix.



\textbf{Example A2} \textmd It can happen that both solutions are
the same.  This occurs when the response matrix comes from
networks whose conductors have certain symmetries.  One way to
accomplish this is to generate \Lam\ from the network that has all
conductances equal to one.  In the formulas for the conductors,
the discriminants are zero and both solutions are equal to one for
each conductor.

\subsection{The Rank of the Differential (added 2005)}

Example A2 shows the triangle-in-triangle network is recoverable
for special sets of conductivities that make the discriminants
zero in the quadratic formulas for conductances.  Those formulas
presented earlier are in terms of entries of the response matrix,
but now we know what simple condition the conductances themselves
satisfy when the network is recoverable.

In 2004 Jenny and Jerry showed in their paper \emph{$2^{n}$ to 1
Graphs} as a corollary to a more general result that the
triangle-in-triangle network is recoverable precisely when
\begin{equation}
\gamma_{6,8}\gamma_{3,8}\gamma_{2,7}\gamma_{5,7}\gamma_{1,9}\gamma_{4,9}-
\gamma_{3,9}\gamma_{6,9}\gamma_{1,7}\gamma_{4,7}\gamma_{5,8}\gamma_{2,8}=0,
\label{cond}\end{equation} where conductivities are denoted using
the notation in this appendix.

Another way to analyze what conditions on the conductors result in
different recovery properties is to look at the rank of the
differential of the map $T$ from the 12 conductances to the
entries in the response matrix $\Lambda$.  Considering the 15
$\Lambda$ entries above the main diagonal as a point in
$\mathbb{R}^{15}$, $T$ maps $(\mathbb{R}^{+})^{12}$ to
$\mathbb{R}^{15}$.

\begin{proposition}
The rank of the differential $dT$ is 11 if and only if equation
\ref{cond} holds.  Otherwise the rank of $dT$ is 12.
\end{proposition}

\begin{proof}
The proof goes by way of a symbolic computation in MATLAB.
MATLAB's \emph{diff} command was used to symbolically take partial
derivatives of the $\Lambda$ entries with respect to the
conductances and thus compute $dT$.  Then by permuting rows and
columns and performing Gaussian elimination, $dT$ was put in
echelon form to determine the rank.  The column permutations
forced the pivot positions to lie on the diagonal of the resulting
matrix.  These 12 diagonal entries are listed in order below.
\begin{enumerate}
\item
\[\frac{-\gamma_{2,7}(\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7})}{(\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7})^{2}}\]
\item
\[\frac{-\gamma_{3,9}(\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9})}{(\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9})^{2}}\]
\item
\[\frac{\gamma_{1,7}\gamma_{4,7}}{\gamma_{2,7}(\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7})}\]
\item
\[\frac{-\gamma_{5,7}\gamma_{4,9}\gamma_{1,9}}{\gamma_{4,7}\gamma_{3,9}(\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9})}\]
\item
\[\frac{\gamma_{6,9}\gamma_{1,7}}{\gamma_{4,9}(\gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7})}\]
\item
\[\frac{-\gamma_{3,8}(\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8})}{(\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8})^{2}}\]
\item
\[\frac{\gamma_{2,7}\gamma_{1,9}(\gamma_{5,7}+\gamma_{2,7})}{\gamma_{1,7}(\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7})(\gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9})}\]
\item
\[\frac{\gamma_{5,8}\gamma_{2,8}}{\gamma_{3,8}(\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8})}\]
\item
\[\frac{\gamma_{6,8}\gamma_{2,7}}{\gamma_{5,8}(\gamma_{5,7}+\gamma_{2,7})}\]
\item
\[\frac{\gamma_{3,9}\gamma_{4,7}\gamma_{1,7}\gamma_{2,8}(\gamma_{6,9}+\gamma_{3,9})}{\gamma_{1,9}\gamma_{5,7}\gamma_{2,7}(\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9})(\gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8})}\]
\item
\[\frac{-\gamma_{3,8}\gamma_{5,8}}{\gamma_{6,8}(\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8})}\]
\item
\[\frac{\gamma_{6,8}\gamma_{3,8}\gamma_{2,7}\gamma_{5,7}\gamma_{1,9}\gamma_{4,9}-\gamma_{3,9}\gamma_{6,9}\gamma_{1,7}\gamma_{4,7}\gamma_{5,8}\gamma_{2,8}}{\gamma_{6,9}\gamma_{1,7}\gamma_{4,7}\gamma_{5,8}\gamma_{2,8}(\gamma_{6,9}+\gamma_{3,9})}\]
\end{enumerate}

The computation is valid because we never divided by an expression
that could have been zero.  Since all conductivities are positive,
none of the denominators in the listed diagonal entries can be
zero. Also, none of the numerators in the first 11 entries can be
zero. Since the first 11 pivots are nonzero, the rank of $dT$ is
always at least 11. Finally, the algorithm didn't ever require
dividing by the 12th diagonal entry.  The rank of $dT$ is 11 if
and only if entry 12 is zero, which occurs if and only if equation
\ref{cond} holds.  Otherwise entry 12 is nonzero and $dT$ has rank
12.
\end{proof}

It's interesting how the rank of $dT$, which gives information
about local invertibility of $T$, also relates to the global
invertibility of $T$.  Splitting up the domain according to the
rank of $dT$, we can write $(\mathbb{R}^{+})^{12} = \Omega_{11}
\bigcup\ \Omega_{12}$ where $\Omega_{11} = \{\gamma \in
(\mathbb{R}^{+})^{12} : \mbox{rank}(dT) = 11\}$ and $\Omega_{12} =
\{\gamma \in (\mathbb{R}^{+})^{12} : \mbox{rank}(dT) = 12\}$.
$\Omega_{12}$ is then the set where $T$ is locally invertible and
$\Omega_{11}$ is the set where $T$ is not locally invertible. Note
that $T|_{\Omega_{12}}$ is two to one whereas $T|_{\Omega_{11}}$
is one to one.  An oversimplified analogy to this situation is the
function $f(x)=x^2$ which is locally invertible and globally two
to one on $\mathbb{R}\backslash\{0\}$.  Of course,
$f|_{\mathbb{R}^{\geq0}}$ and $f|_{\mathbb{R}^{\leq0}}$ are both
one to one.  This is worth pointing out because $T$ shares the
analogous property.

\begin{proposition}Define $\Omega_{P}$ and $\Omega_{N}$ according
to when the expression in equation \ref{cond} is positive or
negative:
\[\Omega_{P} = \{\gamma \in (\mathbb{R}^{+})^{12} :
\gamma_{6,8}\gamma_{3,8}\gamma_{2,7}\gamma_{5,7}\gamma_{1,9}\gamma_{4,9}-
\gamma_{3,9}\gamma_{6,9}\gamma_{1,7}\gamma_{4,7}\gamma_{5,8}\gamma_{2,8}
\geq 0\}\]
\[\Omega_{N} = \{\gamma \in (\mathbb{R}^{+})^{12} :
\gamma_{6,8}\gamma_{3,8}\gamma_{2,7}\gamma_{5,7}\gamma_{1,9}\gamma_{4,9}-
\gamma_{3,9}\gamma_{6,9}\gamma_{1,7}\gamma_{4,7}\gamma_{5,8}\gamma_{2,8}
\leq 0\}.\] Both $T|_{\Omega_{P}}$ and $T|_{\Omega_{N}}$ are one
to one maps.
\end{proposition}

\begin{proof}
We first construct the function that takes a set of conductivities
$\gamma$ and returns the other set (possibly the same if equation
\ref{cond} holds) of conductivities $\gamma'$ with the same
electrical response.  Recall the solution to equation \ref{quad}
\[ \gamma_{6,9} = \frac{-B \pm \sqrt{B^{2} - 4AC}}{2A} \]
This means
\[\gamma_{6,9}' = -\gamma_{6,9} - \frac{B}{A}. \]
By writing $B$ and $A$ in terms of conductivities $\gamma$, we can
write $\gamma_{6,9}'$ entirely in terms of the $\gamma$'s.  To
simplify the resulting expression, we define the following:
\[A_0 =
\gamma_{6,8}\gamma_{3,8}\gamma_{2,7}\gamma_{5,7}\gamma_{1,9}\gamma_{4,9}\]
\[B_0 =
\gamma_{3,9}\gamma_{6,9}\gamma_{1,7}\gamma_{4,7}\gamma_{5,8}\gamma_{2,8}\]
\[ s_7 = \gamma_{1,7}+\gamma_{2,7}+\gamma_{4,7}+\gamma_{5,7} \]
\[ s_8 = \gamma_{2,8}+\gamma_{3,8}+\gamma_{5,8}+\gamma_{6,8} \]
\[ s_9 = \gamma_{1,9}+\gamma_{3,9}+\gamma_{4,9}+\gamma_{6,9} \]
\[ P_9 = \gamma_{1,9}\gamma_{3,9}\gamma_{4,9}\gamma_{6,9} \]
Then we have
\begin{equation}
\gamma_{6,9}' =
\frac{(\gamma_{1,9}+\gamma_{4,9})B_0+(\gamma_{3,9}+\gamma_{6,9})A_0+s_8P_9\gamma_{2,7}\gamma_{5,7}
+
s_7P_9\gamma_{2,8}\gamma_{5,8}}{\gamma_{3,9}(s_9\gamma_{1,7}\gamma_{4,7}\gamma_{2,8}\gamma_{5,8}
+ s_8\gamma_{1,9}\gamma_{4,9}\gamma_{2,7}\gamma_{5,7} +
s_7\gamma_{1,9}\gamma_{4,9}\gamma_{2,8}\gamma_{5,8})}
\end{equation}
We can take advantage of the graph's symmetries and write a
similar formula for all the other $\gamma'$'s by performing
rotations, inversions, flips, etc. and transforming the indices
accordingly.  Altogether, this gives a map between conductances
$\gamma$ and $\gamma'$.  Note this map is it's own inverse.
%It's
%useful for verifying symmetries between the two sets of
%conductances, such as $\frac{\gamma_{6,9}'}{\gamma_{3,9}'} =
%\frac{\gamma_{6,9}}{\gamma_{3,9}}$, which for example was already
%known.
Let
\[A_1 =
\gamma_{6,8}'\gamma_{3,8}'\gamma_{2,7}'\gamma_{5,7}'\gamma_{1,9}'\gamma_{4,9}'\]
\[B_1 =
\gamma_{3,9}'\gamma_{6,9}'\gamma_{1,7}'\gamma_{4,7}'\gamma_{5,8}'\gamma_{2,8}'.\]
Note that equation \ref{cond} becomes $A_0-B_0$ for the $\gamma$'s
and $A_1-B_1$ for the $\gamma'$'s.  A symbolic computation in
MATLAB verifies that \[\frac{A_1}{B_1} = \frac{B_0}{A_0}. \]  Thus
if $A_0-B_0 < 0$, then $\frac{A_1}{B_1} = \frac{B_0}{A_0} > 1$.
This implies $A_1 - B_1 > A_1 - \frac{A_1}{B_1}B_1 = 0$.
Similarly, if $A_0-B_0 > 0$, then $A_1 - B_1 < 0$.  $T$ is one to
one on $\Omega_{11}$, the set where $A_0-B_0=0$.  So if
$A_0-B_0=0$ we must have $\gamma=\gamma'$ and therefore
$A_1-B_1=0$. Whenever $\gamma$ and $\gamma'$ are distinct, they
can't both lie in $\Omega_{P}$ or both lie in $\Omega_{N}$. Thus
$T|_{\Omega_{P}}$ is one to one and $T|_{\Omega{N}}$ is one to
one.
\end{proof}

\pagebreak
\section{MATLAB Programs:}

\begin{verbatim}

FUNCTIONS THAT MAKE KIRCHHOFF MATRICES:

function K = makeKgen(n,c)
%function K = makeKgen(n,c)

%V = [1;2;3;4;5];
V = ones(2*c+1,1);
K = zeros(n*(c+2));

%inner spikes first
for i = 1:n
   K(i,i+2*n) = -V(2*c+1,1);
end

%outer spikes
for i = 1:n
   K(i+n,i+(c+1)*n) = -V(1,1);
end

%conductors on arcs
for i = 1:(n-1)
   for j = 2:(c+1)
      if i == 1
         K(1+j*n,(j+1)*n) = -V((2*c - (j-2)*2),1);
      end
      K((i+j*n),(i+j*n+1)) = -V((2*c - (j-2)*2),1);
   end
end

%conductors on rays
for i = 1:n
   for j = 2:c
      K((i+j*n),(i+(j+1)*n)) = -V((2*c-1-(j-2)*2),1);
   end
end

%putting K together

K = K + K';
S = sum(K,2);
for i = 1:(n*(c+2))
   K(i,i) = -S(i,1);
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


function K = makeKannulus
%Make Kirchhoff Matrix for annulus with three rays
B = -(rand(12));
%B = -ones(12);
n = 12;
for i = 1:n
   B(i,1:i) = 0;
end
for j = 1:6
   for k = 1:n
      if k~= j + 6
         B(j,k) = 0;
      end
   end
end
B(7,11:12) = 0;
B(8,10) = 0;
B(8,12) = 0;
B(9,10:11) = 0;
B = B + B';
C = sum(B,2);
for j = 1:n
   B(j,j) = -C(j,1);
end
K = B;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


function K = inputKannulus(a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,e1,e2,e3)
K = zeros(12);
K(4,10) = -a1;
K(5,11) = -a2;
K(6,12) = -a3;
K(10,11) = -b1;
K(11,12) = -b2;
K(10,12) = -b3;
K(7,10) = -c1;
K(8,11) = -c2;
K(9,12) = -c3;
K(7,8) = -d1;
K(8,9) = -d2;
K(7,9) = -d3;
K(1,7) = -e1;
K(2,8) = -e2;
K(3,9) = -e3;

K = K + K';
S = sum(K,2);
for i = 1:12
   K(i,i) = -S(i,1);
end


FUNCTION THAT GETS RESPONSE MATRIX:


function L = getL(K,n)
%function L = getL(K,n)
%n is the number of boundary nodes
A = K(1:n,1:n);
C = K((n+1):end,(n+1):end);
B = K(1:n,(n+1):end);
L = A - B*(inv(C))*B';



RECOVERS CONDUCTANCES IN G(3,2) FROM KNOWN CONDUCTOR:


function K = symgetcond(L,gamma4_10)
%symgetcond(L,gamma4_10)
%recovers conductances from one known boundary conductor in
%the network with three rays and two circles; returns K

K = sym(zeros(12));

U1 = (L([4 5 6],[1 2 3]))\(-L([4 5 6],[4]) + [gamma4_10;0;0]);
W = U1(1,1);
A = U1(2,1);
B = U1(3,1);
gamma2_8 = (1/A)*(L(2,4) + W*L(2,1) + A*L(2,2) + B*L(2,3));
gamma3_9 = (1/B)*(L(3,4) + W*L(3,1) + A*L(3,2) + B*L(3,3));
K(4,10) = -gamma4_10;
K(2,8) = -gamma2_8;
K(3,9) = -gamma3_9;

U2 = (L([1 2 3],[4 5 6]))\(-L([1 2 3],[2]) + [0;gamma2_8;0]);
D = U2(1,1);
E = U2(2,1);
F = U2(3,1);
gamma6_12 = (1/F)*(L(6,2) + D*L(6,4) + E*L(6,5) + F*L(6,6));
K(6,12) = -gamma6_12;

U3 = (L([1 2 3],[4 5 6]))\(-L([1 2 3],[3]) + [0;0;gamma3_9]);
G = U3(1,1);
H = U3(2,1);
I = U3(3,1);
gamma5_11 = (1/H)*(L(5,3) + G*L(5,4) + H*L(5,5) + I*L(5,6));
u12 = (1/gamma6_12)*(I*gamma6_12 - L(6,3) - G*L(6,4) - H*L(6,5) - I*L(6,6));
gamma9_12 = -gamma3_9/u12;
gamma11_12 = (-1/u12)*(L(5,3) + G*L(5,4) + H*L(5,5) + I*L(5,6));
gamma10_12 = (-1/u12)*(L(4,3) + G*L(4,4) + H*L(4,5) + I*L(4,6));
K(5,11) = -gamma5_11;
K(9,12) = -gamma9_12;
K(11,12) = -gamma11_12;
K(10,12) = -gamma10_12;

U4 = (L([4 5 6],[1 2 3]))\(-L([4 5 6],[6]) + [0;0;gamma6_12]);
J = U4(1,1);
K1 = U4(2,1);
L1 = U4(3,1);
gamma1_7 = (1/J)*(L(1,6) + J*L(1,1) + K1*L(1,2) + L1*L(1,3));
u9 = (1/gamma3_9)*(L1*gamma3_9 - L(3,6) - J*L(3,1) - K1*L(3,2) - L1*L(3,3));
gamma8_9 = (-1/u9)*(L(2,6) + J*L(2,1) + K1*L(2,2) + L1*L(2,3));
gamma7_9 = (-1/u9)*(L(1,6) + J*L(1,1) + K1*L(1,2) + L1*L(1,3));
K(1,7) = -gamma1_7;
K(8,9) = -gamma8_9;
K(7,9) = -gamma7_9;

U5 = (L([4 5 6],[1 2 3]))\(-L([4 5 6],[5]) + [0;gamma5_11;0]);
M = U5(1,1);
N = U5(2,1);
P = U5(3,1);
u8 = (1/gamma2_8)*(N*gamma2_8 - L(2,5) - M*L(2,1) - N*L(2,2) - P*L(2,3));
gamma8_11 = (-1/u8)*(gamma5_11);
gamma7_8 = (-1/u8)*(L(1,5) + M*L(1,1) + N*L(1,2) + P*L(1,3));
K(8,11) = -gamma8_11;
K(7,8) = -gamma7_8;

U6 = (L([1 2 3],[4 5 6]))\(-L([1 2 3],[1]) + [gamma1_7;0;0]);
Q = U6(1,1);
R = U6(2,1);
S = U6(3,1);
u10 = (1/gamma4_10)*(Q*gamma4_10 - L(4,1) - Q*L(4,4) - R*L(4,5) - S*L(4,6));
gamma7_10 = (-1/u10)*(gamma1_7);
gamma10_11 = (-1/u10)*(L(5,1) + Q*L(5,4) + R*L(5,5) + S*L(5,6));
K(7,10) = -gamma7_10;
K(10,11) = -gamma10_11;

K = K + K';
Z = sum(K,2);
for i = 1:12
   K(i,i) = -Z(i,1);
end

gamma4_10 = simplify(gamma4_10)
gamma6_12 = simplify(gamma6_12)
gamma5_11 = simplify(gamma5_11)

gamma10_11 = simplify(gamma10_11)
gamma10_12 = simplify(gamma10_12)
gamma11_12 = simplify(gamma11_12)

gamma7_10 = simplify(gamma7_10)
gamma8_11 = simplify(gamma8_11)
gamma9_12 = simplify(gamma9_12)

gamma7_8 = simplify(gamma7_8)
gamma7_9 = simplify(gamma7_9)
gamma8_9 = simplify(gamma8_9)

gamma1_7 = simplify(gamma1_7)
gamma2_8 = simplify(gamma2_8)
gamma3_9 = simplify(gamma3_9)



RECOVERS CONDUCTANCES IN G(4,3) FROM KNOWN CONDUCTOR:
(Conductances are equal on layers.)


function K = Recover43(L,a)
U = sym(zeros(20,2));
K = sym(zeros(20));

U(1:4,1) = L(5:8,1:4)\(-L(5:8,5) + [a;0;0;0]);
U(5,1) = 1;
C = L*U(1:8,1);
g = (1/U(3,1))*(C(3,1));

U(10,1) = (-1/g)*(-U(2,1)*g + C(2,1));
U(12,1) = (-1/g)*(-U(4,1)*g + C(4,1));
U(9,1) = (-1/g)*(-U(1,1)*g + C(1,1));
f = (U(3,1)*g)/(-U(10,1) - U(12,1));
e = (-1/U(12,1))*(f*(U(12,1)*2 - U(9,1)) + g*(U(12,1) - U(4,1)));

U(13,1) = (1/e)*(U(9,1)*e + f*(2*U(9,1) - U(10,1) - U(12,1)) + g*(U(9,1) - U(1,1)));
d = (-U(12,1)*e)/(U(13,1));
c = (-1/U(13,1))*(2*U(13,1)*d + e*(U(13,1) - U(9,1)));



U(5:8,2) = L(1:4,5:8)\(-L(1:4,1) + [g;0;0;0]);
U(1,2) = 1;
C2 = L*U(1:8,2);
U(18,2) = (-1/a)*(-U(6,2)*a + C2(6,1));
U(20,2) = (-1/a)*(-U(8,2)*a + C2(8,1));
b = (a*U(7,2))/(-U(18,2) - U(20,2));

a = simplify(a)
b = simplify(b)
c = simplify(c)
d = simplify(d)
e = simplify(e)
f = simplify(f)
g = simplify(g)

for i = 1:4
   K(i,i+8) = -g;
   K(i+4,i+16) = -a;
   K(i+8,i+12) = -e;
   K(i+12,i+16) = -c;
end

K(17,20) = -b;
K(13,16) = -d;
K(9,12) = -f;

for i = 1:3
   K(i+16,i+17) = -b;
   K(i+12,i+13) = -d;
   K(i+8,i+9) = -f;
end

K = K + K';
S = sum(K,2);
for i = 1:20
   K(i,i) = -S(i,1);
end


MAKES SET OF INDICES USED TO PRODUCE A BASIS OF POLYNOMIALS
THAT ARE INVARIANT UNDER ROTATIONS AND INVERSIONS OF G(3,2):

function match = makematch(m1,d)
%function match = makematch(m1,d)

LL = zeros(15,2);
y = 0;
for i = 1:5
   for j = i+1:6
      y = y+1;
      LL(y,:) = [i j];
   end
end
LL(3,:) = [];
LL(7,:) = [];
LL(10,:) = [];


%group terms
for i = 1:d
   add(1,2*i-1) = 1;
   add(1,2*i) = 2;
end

match(1,:) = add;
term = 1;

[a b] = size(m1);
for r = 1:a
   r

   switch 10*m1(r,2*d-3) + m1(r,2*d-2)
   case 12
      start = 1;
   case 13
      start = 2;
   case 15
      start = 3;
   case 16
      start = 4;
   case 23
      start = 5;
   case 24
      start = 6;
   case 26
      start = 7;
   case 34
      start = 8;
   case 35
      start = 9;
   case 45
      start = 10;
   case 46
      start = 11;
   case 56
      start = 12;
   end

   for i = start:12
      mlist = [m1(r,:) LL(i,:)];

        [nextmatch,check] = testmatch(match,mlist,d);

         if check == 1

            term = term + 1;
            match(term,:) = nextmatch;
         end
      end
   end


FUNCTION CALLED BY MAKEMATCH TO MAKE SURE THE BASIS IS
NOT TOO LARGE:

function [nextmatch,check] = testmatch(match,mlist,d)
%function [nextmatch,check] = testmatch(match,mlist,d)

[m n] = size(match);
nextmatch = mlist;
check = 1;

for i = 1:m
   for j = 0:1
      for k = 0:2

         flip(1,1:2*d) = 3*j;
         new = match(i,:) + flip;
         for l = 1:2*d
            if new(1,l) > 6
               new(1,l) = new(1,l) - 6;;
            end
         end

         rot(1,1:2*d) = k;
         new = new + rot;
         if k == 1
            for l = 1:2*d
               if new(1,l) == 4 | new(1,l) == 7
                  new(1,l) = new(1,l) - 3;
               end
            end
         end

         if k == 2
            for l = 1:2*d
               if new(1,l) == 5 | new(1,l) == 4 | new(1,l) == 7 | new(1,l) == 8
                  new(1,l) = new(1,l) - 3;
               end
            end
         end

         for w = 1:d
            if new(1,2*w-1) > new(1,2*w)
               y = new(1,2*w-1);
               new(1,2*w-1) = new(1,2*w);
               new(1,2*w) = y;
            end
         end

         for drat = 1:d-1
                for w = 1:d-1
                if (10*new(1,2*w-1)+new(1,2*w)) - (10*new(1,2*w+1)+new(1,2*w+2)) > 0
                    t1 = new(1,2*w-1);
                    t2 = new(1,2*w);
                    new(1,2*w-1) = new(1,2*w+1);
                    new(1,2*w) = new(1,2*w+2);
                    new(1,2*w+1) = t1;
                    new(1,2*w+2) = t2;
                end
                end
            end

         if sum(abs(new - mlist)) == 0

            nextmatch = nan;
            check = 0;
            return
         end
      end
   end
end



OPERATES ON OUTPUT OF MAKEMATCH BY ALL ROTATIONS AND INVERSIONS:

function M = makebigM(m1)
%function M = makebigM(m1)

[m,n] = size(m1);
for i = 1:m
   z = -1;
   for j = 0:1
      for k = 0:2
         z = z+1;

         flip(1,1:n) = 3*j;
         new = m1(i,:) + flip;
         for l = 1:n
            if new(1,l) > 6
               new(1,l) = new(1,l) - 6;;
            end
         end

         rot(1,1:n) = k;
         new = new + rot;
         if k == 1
            for l = 1:n
               if new(1,l) == 4 | new(1,l) == 7
                  new(1,l) = new(1,l) - 3;
               end
            end
         end

         if k == 2
            for l = 1:n
               if new(1,l) == 5 | new(1,l) == 4 | new(1,l) == 7 | new(1,l) == 8
                  new(1,l) = new(1,l) - 3;
               end
            end
         end
         M(i,(n*z+1):(n*z+n)) = new;
      end
   end
end


MAKES P*:
(P* is a square matrix and each row is the basis of polynomials with
different values substituted in. This program is currently set up for
the case GP = P.)

function A = makebigA(M,d)

[m,n] = size(M);
A = zeros(m,m);
for i = 1:m
   K = inputKannulus((round(14*rand)+1),(round(14*rand)+1),(round(14*rand)+1),...
      (round(14*rand)+1),(round(14*rand)+1),(round(14*rand)+1),...
      (round(14*rand)+1),(round(14*rand)+1),(round(14*rand)+1),...
      (round(14*rand)+1),(round(14*rand)+1),(round(14*rand)+1),...
      (round(14*rand)+1),(round(14*rand)+1),(round(14*rand)+1));
   L = getL(K,6);

   for j = 1:m
      thing(1:6,1) = 1;
      for k = 1:6
        for l = 1:d
            thing(k,1) = thing(k,1)*L(M(j,((2*l-1) + 2*d*(k-1))),M(j,((2*l) + 2*d*(k-1))));
         end
         A(j,i) = A(j,i) + thing(k,1);
      end
   end
end
A = A';


MAKES SYMBOLICLY THE BASIS OF POLYNOMIALS:
(This program is also currently set up for the case GP = P.)

function P = makepoly(m1)
%function P = makepoly(m1)

[m,n] = size(m1);
P = sym(zeros(m,1));
L = sym(zeros(6));
syms a b c d e f g h p q r s t u v real
L(1,2) = a;
L(1,3) = b;
L(1,4) = c;
L(1,5) = d;
L(1,6) = e;
L(2,3) = f;
L(2,4) = g;
L(2,5) = h;
L(2,6) = p;
L(3,4) = q;
L(3,5) = r;
L(3,6) = s;
L(4,5) = t;
L(4,6) = u;
L(5,6) = v;
L = L + L';

for i = 1:m
   for j = 0:1
      for k = 0:2

         flip(1,1:n) = 3*j;
         new = m1(i,:) + flip;
         for l = 1:n
            if new(1,l) > 6
               new(1,l) = new(1,l) - 6;;
            end
         end

         rot(1,1:n) = k;
         new = new + rot;
         if k == 1
            for l = 1:n
               if new(1,l) == 4 | new(1,l) == 7
                  new(1,l) = new(1,l) - 3;
               end
            end
         end

         if k == 2
            for l = 1:n
               if new(1,l) == 5 | new(1,l) == 4 | new(1,l) == 7 | new(1,l) == 8
                  new(1,l) = new(1,l) - 3;
               end
            end
         end

         thing = 1;
         for l = 1:n/2
            thing = thing * L(new(1,2*l-1),new(1,2*l));
         end
         P(i,1) = P(i,1) + thing;
      end
   end
end

\end{verbatim}

\begin{thebibliography}{99}
\bibitem[1]{book}
Edward B. Curtis and James A. Morrow \emph{Inverse Problems for Electrical Networks.}
Series on applied mathematics - Vol. 13.  World Scientific, \copyright 2000.

\end{thebibliography}

\end{document}
