text:
\section{Introduction}
Graphs are an important tool for mathematically analysing many systems, from interactions of chemical agents, to ecological networks, to representing data objects in computer science~\cite{newman2010networks,newman2011structure}. An interesting perspective regarding such graphs is to investigate the complexity~\cite{bonchev,kim2008complex} or information content of a graph~\cite{mowshowitz2012entropy}. While Shannon information theory~\cite{adami2011information,mowshowitz2012entropy,mowshowitz2009entropy} and counting symmetries~\cite{xiao2008emergence,xiao2008network} have been applied to measure information content/complexity of graphs, little has been done, by contrast, to demonstrate the utility of Kolmogorov complexity as a numerical tool for graph and real-world network investigations. Some theoretical connections between graphs and algorithmic randomness have been explored (e.g.~\cite{buhrman}), but these are mostly related to formal properties of random graphs.

Here we computationally study some of these numerical and real-world directions and show how Kolmogorov complexity can capture group-theoretic and topological properties of abstract and empirical graphs and networks. We do this by introducing a measure of graph complexity based on approximating the Kolmogorov complexity of the adjacency matrix representation of a graph, which we achieve by applying our recently developed \emph{Block Decomposition Method} (below)~\cite{kolmo2d}. A theoretical advantage of using Kolmogorov complexity $K$ is that the measure $K$ is designed to capture \emph{all} structure (i.e. non-randomness) in an object, such as a graph.  In contrast, only looking at symmetries, for example, can miss structure and potential simplicity in a graph. For example, Fig.~\ref{fig:simplegraph} shows a graph with no symmetries, despite being far from random, and indeed is intuitively simple.

This paper is structured as follows: The next two Sections give background definitions and theorems; then in Section IV we consider the question of whether approximations of Kolmogorov complexity can characterise group-theoretic and topological properties of graphs and networks, more specifically, we study the number of automorphisms of a graph and introduce a normalised measure of graph complexity; following this in Section V we apply our measure to real-world networks; and finally we study in Section VI algorithmic information-theoretic similarities of networks with similar topologies created using different mechanisms (e.g. random versus preferential attachment).

\section{Preliminaries}
\label{preliminaries}

\subsection{Graph notation}

A graph $g=(V,E)$ consists of a set of vertices $V$ (also called nodes) and a set of edges $E$. Two vertices, $i$ and $j$, form an edge of the graph if $(i,j)\in E$. Let the binary adjacency matrix of $g$ be denoted by $Adj(A)$. A graph can be represented by its adjacency matrix. Assuming that the vertices are indices from 1 to $n$, that is, that $V=\{1, 2, \ldots, n\}$, then the adjacency matrix of $g$ is an $n\times n$ matrix, with entries $a_{i,j}=1$ if $(i,j)\in E$ and 0 otherwise. The distance $D(g)$ of a graph $g$ is the maximum distance between any 2 nodes of $g$. The size $V(g)$ of a graph $g$ is the vertex count of $g$; similarly $E(g)$ denotes the edge count of $g$.\\

\noindent \textbf{Definition 1.} Two graphs $g$ and $h$ are \emph{isomorphic} if and only if there exists a permutation $\lambda$ such that $\lambda(g) = h$. (That is, $g$ and $h$ are topologically equivalent).\\

\begin{figure}[htbp!]

  \includegraphics[width=5.0cm]{SimpleGraphNoAuts.pdf}
  \caption{\label{fig:simplegraph} An example of a graph which has no symmetries (i.e. automorphism group size of 1, cf. Def. 2), despite being intuitively simple, i.e. just a string of nodes with a single side node.}
\end{figure}

The general problem of graph isomorphism appears, for example, in chemistry~\cite{Hopcroft1974,read77} and biology~\cite{bask06,bask07}. \\

\noindent \textbf{Definition 2.} An \emph{automorphism} of a graph $g$ is a permutation $\lambda$ of the vertex set $V$, such that the pair of vertices $(i,j)$ forms an edge if and only if the pair $(\lambda(i),\lambda(j))$ also forms an edge.\\

The set of all automorphisms of an object forms a group, called the \emph{automorphism group}. Intuitively, the size of the automorphism group $A(g)$ provides a direct measure of the abundance of symmetries in a graph or network. Every graph has a trivial symmetry (the identity) that maps each vertex to itself.\\

A clustering coefficient is a measure of the degree to which nodes in a graph tend to cluster together (for example, friends in social networks~\cite{GirvanNewman}).
\\

\noindent \textbf{Definition 3.}
$$C(v_i)=\frac{2\left|E(N_i)\right|}{n_i (n_i-1)}$$ where $E(N_i)$ denotes the set of edges with both nodes in $N_i$, and  $C(v_i)$ is the local clustering coefficient of node $v_i$.

\section{Approximating Kolmogorov complexity}
\label{kolmo}

\subsection{Background Results}
Before describing our graph complexity measure, we provide some pertinent definitions and results from the theory of algorithmic randomness.

The \emph{Kolmogorov complexity} of a string $s$ is the length of the shortest program $p$ that outputs the string $s$, when run on a universal Turing machine $U$. Formally \cite{kolmo,chaitin},\\

\noindent \textbf{Definition 4.}
\begin{equation}
K_U(s) = \min \{|p|, U(p)=s\}
\end{equation}

By the \emph{invariance theorem}~\cite{li}, $K_U$ only depends on $U$ up to a constant $c$, so as is conventional, the subscript $U$ of $K$ is dropped. A technical inconvenience of $K$ as a function taking $s$ to the length of the shortest program that produces $s$, is that $K$ is semi-computable. Lossless compression algorithms are, however, traditionally used to approximate $K$ given that compressibility is a sufficient test of low Kolmogorov complexity.

The concept of algorithmic probability (also known as Levin's semi-measure) yields a method to approximate Kolmogorov complexity. The algorithmic probability of a string $s$ is a measure that describes the probability that a random program $p$ produces the string $s$ when run on a universal (prefix-free \footnote{The group of valid programs forms a prefix-free set (no element is a prefix of any other, a property necessary to keep $0 < m(s) < 1$.) For details see~\cite{calude}.}) Turing machine $U$. Formally~\cite{solomonoff,levin,chaitin},\\

\noindent \textbf{Definition 5.}
\begin{equation}
\label{codingeq}
m(s) = \sum_{p:U(p) = s} 1/2^{|p|}
\end{equation}

The probability semi-measure $m(s)$ is related to Kolmogorov complexity $K(s)$ in that $m(s)$ is at least the maximum term in the summation of programs ($m(s)\geq2^{-K(s)}$), given that the shortest program carries the greatest weight in the sum. The algorithmic Coding Theorem~\cite{cover,calude} further establishes the connection between $m(s)$ and $K(s)$.\\

\noindent \textbf{Theorem 1.} (\cite{levin}):
\begin{equation}\label{cdthm}
|-\log_2 m(s) - K(s)| < c
\end{equation}
where $c$ is some fixed constant, independent of $s$. The theorem implies~\cite{cover} (pp. 190-191) and~\cite{zenil2007,delahayezenil} that one can estimate the Kolmogorov complexity of a string from the frequency of production from running random programs by simply rewriting Eq.~(\ref{cdthm}) as:

\begin{equation}
K(s)=-\log_2 m(s) + O(1)
\end{equation}

The advantage of calculating $m(s)$ as an approximation of $K$ by application of the Coding Theorem is that $m(s)$ retrieves finer-grained values than compression algorithms, which  are unable to compress and therefore distinguish complexity variations for small objects. Applications of $m(s)$ have been explored in~\cite{thesis,zenil2007,d4,zenilalgo,d5,numerical}, and include applications to image classification~\cite{kolmo2d} and to the evolution of space-time diagrams of cellular automata~\cite{zenilchaos}. Error estimations of approximations of $m(s)$ have also been reported before in~\cite{kolmo2d}, showing that estimations of the constant involved in the invariance theorem remain small when taking larger samples of
Turing machines from which $m(s)$ is calculated. Moreover, in the same paper~\cite{kolmo2d}, it is shown that values between $m(s)$ and lossless compression algorithms, for experiments where both methods overlap, remain close to each other. Here Fig.~\ref{dual} provides an indication of the error estimation as compared to the estimation error of the lossless compression algorithm used (Deflate), by comparing the Kolmogorov complexity of dual graphs estimated using both $m(s)$ and lossless compression.

\subsection{The Coding Theorem Method}
In~\cite{d4} a technique was advanced for approximating $m(s)$ (hence $K$) by means of a function that considers all Turing machines of increasing size (by number of states). Let $(n,k)$ denote the set of Turing machines with $n$ states and $k$ symbols using the Busy Beaver formalism~\cite{rado} and let $T$ be a Turing machine in $(n, k)$ with empty input. Then:\\

\noindent \textbf{Definition 6.}
\begin{equation}
\label{Deq}
\mathbb{D}(n, k)(s)=\frac{|\{T\in(n, k) : T \textit{ produces } s\}|}{|\{T \in(n, k) : T \textit{ halts }\}|}
\end{equation}

For small values $n$ and $k$, $\mathbb{D}(n, k)$ is computable for values of the Busy Beaver problem that are known. The Busy Beaver problem is the problem of finding the $n$-state, $k$-symbol (or colour) Turing machine which writes a maximum number of non-blank symbols on the tape before halting and starting from an empty tape, as originally proposed by Rado~\cite{rado}. Or alternatively, finding the Turing machine that performs a maximum number of steps when started on an initially blank tape before halting. For $n=4$ and $k=2$, for example, the Busy Beaver machine has maximum runtime $S(n)=107$~\cite{brady}, from which one can deduce that if a Turing machine with 4 states and 2 symbols running on a blank tape hasn't halted after 107 steps then it will never stop. This is how $\mathbb{D}$ was initially calculated with the help of the Busy Beaver. However, the Busy Beaver problem is only computable for small $n,k$ values. Nevertheless, one can continue approximating $\mathbb{D}$ for a greater number of states (and colours) proceeding by sampling as described in~\cite{d5}, with an informed runtime after studying the behaviour of the runtime distribution of the Busy Beavers.

The Coding Theorem Method~\cite{d4,d5} is rooted in the relation provided by algorithmic probability between frequency of production of a string from a random program and its Kolmogorov complexity (Eq.~(\ref{cdthm})). Essentially it uses the fact that the more frequent a string is, the lower Kolmogorov complexity it has; and strings of lower frequency have higher Kolmogorov complexity.

\subsection{Applying the Block Decomposition Method to graphs}
\label{sec:two-dimens-turing}

As an extension of the Coding Theorem Method~\cite{d4,d5} of approximating bit string complexity (above), a method to approximate the Kolmogorov complexity of $d$-dimensional objects was advanced in~\cite{kolmo2d}. The method is called the \emph{Block Decomposition Method} (BDM) and it consists of decomposing larger objects into smaller pieces for which complexity values have been estimated, then reconstructing an approximation of the Kolmogorov complexity of the larger object by adding the complexity of the individual pieces according to rules of information theory.

By taking the adjacency matrix of a graph as the representation of the graph, we can use the BDM to estimate $K$ for graphs. Given the 2-dimensional nature of adjacency matrices we can use a variation of a Turing machine that runs on a 2-dimensional tape in order to estimate upper bounds of $K$ of the adjacency matrix of a graph. A popular example of a 2-dimensional tape Turing machine is Langton's ant~\cite{langton}. Another way to see this approach is to take the BDM as a form of deploying all possible 2-dimensional deterministic Turing machines of a small size in order to reconstruct the adjacency matrix of a graph from scratch (or smaller pieces that fully reconstruct it). Then as with the Coding Theorem Method (above), the Kolmogorov complexity of the adjacency matrix of the graph can be estimated via the frequency that it is produced from running random programs on the (prefix-free) 2-dimensional Turing machine.

Having outlined the theory, here we will use Eq.~(\ref{Deq}) with $n=5$ and $k=2$ to approximate $K$. The choice of this $n$ and $k$ is because 2-dimensional Turing machine with $n=4$ states and empty input produce all square arrays (or matrices) of size 3 by 3 but not all of size 4 by 4. The larger the arrays, the better approximations of $K$ for large objects decomposed in square arrays, and $n=5$ was a Turing machine size that we were able to run with current technology on a medium-size supercomputer ($\sim 30$ cpus) for about a month. Details are provided in~\cite{d5}. One can continue calculating further and approximations will improve accordingly.

Let $\mathbb{D}(5,2)$ be the frequency distribution constructed from running 2-dimensional machines (hence producing arrays rather than strings) according to Eq.~(\ref{Deq}). Then, for an array $s$,\\

\noindent \textbf{Definition 7.}
\begin{equation}
\label{ecaeq}
K_m(s) = -\log_2(\mathbb{D}(5,2)(s))
\end{equation}
where $K_m(s)$ is an approximation to $K$ by means of the Coding Theorem. $K_m(s)$ will then be used to estimate the complexity of graphs as follows: Formally, we will say that a graph $g$ has complexity:\\

\noindent \textbf{Definition 8.}
\begin{equation}
\label{newecaeq}
K\log_m(g) = \sum_{(r_u,n_u)\in Adj(g)_{d\times d}} \log_2(n_u)+K_m(r_u)
\end{equation}
where $Adj(g)_{d\times d}$ represents the set with elements $(r_u,n_u)$, obtained when decomposing the adjacency matrix of $g$ into non-overlapping squares of size $d$ by $d$. In each $(r_u,n_u)$ pair, $r_u$ is one such square and $n_u$ its multiplicity (number of occurrences). From now on both $K_m$ and $K\log_m$ will denote the same Eq.~(\ref{newecaeq}) given that Eq.~(\ref{ecaeq}) will no longer be used.

In~\cite{kolmo2d} a set of 2-dimensional Turing machines was executed to produce all square arrays of size $d=4$. This is why BDM is needed in order to decompose objects of larger size into objects for which its Kolmogorov complexity has been estimated. Using squares of size 4 is like looking for local regularities that give an approximation of the Kolmogorov complexity of the larger object. Because we will take $d=4$ from this point on we will denote by $K_m$ (sometimes also by $K\log_m$, but $m$ should not be taken as the base of the $\log$, which is 2 in the definition of $K\log_m$). The reader should simply bear in mind that $K_m$ and $K\log_m$ are approximations of Kolmogorov complexity using the Block Decomposition Method (BDM).

\subsection{Complexity and graph vertex order}
\label{sec:compl-order-graph}

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=4.5cm]{wheela.png}
  \caption{Wheel-18 graph.}
  \label{fig:wheel18a}
