efforts on developing implementations of nonmonotonic reasoning systems have intensified during the last years and , in particular , implementation techniques for declarative semantics of logic programs ( e.g. , stable model and well - founded semantics ) have considerably advanced . with an increasing number of systems the question of suitable test suites arises .typical benchmarks used for testing and comparing such systems include problems from graph theory , planning , and constraint satisfaction  . however , it is still difficult to find benchmark suites of wide industrial relevance .  in this paperwe advocate that _ logical cryptanalysis _ is a good benchmark for nonmonotonic reasoning systems .logical cryptanalysis has been introduced by massacci and marraro  as a framework for reasoning about cryptographic algorithms .they pointed out that encoding cryptographic problems as sat problems might be beneficial for the automated reasoning community as it provides a set of problems of industrial relevance which optimally shares features of randomly generated problems and real - world problems .indeed , the encoding of the us data encryption standard ( des ) into sat proposed in has a number of useful features :  * it allows to generate random instances of similar structure in practically inexhaustible number ; * it provides solved instances ( for which one solution is known beforehand ) which are very hard , for which we can change the value of the solution , and such that we can generate as many different ( hard ) instances as we want with the same solution ; * it has a lot of structure , and the structure is very common to many similar problems in hardware verification , planning and constraint programming ( all - diff constraints , defined variables , layered definitions etc . ) .these considerations apply to the encoding of cryptographic problems for nonmonotonic reasoning systems with some further advantages :  * the representation of cryptographic algorithms using normal logic programs with the stable model semantics is extremely simple and easy to understand ; * normal logic programs with the stable model semantics can be seen as an interesting special case for many other more general formalizations of nonmonotonic reasoning .  indeed, we can provide a natural encoding of des out of the standard specifications  as a logic program .massacci and marraro  have developed a sat - encoding of des where substantial amount of preprocessing and optimizations are employed . as an alternative encoding of des using logic programswe have upgraded massacci and marraro s optimized sat - encoder to deal directly with logic programs . using these encodings one can perform most of the reasoning tasks suggested in  .we examine the efficiency of the encodings by using an implementation of the stable model semantics , the system  , for des key search and by comparing the performance to that of sat - solvers which use the optimized encoding of des into sat developed massacci and marraro .the rest of the paper is organized as follows .we start by briefly introducing the stable model semantics and by discussing how to encode boolean expressions as logic programs .we first describe the direct encoding of des to logic programs and then the optimized encoding .we finish with some experimental results .the stable model semantics  generalizes the minimal model semantics of definite programs to normal logic program rules where negative body literals ( ) are allowed . for a ground ( variable - free )program , the stable models are defined as follows .the _ reduct _ of a program with respect to a set of atoms is the program obtained from by deleting  1 .each rule that has a negative literal in its body with and 2 .all negative literals in the remaining rules .the reduct can be seen as the set of potentially applicable rules given the stable model , i.e. , as the rules where the negative body literals are satisfied by the model .note that in the reduct the negative body literals of the potentially applicable rules are removed and , hence , the rules are definite .the idea is that a stable model should be grounded ( or justified ) in the sense that every atom in the model is a consequence of the potentially applicable rules and every consequence of the potentially applicable rules is included in the model .the atomic consequences of a set of definite rules can be captured by the unique minimal model , the _ least model _ , of the set seen as definite clauses .hence , a set of atoms is a stable model of a program if it coincides with the least model of the reduct .let be a ground program .then a set of ground atoms is a _ stable model _ of iff is the least model of .[ ex : smodel : intro ] program {l } p \leftarrow { \mathrm{not}\;}q , r\\ q \leftarrow { \mathrm{not}\;}p \\ r \leftarrow { \mathrm{not}\;}s \\ s \leftarrow { \mathrm{not}\;}p \end{array}\ ] ] has a stable model because is the least model of .{l } p \leftarrow r \\r \leftarrow \end{array}\ ] ] in addition to this model , has another stable model which can be verified similarly by constructing the reduct and its least model .the stable model semantics for programs with variables is obtained from the semantics of ground programs by employing the notion of _ herbrand models_. the stable models of a program with variables are the stable models of the ground instantiation of the program where variables are substituted by terms from the herbrand universe of the program ( the ground terms built from constants and functions in the program ) .  _ integrity constraints _ , i.e. , rules of the form are often useful for saying that a stable model containing but none of is not acceptable . these rules can be encoded using ordinary rules and and a new rule and finally replacing every rule of the form ( [ eq : icrule ] ) with one having as its head . ] .consider program in example [ ex : smodel : intro ] extended by two integrity constraints this program has only one stable model as the other stable model of , , does not satisfy the first integrity constraint above .integrity constraints are a powerful and simple technique for pruning unwanted stable models as they can not introduce new stable models but only can eliminate them .this means that for a program and a set of integrity constraints , if is a stable model of , then is a stable model of .des can be seen as a boolean function which takes as input a vector of bits consisting of the plaintext and key and outputting a vector of bits ( the ciphertext ) .des is specified using standard boolean operators ( negation , disjunction , conjunction , xor ) as well as boolean functions given as truth tables .  in this sectionwe discuss how to encode such boolean expressions using logic programs . herethe goal is to achieve a compact and potentially computationally efficient coding .we aim to exploit the special property of the stable model semantics that everything is false unless otherwise stated .this means that it is enough to consider only the conditions under which an expression is true and let the default negation to handle the other case when the expression is false .given a boolean expression we provide a logic program such that satisfying truth assignments of and stable models of coincide .this can be done by introducing a new atom for each subexpression of and , according the intuition mentioned above , by only giving rules stating all conditions on its subexpressions under which is true .{l } p { \leftarrow}{p_{l_1}},\ldots,{p_{l_n } }  \end{array } \\\hline l_1 \lor \cdots\lor l_n & \begin{array}[t]{l } p { \leftarrow}{p_{l_1 } } \\ \vdots  \\ p { \leftarrow}{p_{l_n } }  \end{array } \\\hline \neg l & \begin{array}[t]{l } p { \leftarrow}{\mathrm{not}\;}{p_{l } } \\\end{array } \\\hline l_1 { \oplus}l_2 & \begin{array}[t]{l } p { \leftarrow}{p_{l_1}},{\mathrm{not}\;}{p_{l_2 } } \\ p { \leftarrow}{\mathrm{not}\;}{p_{l_1 } } , { p_{l_2 } } \\ \end{array } \\ \hline \end{array } ] gives the number of the bit and indicates the pair in question .note that only facts for true plaintext bits need to be written .for instance , a set of facts specifies that in the first plaintext - ciphertext pair , the plaintext bits are true and all other false .   the rules which encode the round operations , i.e. , the rules that join the previous round to the next , are summarized in figure [ fig : round ] .they work as follows .  for the first round , the 64-bit block of plaintext is first permuted according to the initial - permutation ip which is given as a set of facts using these facts the rule for is easy to express .  for each pair ,the bits are divided in two 32 bit parts and renumbered .the renumbering is used only to make the description of the function easier to write and understand and it is done by dividing both halves ( 32 bits ) into 8 groups with each 4 bits .the bits are numbered so that the first digit represents the group and the second digit represents the bit . for example , bit 32 , is the second bit in the third group .this renumbering is given as facts : these facts are used in the rules and specifying the right and left parts where the predicate is defined using a set of facts giving the possible renumbered bits .  for each round and each plaintext - ciphertextpair , the left and right parts and can be defined in terms of the previous parts and the result of the function as follows .the right side is swapped to the left ( ) and the left side is xored with the output of to form the right side for the next round ( ) .  in the final round the switching of left and right halvesis omitted ( ) but the renumbering is undone and the final permutation ( ) is applied .   for each round and for each pair ,the function takes as input the 32 bits of the right part of the previous round and a 48 bit round - key and works as follows .first every group of the right part is expanded from 4 to 6 bits .for example , the rule {ll } e(p,65,n ) { \leftarrow}&r(p,64,n-1 ) , round(n ) , \\ & round(n-1 ) , pair(p ) \end{array } \label{eq : expansion}\ ] ] means that the 4th bit in the 6th group becomes the 5th bit in the 6th group .the expanded bit string is xored with the key bits : where the predicate is defined using a set of facts giving the possible extended renumbered bits .the resulting groups of 6 bits are the input of their respective s - boxes . the output of every s - box consists of 4 bits .if we consider the output one bit at the time , the s - boxes can be seen as truth tables .for example , if the input to the second s - box is 010101 , it s output is 0001 .we can encode this behavior with the following rule : once again , with the stable models semantics only rules that imply true output bits are needed ( see , example [ ex : table ] ) . in this case , the output bits 1 - 3 are zeros , therefore no rules are needed for them . in the end of the des function , the vector of bits is permuted according to the permutation p. the rules for permutation are similar to the ones in expansion .  for each round , the keyschedule is given as a set of rules using the key bit facts .for example , the rule specifies that in the first round the ( renumbered ) bit 11 of the round - key is determined by the key bit 10 .the stages presented in figure [ des : structure](c ) and the renumbering is calculated beforehand in order to avoid some modulo arithmetic .this can be done because the keyschedule is independent of the plaintext to be used .the encoding can be easily modified to solve many kinds of computational problems related to des by changing the way the plaintext , ciphertext and the key are encoded .encryption : : :  it is sufficient to give the true bits of the  plaintext as facts for each pair   and the true bits of the key as facts . now for  each pair , the true bits of the encrypted ciphertext  can be recovered as ground facts in the  unique stable model of the encoding with the plaintext and key facts .decryption : : :  the true bits of the key are specified as facts ,  the ciphertext is given in the form and the plaintext by the rules of the form  ( [ eq : choice ] ) saying that one can choose the truth values of the  ground atoms .then the decrypted plaintext is  given by the stable model of the encoding : for each true bit of the  plaintext a ground fact is in the model .+  actually , des is symmetric .this means that decryption is usually done  the same way as encryption , using the key schedule in reverse order  and the ciphertext in place of the plaintext .known plaintext attack : : :  for this attack we assume that a certain number of pairs of plaintexts  and the corresponding ciphertexts are available and that we want to  recover the key . for each pair , the true bits   of the plaintext are given as facts   , the ciphertext is given in the form   and the key is given by rules of the form ( [ eq : choice ] )    specifying that the truth values of the ground atoms   corresponding to the key bits can be chosen . then  the stable models of the resulting encoding correspond to the possible  keys yielding the ciphertext from the plaintext for each pair   .a key is given as ground facts   in the corresponding stable model for all true key bits .massacci and marraro  have devised an optimized encoding of des to sat which is particularly effective when the plaintext and the ciphertext are used in a known plaintext attack .we show how to modify this to work with logic programs .we sketch here just the main ideas to make the paper self - contained and refer to for further details on the encoding .  the basic idea of the direct encoding is to represent each step of des as a logic program , the more straightforward , the better . for the optimized encodingwe start from a different direction and represent des as a logical circuit in which each operation is represented as a boolean formula .then , for the operations that are repeated at each round ( such as the round function ) we apply off - line some advanced cad minimization techniques to squeeze their size as much as possible . in particular in the cad program espresso has been used for minimizing the representation of s - boxes as programmable logic arrays ( plas ) .the pla representation is just a representation of boolean functions with disjunctions of conjunctions .this yields a notable squeeze in the size of the boolean formulae representing the corresponding operations of the s - boxes but is not enough .the second important twist is that whenever possible , the program `` executes '' directly the des operations on the propositional variables representing the input bits .for instance , a permutation is not encoded into a boolean formula , rather the program executes the permutation of the input bits and provides as output the permuted propositional variables .the simplifying effect of this operation can be also explained as a form of partial evaluation in the direct encoding of des .consider , for instance , the logic program rule ( [ eq : expansion ] ) .the net effect of the `` execution '' step is that is replaced everywhere by .  at the end of this process the encoder program def2fml used in output a minimized logic program corresponding to des w.r.t .the direct encoding that we have described in the previous section using the rules we have given in the section on coding boolean formulae .we can do more when the plaintext and the ciphertext are known , i.e. when we want to perform a known plaintext attack .in particular , with a boolean representation we can perform a notable amount of linear reasoning ( reasoning using formulae with exclusive or ) . in is noted that the presence of exclusive or is what makes the problem hard for state - of - the - art sat checkers and therefore its minimization is essential .so , for the encoding we acquire the boolean values corresponding to plaintext and ciphertext and preprocess the formula by applying exhaustively a set of simplification rules aimed at eliminating redundancies :  1 .variables defined by atomic equivalences where is a variable and is either another variable or a truth value . ]are replaced by the corresponding values to reduce the number of variables in other formulae , and to introduce the truth values .2 .  the propositional simplification rules listed in figure [ fig : valprop ] are applied .the second step ( propositional simplification ) may introduce additional atomic equivalences and therefore the overall simplification phase is repeated until saturation is reached .l  [ cols="<,<",options="header " , ]   notice that such preprocessing , and in particular the operations involving exclusive or , can not be performed with a logic program representation ( at least with current technology ) .the resulting formula is then translated into a logic program using a further optimized translation w.r.t .that presented in the section on boolean encoding .we can exploit the knowledge that the final formula we got has the form shown in figure [ fig : encod : preprocess ] ( adapted from ) and translate it as shown in figure [ fig : encod : translate ] .the variables and stand for the number of pair and rounds , according the format of the direct encoding .the letter corresponds to a suitable ground value of the bit number represented by the variable used in the direct encoding .notice that the final output is a ground logic program so that and are appropriately instantiated by the optimizing encoder .  {@{}l@ { } } r(p , b,3 )  { \leftarrow}\pm s(p , b',1 ) , { \mathrm{not}\;}s(p , b'',3 )  \\r(p , b,3 )  { \leftarrow}{\mathrm{not}\;}\pm s(p , b',1 ) , s(p , b'',3 )  \\r(p , b,4 )  { \leftarrow}\pm s(p , b',2 ) , { \mathrm{not}\;}s(p , b'',4 )  \\r(p , b,4 )  { \leftarrow}\pm { \mathrm{not}\;}s(p , b',2 ) , s(p , b'',4 )  \\r(p , b , n )  { \leftarrow}r(p , b',n-2 ) , { \mathrm{not}\;}s(p , b'',n ) , 5\leq n\leq r-4  \\r(p , b , n )  { \leftarrow}{\mathrm{not}\;}r(p , b',n-2 ) , s(p , b'',n ) , 5\leq n \leq r-4  \\s(p , b , n ) { \leftarrow}m(p , b',n ) , 1\leq n\leq r \mbox { and } 1\leq b'\leq n_n  \\s(p , b , r-1 ) { \leftarrow}\pm r(p , b',r-5 ) , { \mathrm{not}\;}s(p , b'',r-3 ) \\s(p , b , r-1 ) { \leftarrow}{\mathrm{not}\;}\pm r(p , b',r-5 ) , s(p , b'',r-3 )  \\s(p , b , r ) { \leftarrow}\pm r(p , b',r-4 ) , { \mathrm{not}\;}s(p , b'',r-2 )  \\s(p , b , r ) { \leftarrow}{\mathrm{not}\;}\pm r(p , b'',r-4 ) , s(p , b'',r-2 )  \\m(p , b,1 ) { \leftarrow}\pm k(b',1 ) , \ldots \pm k(b'',1 )  \\m(p , b , n ) { \leftarrow}x(p , b',n)_1 , \ldots , x(p , b'',n)_{n_n } , 2\leq n \leq r-1  \\ m(p , b , r ) { \leftarrow}\pm k(b',r ) , \ldots \pm k(b'',r )  \\ \end{array } \begin{array}[t]{@{}l@ { } } x(p , b,2 )  { \leftarrow}\pm s(p , b',1 ) , { \mathrm{not}\;}k(b'',2 ) \\x(p , b,2 )  { \leftarrow}\pm { \mathrm{not}\;}s(p , b',1 ) , k(b'',2 ) \\ x(p , b,3 )  { \leftarrow}\pm s(p , b',2 ) , { \mathrm{not}\;}k(b'',3 ) \\x(p , b,3 )  { \leftarrow}\pm { \mathrm{not}\;}s(p , b',2 ) , k(b'',3 ) \\x(p , b , n )  { \leftarrow}r(p , b',n-1 ) , { \mathrm{not}\;}k(b'',n ) , 4\leq n\leq r-3  \\x(p , b , n )  { \leftarrow}{\mathrm{not}\;}r(p , b',n-1 ) , k(b'',n ) , 4\leq n \leq r-3  \\x(p , b , r-2 )  { \leftarrow}\pm s(p , b',r-1 ) , { \mathrm{not}\;}k(b'',r-1 )  \\x(p , b , r-2 )  { \leftarrow}\pm { \mathrm{not}\;}s(p , b',r-1 ) , k(b'',r-1 )  \\x(p , b , r-1 )  { \leftarrow}\pm s(p , b',r ) , { \mathrm{not}\;}k(b'',r ) \\x(p , b , r-1 )  { \leftarrow}\pm { \mathrm{not}\;}s(p , b',r ) , k(b'',r ) \end{array } $ ]  notice that the translation of the formula is done piecewise : each equivalence is translated in a suitable number of rules : we use one rule for conjunctions , two rules for xors , and many rules of disjunctions ( as many as there are disjuncts ) .the trick is that we only encode one direction of the the equivalence exploiting the property of logic programs that `` everything is false by default '' . in this way we have only to specify when a boolean formula may be true .however , this is still not sufficient because the translation as sketched is not faithful : we might have more than one `` definition '' of the same atom , i.e. one or more formulae of the form for the same atom .if we left it that way , there would not be a one - one correspondence between stable models and propositional truth assignments .we would have more models than due .so we need a further twist to cope with atoms that are defined ( are on the left of the equivalence sign in figure [ fig : encod : preprocess ] ) two or more times .suppose that we have a set of formulae of the form : and that denotes the fragment of the logic program translating the boolean formula according the rules we have used in table [ table : btorules ] and figure [ fig : encod : translate ] .we translate this set of formulae as follows : {l@{\hspace{4ex}}l } \mbox{boolean formula } & \mbox{logic program } \\[1ex ] a { \leftrightarrow}\varphi_1 &  \translate{a { \leftrightarrow}\varphi_1 } \\[1ex ] a { \leftrightarrow}\varphi_2 & a { \leftarrow}a_2 \\         & { \leftarrow}a,{\mathrm{not}\;}a_2\\         & \translate{a_2 { \leftrightarrow}\varphi_2 } \\ \vdots     & \vdots \\ a { \leftrightarrow}\varphi_n & a { \leftarrow}a_n \\         & { \leftarrow}a,{\mathrm{not}\;}a_n\\         & \translate{a_n { \leftrightarrow}\varphi_n } \end{array}\ ] ] one may check that this is a faithful translation of the corresponding boolean formulae .the intuitive explanation is simply that the boolean set of formulae , read conjunctively , just says that all must have the same value and this value must also be assigned to .the first rule chooses a value , say and assign it to as in the standard encoding .the rest of the construction assigns the value of to a new atom and then specifies that is true when is true and that can not be false when is true.  then we add the rules ( [ eq : choice ] ) saying that one can choose the truth values of the atoms corresponding to key bits , as we do for the direct encoding , and we are done .we study the computational properties of the two logic program encodings of des by using them for key search in a known plaintext attack for a limited form of des running a given number of rounds .for each number of rounds and pairs of plaintext - ciphertext blocks we perform 50 key searches using different randomly generated plaintexts and report the mean of the running time and of the size of the search tree .the tests were run under linux 2.2.12 on 450 mhz pentium iii computers .the encodings and test cases are available at ` http://www.tcs.hut.fi/software/smodels/tests/des.html ` .table [ table : smodels ] reports the data on s performance .the running times do not include preprocessing .for the direct encoding ( dir . ) preprocessing consists of parsing and grounding of the rules which is done by the standard parser ` lparse ` .this takes only few seconds even for the largest examples . for the optimized encoding ( opt . )preprocessing is more involved as explained in the previous section .it includes off - line minimization of boolean functions used in des , partial evaluating the des description , simplifying it using the known plaintexts - ciphertext pairs , transforming the resulting boolean formula to a set of ground logic program rules as well as parsing the rules into the internal format of ` smodels ` .hence , in both cases preprocessing produces a ground program parsed into the internal format of ` smodels ` .table [ table : smodels ] gives the average running time and search space size for ` smodels ` ( version 2.25 with ` -backjump ` option ) to find a stable model ( a key ) for such a ground program .entries marked with are cases where the set of 50 key searches could not be completed because the running time for each key search extended several cpu hours .both encodings have a reasonable performance ( although it should be noted that special purpose methods and hardware are able to perform known plaintext attacks successfully even to the full des ) .the direct encoding does not seem to be able to propagate the information from the known plaintext - ciphertext pairs as efficiently as the preprocessing techniques in the optimized encoding .the search heuristics of ` smodels ` yields a rather stable performance on these des examples except for the optimized encoding with three rounds and two blocks where there are three orders of magnitude differences in the minimal and maximal observed running times and search space sizes .we compare the performance of to that of a sat - checker which has been customized and tuned for the optimized sat - encoding of des described in .this sat - checker , based on by bayardo and schrag , clearly outperforms state - of - the - art sat - checkers on des encodings  .table [ table : relsat ] reports the data on. the data does not include preprocessing which in this case is similar to that of the optimized logic program encoding with the addition that it includes also the transformation of the optimized des description ( a boolean formula ) to a compact conjunctive normal form ( cnf ) representation .table [ table : relsat ] presents the average running time and search space size for to find a propositional model ( a key ) for this cnf formula .  from this preliminary analysisone can say that the usage of stable models as computational paradigm to be used in practice does not score at all badly for such an industrial application .rounds & blocks & & + & & ( dir . ) & ( opt . ) & ( dir . ) & ( opt . )+ 1 & 1 & 0.3 & 0.07 & 155 & 28 + 1 & 2 & 1.6 & 0.06 & 372 & 18 + 1 & 4 & 2.2 & 0.1 & 179 & 16 + 1 & 8 & 5.8 & 0.2 & 200 & 16 + 2 & 1 & 1.2 & 0.1 & 151 & 9 + 2 & 2 & 1.7 & 0.1 & 98 & 8 + 2 & 4 & 2.0 & 0.2 & 51 & 8 + 2 & 8 & 3.6 & 0.4 & 39 & 8 + 3 & 1 & & 230 & & 699 + 3 & 2 & 640 & 8900 & 20672 & 6000 + 3 & 4 & 1400 & 190 & 14709 & 29 + 3 & 8 & 3500 & 48 & 18612 & 8 +   rounds & blocks & time ( s ) & branches + 1 & 1 & 0.02 & 32 + 1 & 2 & 0.1 & 100 + 1 & 4 & 0.2 & 107 + 1 & 8 & 0.4 & 87 + 2 & 1 & 0.2 & 283 + 2 & 2 & 0.2 & 106 + 2 & 4 & 0.3 & 70 + 2 & 8 & 0.7 & 56 + 3 & 1 & & + 3 & 2 & 920 & 141291 + 3 & 4 & 110 & 14419 + 3 & 8 & 100 & 5483 +we believe that des provides an interesting benchmark problem for nonmonotonic reasoning systems because ( i ) it supplies practically inexhaustible number of industrial relevant test cases , ( ii ) the encoding of des using normal logic programs with the stable model semantics is easy to understand , and ( iii ) test cases are obtained for many nonmonotonic formalisms which contain this subclass of logic programs as a special case .we have developed a direct encoding and an optimized one extending the work of massacci and marraro .we have also tested the computational performance of the encodings using the system .as des is basically a boolean function , its encoding does not require any particular nonmonotonic constructs .in our encoding we have used default negation in a straightforward way ( everything is false unless otherwise stated ) , to obtain a much leaner encoding than those obtained by encoding des as a sat formula ( where both ways of the equivalence are needed ) .the resulting encodings are acyclic sets of rules which are compact but fairly simple to write and understand .it seems that they are more easier to understand than corresponding encodings of des using cnf clauses which is the typical input format for current state - of - the - art sat - checkers .given that des key search is a natural boolean satisfiability problem , it is somewhat surprising that our encodings are competitive when compared to state - of - the - art sat - checkers and even to a tuned and customized sat - checker working on an optimized sat - encoding of des . we think that the success can be accounted for by the compactness of the logic program encoding and the search methods and pruning techniques employed in the system .  in order to obtain a deeper understanding of the relative strengths of sat - checkers and stable model implementations, an interesting comparison would be to map the stable model finding problem of des key search directly to a satisfiability problem and use a state - of - the - art sat - checker to solve the resulting problem .as our encodings are acyclic programs , the reduction could be done using , e.g. , a completion approach  .massacci , f. 1999 . using walk - sat and look - back csp for cryptographic key search . in _ proc .  of the 16th international joint conference on artificial intelligence _ , 290295 .morgan kaufmann publishers .niemel , i. , and simons , p. 1997 .smodels an implementation of the stable model and well - founded semantics for normal logic programs . in _ proc .  of the 4th international conference on logic programming and non - monotonic reasoning _ , 420429 .dagstuhl , germany : springer - verlag .

