3.2 Generation of NISTs for Rerouting against Double Network Component Failures
In our proposed method, we generate two NISTs rooted at every node from a given network
topology $G$ using the following algorithm.
NIST generation algorithm
(Step 0) Let $n$ be the number of BCs starting from $n=2$.
(Step 1) If $n\le N$ ($N$ is the number of nodes in $G$), then proceed to Step 2;
otherwise terminate the algorithm (which means that we fail to generate NISTs).
(Step 2) Using our BC generation algorithm described later, if ${\mathrm{BC}}_1$,
${\mathrm{BC}}_2$, ... ,$\mathrm{\ }{\mathrm{BC}}_n$ can be generated from $G$ such
that each BC satisfies the following conditions (i) and (ii), then proceed to Step
3; otherwise return to Step 1 after incrementing the value of $n$ by one.
(i) Each isolated node must have at least two restricted links.
(ii) Each normal node must have at least two normal links.
(Step 3) Create the shrunken topology from each ${\mathrm{BC}}_i$ generated in Step
2.
(Step 4) For each destination node $d$ in each shrunken topology $T_s$, generate two
NISTs ($T^d_1$, $T^d_2$) using the following steps in this order.
(Step 4-1) If $d$ is an isolated node in $T_s$, remove all isolated nodes except $d$
in $T_s$; otherwise (if $d$ is not an isolated node), remove all isolated nodes.
(Step 4-2) Let ${T_s}^{'}$ be $T_s$ after the execution of Step 4-1. If two NISTs
($T^d_1$, $T^d_2$) can be created from ${T_s}^{'}$ using the algorithm in [16] (which is an algorithm for creating two NISTs from a given connected graph), proceed
to Step 4-3; otherwise return to Step 1 after incrementing the value of $n$ by one.
(Step 4-3) Using the isolated node connecting algorithm described later, connect every
isolated node that was removed in Step 4-1 to the two NISTs ($T^d_1$, $T^d_2$) created
in Step 4-2 so that they can remain NISTs.
Note that in the NIST generation algorithm described above, we try to generate ${\mathrm{BC}}_1$,
${\mathrm{BC}}_2$, ... ,$\mathrm{\ }{\mathrm{BC}}_n$ from $G$ such that each BC satisfies
conditions (i) and (ii) in Step 2 because we must generate two NISTs rooted at each
node in Step 4. Figs. 4(b)-4(e) are BCs obtained from Fig. 4(a) by Step 2 that satisfy conditions (i) and (ii).
We describe our BC generation algorithm in Step 2.
To attain condition ($\mathrm{i}$) described above, we modify the BC generation algorithm
in [11]. That algorithm tries to isolate each node in only one BC as described in (C1) and
decides whether node $u$ can be isolated in a BC (say ${\mathrm{BC}}_i$) by executing
the following steps in order.
BC generation algorithm of [11]
(P0) Set a given network topology to the initial topology of $\mathrm{each\ }{\mathrm{BC}}_j\
\left(1\le j\le n\right).$
(P1) Select a node $u$ randomly among all nodes.
(P2) Set a variable $i=1$, and set a variable $start\_i=i$.
(P3) Try to isolate node $u$ in ${\mathrm{BC}}_i$ by executing the following steps
(P3-0) to (P3-5) in this order.
(P3-0) If $u$ has a restricted link in ${\mathrm{BC}}_i$, then the isolation of $u$
in ${\mathrm{BC}}_i$ fails, and proceed to (P4).
(P3-1) All links of $u$ that are currently isolated links in ${\mathrm{BC}}_i$ remain
isolated links in ${\mathrm{BC}}_i$.
(P3-2) We temporarily change all links of $u$ in ${\mathrm{BC}}_i$ to isolated links
in ${\mathrm{BC}}_i$ if they are currently restricted links in other BCs.
(P3-3) We temporarily change all links of $u$ in ${\mathrm{BC}}_i$ to restricted links
in ${\mathrm{BC}}_i$if they are currently isolated links in other BCs.
(P3-4) After (P3-3), if $u$ in ${\mathrm{BC}}_i$ has a restricted link, then we temporarily
change all the remaining links of $u$ in ${\mathrm{BC}}_i$, which are normal links,
to isolated links in ${\mathrm{BC}}_i$; otherwise if $u$ has normal links in ${\mathrm{BC}}_i$,
we randomly select one arbitrary link, and temporarily change it to a restricted link
in ${\mathrm{BC}}_i$, and temporarily change the remaining normal links to isolated
links.
(P3-5) After (P3-4), if $u$ in ${\mathrm{BC}}_i$ has a restricted link, then the isolation
of $u$ is successful, the temporary settings of links of $u$ in ${\mathrm{BC}}_i$
are fixed, $u$ becomes an isolated node in ${\mathrm{BC}}_i$ and proceed to (P5);
otherwise the isolation of $u$ fails, the temporary settings are canceled and proceed
to (P4).
(P4) If $i=n$, then $i=1$, otherwise $i=i+1$. If $i=start\_i$, then the isolation
of node $u$ fails and terminate the algorithm; otherwise proceed to (P3).
(P5) If there is a node which has not been isolated yet, then go to (P6); otherwise
(i.e. all nodes have been isolated) terminate the algorithm.
(P6) If there is an isolated node $v$ which connects to node $u$ in ${\mathrm{BC}}_i$
by a restricted link and has not been isolated yet, then select the node $v$; otherwise
randomly select a node $v$ which has not been isolated yet. And set $start\_i=i+1$
and $i=i+1$, then proceed to (P3) considering node $v$ as node $u$ in (P3).
As described above, the algorithm of [11] tries to isolate node $u$ in ${\mathrm{BC}}_{start\_i}$, ${\mathrm{BC}}_{start\_i+1}$,
..., ${\mathrm{BC}}_n$, ${\mathrm{BC}}_1$, ..., ${\mathrm{BC}}_{start\_i-1}$ in this
order in (P3) and (P4), and if $u$ has been isolated in ${\mathrm{BC}}_i$, then the
algorithm tries to isolate a node $v$ selected in (P6) in ${\mathrm{BC}}_{i+1}$, ...,
${\mathrm{BC}}_n$, ${\mathrm{BC}}_1$, ..., ${\mathrm{BC}}_i$ in this order by setting
$start\_i=i+1$.
In our BC generation algorithm, we have changed (P3-4), (P3-5) and (P4) into (P3-4$^{'}$),
(P3-5$^{'}$) and (P4$^{'}$), respectively, as described below for condition (i), and
we have changed (P5) into (P5$^{'}$) for condition (ii).
Changes in our BC generation algorithm
(P3-4$^{'}$) \textls[-20]{After (P3-3), if $u$ in ${\mathrm{BC}}_i$ has at least two
restricted links, then execute (P3-4$^{'}$-1). Otherwise, if $u$ in ${\mathrm{BC}}_i$
has one restricted link, then execute (P3-4$^{'}$-2), otherwise execute (P3-4$^{'}$-3).}
(P3-4$^{'}$-1) We temporarily change all the remaining links of $u$ in ${\mathrm{BC}}_i$,
which are all normal links, to isolated links.
(P3-4$^{'}$-2) f $u$ has normal links in ${\mathrm{BC}}_i$, then we randomly select
one arbitrary link and temporarily change it to a restricted link, and we temporarily
change the remaining normal links to isolated links.
(P3-4$^{'}$-3) If $u$ has at least two normal links in ${\mathrm{BC}}_i$, then we
randomly select two arbitrary links and temporarily change them to restricted links,
and we temporarily change the remaining normal links to isolated links.
(P3-5$^{'}$) After (P3-4$^{'}$), if $u$ in ${\mathrm{BC}}_i$ has at least two restricted
links, then the isolation of $u$ is successful, the temporary settings of links of
$u$ in ${\mathrm{BC}}_i$ are fixed, and $u$ becomes an isolated node in ${\mathrm{BC}}_i$;
otherwise the isolation of $u$ in ${\mathrm{BC}}_i$ fails, the temporary settings
are canceled and proceed (P4$^{'}$).
(P4$^{'}$) If $i=n$, then $i=1$, otherwise $i=i+1$. If $i=start\_i$, then the isolation
of node $u$ fails and it means that we fail to generate such ${\mathrm{BC}}_1$, ${\mathrm{BC}}_2$,
..., ${\mathrm{BC}}_n$ that satisfy condition (i), otherwise proceed to (P3).
(P5$^{'}$) If there is a node which has not been isolated yet, then proceed to (P6).
Otherwise (i.e. it means that all nodes have been isolated so that condition (i) is
satisfied) if each normal node has at least two normal links, then because it means
that all nodes have been isolated so that condition (ii) is satisfied, otherwise it
means that condition (ii) is not satisfied.
Next, we describe the isolated node connecting algorithm in Step 4-3. If an isolated
node (say $u$) has more than two restricted links, then we randomly select two (say
links $u$-$v_1$ and $u$-$v_2$; that is, $u$ connects to nodes $v_1$ and $v_2$ in the
shrunken topology) of them and remove the others.
Without loss of generality, $P(v_1,d)$ and $P(v_2,d)$ in $T^d_1$ and $P(v_1,d)$ and
$P(v_2,d)$ in $T^d_2$ have one of the following relations as shown in Fig. 6.
(R1) $P(v_1,d)$ includes $P(v_2,d)$ in $T^d_1$, and $P(v_2,d)$ includes $P(v_1,d)$
in $T^d_1$.
(R2) $P(v_1,d)$ includes $P(v_2,d)$ in $T^d_1$, and $P(v_1,d)$ and $P(v_2,d)$ are
node-independent of each other in $T^d_2$.
(R3) $P(v_1,d)$ and $P(v_2,d)$ are node-independent of each other in $T^d_1$, and
they are also node-independent of each other in $T^d_2$.
In (R1) to (R3), if we connect $u$ to $v_2$ in $T^d_1$ and connect $u$ to $v_1$ in
$T^d_2$, then $T^d_1$ and $T^d_2$ remain NISTs of each other. The proof is obvious.
Fig. 6. Relation between ``$P(v_1,d)$ includes $P(v_2,d)$ in $T_1^d$'' and ``$P(v_1,d)$
includes $P(v_2,d)$ in $T_2^d$.''