\end{figure}

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=8.5cm]{wheel18.png}
  \caption{Wheel-18 graph with the nodes in five different orders. Despite each adjacency matrix corresponding to the same topology (i.e. the Wheel-18 graphs), the different node orders affect the estimated complexity. }
  \label{fig:wheel18}
\end{figure}

As a final note on our method of approximating $K$, the order of the graph nodes in the adjacency matrix is relevant for the complexity retrieved by BDM. This is especially important in highly symmetrical graphs. Fig.~\ref{fig:wheel18} shows five different adjacency matrices for the wheel graph of 18 nodes (Fig.~\ref{fig:wheel18a}), with the nodes ordered in different ways. The extreme left matrix of Fig.~\ref{fig:wheel18} represents the nodes in consecutive order, with the central one at the right. The other four matrices sort the nodes in random order. As we can see in this very regular graph, the lowest complexity corresponds to the organized matrix.

Hence, when studying the complexity of graphs, for several applications we will be interested not only in the $K_m$ value of a particular adjacency matrix, but in several randomisations of the vertex order. Notice that it is just the adjacency matrix representation that changes; topologically the graph is the same in all permutations of the nodes. In estimating complexity, it is reasonable to consider that the complexity of a graph corresponds to the lowest $K_m$ value of all permutations of the adjacency matrix, as the shortest program generating the simplest adjacency matrix is the shortest program generating the graph. Hence when estimating $K_m$ we find a large number of programs producing the array from which a minimum complexity value is calculated by means of the frequency of the programs producing the array.

\subsection{Normalising BDM}

We now also introduce a normalised version of the BDM. The chief advantage of a normalised measure is that it enables a comparison among objects of different sizes without allowing the size to dominate the measure. This will be useful to compare graphs and networks of different sizes. First, for a square array of size $n\times n$, we define:
\[
MinBDM(n)_{d\times d} = \lfloor n/d \rfloor + \displaystyle\min_{x\in M_d(\{0,1\})} K_m(x)
\]
\noindent Where $M_d(\{0,1\})$ is the set of binary matrices of size $d\times d$. For any $n$, $MinBDM(n)_{d\times d}$ returns the minimum value of Eq.~\eqref{newecaeq} for square matrices of size $n$, so it is the minimum BDM value for graphs with $n$ nodes. It corresponds to an adjacency matrix composed by repetitions of the least complex $d\times d$ square. It is the empty (or complete) graph, because $0_{d,d}$ and $1_{d,d}$ are the least complex squares (the most compressible) of size $d$.