Abstract: the us data encryption standard , des for short , is put forward as an interesting benchmark problem for nonmonotonic reasoning systems because ( i ) it provides a set of test cases of industrial relevance which shares features of randomly generated problems and real - world problems , ( ii ) the representation of des using normal logic programs with the stable model semantics is simple and easy to understand , and ( iii ) this subclass of logic programs can be seen as an interesting special case for many other formalizations of nonmonotonic reasoning . in this paper we present two encodings of des as logic programs : a direct one out of the standard specifications and an optimized one extending the work of massacci and marraro . the computational properties of the encodings are studied by using them for des key search with the system as the implementation of the stable model semantics . results indicate that the encodings and are quite competitive : they outperform state - of - the - art sat - checkers working with an optimized encoding of des into sat and are comparable with a sat - checker that is customized and tuned for the optimized sat encoding .


the study of wealth and income distributions has a long history .pareto proposed in 1897 that wealth and income distributions obey universal power laws .subsequent studies have often disputed this conjecture ( see a systematic survey in the world bank research publication ) .mandelbrot proposed that the pareto law applies only asymptotically to the high ends of the distributions .many researchers tried to deduce the pareto law from a theory of stochastic processes .gibrat proposed in 1931 that income and wealth are governed by multiplicative random processes , which result in a log - normal distribution .these ideas were later followed , among many others , by montroll and shlesinger . however , already in 1945 kalecki pointed out that the log - normal distribution is not stationary , because its width increases in time .modern econophysicists also use various versions of multiplicative random processes in theoretical modeling of wealth and income distributions .  unfortunately , numerous recent papers on this subject do very little or no comparison at all with real statistical data , much of which is widely available these days on the internet . in order to fill this gap , we analyzed the data on income distribution in the united states ( us ) from the bureau of census and the internal revenue service ( irs ) in ref .we found that the individual income of about 95% of population is described by the exponential law .the exponential law , also known in physics as the boltzmann - gibbs distribution , is characteristic for a conserved variable , such as energy . in ref . , we argued that , because money ( cash ) is conserved , the probability distribution of money should be exponential .wealth can increase or decrease by itself , but money can only be transferred from one agent to another .so , wealth is not conserved , whereas money is .the difference is the same as the difference between unrealized and realized capital gains in stock market .unfortunately , we were not able to find data on the distribution of money .on the other hand , we found data on wealth distribution in the united kingdom ( uk ) , which are presented in this paper . also presentedare the income distribution data for the uk and for the individual states of the usa . in all of these data ,we find that the great majority of population is described by an exponential distribution , whereas the high - end tail follows a power law .in this section , we discuss the cumulative probability distribution of wealth =(the number of people whose individual wealth is greater than )/(the total number of people ) .a plot of vs.  is equivalent to a plot of person s rank in wealth vs. wealth , which is often used for top reach people .we will use the power law , , and the exponential law , to fit the data .these distributions are characterized by the exponent and the `` temperature '' .the corresponding probability densities , , also follow a power law or an exponential law .for the exponential law , it is also useful to define the temperatures ( also known as the median ) and using the bases of 1/2 and 1/10 : .the distribution of wealth is not easy to measure , because people do not report their total wealth routinely .however , when a person dies , all assets must be reported for the purpose of inheritance tax . using these data and an adjustment procedure , the british tax agency , the inland revenue ( ir ) , reconstructed wealth distribution of the whole uk population . in fig .[ fig : ukwealth ] , we present the 1996 data obtained from their web site . the left panel shows the cumulative probability as a function of the personal total net capital ( wealth ) , which is composed of assets ( cash , stocks , property , household goods , etc . ) and liabilities ( mortgages and other debts ) .the main panel illustrates in the log - log scale that above 100 k the data follow a power law with the exponent .the inset shows in the log - linear scale that below 100 k the data is very well fitted by an exponential distribution with the temperature  k (  k and  k ) .the right panel of fig .[ fig : ukwealth ] shows the so - called lorenz curve for wealth distribution .the horizontal and vertical coordinates are the cumulative population and the cumulative wealth : the points represent the actual data , whereas the solid line is calculated for a purely exponential distribution : one can see that the data systematically deviate from the exponential law because of the wealth concentrated in the power - law tail ; however , the deviation is not very big .the so - called gini coefficient , which measures the inequality of wealth distribution , has increased from 64% in 1984 to 68% in 1996 .this value is bigger than the gini coefficient 50% for a purely exponential distribution .the inequality of the us income distribution was also increasing during that time period .we obtained the data on the yearly income distribution in the uk for 1997/8 and 1998/9 from the web site of the ir . the data for 1994/5 , 1995/6 , and1996/7 were taken from the annual abstract of statistics derived from the ir .the data for these 5 years are presented graphically in fig .[ fig : ukincome ] . in the upper inset of the left panel ,the original raw data for the cumulative distribution are plotted in log - linear scale . for not too high incomes ,the points form straight lines , which implies the exponential distribution , where stands for income ( revenue ) , and is the income `` temperature '' . however , the slopes of these lines are different for different years .the temperatures for the years 1994/5 , 1995/6 , 1996/7 , and 1997/8 differ from the temperature for 1998/9 ,  k (  k and  k ) , by the factors 0.903 , 0.935 , 0.954 , and 0.943 . to compensate for this effect ,we rescale the data .we divide the horizontal coordinates ( incomes ) of the data sets for different years by the quoted above factors and plot the results in log - log scale in the main panel and log - linear scale in the lower inset .we observe scaling : the collapse of points on a single curve .thus , the distributions for different years are described by a single function .the main panel shows that this scaling function follows a power law with the exponent - 2.3 at high incomes .the lower inset shows that has an exponential form for about 95% of individuals with lower incomes .these results qualitatively agree with a similar study by cranshaw .he proposed that the data for lower incomes are better fitted by the gamma distribution . for simplicity , we chose not to introduce the additional fitting parameter .  we must mention that the individuals with income below a certain threshold are not required to report to the ir .that is why the data in the lower inset do not extend to zero income .we extrapolate the straight line to zero income and take the intercept with the vertical axis as 100% of individuals .thus , we imply that the ir data does not account for about 25 - 27% of individuals with income below the threshold .the lorenz curve for the distribution of the uk income is shown in the right panel of fig .[ fig : ukincome ] .we treat the number of individuals below the income threshold and their total income as adjustable parameters , which are the horizontal and vertical offsets of the coordinates origin relative to the lowest known data point .these parameters are chosen to fit the lorenz curve for the exponential law ( [ eq : yx ] ) shown as the solid line .the fit is very good .the horizontal offsets are 28 - 34% , which is roughly consistent with the numbers quoted for the lower inset of the left panel .we obtained the data on distribution of the yearly individual income in 1998 for each of the 50 states and the district of columbia that constitute the usa from the web site of the irs .we plot the original raw data for the cumulative distribution of income in log - linear scale in the upper inset of the left panel of fig.[fig : usincome ] .the points spread significantly , particularly at higher incomes . for example , the fraction of individuals with income greater than 1 m (  k ) .the temperatures of the individual states differ from by the amounts shown in table [ table ] .for example , the temperature of connecticut ( ct ) is 1.25 times higher and the temperature of west virginia ( wv ) is 0.78 times lower than the average us temperature .@*17c@ ct & nj & ma & md & va & ca & ny & il & co & nh &  ak & dc & de & mi & wa & mn & ga + [ -0.5ex ]  25% & 24% & 14% & 14% & 9% & 9% & 7% & 6% & 6% & 5% &  5% & 5% & 4% & 4% & 2% & 1% & 0% + tx & ri & az & pa & fl & ks & or & hi & nv & nc &  wi & in & ut & mo & vt & tn & ne + -1% & -3% & -3% & -3% & -4% & -5% & -6% & -7% & -7% & -7% &  -8% & -8% & -9% & -9% & -9% & -11% & -12% + oh & la & al & sc & ia & wy & nm & ky & i d &  ok & me & mt & ar & sd & nd & ms & wv + -12% & -13% & -13% & -13% & -14% & -14% & -14% & -14% & -15% &  -16% & -16% & -19% & -19% & -20% & -20% & -21% & -22% +  [ table ]  the lorenz plot for all states is shown in the right panel of fig.[fig : usincome ] together with the solid curve representing eq.([eq : yx ] ) . the majority of points are well clustered and are not too far from the solid curve .the exceptions are wyoming ( wy ) with much higher inequality and the washington state ( wa ) with noticeably lower inequality of income distribution .the average us data , shown by open circles , is consistent with our previous results . unlike in the uk case, we did not make any adjustment in the us case for individuals with income below the threshold , which appears to be sufficiently low .we found scaling in the cumulative probability distributions of individual income derived from the tax statistics for different years in the uk and for different states in the us .the distributions have the scaling form , where the scale ( the temperature ) varies from one data set to another , but the scaling function does not .the function has an exponential ( boltzmann - gibbs ) form at the low end , which covers about 95% of individuals . at the high end, it follows a power ( pareto ) law with the exponents about 2.1 for the uk and 1.7 for the us .wealth distribution in the uk also has a qualitatively similar shape with the exponent about 1.9 and the temperature  k .some of the other values of the exponents found in literature are 1.5 proposed by pareto himself ( ) , 1.36 found by levy and solomon for the distribution of wealth in the forbes 400 list , and 2.05 found by souma for the high end of income distribution in japan .the latter study is similar to our work in the sense that it also uses tax statistics and explores the whole range of incomes , not just the high end .souma finds that the probability density at lower incomes follows a log - normal law with a maximum at a nonzero income .this is in contrast to our results , which suggest that the maximum of is at zero income .the disrepancy may be due to the high threshold for tax reporting in japan , which distorts the data at the low end .on the other hand , if the data is indeed valid , it may reflect the actual difference between the social stuctures of the us / uk and japan .the income temperature for the uk in 1998/9 was  k and for the us in 1998 was  k , which is 1.87 times lower than the us temperature .the difference in temperatures indicates nonequilibrium , which can be exploited to create a thermal machine .the gain ( profit ) produced by such a thermal machine is proportional to the difference in temperatures . in agreement with the second law of thermodynamics, money would flow from a high - temperature system to a low - temperature one .this may explain the huge trade deficit of the usa in global international trade with other , lower - temperature countries .the variation of temperatures between different states of the usa is shown in table [ table ] .we are grateful to ted cranshaw , who kindly sent us his unpublished study of income distribution in the uk and data , and bertrand roehner , who suggested to study income distributions in the states of the usa and sent us link .

