User:Realazthat/Notes/Scrap: Difference between revisions

Undo revision 98712 by Realazthat (talk)
No edit summary
(Undo revision 98712 by Realazthat (talk))
Line 19:
\in \left\{0,1\right\}
& = &
\begin{cases}
0 & \text{if }\left(u,v\right) \notintext{ is an edge in }E\\
1 & \text{if }\left(u,v\right) \notintext{ is not an edge in }E\end{cases}\\
 
f\left(E,F,u,v\right)
\in \left\{0,1\right\}
& = &
\begin{cases}
0 & \text{if } b\left(E,u,v\right) \inneq 1 \vee b\left(F,u,v\right) \neq 0\\
1 & \text{if } b\left(E,u,v\right) = 1 \notinwedge b\left(F,u,v\right) = 0\end{cases} \\
 
c\left(C,E,p,q,r,s\right)\in\left\{ 0,1,2,3\right\} & = & b\left(E,C_{p-1},C_{q+1}\right)+b\left(E,C_{q},C_{s}\right)+b\left(E,C_{p},C_{r}\right) \\
 
d\left(C,E,F,p,q,r,s\right)\in\left\{ 0,1,2,3\right\} & = & -f\left(E,F,C_{p-1},C_{q+1}\right)+f\left(E,F,C_{q},C_{s}\right)+f\left(E,F,C_{p},C_{r}\right)\\
 
b,c,d,f \in O\left(1\right)\\
Line 107:
 
</pre>
 
== Better algorithm ==
<math>
 
 
\begin{array}{lcl}
T_{q}
& = &
\left\{ C{s} : s \notin [p,q] \wedge \exists_{r,|r-s|=1,r \notin [p,q]}
\left[
b(E,C_{p},C_{r})=0
\right]
\right\}\\
U_{q}
& = &
\left\{ C{s} : s \notin [p,q] \wedge \exists_{r,|r-s|=1,r \notin [p,q]}
\left[
b(E,C_{p},C_{r})=1 \wedge f(E,F,C_{p},C_{r})=1
\right]
\right\}\\
V_{q}
& = &
\left\{ C{s} : s \notin [p,q] \wedge \exists_{r,|r-s|=1,r \notin [p,q]}
\left[
b(E,C_{p},C_{r})=1 \wedge f(E,F,C_{p},C_{r})=0
\right]
\right\}\\
D_{q}
& = &
\left\{ v : (C_{q},v) \in E
\right\}\\
H_{q}
& = &
\left\{ v \in D_{q} : f(E,F,v,C_{q})=0
\right\}\\
 
W(q)
& = &
\begin{cases}
W_{0}(q) & \text{if } b(E,C_{p-1},C_{q+1}) = 0 \text{,}\\
W_{1}(q) & \text{if } b(E,C_{p-1},C_{q+1}) = 1 \wedge f(E,F,C_{p-1},C_{q+1}) = 0\text{,}\\
W_{2}(q) & \text{if } b(E,C_{p-1},C_{q+1}) = 1 \wedge f(E,F,C_{p-1},C_{q+1}) = 1
\end{cases}\\
\end{array}
</math>