Secondly, for the maximum complexity, Eq.~(\eqref{newecaeq}) returns the highest value when the result of dividing the adjacency matrix into $d\times d$ squares contains the highest possible number of different squares (to increase the sum of the right terms in Eq.~\eqref{newecaeq}) and the repetitions (if necessary) are homogeneously distributed along those squares (to increase the sum of the left terms in Eq.~\eqref{newecaeq}), which should be the most complex ones in $M_d(\{0,1\})$. For $n,d\in \mathbb{N}$, we define a function \[f_{n,d}: M_d(\{0,1\})\longmapsto \mathbb{N}\]
that verifies:
\begin{eqnarray}
  \label{eq:2}
  & \displaystyle\sum_{r\in M_d(\{0,1\})} f_{n,d}(r) = \lfloor
  n/d\rfloor^2 & \\
  \label{eq:3}
  & \displaystyle\max_{r\in M_d(\{0,1\})} f_{n,d}(r)\ \ \leq\ \ 1+
  \displaystyle\min_{r\in M_d(\{0,1\})} f_{n,d}(r)  & \\
  \label{eq:4}
  &
  K_m(r_i) > K_m(r_j)\ \Rightarrow \ f_{n,d}(r_i)\geq
  f_{n,d}(r_j
  &
\end{eqnarray}

The value $f_{n,d}(r)$ indicates the number of occurrences of $r\in
M_d(\{0,1\})$ in the decomposition into $d\times d$ squares of the
most complex square array of size $n\times n$. Condition Eq.~\eqref{eq:2}
establishes that the total number of component squares is $\lfloor
n/d\rfloor^2$. Condition Eq.~\eqref{eq:3} reduces the square repetitions
as much as possible, to increase the number of differently
composed squares as far as possible and distribute them
homogeneously. Finally, Eq.~\eqref{eq:4} ensures that the most complex
squares are the best represented. Then, we define:

\[
MaxBDM(n)_{d\times d} = \hspace{-0.5cm}\sum_{
  {\begin{array}{c}
    r\in M_d(\{0,1\}),\\f_{n,d}(r)>0
  \end{array}}} \hspace{-0.5cm}
\log_2(f_{n,d}(r))+ K_m(r)
\]

Finally, the normalised BDM value of a graph $g$ is:\\

\noindent \textbf{Definition 9.} Given graph $g$ with $n$ nodes,
$NBDM(g)_d$ is defined as
\begin{equation}
\label{nbdm}
\frac{K_m(g) - MinBDM(n)_{d\times
    d}}{MaxBDM(n)_{d\times d} - MinBDM(n)_{d\times d}}
\end{equation}

This way we take the complexity of a graph $g$ to have a normalised value which is not dependent on the size $V(g)$ of the graph but rather on the relative complexity of $g$ with respect to other graphs of the same size. The use of $MinBDM(n)_{d\times d}$ in the normalisation is relevant. Note that the growth of $MinBDM(n)_{d\times d}$ is linear with $n$, and the growth of $MaxBDM(n)_{d\times d}$ exponential. This makes that for complex graphs, the result of normalising using just $K_m(g)/MaxBDM(n)_{d\times d}$ would be similar to $NBDM(g)_d$. But it would not work for simple graphs, as when the complexity of $g$ is close to the minimum, the value of $K_m(g)/MaxBDM(n)_{d\times d}$ drops exponentially with $n$. For example, the normalised complexity of an empty graph would drop exponentially in its size. To avoid it, Eq.~\eqref{nbdm} considers not only the maximum but also the minimum.

Notice the heuristic character of $f_{n,d}$. It is designed to ensure a quick computation of $MaxBDM(n)_{d\times d}$, and the distribution of complexities of squares of size $d\in\{3,4\}$ in $\mathbb{D}(5,2)$ ensures that $MaxBDM(n)_{d\times d}$ is actually the maximum complexity of a square matrix of size $n$, but for other distributions it could work in a different way. For example, condition~\eqref{eq:3} assumes that the complexities of the elements in $M_d(\{0,1\})$ are similar. This is the case for $d\in\{3,4\}$ in $\mathbb{D}(5,2)$, but
it may not be true for other distributions. But at any rate it offers a way of comparing the complexities of different graphs independent of their size.\\

Having defined our complexity measure and its normalised version, we verify it by showing that it behaves in accordance with theory when analysing edge density and dual graphs.

\subsection{Complexity and edge density}
\label{sec:compl-numb-edges}

There has been a protracted discussion in the literature as to whether the complexity of a structure increases with its connectivity, beginning with a disconnected graph with no edges, or whether instead it reaches a maximum before returning to zero for complete graphs~\cite{bonchev}. In~\cite{gellmann}, for example, Gell-Mann asks about the algorithmic complexity (description length) of small graphs with eight vertices each and an increasing number of edges $E(g)=0$ to $E(g)=V(g)(V(g)-1)/2$ (complete graph). Gell-Mann reasonably argues that these two extreme cases should have roughly equal complexity. Graphs with 0.5 edge density should fall in between and the other cases are more difficult to tell apart. Here we provide an answer to the general question of the relation between description complexity and edge count, an answer which is in agreement with Gell-Mann while being at odds with several other tailor made measures of complexity~\cite{bonchev}, \cite{dehmer1}, \cite{dehmer2} and \cite{standish}. We have created a number of random graphs, all with 50 nodes but different numbers of edges, ranging from 1 to ${50 \choose 2} = 1225$, in intervals of $1225/20$ edges. For each interval, we created 20 random graphs and generated 100 random permutations of each (see Fig.~\ref{fig:50meanStdDev}). All the graphs (Fig.~\ref{fig:50meanStdDev}) in the same interval correspond to aligned points. There are always 20 aligned points, but in most cases they overlap. Points represent the minimum (Top) and standard deviations (Bottom) of the complexity of the 100 permutations of each group.

In fact, that the most complex binary strings (hence binary adjacency matrices) will have roughly equal zeros and ones is a standard result from Kolmogorov complexity theory. This can be shown straightforwardly by the following relation of $K$ to Shannon entropy: If $x=x_1,\dots,x_l$ is a bit string, then~\cite{cover},

\begin{equation}\label{eq:Shan}
K(x)\leq l H_0\left(\frac{1}{l}\sum_{i=1}^{l}x_i\right)+O(\log_2(l))
\end{equation}
where
\begin{equation}
H_0(p)=-p\log_2(p)-(1-p)\log_2(1-p)
\end{equation}
 is the Shannon entropy (in bits) of the string $x$. This then implies that if the number of edges diverges from roughly half of the maximum possible, then $p$ must diverge from 0.5, and so the entropy $H_0$ decreases, implying that $x$ cannot be algorithmically random. Hence, the most complex strings must have roughly equal zeros and ones, or in graph terms, they must have roughly half the number of possible edges. Additionally, Eq.~(\ref{eq:Shan}) predicts that Fig. \ref{fig:50meanStdDev} (Top) should look roughly like the graph of $H_0(p)$ vs $p$, which it does: peaking at the centre, with gradual decay to zero at $p=0,1$. Also, note the clear symmetry of the plots in Fig.~\ref{fig:50meanStdDev}. This is because the value of $K_m$ is the same for any given graph and its complement. Complexity is minimal for empty or complete graphs (the most homogeneous matrices, all 0 or all 1), and so the standard deviation is also minimal.
These observations show that our measure is behaving as expected from theory.

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=6.6cm]{edges.png}
  \includegraphics[width=6.6cm]{edges2.png}
  \caption{Estimated (normalised) Kolmogorov complexity for increasing number of edges for random graphs of 50 nodes each. The minimum complexity (Top) and standard deviation (Bottom) is shown for 100 random permutations of 20 graphs in each group.}
  \label{fig:50meanStdDev}
\end{figure}

\subsection{Graph duality}
\label{sec:duality}

The dual graph of a planar graph $g$ is a graph that has a vertex corresponding to each face of $g$, and an edge joining two neighbouring faces for each edge in $g$. If $g\prime$ is a dual graph of $g$, then $A(g\prime)=A(g)$, making the calculation of the Kolmogorov complexity of graphs and their dual graphs interesting because of the correlation between Kolmogorov complexity and $A(g\prime)$, which should be the same for $A(g)$. One should also expect the estimated complexity values of graphs to be the same as those of their dual graphs, because the description length of the dual graph generating program is $O(1)$.

Note that unlike the t-statistic, the value of the D statistic (and hence the P value) is not affected by scale changes like using log. The KS-test is a robust test that cares only about the relative distribution of the data.

We numerically approximated the Kolmogorov complexity of dual graphs
using both lossless compression and the BDM applied to the adjacency matrices
of 113 regular graphs with non-identical dual graphs found in
\emph{Mathematica}'s built-in repository GraphData[]. The values (see
Figs.~\ref{dual}) were normalised by a multiple of the size of the
adjacency matrices $c|Adj(A)|$. Graphs ($g$) and their dual graphs
($g\prime$) were found to have estimated Kolmogorov complexity values that
are close to each other. The Spearman coefficient $r$ between $K_m(g)$ and
$K_m(g\prime)$ NBDM estimations amounts to $r=0.96$.
Values approximated by lossless compression were calculated with
Deflate (a standard compression algorithm) implemented in
\emph{Mathematica}'s Compress[] function. Notice that the BDM (and
therefore the NBDM) accumulates errors for larger graphs if the
complementary algorithm (CTM) is not run for a greater number of
Turing machines. A more accurate analysis of divergence rates and
accumulated errors should be investigated. Robustness of algorithmic probability approximations for different (Turing-universal) computational formalisms (e.g. deterministic cellular automata, Post tag systems, etc.) was investigated in~\cite{zenilalgo}, where frequency distributions were calculated and their ranking order correlation also quantified with the Spearman coefficient.

\begin{figure}[htbp!]
  \centering
\includegraphics[width=7.5cm]{dualplot1.png}
\includegraphics[width=7.3cm]{dualplot2.png}
  \caption{\label{dual} Log scatter-plots of graphs ranked by Kolmogorov complexity approximated by two different methods. Top: Dual graphs not ranked by the BDM method closely follow the distribution of their respective duals as one would expect from a complexity measure given that an $O(1)$ program can build a graph from its dual and vice-versa. Bottom: Lossless compression in agreement with BDM and the expected complexity of dual graphs.}
\end{figure}

These results show that Kolmogorov complexity applied to adjacency matrices of graphs as a measure of complexity behaves as expected, agreeing both with theory and intuition. Having verified that our measure behaves as expected, we can now apply our measure to analysing automorphism in graphs.

\section{Graph automorphisms and Kolmogorov complexity}

Intuition tells us that a graph with more symmetries can be more compactly described and should therefore have a lower Kolmogorov complexity. For example, if an object is symmetrical a single symbol can be used for each repetition, in addition to an additive constant of information describing the type of transformation (e.g. rotation, reversion, translation). Specifically, any collection of graph nodes within the same orbit of a group transformation will require only the bonds of one node to be specified, with the other nodes then using the same information to specify their bonds. Hence, the number of bits required to specify the graph would be signifcantly lowered, reducing the graph Kolmogorov complexity. Consequently, as the size of its automorphism group $A(g)$ of a graph $g$ measures the extent of symmetries in $g$, one would expect to find Kolmogorov complexity to be related to $A(g)$.