Abstract: we present the data on wealth and income distributions in the united kingdom , as well as on the income distributions in the individual states of the usa . in all of these data , we find that the great majority of population is described by an exponential distribution , whereas the high - end tail follows a power law . the distributions are characterized by a dimensional scale analogous to temperature . the values of temperature are determined for the uk and the usa , as well as for the individual states of the usa .   econophysics , wealth , income , boltzmann , gibbs , pareto 87.23.ge , 89.90.+n , 02.50.-r


neo - riemannian theory is based on the idea of connecting chords according to some definition of harmonic proximity .this arose from a reappraisal of the work of hugo riemann by music theorists including richard cohn , david lewin , dmitri tymoczko and others  .the premise of harmonic proximity requires a notion of a metric , or distance , between chords , making an appeal to mathematical formalism natural .there is a variety of different ways to define such chordal distance , as discussed in .a fundamental idea is that of _ parsimonious voice - leading_. this essentially describes an efficiency of movement between chords , illustrated by the simple example of the proximity of major and minor triads .both share a pair of common pitches ( and ) , while their remaining pitches are neighbours in the chromatic scale , being only a semitone apart . choosing an initial scale , or set of pitches , thus defines in turn a set of available triads which exist in the set of pitches , and a set of parsimonious voice - leading connections .these triads and connections , viewed as vertices and edges , naturally lead to a mathematical treatment of the network produced .one successful view of this type of structure is the geometrical .many pitch sets , including the diatonic and the chromatic scales , produce a well - defined geometry , which lends itself well to musical analysis . this view has been comprehensively studied in , which explores geometric features and how they constrain or inspire composers who wish to create music with a sense of tonality .a drawback of the geometrical approach is that a given pitch set might produce a network with no accessible geometry , for example , the network emanating from a harmonic minor scale . interpreting the network as a mathematical graph rather than a geometry allows a greater range of pitch sets to be studied .a graph theoretic approach has been taken in work such as and , in which the focus is on pitch sets which produce networks possessing some symmetry . in the present paperwe do not look for any geometrical or symmetrical structure in the networks , but ask purely graph theoretic questions , such as how to quantify connectivity and traversability .classical graph theory provides some such measures , but recent work in complex network theory asks different questions .in particular , how efficiently can information flow through a network ?typically a network in complexity studies is huge far , far bigger than the networks we study here but still the principles and diagnostics , such as _ centrality _ and _ communicability _ , developed for such large graphs have a pertinent interpretation to voice - leading graphs , providing information about how important particular chords are in optimising the efficiency of a chord progression between a pair of triads in a given harmonic landscape .   throughout this paperwe use the following notation : major triads are denoted with upper - case script letter ; minor triads in lower case .augmented triads are given in upper - case with a superscript ; diminished triads are lower - case with a superscript .thus , , , , denote major , minor , augmented and diminished triads respectively , on the pitch .parsimonious , or efficient , voice - leading is a notion of counterpoint which is prevalent in western tonal music and which is frequently discussed in relation to neo - riemannian theory .following , we begin with some chosen scale ( or more generally , a collection of pitches ) and determine all possible major , minor , augmented and diminished triads which can be constructed using the notes of our collection . for the purposes of this paperwe will consider the different inversions of a triad to be equivalent .we will also accept octave equivalence , so we essentially consider pitch classes rather than pitches and unless otherwise stated we will be working in twelve - tone equal temperament .next , we construct a mathematical graph , with each vertex representing a triad and two vertices being joined by an edge if the corresponding triads can be connected by ` efficient ' voice leading . in this paperwe consider ` single - step voice - leading ' where we require that two notes remain unchanged and the third note may move by a single step _ within the scale or collection of notes _ in which we are working , however large that step may be .that is , two vertices of our graph are connected precisely when the corresponding triads contain two common tones and the remaining notes are a single ` scale - step ' apart .this model is restrictive , but well - defined .it serves as a basic procedure to illustrate principles which could then be generalised to other situations : for example we might : allow chords of more than three notes ; allow more than one note to move at a time , or for one note to move by several steps ; work in -tone equal temperament , or other tuning systems . in all casesthe graphs obtained by this method will be simple ( that is , they contain no loops or multiple edges ) , and the graphs are undirected .some generalisations might call for a weighted graph ( that is , with a numerical value assigned to each edge ) , or a directed graph ( that is , with directions specified on edges , so that a chord progression may be permitted in one direction , but not the reverse ) , or a multigraph ( that is , with multiple edges permitted between a pair of vertices ) , and the associated theory .   herewe give an explicit set - theoretic description of the procedure of constructing voice - leading graph .consider the ( ordered ) pitch class set , representing -tone equal temperament , with representing the pitch class , representing , and so on .choose an ordered set of pitch classes , with .there are possible choices for . a major triad on the pitch exists in if the set , with addition taken modulo .similarly , minor , diminished and augmented triads exist if , and respectively .we label the collection of all such triads .these will form the vertices of the voice - leading graph .an edge exists between vertices and if and only if contains exactly two elements , and iff the two elements of the symmetric difference are neighbours ( modulo ) in , that is , .  for example , let , which contains the major triads , and , the minor triads , and , and the diminished triad . there are no augmented triads .the triad pair are connected since and contains neighbours in the ordered set .similarly , triad pairs , , , , and are connected , but no other triad pairs .the resulting graph , shown in figure [ fig : diatonic ] , is naturally identical to the corresponding figure in texts such as , but here we focus on graph - theoretic rather than geometrical properties .of course , when consists of the notes of any major ( or natural minor ) scale , a similar circular graph is produced .other choices for may give different graphs . figure [ fig : hexatonic ] shows the voice - leading graph for the notes of the hexatonic scale , which produces a graph with eight vertices , each connected to two others .note that this graph has a different structure to the _ hexacycles _ of as we are allowing augmented triads .geometrically , figure [ fig : hexatonic ] depicts a cube , but again we concentrate on graph - theoretic properties .when , and we can form all triads on all notes in 12-tet , the difference between the geometric and graph - theoretic viewpoints is more apparent .figure [ fig : chrom_graph ] show the voice - leading graph for the chromatic scale . in is interpreted as a twisted two - torus in three dimensions , whereas here we sacrifice the geometry in favour of accessing graph - theoretic diagnostics which quantify how well - connected , and how easily traversed , is the underlying harmonic space .we note that similar graphs have been previously studied    this model also lends itself well to those scales with various numbers of notes for which there is not always an obvious geometrical interpretation .for example , figure [ fig : cmaj_plus ] shows the pair of graphs produced when the pitch set is the major scale extended first with the note , and second with the note .each pitch set contains exactly 8 pitches , but different numbers of triads and efficient progressions are possible . accepting these pitchs sets as possible harmonic palettes ,it is reasonable to wish to quantify the differences between the resulting graphs in some meaningful way .to analyse these voice - leading graphs we utilise common graph - theoretic properties .these make quantifiable distinctions between different graphs , and , musically , provide information about the level of harmonic choice available to composers wishing to employ these contrapuntal techniques .we note that some graph - theoretic properties , such as connectivity , colouring and group structure have been studied by , but diminished and augmented triads are not considered in that paper .   a mathematical graph consists of a vertex set together with a set containing edges which may link some vertices .since some of the terminology in this area varies between authors , we begin with some basic definitions . where there is no risk of ambiguity we will use juxtaposition notation , denoting an edge connecting two vertices , and , by .the * degree * of a vertex is the number of edges with that vertex as an endpoint , and a graph is said to be * regular * if all vertices have the same degree .musically , if a voice - leading graph is regular , this tells us that the level of harmonic choice is consistent throughout .for example , the hexatonic scale known sometimes as the ` symmetrical augmented ' scale , which is constructed by alternating between intervals of a minor third and a semitone , produces a regular graph , shown in figure [ fig : hexatonic ] .similarly , the diatonic scale graph of figure [ fig : diatonic ] is regular , but the chromatic graph in figure [ fig : chrom_graph ] and those in figure [ fig : cmaj_plus ] are not .a * walk * or * edge sequence * is a sequence of vertices such that is an edge for all .thus a walk is simply a chord progression between triads .a graph with vertex set can be represented by an * adjacency matrix * , , the entries of which are given by   the -th entry of the power of adjacency matrix represents the number of walks of length from to .this gives us the number of different chord progressions of length between specific pairs of triads .let and be graphs with vertex sets and respectively . and are * isomorphic * if there exists a bijective mapping such that for all , , and are joined by an edge in if and only if and are joined by an edge in .if two graphs are isomorphic they have the same number of vertices and edges and the same degree distribution .graphs which are isomorphic exhibit the same structure , so when two voice - leading graphs are isomorphic this means we have the same number of available triads , and the same amount of harmonic choice available to the composer . however , two graphs may be isomorphic and contain different _ types _ of chords as we see in the following example .the four graphs obtained by starting with a major scale and adding , respectively , the pitches or areall isomorphic graphs on ten vertices ( one is shown in figure [ fig : cmaj_fsharp ] ) .however , we do not have the same types of chords : the pitch sets and each contain an augmented triad whereas the pitch sets and do not . the graph obtained by adding the pitch to the major scale has thirteen vertices ( see figure [ fig : cmaj_gsharp ] ) and hence is not isomorphic to the others .in fact , the four smaller graphs are isomorphic to a subgraph of the network , revealing the greater harmonic choice in this scale .since we are primarily concerned with exploring efficiency of voice leading , it is clearly useful to consider how one might traverse these graphs .a * path * is a walk in which no vertex is repeated .a walk in which the initial and final vertices coincide ( that is , ) , but no other vertex is repeated , is called a * circuit*.  walks , paths and circuits all represent chord progressions through the graphs .paths allow each chord to be used only once within the progression , whereas walks bear no such restrictions .circuits require the progression to begin and end on the same chord ( so one might wish to consider circuits beginning on the tonic triad ) .the * ( geodesic ) distance * between two vertices , and , is defined to be the number of edges in the shortest path which connects them .we denote this by   the distance between a pair of vertices can be thought of as the ` size ' of the voice - leading between two triads since it measures how many steps must be moved in total between the chords .there are various metrics used for measuring voice - leading size , arguably none of them standard .thus , we adopt the graph theoretic notion of distance as our definition of voice - leading size , remaining aware of the limitations of this definition .for example , we can not recognise so - called ` voice - crossings ' which intuitively ought to make the voice - leading size larger .one might also wish to consider , not only path length , but chromatic length , that is , how many semitones have moved , rather than scale - steps .this could be achieved by weighting each edge to show how much movement has occurred in terms of semitones .this would then allow for the same graph theoretic analysis , but using the analogous tools designed for weighted graphs .the * eccentricity * of a vertex is the greatest geodesic distance of from any other vertex .the * diameter * of , is the greatest distance between any two vertices of .that is , .the * radius * of is the minimum eccentricity of any vertex , that is , .the diameter can be thought of as representing the maximum amount of movement that must occur to create a voice - leading between any two triads , in other words , the longest necessary chord progression .a * central vertex * is any vertex which achieves the radius , that is .a * peripheral * vertex is any vertex which achieves the diameter , that is , .a graph is * self - centred * if , that is , if every vertex has the same eccentricity .  in a self - centred graphevery vertex is both central and peripheral , so no vertex is any more isolated than any other .there are possible pitch sets of between three ( so there are sufficient pitches for at least one triad ) and twelve pitches . of these ,642 produce empty graphs ( that is , there are no major , minor , augmented or diminished triads contained in ) , and 2 ( the whole tone scales and ) produce unconnected graphs , with two vertices and no edges . of the remaining 3373 , 1857 produce self - centred graphs , while 1516 produce non - self - centred graphs .notably , standard musical scales , including major ( and therefore natural minor ) , harmonic minor , melodic minor , octatonic , hexatonic and chromatic scales , produce self - centred graphs .so indeed do all the previously discussed scales produced from adding any combination of black notes to the major scale .the musical implication is that in such harmonic frameworks , no chord is more or less isolated than any other : each triad requires the same length chord progression to reach its most distant triad .the list of non - self - centred scales include many with large gaps between elements of , but there exist some ( less standard ) musical scales that are non - self - centred .for example , the mixolydian augmented scale has a diameter of 4 and a radius of 3 , while the enigmatic minor scale ( reputedly invented by guiseppe verdi ) forms a line graph of five triads , and therefore is not self - centred .geodesic distances give a crude first impression of how difficult a graph is to traverse .these can be refined using some very well - known concepts from graph theory .we next discuss hamiltonian paths and circuits , which relate closely to one of the most famous and computationally expensive extant problems of computer science : the travelling salesperson problem .we then examine eulerian trails , discussed by the eponymous euler in his solution to the bridges of knigsberg problem , the solution of which is arguably the oldest theorem of graph theory .  a * hamiltonian circuit * is a circuit which visits every vertex of a graph .a hamiltonian circuit represents a voice - leading in which every available triad is used precisely once .although this is clearly very restrictive , the principle could potentially be used by a composer wishing to exhibit all triads as efficiently as possible .consider once more the graph of the hexatonic scale shown in figure [ fig : hexatonic ] . due to the relationship between this graph and the cube , its propertieshave been explored in depth it contains no less than 12 hamiltonian circuits , that is , there are 12 distinct ways to write a chord progression obeying parsimonious voice - leading , which start and end on the same triad and includes each other exactly once .in general it is nontrivial to discover whether a graph contains a hamiltonian path or circuit , since these are both np - complete problems .hamiltonian cycles in the context of chordal and timbral musical morphologies have recently been studied in .the hamiltonian property ensures all triads are visited , but does not require every edge to be used .a composer might wish to use every possible progression between triad pairs as efficiently as possible .this is described by the eulerian property .an * eulerian trail * begins and ends with the same vertex and uses each edge of a graph precisely once , but may repeat vertices .a * semi - eulerian trail * is like an eulerian trail except that it begins and ends on different vertices .a graph is called * eulerian * if it contains an eulerian trail and * semi - eulerian * if it contains a semi - eulerian trail but not an eulerian trail .since the graphs we are considering are undirected we would be able to move in either direction between a pair of chords , but then we would not be able to use the reverse progression within the same eulerian trail .in contrast with hamiltonicity , it is very easy to tell whether a graph is eulerian .it is a well known , and very useful , fact that a graph is eulerian if and only if every vertex has even degree .it is semi - eulerian if precisely two vertices of the graph have odd degree .thus the hexatonic graph of figure [ fig : hexatonic ] is not eulerian . the ` symmetric diminished scale ' , sometimes referred to simply as the ` octatonic scale ' , is constructed by alternating between intervals of a semitone and a whole tone .this scale produces a beautiful graph which reflects the internal symmetry of the scale which its name implies .this graph is eulerian , and is shown in figure [ fig : octatonic ] .however actually finding eulerian trails , and in particular , evaluating the number of eulerian trails within a graph is certainly non - trivial for large graphs .as discussed , only the whole tone scales produce graphs which are not connected . for all other voice - leading graphs ,an instructive question is _ how well - connected _ they are .this turns out to be somewhat problematic since most , if not all , of the standard tools for measuring ` connectivity ' ( for example , vertex connectivity , algebraic connectivity , the isoperimetric number ) depend , to some extent , on the number of vertices of the graph .this makes comparison between graphs difficult , especially as scales with the same number of notes may produce graphs with different numbers of vertices .for this reason we turn our attention towards more specific measures such as ` communicability ' and ` centrality ' which focus on the properties of the individual vertices of a graph .complex network theory is a modern , vibrant area of study which seeks to analyse graphs which represent , among other things , social networks and computer networks .such graphs are typically gargantuan in size , and display highly complex , and often dynamic , structures . because of this, many tools have been developed which aim to concisely distill information about both the individual vertices and the network as a whole .though our graphs are small compared to a typical complex network , many of these tools still have specific and appropriate interpretations for parsimonious voice - leading .measures of _ centrality _ determine how ` important ' a certain vertex is within a network , where a variety of different meanings of ` important ' have lead to a variety of different meaures . here we describe several , and discuss their application to voice - leading , using the particular ( simple , but instructive ) example of triads available in the harmonic minor scale on . the resulting graph for this set of pitches , ,is shown in figure [ fig : charm_minor_graph ] .   harmonic minor . ]the simplest such measure is to consider the degree distribution of the vertices .this gives an absolute value to the amount of harmonic choice at each vertex the number of triads that are a single voice - leading step away . for a graph of vertices, this is commonly normalised by dividing by , the maximum possible degree at each vertex , to give _degree centrality_. table [ tab : katz ] gives the degree centrality for each of the vertices in figure [ fig : charm_minor_graph ] , which simply indicates what proportion of all available triads are accessible from each triad ..a variety of centrality measures for the voice - leading graph of triads from harmonic minor , shown in figure [ fig : charm_minor_graph ] .the values for katz centrality are computed with .this is close to the maximum possible value of , which is given by the reciprocal of the largest eigenvalue of , which is approximately equal to 2.768 . [cols="^,^,^,^,^,^ " , ]   the degree of a vertex gives purely local information ; it says nothing about how far away other triads are . for a given vertex, one might average the geodesic distance to all other nodes . a smaller value of this average would indicate a greater centrality , so the reciprocal defines the next measure we discuss .  the * closeness centrality * of a vertex is given by   referring to table [ tab : katz ] , we can see that closeness centrality distinguishes between , for example , minor and , which have the same degree centrality . on average ,fewer chord progressions are necessary to explore the harmonic landscape from than from minor .  given that geodesic distances represent efficient voice - leading , one might ask which vertices appear most often in shortest paths , that is , which triads frequently act as musical stepping - stones between others in voice - leading . this is the quantity measured in the following .the * betweenness centrality * of a given vertex is the proportion of shortest paths in the graph which pass through .consider the triads and in table [ tab : katz ] . is more central , in the sense that it is , on average , a shorter distance from all others than , but is of more use when constructing the most efficient route between triads .the chord has the uniquely smallest value of betweenness centrality , which speaks to the fact that we might be more likely to use the c minor chord at the beginning of end of a chord progression , rather than in the middle .  for a final centrality measure , we consider _ katz centrality _ , which generalises the idea of degree centrality from the local to the global .  given a network , the * katz centrality * of given by where is the number of vertices in the network , is the adjacency matrix and is an attenuation factor which specifies the relative significance to be placed on nearby neighbours within a graph , as opposed to those which are further away . to ensure that the sum converges, must be smaller than the reciprocal of the largest eigenvalue of .recall that the -th entry of gives the number of walks of length from to .thus katz centrality measures the number of all vertices that can be reached , with the contribution from vertices steps away diminished by a factor of the power of .musically , while degree centrality represents harmonic choice at a given vertex , katz centrality measures total harmonic choice along all progressions from the initial triad . in terms of social network analysis this effect is often described as ` it s not how many friends you have , but how influential your friends are . 'this interpretation can again be illustrated by table [ tab : katz ] .triads and have the same degree ( and note that has the higher betweenness centrality ) , but the katz centrality for is higher , since it has , the most influential and central vertex of all , as an immediate neighbour .  as an alternative to looking at individual triads, we might consider how well specific pairs of vertices ` communicate ' with each other .let be the number of shortest paths with length between and and let be the number of walks between and with length .the * communicability * between the vertices and is then   this measure considers all routes between and , with shorter routes being weighted more heavily than longer ones .the communicability of a pair of vertices then captures the idea of how easy it is to move between these two vertices . using the power of the adjacency matrix , this expressioncan be rewritten as   again we can consider the harmonic minor example . although and are both a distance of two away from , we have and .it is also interesting to consider the values when each vertex is paired with itself . in this case has the highest value , at 4.500 , with and having the lowest values at 2.343 .this agrees with the intuition , since the more isolated nature of these two vertices means that a smaller proportion of walks , or chord progressions , will use these vertices .we have discussed the application of a variety of concepts and tools from graph theory and complex network theory to efficient voice - leading within a given harmonic structure . the notion of a self - centred graph demonstrated that in one particular ( classical graph - theoretic ) sense , typical musical scales are all equally well - distributed , in that no triad is any more or less isolated than any other . however , the relative centrality of vertices can be distinguished using modern ideas from complex networks , each having a specific interpretation to harmonic progressions .this field of study is an evolving area , with a potentially increasing number of new tools which could be incorporated into this framework .there are natural musical extensions to this approach , for example exploring the connectivity of voice - leading in -tone equal temperament , or unequal temperament .there are no mathematical issues with considering such graphs , indeed , many of the measures discussed here are designed for larger graphs .weighted graphs could be employed to represent notions of voice - leading size , and similarly directed graphs could model situations in which chord progressions are allowed in only one direction .many of the graph theoretic tools we have employed have direct analogues for weighted and directed graphs so the analysis should not prove too difficult in these cases .a further idea of interest would be to consider dynamic graphs , changing with time to represent the idea of changing key signatures or tonal centres throughout a piece . in terms of musical analysis and composition, it is hoped that these ideas offer a new viewpoint from which to study parsimonious voice - leading , and even give inspiration to composers who seek to use voice - leading in some efficient manner .

Abstract: we study the neo - riemannian principle of parsimonious voice - leading using tools and techniques from classical graph theory and the modern field of complex networks . we quantify the relative importance of particular chords within this framework . the graph - theoretic notion of eccentricity suggests that when working in a harmonic scheme dictated by any common musical scale , no triad is any more isolated than any other . complex network theory refines this idea , and in this context provides measures of how important particular triads might be for the flow of chord progressions through the harmonic network . we review and compare several different such measures of centrality and communicability .