We test this reasoning on connected regular graphs of size $V(g)=20$ nodes; Fig.~\ref{fig7} shows that $A(g)$ and $K_m(g)$ are indeed negatively related, as expected.

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=8.8cm]{main3.png}
\flushright
   \includegraphics[width=8.7cm]{main1b.png} \caption{\label{fig7} Plot of graph automorphism group size $A(g)$ ($y$-axis) of all connected regular graphs of size $V(g)=20$ available in \emph{Mathematica}'s GraphData[] versus Kolmogorov complexity ($x$-axis) estimated by BDM. As theoretically expected, the larger automorphism group size $A(g)$ the smaller Kolmogorov complexity estimations.}
\end{figure}

It is interesting that there are several graphs of low $K_m$ and also low $A(g)$ (see Fig.~\ref{fig7b})---that is, there are several graphs which have few symmetries but yet also low complexity (this is analogous to Fig.~\ref{fig:simplegraph}). Hence our measure is picking up structure in the graphs which are not detectable by symmetry search.

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=8.8cm]{boundarygraphs.png}
  \caption{\label{fig7b} The three graphs found in the boundaries of Fig.~\ref{fig7}. From left to right: The graph at the top left, with low $K_m$ and large automorphism group size is the complete graph for $V(g)=20$. Bottom left with low $K_m$ but small automorphism group size is the (4,5)-lattice. Bottom right, with high $K_m$ and small automorphism group size: the (20,46)-noncayley transitive graph.
\end{figure}

We plotted analogous plots to Fig.~\ref{fig7} (i.e. connected regular graphs) for different number of nodes, using $V(g)$ between 22 and 36 (see Appendix Fig.~\ref{fig8} and Fig.~\ref{fig9}). The results were qualitatively the same, with graphs of larger $K$ estimations having smaller $A(g)$ values, and the results also agreed with those using lossless compression (Deflate) instead of BDM.

Notice that the measure $K_m$ does not quantitatively agree with the theoretical $K$, as the theoretical $K$ has an upper bound of $\sim$200 bits, which would be arrived at by specifying $Adj(g)$ literally and in full, i.e. using the fact that
\begin{equation}
K(g)\leq {V(g) \choose 2}+2\log_2 {V(g) \choose 2} +O(1)
\end{equation}
 On the other hand, BDM retrieves values up to $\sim$800. Nonetheless, BDM values (just like compression results) are consistent upper bounds. BDM can provide better approximations but it requires
 the calculation of a larger sample of random programs~\cite{d5}
 with square matrices of larger size $d$, compared to the current $d=4$ that the experiments here introduced used. But in order for BDM to \emph{scale up} and provide better $K_m$ approximations to the theoretical (and ultimately uncomputable) $K$, the full method to consider is both Coding Theorem Method (CTM) $ + $ BDM. CTM is, however, computationally very expensive, while BDM is computationally very cheap, so there is a trade-off in the application of the algorithm. BDM alone is limited by the data generated by CTM, and the range of application of BDM will be limited in this respect, specially for increasingly larger objects (where lossless compression can take over and behave better than for small objects, hence CTM $ + $ BDM and lossless compression are complementary tools). The chief advantage of the CTM $ + $ BDM approach, is that CTM needs to run only once and BDM can be then efficiently applied and used many times on all sorts and types of data.

\section{Applying BDM to real-world natural and social networks}

We now move on to applying the normalised version of the BDM (NBDM) to real world networks of different sizes.
The 88 real-world networks range from metabolic to social networks and have between 200 and 1000 nodes, and were extracted from the function ExampleData[``NetworkGraph"] in Wolfram \emph{Mathematica} v.9. A subset of 20 of the specific real-world network examples used in this experiment are in Table~\ref{table1} (Appendix).  Fig.~\ref{largenetworks} shows complexity plotted against automorphism group size for these networks. We find that the same qualitative relationship between $K$ and $A(g)$ as reported in Fig.~\ref{fig7} and Fig.~\ref{fig8} for synthetic networks (see Appendix) are obtained for these larger real-world networks. This provides further evidence that approximations of Kolmogorov complexity identify group-theoretic properties (as well as topological properties, as will be shown in Section~\ref{topossection}) of graphs and networks. The automorphism group sizes $A(g)$ were calculated using the software Saucy 3.0 (\url{http://vlsicad.eecs.umich.edu/BK/SAUCY/},  accessed in September 2013), the most scalable symmetry-finding tool available today~\cite{18}. Saucy only deals with undirected graphs hence only directed versions of the real-world sample of networks was used to calculate the automorphism group size $A(g)$ of each with Saucy. We made directed graphs into undirected graphs by setting an edge between two nodes $i$ and $j$ if in the original directed graph there was a directed edge from $i$ to $j$, $j$ to $i$, or both. Clearly undirected graphs are simpler than directed graphs, in general. In the case of labelled nodes, it is easy to see that the Kolmogorov complexity of a random undirected graph is typically half of a directed labelled graph, as the binary adjacency matrix for undirected graphs is symmetric. For unlabelled graphs, it is not so straightforward, due to complications of isomorphism (recall that there are typically many adjacency graphs representing a given unlabelled graph). Nonetheless directed graphs typically require more bits to specify their links, and are hence more complex. Exploring directed graphs will be left for future work.

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=7.4cm]{main2.png}
  \caption{\label{largenetworks} Real-world networks also display the same correlation between Kolmogorov complexity and automorphism group size $A(g)$. Networks with more symmetries have lower estimated Kolmogorov complexity. Automorphisms count is normalised by network size.}
\end{figure}

\section{The algorithmic randomness of synthetic complex networks}
\label{topossection}

An objective and universal measure of complexity should take into account symmetries as a simplifying factor when it comes to description size.
 Here we explore how $K$ can characterise topological properties of complex networks.

The study of complex networks is currently an active area of research~\cite{newman2011structure}. The field has been driven largely by observations that many real-world networks (e.g. internet links or metabolic networks) have properties very different from both regular and random graphs; the latter having been extensively studied in foundational work by Paul Erd\"os and Alfr\'ed R\'enyi. Specifically, two topological properties of many complex networks that have been a focus of interest are (a) a scale-free (or power law) distribution in node degree distributions, and (b) the ``small-world" property where graphs have high clustering and the average graph distance $D$ grows no faster than the $\log$ of the number of nodes: $D \sim \log(V(g))$.

Observations of these properties have motivated the development of many models to explain these features. Of these, The Barab\'asi-Albert model~\cite{albert2002statistical} reproduces complex network features using a preferential attachment mechanism,
and the Watts-Strogatz model~\cite{watts} also provides a mechanism for constructing small-world networks with a rewiring algorithm (which involves starting from a regular network and randomly rewiring); see for example Fig.~\ref{swplot}.

\subsection{Network connectedness and complexity}

We have theoretically substantiated and experimentally demonstrated how network size, both in terms of the number of nodes and the density of edges for a fixed number of nodes, can impact Kolmogorov complexity values (above). However, Fig.~\ref{connectednessplot} demonstrates that node and edge count do not exclusively dominate $K$, as the graphs in the plot all have exactly the same graph size and edge density. The plot considers Watts--Strogatz graphs of size $V(g)=1000$ with rewiring probability ranging from $p=0$ (a regular graph) to $p=1$ (a random graph). The plot shows that the graph complexity increases with $p$, thus illustrating a change not subject to graph size or edge density, which are both the same for all cases. Rather, the increasing complexity must be due to other topological properties such as connectedness, link distribution and graph diameter

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=2.7cm]{WS1.png}
 \includegraphics[width=2.7cm]{WS2.png}
 \includegraphics[width=2.7cm]{WS3.png}
  \caption{Example of a Watts--Strogatz rewiring algorithm for $n=100$-vertex graphs and rewiring probability $p=0,$ .01 and $0.1$ starting from a $2n$-regular graph. The larger $p$ the closer to a random graph (rewiring $p=1$).}
  \label{swplot}
\end{figure}

\begin{figure}[htbp!]
  \centering
\includegraphics[width=7.2cm]{rewiring.png}
  \caption{Kolmogorov complexity of the Watts-Strogatz model as a function of the rewiring probability on a 1000-node network starting from a regular ring lattice. Both the number of nodes and the number of links are kept constant, while $p$ varies; Kolmogorov complexity increases with $p$.}
  \label{connectednessplot}
\end{figure}

\begin{figure}[htbp!]
  \centering
\includegraphics[width=6.7cm]{clustering1.png}
\includegraphics[width=6.7cm]{compressionratio.png}
  \caption{The Watts-Strogatz model starts from a ring lattice, hence highly compressible, then with rewiring probability $p$ ($x$-axis) the global clustering coefficient drops fast (Top) in this $15\times10^3$-node W-S network while approaching a random graph ($p=1$) slowing down at points $p \sim 0.2$ and 0.5  (red dots in plots) where compression ratios (Bottom) also display slight slope variations.}
  \label{clustering}
\end{figure}

\subsection{Topological characterization of artificial complex networks}

Random networks and Barab\'asi-Albert networks not only have exactly the same vertex count $V(g)$ in the experiment the results of which are summarised in Fig.~\ref{fig10b} and~\ref{fig10b2}, but also the same number of edges on average. The $K_m$ difference can only therefore be attributed to other topological properties related to each network model. Observing that $K$ can be affected by topological features such as clustering coefficient (as shown in~\ref{clustering} for Watts-Strogatz networks), we proceeded to examine  other network models.
As shown in Figs.~\ref{fig10b} and~\ref{fig10b2}, $K_m$ approximated by the BDM assigns low Kolmogorov complexity to regular graphs and Watts-Strogatz networks and higher complexity to Barab\'asi-Albert networks, with random networks displaying the greatest Kolmogorov complexity as expected. Indeed, that random graphs are the most algorithmically complex is clear from a theoretical point of view: nearly all long binary strings are algorithmically random, and so nearly all random unlabelled graphs are algorithmically random~\cite{li}.

Barab\'asi-Albert networks are often referred to as scale free, because the node distribution follows a power law. However for small graphs such as those we analyse, it is questionable whether the global scaling is meaningful. An advantage of the method is, however, that it still differentiates between different network models despite their  small size. The theory of algorithmic information formally characterizes any object in terms of the properties specified in its description from which the object can be fully recovered. It is therefore vis-\`a-vis small objects that the theory presents its greatest challenges, given that the invariance theorem (see~\cite{li}) does not tell us anything about the rate of convergence in values.

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=8.5cm]{histogram2.png}
  \caption{Distribution of 292 regular, Watts-Strogatz, Barab\'asi-Albert and Erd\"os-R\'enyi networks with $V(g)=30$ (73 networks each) with W-S rewiring probability $p=0.05$. The number 73 comes from the number of regular graphs of size $V(g)=30$ in the used repository (\emph{Mathematica}'s GraphData[]).}
  \label{fig10b}
\end{figure}

\begin{figure}[htbp!]
  \centering
  \includegraphics[width=8.5cm]{histogram3.png}
  \caption{Distribution of 792 regular, Watts-Strogatz, Barab\'asi-Albert and Erd\"os-R\'enyi networks with $V(g)=20$ (198 networks each) with W-S rewiring probability from $p=0.05$ in Fig.~\ref{fig10b} to $p = 0.5$ as an experiment introducing randomness to witness the shift of the W-S networks towards higher complexity values of random graphs. For combinatorial reasons, there are more regular networks of size 30 than 20, hence this time the number 198 comes from the number of regular graphs found in the (\emph{Mathematica}'s GraphData[]).}
  \label{fig10b2}
\end{figure}

We also considered regular graphs for this comparison including Haars, circulants, noncayley transitives, snarks, cubics, books, lattices and suns among other types of regular networks. The average NBDM complexity value of the regular graph group remained very low (and the distribution mostly uniform with a slight peak at around 0.5). The group of complex networks peak at different $K_m$ values, with Watts-Strogatz networks ranking low for $p=0.01$ when the small world effect is produced, and then moves towards high Kolmogorov complexity when rewiring probability $p$ increases. Barab\'asi-Albert networks peak at NBDM value equal to 0.75 and random graphs (Erd\"os-R\'enyi ) ranked the highest at an estimated Kolmogorov complexity value close to 0.9.

\section{Concluding remarks}

Our investigation connected disparate seminal subjects in graph theory and complexity science. We have shown computationally that Kolmogorov complexity approximations capture important group-theoretic and topological properties of graphs and networks, properties related to symmetry, density and connectedness, to mention a few and the most important. For example, we found that graphs with a large number of non-trivial automorphism groups tend to have smaller Kolmogorov complexity values. This was verified both for small artificial graphs and larger (but still rather small) empirical networks ranging from biological to social networks.

We have also shown that graphs with differing algorithmic randomness distinguish models of networks, two of which are complex networks with different edge generation mechanisms. A number of connections between graph and network properties to complexity that other papers have claimed or have tried to connect before with hand-tailored measures were obtained naturally with Kolmogorov complexity.

In future work, it may be interesting to take one class of networks of a fixed size and analyse what aspects of the topology change $K$, and what physical interpretations and implications may be associated to low and high complexities. Additionally, due to the small graphs we have analysed, it would be interesting to explore how approximations to $K$ behave for increasing network size for each model, and also with larger samples of graphs. Finally, extending these results to directed graphs would be another possible direction to explore. The findings suggest that analysing natural complex systems via Kolmogorov complexity may open new interesting avenues of research.

Supplemental material, including all the source code in \emph{Mathematica} v.9 can be downloaded (and read with the free \emph{Mathematica} player) at \url{http://complexitycalculator.org/graphcomplexitysuplementalmaterialv1.zip}.

\section*{Acknowledgements}

We thank Sebastian Ahnert, Jesper Tegn\'er and the anonymous referees for the helpful discussion and comments on the manuscript.

\bibliographystyle{elsarticle-num}

redpajama_set_name: RedPajamaArXiv


RAJOURI: The civil and police authorities of Rajouri district exhumed the body of a man who hailed from Pakistan-occupied Kashmir (PoK) on Tuesday.
As per reports, the man was died last year and his body was exhumed today after more than six months at Kampla Mohra in Rajouri district. The officials present on the spot informed that the body of the PoK resident identified as Irshad Ahmad (age 30), son of Mohd Shabir of Kotli Gujjran was exhumed today following the magisterial orders. The family members of the deceased approached the authorities and demanded the remains of his body. The Deputy Commissioner Rajouri Mohammad Aijaz Asad, had ordered the exhumation. The orders followed after Pakistan army had taken up the matter with counterparts following which the legal process was initiated. Civil and police officials, including Tehsildar, Additional SP Nowshera, SHO concerned and a team of doctors were present on the spot when the body was exhumed.
The remains of body were handed over to army authorities for further transportation to his native village in PoK, the reports added. It is pertinent to mention here that on the intervening night of 22/23-07-2018 Irshad after intruding into the Indian side of Line Of Control (LoC) died due to electric shock at Sair in Nowshera sector. Later, he was buried at Kampla Mohr and a case FIR 147/18 under section 2/3 Egress & Ingress Movement Control Ordinance (E&IMCO) was registered in Police Station Nowshera.


It's hard to imagine the "I Love Lucy" show, the Henri Bendel store and the seductive harem-esque bottle interior of "I Dream of Jeannie" sharing equal billing as inspirations for apartment decor. But such were the unlikely forces behind this rental loft in Printer's Row where Phil Johnson and Seth Krosner created a theatrical stage-set of a home with $5,000 and a lot of chutzpah. Campy? No question. But who says "playful" and "sophisticated" are mutually exclusive?
"We wanted to do something a little wild here, and thanks to the 12-foot-high ceilings, we could get away with ideas that were just too big and stagey for a normal apartment," says Johnson, an actor in the current production of "Miss Saigon" who has spent much of the last six months haunting flea markets, Minnesota Fabrics, Salvage One and as many Ace Hardware locations as it took to get 10 gallons of gold paint. The results, with home-upholstered chairs, refinished tables, hand-painted wall finishes and plenty of rayon drapery "is all based on good, even grand design that we just sort of kicked in the teeth."
Setting a dramatic tone in the dining room is a showy black and gold light fixture that once graced the Chicago Theater but "looked horrible when Phil bought it-filthy, in bad condition-I hated it," says Krosner, a doctor of emergency medicine who spent hours scrubbing and polishing the $100 "find" back to its former glory. Now, the chandelier's details clearly echo the golden, harlequin-patterned wall that Johnson, ever watchful, copied from a room at Bendel's. But it was Ricky Ricardo's bandstands on "I Love Lucy" that are recalled in a pair of painted wooden panels, painted by Ellen Gould, that cleverly camouflage two ordinary floor lights.
An art form of somewhat higher order (depending on your viewpoint) gave focus to the library, with its mottled green walls and intricate Art Nouveau border. "We wanted to highlight a print by Gustav Klimt that uses a color I'd describe as British Men's Club Green," says Krosner who, along with Johnson, was responsible for the paint job. Artist Gould was again pressed into service to create the complex frieze and the result, which epitomizes the whole abode, "evokes a serious room and makes fun of it at the same time," according to Johnson.
Even in the muted, vaguely neoclassical bedroom, with its palette of black, brown and white, a pair of giant plaster Egyptoid capitals, rescued from a thrift store, add a zinger of dramatic flair, recalling a stage set of ancient Thebes. Clearly, this is one rental unit that's getting to live up to its potential.
"Even though we just lease the place, I wanted to turn it into something distinctive," admits Johnson, who has been in so many traveling productions that he has had no home base for the last two years. "But there's one drawback," points out pragmatist Krosner, who had to be coerced into accepting several of Johnson's design ideas. "Either we paint everything white when we leave or we forfeit the damage deposit."


text:
The 36th Combat Aviation Bridge Soldiers receive awards for their role in Harvey relief [Image 2 of 3]
Photo by Spc. Christina Clardy
36th Infantry Division (TXARNG)
Brig. Gen. Patrick M. Hamilton, the commanding general of Texas Military Forces Domestic Operations, awards Soldiers from the 36th Combat Aviation Brigade, 36th Infantry Division, Texas Army National Guard, the Texas Outstanding Service Medal in recognition of their efforts and participation in 2017's Hurricane Harvey emergency response during an awards ceremony in Austin, Texas, on Feb. 11, 2018. More than 60 members of the 36th CAB were recognized with various awards for their exceptional support and dedication in rescue, recovery and relief assistance in the aftermath of the hurricane. (U.S. National Guard Photo by Spc. Christina Clardy, 36th Infantry Division Public Affairs)
VIRIN: 180211-Z-C4745-005
Location: AUSTIN, TX, US
This work, The 36th Combat Aviation Bridge Soldiers receive awards for their role in Harvey relief [Image 3 of 3], by SPC Christina Clardy, identified by DVIDS, must comply with the restrictions shown on https://www.dvidshub.net/about/copyright.
Combat Aviation Brigade
TXARNG
Texas Army National Guard
Domestic Operations
36th ID
36th Combat Aviation Brigade
36th CAB
DOMOPS
36ID
36CAB
Texas Military Department
Domestic Operations Command
The 36th Combat Aviation Bridge Soldiers receive awards for their role in Harvey relief

redpajama_set_name: RedPajamaCommonCrawl


text:
Lawyer for dealers in Ivory Act appeal: 'prepare to sell your antique ivory'
A lawyer acting for dealers and collectors bidding to have the Ivory Act 2018 overturned warned antique ivory owners they need to "prepare to sell quickly" if judges reject the legal challenge.
Noelle McElhatton
The Court of Appeal at the Royal Courts of Justice in The Strand.
View Flickr WikiCommons licence.
In front of three Lord Justices in the Court of Appeal on February 24-25, lawyers for Friends of Antique Cultural Treasures (FACT) Ltd made their last attempt to stop the government from bringing the act into force.
After the hearing, FACT solicitor Richard Pike, partner at Constantine Cannon, told ATG that if the government wins the case, it was "likely to act quickly to bring the ivory ban into effect" by statutory instrument "possibly without warning".
The verdict was likely to be delivered "in a few weeks," he said.
'Take action now'
Ahead of that, Pike said dealers and collectors "should take action now to protect the value of their collections, including moving items overseas where practicable".
The stark warning came as directors for FACT praised their legal team, led by Thomas de la Mare QC.
"We have been able to use the legal process to show how much damage will be done to dealers in, and collectors of, antiques and how that harm was not properly taken into account by the government," FACT said in a statement after the hearing.
"We have also succeeded in showing that the ban is unlikely to lead to much, if any, benefit for elephants and that much the same could have been achieved through other lesser measures, including only an export ban rather than a ban on domestic sales."
DEFRA argument
Since a trade ban was first revealed as Conservative Party policy in 2015, DEFRA (the Department of the Environment, Food and Rural Affairs), the act's sponsor, has argued that "the legal market presents opportunities for criminals to launder recently poached ivory as old ivory products".
Pike said that during the appeal hearing, DEFRA failed to provide "any compelling evidence of the UK market itself contributing to elephant poaching".
"Toughest of bans"
After a public consultation in 2017, DEFRA promised a UK ban on trading ivory that would be "one of the world's toughest".
In a major speech on February 3, Prime Minister Boris Johnson hailed the resulting Ivory Act as "one of the strictest of ivory bans in the world".
The appeal hearing, which took place at London's Royal Courts of Justice while elephant interest groups protested outside, was broadcast live on YouTube, a recording of which can be viewed here.
It is the final chapter in a long fight by the trade to stop the act, which received Royal Assent in December 2018, from coming into force.
The act will allow only narrow exemptions to a UK trade ban:
Items comprised of less than 10% ivory by volume made prior to 1947
Musical instruments with an ivory content of less than 20% and made before 1975
Portrait miniatures made before 1918
Sales to and between accredited museums.
Items of outstanding artistic, cultural or historic significance, made prior to 1918, the trade in which will be subject to the advice of specialists at institutions such as the UK's most prestigious museums.
Endangered species: ivory
Front Page and News
Ivory regulation
Law, crime and regulation
Judge says seized silver and ivory tea set won't be returned
Tory party expected to water down plans for total ivory ban
No mention of ivory in Tory manifesto
No change on ivory without consultation
Trade urged to defend ivory works of art as Michael Gove renews ban call


text:
version: 1.0.2
title: GenStage
---

En esta lección vamos a echar un vistazo muy de cerca a `GenStage`, que rol cumple y como podemos aprovecharlo en nuestra aplicaciones.

{% include toc.html %}

## Introducción

Entonces ¿Qué es GenStage? De la documentación oficial es una "especificación y flujo computacional para Elixir", ¿pero qué significa eso para nosotros?

Lo que significa es que `GenStage` nos provee una forma de definir un *pipeline* de trabajo para ser llevado en pasos independientes en procesos separados; Si has trabajado con *pipelines* antes entonces algunos de estos conceptos deberían ser familiares.

Para mejor entendimiento de cómo trabaja vamos a visualizar un flujo simple de productor-consumidor:

```
[A] -> [B] -> [C]
```

En este ejemplo tenemos 3 fases: `A` un productor, `B` un productor-consumidor y `C` un consumidor.
`A` produce un valor el cual es consumido por `B`, `B` realiza algo de trabajo y retorna un nuevo valor el cual es recibido por nuestro consumidor `C`; el rol de nuestra fase es importante como veremos en la siguiente sección.

Ya que nuestro ejemplo es un productor-a-consumidor 1-a-1 es posible para ambos tener múltiples consumidores y productores en cualquier fase dada.

Para ilustrar mejor estos conceptos vamos a construir un *pipeline* con `GenStage` pero primero vamos a explorar los roles sobre los que `GenStage`se basa un poco mas a fondo.

## Consumidores y productores

Como hemos leído, el rol que damos a nuestra fase es importante.
La especificación de `GenStage` reconoce tres roles:

+ `:producer` — Una fuente.
Los productores esperan por la demanda de los consumidores y responden con los eventos solicitados.

+ `:producer_consumer` — Ambos, una fuente y un sumidero.
Productor-consumidores pueden responder a la demanda de otros consumidor como también a las solicitudes de otros productores.

+ `:consumer` — Un sumidero.
Un consumidor solicita y recibe datos de los productores.

¿Notas de que nuestros productores __esperan__ por demanda? Con `GenStage` nuestros consumidores enviar demanda y procesan los datos de nuestro productor.
Esto facilita un mecanismo conocido como contra-presión(*back-pressure*).
La contra-presión pone la carga en el productor para no sobre presionar cuando los consumidores están ocupados.

Ahora que hemos cubierto los roles dentro de `GenStage` vamos a empezar nuestra aplicación.

## Comenzando

En este ejemplo estaremos construyendo una aplicación `GenStage` que emita números, ordene los números pares y finalmente los imprima.

Para nuestra aplicación usaremos los tres roles de `GenStage`.
Nuestro productor será responsable de contar y emitir los números.
Usaremos un productor-consumidor para filtrar solo los números pares y luego responder a la demanda.
Por último construiremos un consumidor que imprima los números restantes para nosotros.

Comenzaremos generando un proyecto con un árbol de supervisión:

```shell
$ mix new genstage_example --sup
$ cd genstage_example
```

Vamos a actualizar nuestras dependencias en `mix.exs` para incluir `gen_stage`:

```elixir
defp deps do
  [
    {:gen_stage, "~> 0.11"},
  ]
end
```

Deberíamos descargar nuestras dependencias y compilarlas antes de continuar:

```shell
$ mix do deps.get, compile
```

¡Ahora estamos listos para construir nuestro productor!

## Productor

El primer paso para nuestra aplicación `GenStage` es crear nuestro productor.
Como discutimos antes, queremos crear un productor que emita un flujo constante de números.
Vamos a crear nuestro archivo productor:

```shell
$ mkdir lib/genstage_example
$ touch lib/genstage_example/producer.ex
```

Ahora podemos agregamos el código:

```elixir
defmodule GenstageExample.Producer do
  use GenStage

  def start_link(initial \\ 0) do
    GenStage.start_link(__MODULE__, initial, name: __MODULE__)
  end

  def init(counter), do: {:producer, counter}

  def handle_demand(demand, state) do
    events = Enum.to_list(state..(state + demand - 1))
    {:noreply, events, state + demand}
  end
end
```

Las dos partes más importantes que debemos notas aquí son `init/1` y `handle_demand/2`.
En `init/1` definimos el estado inicial tal como hemos hecho con nuestros `GenServers` pero mas importante nos nos etiquetamos como un productor.
La respuesta de nuestra función `init/1` es sobre lo que `GenStage` se va a basar para clasificar nuestro proceso.

La función `handle_demand/2` es donde la mayor parte de nuestro productor se definido.
Debe ser implementada por todos los productores `GenStage`.
Aquí retornamos el conjunto de números demandados por nuestros consumidores e incrementamos nuestro contador.
La demanda de los consumidores, `demand` en el código de arriba, es representada como un entero correspondiendo al número de eventos que pueden manejar, por defecto el valor es 1000.

## Productor Consumidor

Ahora que tenemos un productor generando números, vamos a pasar a nuestro productor-consumidor.
Vamos a querer solicitar números de nuestro productor, filtrar los impares y responder a la demanda.

```shell
$ touch lib/genstage_example/producer_consumer.ex
```

Vamos a actualizar nuestro archivo para que se parezca al código de ejemplo:

```elixir
defmodule GenstageExample.ProducerConsumer do
  use GenStage

  require Integer

  def start_link do
    GenStage.start_link(__MODULE__, :state_doesnt_matter, name: __MODULE__)
  end

  def init(state) do
    {:producer_consumer, state, subscribe_to: [GenstageExample.Producer]}
  end

  def handle_events(events, _from, state) do
    numbers =
      events
      |> Enum.filter(&Integer.is_even/1)

    {:noreply, numbers, state}
  end
end
```

Puede que hayas notado que en nuestro productor-consumidor hemos introducido una nueva opción en `init/1` y una nueva función: `handle_events/3`.
Con la opción `subscribe_to` le decimos a `GenStage` que nos comunique con un productor específico.

La función `handle_events/3` es nuestro caballo de carga, donde recibimos los eventos entrantes, los procesamos y devolvemos un conjunto transformado.
Como veremos, los consumidores están implementados de la misma forma pero la mas importante diferencia es que retorna nuestra función `handle_events/3` y como es usada.
Cuando etiquetamos nuestro proceso como un `producer_consumer` el segundo argumento de nuestra tupla, `numbers` en nuestro caso, es usado para saber la demanda de los consumidores.
En los consumidores este valor es descartado.

## Consumidor

Por último pero no menos importante tenemos nuestro consumidor.
Vamos a empezar:

```shell
$ touch lib/genstage_example/consumer.ex
```

Dado que los consumidores y productores-consumidores son tan similares nuestro código no va a ser muy diferente:

```elixir
defmodule GenstageExample.Consumer do
  use GenStage

  def start_link do
    GenStage.start_link(__MODULE__, :state_doesnt_matter)
  end

  def init(state) do
    {:consumer, state, subscribe_to: [GenstageExample.ProducerConsumer]}
  end

  def handle_events(events, _from, state) do
    for event <- events do
      IO.inspect({self(), event, state})
    end

    # As a consumer we never emit events
    {:noreply, [], state}
  end
end
```

Como cubrimos en la sección anterior, nuestro consumidor no emite eventos por lo que el segundo valor de nuestra tupla será descartado.

## Uniendo todas las partes

Ahora que tenemos nuestro productor, productor-consumidor y consumidor construidos estamos listos para unirlos todos juntos.

Vamos a empezar abriendo `lib/genstage_example/application.ex` y agregando nuestros nuevos procesos al árbol de supervisión:

```elixir
def start(_type, _args) do
  import Supervisor.Spec, warn: false

  children = [
    worker(GenstageExample.Producer, [0]),
    worker(GenstageExample.ProducerConsumer, []),
    worker(GenstageExample.Consumer, [])
  ]

  opts = [strategy: :one_for_one, name: GenstageExample.Supervisor]
  Supervisor.start_link(children, opts)
end
```

Si todo está correcto podemos correr nuestro proyecto y deberíamos ver todo funcionando:

```shell
$ mix run --no-halt
{#PID<0.109.0>, 2, :state_doesnt_matter}
{#PID<0.109.0>, 4, :state_doesnt_matter}
{#PID<0.109.0>, 6, :state_doesnt_matter}
...
{#PID<0.109.0>, 229062, :state_doesnt_matter}
{#PID<0.109.0>, 229064, :state_doesnt_matter}
{#PID<0.109.0>, 229066, :state_doesnt_matter}
```

¡Lo hicimos! Como era de esperar nuestra aplicación solo emite número pares y lo hace __rápidamente__.

En este punto ya tenemos un *pipeline* funcionando.
Hay un productor emitiendo números, un productor-consumidor descartando números impares y un consumidor mostrando todo esto y continuando con el flujo.

## Muchos productores y consumidores

Mencionamos en la introducción que era posible tener mas de un productor o consumidor.
Vamos a ver justo eso.

Si examinamos la salida de `IO.inspect/1` de nuestro ejemplo vemos que cada evento es manejado por un único PID.
Vamos a hacer algunos ajustes para tener múltiples *workers* modificando `lib/genstage_example/application.ex`:

```elixir
children = [
  worker(GenstageExample.Producer, [0]),
  worker(GenstageExample.ProducerConsumer, []),
  worker(GenstageExample.Consumer, [], id: 1),
  worker(GenstageExample.Consumer, [], id: 2)
]
```

Ahora que configuramos dos consumidores vamos a ver que obtenemos si ejecutamos nuestra aplicación:

```shell
$ mix run --no-halt
{#PID<0.120.0>, 2, :state_doesnt_matter}
{#PID<0.121.0>, 4, :state_doesnt_matter}
{#PID<0.120.0>, 6, :state_doesnt_matter}
{#PID<0.120.0>, 8, :state_doesnt_matter}
...
{#PID<0.120.0>, 86478, :state_doesnt_matter}
{#PID<0.121.0>, 87338, :state_doesnt_matter}
{#PID<0.120.0>, 86480, :state_doesnt_matter}
{#PID<0.120.0>, 86482, :state_doesnt_matter}
```

Como puedes ver ahora tenemos múltiples PIDs simplemente agregando una linea de código y dándole a nuestro consumidores un ID.

## Casos de uso

Ahora que hemos cubierto `GenStage` y construimos nuestra primera aplicación de ejemplo, ¿cuales son algunos de casos de uso __reales__ para `GenStage`?

+ *Pipeline* para transformación de datos - Los productores no tienen que ser simples generadores de números.
Podemos producir eventos desde una base de datos o incluso desde otra fuente como Apache's Kafka.
Con una combinación de productor-consumidor y consumidores podríamos procesar, ordenar, catalogar y guardar métricas tan pronto como estén disponibles.

+ Cola de trabajo - Dado que los eventos puedes ser cualquier cosa podríamos producir cargas de trabajo para ser completadas por una serie de consumidores.

+ Procesamiento de eventos - Similar al *pipeline* de datos, podríamos recibir, procesar, ordenar y tomar acción sobre los eventos emitidos en tiempo real desde nuestras fuentes.

Estas son solo __algunas__ de las posibilidades de `GenStage`.

redpajama_set_name: RedPajamaGithub


Total consolidated sales for January – June 2016 amounted to Denar 4,197 million, an increase of 4% compared with the same period in the previous year, with an increase of 5% of the consolidated export. Earnings before interest, taxes, depreciation and amortization (EBITDA) in amount of Denar 598 million increased by 8% and consolidated Net Income in amount of Denar 326 million also increased by 8%, according to the unaudited consolidated income statement.
According to the unaudited stand alone income statement, sales for January – June 2016 amounted to Denar 3,244 million, an increase of 6% compared with the same period in the previous year. Earnings before interest, taxes, depreciation and amortization (EBITDA) in amount of Denar 583 million increased by 9% and Net Income also increased by 9%.
The total investments in non-current assets for the period January - June 2016 were in the amount of Denar 344,331 thousand.
There were 95 new employments for the period January - June 2016 in Alkaloid in the Republic of Macedonia.


text:
package org.apache.fineract.data.models.deposit;

public class Charge {

    private String actionIdentifier;
    private String incomeAccountIdentifier;
    private String name;
    private String description;
    private Boolean proportional;
    private Double amount;

    public Charge() {
        super();
    }

    public String getActionIdentifier() {
        return this.actionIdentifier;
    }

    public void setActionIdentifier(final String actionIdentifier) {
        this.actionIdentifier = actionIdentifier;
    }

    public String getIncomeAccountIdentifier() {
        return this.incomeAccountIdentifier;
    }

    public void setIncomeAccountIdentifier(final String incomeAccountIdentifier) {
        this.incomeAccountIdentifier = incomeAccountIdentifier;
    }

    public String getName() {
        return this.name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(final String description) {
        this.description = description;
    }

    public Boolean getProportional() {
        return this.proportional;
    }

    public void setProportional(final Boolean proportional) {
        this.proportional = proportional;
    }

    public Double getAmount() {
        return this.amount;
    }

    public void setAmount(final Double amount) {
        this.amount = amount;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        final Charge charge = (Charge) o;

        return name != null ? name.equals(charge.name) : charge.name == null;
    }

    @Override
    public int hashCode() {
        return name != null ? name.hashCode() : 0;
    }
}


text:
Illinois Football: Reevaluating expectations for the 2015 season after the firing of Tim Beckman
Tim Beckman is gone. Bill Cubit is the interim head coach. There is a football game to be played in less than a week. Now what?
By Trevor Vallese Aug 29, 2015, 9:00am CDT
Share All sharing options for: Illinois Football: Reevaluating expectations for the 2015 season after the firing of Tim Beckman
Bradley Leeb-USA TODAY Sports
Friday afternoon was a chaotic time of uncertainty for Illinois football. A lot of big, important questions were asked. But the one that was seemingly asked the least was the one that will have the greatest short-term impact: how should we adjust our expectations for this team in 2015?
Not for the University of Illinois as a whole, not for the next ten years of Illini football, not for the impending coaching search. Speaking strictly in terms of the team that is going to take the field in less than a week. So forget what has happened to Tim Beckman and brush away the cloud of uncertainty that has surrounded athletic director Mike Thomas; let's just focus on the on-field product that new head coach Bill Cubit will be working with.
Some might believe that Illinois is going to have to sacrifice any type of success in the 2015 season for the sake of a (hopefully) brighter future for the program. And it would make sense to not be asking for much from this team. They have a new voice leading the locker room just days before the season starts and they're still riddled with injuries and question marks. I, however, don't think that's the case. My belief has little to do with Bill Cubit's success as a head coach because, quite frankly, his record isn't anything to write home about:
1992-1996: Head coach at Widener University -- 34-19 record, no playoff appearances (Division III school)
2005-2012: Head coach at Western Michigan -- 51-47 record, three bowl appearances (no wins)
The main reason why I think 2015 can still be a successful campaign for the Illini is simple: no pressure. There was a substantial amount of stress felt by both Beckman and the players these past few seasons. Tim was concerned with just being able to keep his job; one misstep and he knew his seat would only grow hotter. The players wanted to win so badly and prove the nay-sayers wrong, not to mention the pressure that the investigation findings allege Beckman placed on their shoulders. Ignore your significant injury or you'll be taken off scholarship? I can't even imagine what kind of strain that would put on a player's mind. The good news is that all of those outside factors have been alleviated, and now the players can just go out there and play their butts off for nobody other than themselves. Cubit said it best when he was at the podium during Friday afternoon's press conference:
We're a family. This Illinois team is a family. We need everybody to rally together. Fans, alumni, students, parents... everybody has to rally together. There's only one way to do this now. One way. Everybody has to get together if we want to achieve what we need to achieve. Let's support these student athletes because they're the ones going out there and battling and representing this school, not the coaches. So let's all rally together and let's get this thing going.
If you're a player, there is no longer the looming threat of Beckman making you feel unsafe or Beckman losing his job. He's already lost it. It's all over now. I'd have to imagine a good portion of this team is going to breathe a big sigh of relief when they go to bed tonight. Just look at the things they tweeted following the news of his dismissal:
Aye We GOOD!!! #FightingIllini
— KE'SHAWN VAUGHN (@SpeedKe5) August 28, 2015
This is just going to make what we accomplish this season that much sweeter. Great opportunity before us. #ILL
— Rob Bain (@HouseOfBain_) August 28, 2015
Our goals still ain't change the squad still tryna be champions #Letsgetit
— Marchie L. Murdock (@KingMarch2) August 28, 2015
And this gem from former Illinois defensive tackle Akeem Spence:
Illinois just got better !!!#illini.
— Akeem spence (@AkeemSpence) August 28, 2015
Let's be clear: this is not to say every player on the roster was directly affected by what Beckman did, but the dynamic of this Fighting Illini squad has taken a dramatic turn over the past 24 hours. The narrative has gone from "Will Beckman survive year four and what about the investigation?" to "Will this team rally around Cubit and possibly have a successful season now that Beckman is gone?" It's certainly no guarantee, but I think the lack of this enormous distraction will only help this group in the short term. Remember, I'm not referring to recruiting or the future of this program, I'm strictly speaking about the season that starts in six days against Kent State.
The fanbase seems to have reached a general consensus on how they think the Illini will perform this year too, as evidenced below.
So the Illini win 9 games this year, right? It is the only logical thing that can happen now.
— John Brumbaugh (@IlliniBoard) August 28, 2015

What if this was like the turning point and we won 8 games and hired some really good coach
— Bryce (@OrangeBlueCraze) August 28, 2015

So we either go 2-10 or 8-4. There can be no other way #Illini
— Micah Donsbach (@micahdonsbach) August 28, 2015
I tend to agree with these sentiments. This is either going to be one hell of a story to tell when it's all said and done, or it's going to crash and burn and it will be all too obvious how important it is to find a great head coach this offseason. Either way, strap on those seat belts, Illini fans. It's going to be a crazy ride.
How do you think the team will do in 2015 with Beckman gone and Cubit in charge? Drop by below and give us your thoughts/updated predictions.
Illinois fires head football coach Tim Beckman
What can Illinois expect from Bill Cubit?
Football: Reevaluating 2015 Expectations
Mike Thomas addresses media after firing Tim Beckman


text:
<?php
namespace empire\framework\mvc\model;

use \Exception;
use empire\framework\mvc\Controller;

/**
 * Contains the business logic part of the MVC pattern, offers methods to manipulate and retrieve
 * the underlying data.
 *
 * Model data is always associated with a GID and a parent GID.
 *
 * @author Tobias Hornberger [tobias.hornberger@falsemirror.de]
 * @version 1.0
 */
abstract class Model {

	/**
	 * The controller of the module this model is associated with
	 *
	 * @var Controller
	 */
	protected $controller;

	/**
	 * The parent GID string.
	 *
	 * @var string
	 */
	protected $parent;

	/**
	 * Constructs a new model.
	 *
	 * This constructor stores a reference to the controller this model is assigned to. Furthermore
	 * it stores the parent from the controller.
	 *
	 * @param Controller $controller the controller
	 */
	public function __construct(Controller $controller) {
		$this->controller = $controller;
		$this->parent = $controller->getParent();
	}

	/**
	 * Returns the controller of this model.
	 *
	 * @return Controller the controller
	 */
	protected function getController() {
		return $this->controller;
	}

	/**
	 * Returns the parent GID.
	 *
	 * @return string the parent GID
	 */
	protected function getParent() {
		return $this->parent;
	}

	/**
	 * Returns the module name of this model.
	 *
	 * @return string the module name
	 */
	protected function getModule() {
		return $this->controller->getModule();
	}

	/**
	 * Returns another model from the same module by name.
	 *
	 * This method calls the controller to load the model.
	 *
	 * @param string $name the name of the model
	 * @return Model the loaded model
	 */
	protected function getModel($name) {
		return $this->controller->getModel($name);
	}

}


text:
Richmond Agitation-Sedation Scale (RASS)
Original Editor - Karen Wilson Top Contributors - Karen Wilson and Kim Jackson
2 Purpose
4 Indications
6 Scoring and Interpretation
7 Psychometric information
8 Strengths
10 Physical Therapy Implications
11 Availability
The Richmond Agitation Sedation Scale (RASS) is an instrument designed to assess the level of alertness and agitated behavior in critically-ill patients.[1]
The scale was developed by a team of critical care physicians, nurses, and pharmacists with the aim of achieving the following:[1][2]
Establish simple and discrete criteria for assessing arousal and agitation;
Guide sedation therapy to better meet patients' titration needs; and
Improve communication regarding sedation and agitation among healthcare providers.
The RASS is a 10-point scale ranging from -5 to +4.[1] Levels -1 to -5 denote 5 levels of sedation, starting with "awakens to voice" and ending with "unarousable." Levels +1 to +4 describe increasing levels of agitation. The lowest level of agitation starts with apprehension and anxiety, and peaks at combative and violent. RASS level 0 is "alert and calm." The full scale can be found below:[1]
Richmond Agitation and Sedation Scale
Rass Score
+4 Combative, violet, danger to staff
+3 Pulls or removes tube(s) or catheters; aggressive
+2 Frequent nonpurposeful movement, fights ventilator
+1 Anxious, apprehensive, but not aggressive
0 Alert and calm
-1 Awakens to voice (eye opening/contact) > 10 seconds
-2 Light sedation; briefly awakens to voice (eye opening/contant) < 10 seconds
-3 Moderate sedation; movement or eye opening. No eye contact
-4 Deep sedation; no response to voice, but movement or eye opening to physical stimulation
-5 Unarousable; no response to voice or physical stimulation
The RASS is mostly applied in mechanically-ventilated patients, but may be used for any individual who is hospitalized.[3] Regular administration and assessment is particularly useful for patients who are critically-ill, are receiving sedative medications, and/or demonstrate fluctuating levels of consciousness.
The RASS can be administered in a little as 30-60 seconds.[1] Scoring is based on observation, and response to auditory and physical stimulation. Sessler et al.[1] describe the testing procedure as follows:
Test Procedure and Scoring Instructions
1. Observe patient. Is the patient alert and calm? (score 0)
a. Does patient have behavior that is consistent with restlessness or agitation? (score +1 to +4 using level criteria)
2. If patient is not alert, in a loud speaking voice state patient's name and direct patient to open eyes and look at speaker. Repeat once if necessary. Can prompt patient to continue looking at speaker.
a. Patient has eye opening and eye contact, which is sustained for more than 10 seconds (score −1).
b. Patient has eye opening and eye contact, but this is not sustained for 10 seconds (score −2).
c. Patient has any movement in response to voice, excluding eye contact (score −3).
3. If patient does not respond to voice, physically stimulate patient by shaking shoulder and then rubbing sternum if there is no response to shaking shoulder.
a. Patient has any movement to physical stimulation (score −4). b. Patient has no response to voice or physical stimulation (score −5).
Scoring and Interpretation
RASS scoring and interpretation should be based on the sedation protocol being used. For minimal sedation protocols (RASS -2 to 0), sedation should be modified or decreased for a RASS score of -3 or less.[3] Scores of 2 to 4 may indicate under-sedation. At minimum, the patient should be assessed for pain, delirium, and anxiety. In addition, other underlying causes of agitation should be investigated and treated as appropriate.
In select cases, a deep sedation protocol (RASS -4 and -5) may be used.[3] For scores of -3 or higher, sedation should be modified to achieve the desired range.
Psychometric information
The RASS demonstrates strong validity and reliability across a range of critical care populations.[1][4][5][6][7][8][9] Inter-rater reliability has been found to be good to excellent in adult ICU patients on surgical, medical, coronary, cardiac surgery, and neuroscience ICUs.[1][4][5][6][7][9] This includes patients with and without mechanical ventilation and sedative medications. Although most studies were conducted in the United States, inter-rater reliability remained high in Swedish[7] and Portuguese[6] ICU settings as well.
In adult ICU patients in the U.S., the RASS demonstrates good criterion,[4] construct,[1][4] and face validity.[4] Kerson et al.[10] also found high criterion validity in critically-ill children.
The RASS has many advantages compared to other sedation-agitation scales. Aside from strong inter-rater reliability[5][7] and ease of administration, use of the RASS improves discrimination between different levels of mild to moderate sedation (+1 to -4).[1] Moreover, the scale is applicable to multiple disciplines, has been heavily studied, and is referenced as a key assessment tool for clinical guidelines related to pain, agitation, and delirium.[11]
In patients with severe auditory and visual deficits, the RASS is not a suitable instrument for assessing arousal and agitation.[1] Although the scale is well-researched in the U.S., studies assessing validity and reliability are limited in other geographical locations and languages other than English.
Physical Therapy Implications
For physical therapy clinicians, the RASS can be used to streamline communication regarding sedation and agitation with other healthcare providers. Resulting scores can guide decision making regarding the appropriateness of physical therapy intervention, and treatment priority. The RASS may also identify patients in need of further assessment and management for pain, agitation, and delirium.
The RASS is freely available online.
↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 Sessler CN, Gosnell MS, Grap MJ, Brophy GM, O'Neal PV, Keane KA, Tesoro EP, Elswick RK. The Richmond Agitation–Sedation Scale: validity and reliability in adult intensive care unit patients. American journal of respiratory and critical care medicine. 2002 Nov 15;166(10):1338-44.
↑ Khan BA, Guzman O, Campbell NL, Walroth T, Tricker JL, Hui SL, Perkins A, Zawahiri M, Buckley JD, Farber MO, Ely EW. Comparison and agreement between the Richmond Agitation-Sedation Scale and the Riker Sedation-Agitation Scale in evaluating patients' eligibility for delirium assessment in the ICU. Chest. 2012 Jul 1;142(1):48-54.
↑ 3.0 3.1 3.2 Richmond Agitation-Sedation Scale. Accessed July 5, 2020: https://www.mdcalc.com/richmond-agitation-sedation-scale-rass
↑ 4.0 4.1 4.2 4.3 4.4 Ely EW, Truman B, Shintani A, Thomason JW, Wheeler AP, Gordon S, Francis J, Speroff T, Gautam S, Margolin R, Sessler CN. Monitoring sedation status over time in ICU patients: reliability and validity of the Richmond Agitation-Sedation Scale (RASS). Jama. 2003 Jun 11;289(22):2983-91.
↑ 5.0 5.1 5.2 Rasheed AM, Amirah MF, Abdallah M, Parameaswari PJ, Issa M, Alharthy A. Ramsay sedation scale and richmond agitation sedation scale: A Cross-sectional study. Dimensions of Critical Care Nursing. 2019 Mar 1;38(2):90-5.
↑ 6.0 6.1 6.2 Almgren M, Lundmark M, Samuelson K. The Richmond Agitation‐Sedation Scale: translation and reliability testing in a Swedish intensive care unit. Acta anaesthesiologica scandinavica. 2010 Jul;54(6):729-35.
↑ 7.0 7.1 7.2 7.3 Nassar Junior AP, Pires Neto RC, Figueiredo WB, Park M. Validity, reliability and applicability of Portuguese versions of sedation-agitation scales among critically ill patients. Sao Paulo Medical Journal. 2008 Jul;126(4):215-9.
↑ Benítez-Rosario MA, Castillo-Padrós M, Garrido-Bernet B, González-Guillermo T, Martínez-Castillo LP, González A, Asocación Canaria de Cuidados Paliativos (CANPAL) Research Network. Appropriateness and reliability testing of the modified Richmond Agitation-Sedation Scale in Spanish patients with advanced cancer. Journal of pain and symptom management. 2013 Jun 1;45(6):1112-9.
↑ 9.0 9.1 Vasilevskis EE, Morandi A, Boehm L, Pandharipande PP, Girard TD, Jackson JC, Thompson JL, Shintani A, Gordon SM, Pun BT, Wesley Ely E. Delirium and sedation recognition using validated instruments: reliability of bedside intensive care unit nursing assessments from 2007 to 2010. Journal of the American geriatrics society. 2011 Nov;59:S249-55.
↑ Kerson AG, DeMaria R, Mauer E, Joyce C, Gerber LM, Greenwald BM, Silver G, Traube C. Validity of the Richmond Agitation-Sedation Scale (RASS) in critically ill children. Journal of Intensive Care. 2016 Dec 1;4(1):65.
↑ Devlin JW, Skrobik Y, Gélinas C, Needham DM, Slooter AJ, Pandharipande PP, Watson PL, Weinhouse GL, Nunnally ME, Rochwerg B, Balas MC. Clinical practice guidelines for the prevention and management of pain, agitation/sedation, delirium, immobility, and sleep disruption in adult patients in the ICU. Critical care medicine. 2018 Sep 1;46(9):e825-73.
Retrieved from "https://www.physio-pedia.com/index.php?title=Richmond_Agitation-Sedation_Scale_(RASS)&oldid=254933"
Acute Care - Assessment and Examination


text:
Q: Binding to dictionary using enum as key I came across a problem with binding to dictonary property using enum as key in xaml file.
I have a ViewModel with property
public Dictionary<EColor, MyDataStatus> StatusByColor {get; set;}

Where EColor is as enum and MyDataStatus is my own class with property Value.
In a view I'm trying to create a binding
<TextBlock Text="{Binding StatusByColor[enum:EColor.eRed].Value}"/>

and I get an binding error
BindingExpression path error: '[]' property not found on 'object' ''Dictionary`2 .....

However if I enter a digit (instead of using enum) like this:
<TextBlock Text="{Binding StatusByColor[0].Value}"/>

It works perfectly fine
I thought it may be a problem with "including" enum in xaml  (it is defined in other assembly) but a few lines below i can use it as CommandParameter like this.
Text="{Binding Path=StatusByColor, Mode=OneWay,
               Converter={StaticResource statusByColorToDayElapsedConverter},
               ConverterParameter={x:Static enum:EPaintColor.eRed}}"

And in this scenario (with converterParameter) even IntelliSense suggests enum's values.
This is how I "include" enum in xaml:
"xmlns:enum="clr-namespace:CommonTypes.Enums;assembly=CommonTypes""

A: Firstly,Give my answer,and I have verified it.
<TextBlock Text="{Binding StatusByColor[eRed].Value}"/>

I tried your code with a sample and get the same result as you mentioned.
But when I try this code.
<TextBlock Text="{Binding StatusByColor[0].Value}"/>

I changed the index from 0 to 999.I got an exception
"System.Collections.Generic.KeyNotFoundException"
So I confirm that there is a type casting from Int to Enum.
However,only Int can be converted? How about string?
Yes!String also worked.
Refer:
WPF Binding to items within a dictionary by key?

redpajama_set_name: RedPajamaStackExchange


text:
Home \ Fashion Blog \ The "Visionary Man" Alain Chevalier, one of the two founders of the world leader of luxury LVMH, died. By Maria Zota
The "Visionary Man" Alain Chevalier, one of the two founders of the world leader of luxury LVMH, died. By Maria Zota
The "Visionary Man" Alain Chevalier, one of the two founders of the world leader of luxury LVMH, died
This sad new was announced by the Chevalier family.
"On 87-m to year of life at home in Megeve 1 Nov died Alain Chevalier", – stated in the message.
Mr. Knight "has put his intelligence and talent in the service of the policy and of the industry, contributing his vision and his determination to install the France to the first place in the luxury sector", underlines in a press release the presidency of the Republic, who salutes him as a "visionary".
The giant French luxury, today made up of 70 houses, which employ 150,000 people in the world, praised for its "memory" of a "huge industry" in a message to AFP.
In his book on the date of Saturday, le Figaro states that the death took place on 1 November at his home in Megève (Haute-Savoie).
Her funeral mass will be celebrated Wednesday afternoon at the basilica of Sainte-Clotilde in Paris, says the family.
What do you know about his life?
Born on August 16, 1931 in Algiers, where his family is installed since 1880, this "pied-noir Algeria, remained to the end faithful to the memory of his native land" according to the Elysée, studied law and political science before joining the ENA ("promotion Vauban"), from which he graduated in 1959.
Author: Maria Zota
http://instagram.com/mariazota22
AFP, ENA, France, LVMH, Paris
TV Fashion Style | Fashion Blog |
Elie Saab Paris Fashion Week ss2019 Macrotopia by Audrey Tritto
Dolce & Gabbana shocking Spot in China: Humor or Racism?! by Maria Zota