emission at 511 kev , the characteristic signature of positron annihilation , has been observed in the direction of the galactic centre ( gc ) , since the 1970s .
apparently diffuse gamma - ray emission at approximately this energy was first detected in 1970 by the balloon - borne experiments of the rice group ( johnson , harnden , & haymes 1972 ; johnson & haymes 1973 ; haymes et al .
1975 ; preliminary indications were also reported in haymes et al .
1969 ) and was confirmed as positron annihilation emission in 1978 by the balloon - borne experiments of the bell - sandia group ( leventhal , maccallum , & stang 1978 ; leventhal et al .
high - energy balloon experiments and space observatories through the early 1990s continued to detect the 511 kev emission ; however the relatively low spatial resolution of these detectors prevented determination of the true location and distribution of the emission ( see purcell et al .
1997 , jean et al .  2003 , or teegarden et al .
2005 for a summary of these early observations ) .
specifically , from these data it is unclear whether the emission is truly diffuse , or if it originates either from a single discrete source ( _ e.g .  _
sgr a * or 1e1740.7 - 2942,``the great annihilator '' ) or from a small number of discrete but unresolved sources .
some early detections suggested time variability in the signal , indicating a small number of discrete sources , but these variations were not confirmed in subsequent observations ( _ e.g .  _
purcell et al .  1997 ; teegarden et al .  2005 ) .    with the advent of space observatories of increasing sensitivity , spectral
coverage , and spatial resolution , the resultant improvement in data quality now provides much stronger constraints on the origin of the emission .
in particular , observations of the gc by the spi spectrometre on the satellite integral ( the international gamma - ray astrophysicsl laboratory ) have recently produced the most detailed map of the anomalous 511 kev emission to date ( kndlseder et al .
2005 ; weidenspointner et al .  2006 , 2007 ) .
the spi / integral map clearly shows this emission arising from the central @xmath01.5 kpc ( @xmath2@xmath3 ) of the galaxy , with a fainter component of 511 kev flux detected from the remainder of the galactic disk .
the smoothness of the emission constrains the number of discrete sources responsible to be in excess of @xmath0 8 ( kndlseder et al .
2005 ) , as do point source limits of @xmath4 ph @xmath5 s@xmath6 from searches with the ibis imager on integral ( de cesare et al .
most recently , weidenspointner et al .
( 2008 ) have detected a longitudinal asymmetry in the disk component of the emission , which matches the asymmetry in the distribution of the brightest low - mass x - ray binaries ( lmxbs ) detected by the ibis instrument on integral , suggesting that these @xmath7 objects may account for much of the disk component of the 511 kev emission .
diffuse emission from the galactic centre , unaccounted for by known sources , has also been observed at several other wavelengths , notably high - frequency radio ( 2163 ghz ) with wmap ( finkbeiner 2004a ) and soft x - rays ( 110 kev ) with _ e.g.  _ heao and chandra ( worrall et al .  1982 , muno et al .
the origin and nature of the diffuse emission is puzzling in each case . in the case of the diffuse x - ray component ,
a population of discrete but unresolved point sources was originally postulated as a possible source of the emission ( see _ e.g.  _ skibo et al .
1997 , valinia & marshall 1998 ) .    with the advent of high - resolution x - ray imaging using chandra ,
a large new population of low x - ray luminosity sources has indeed been identified in the central 2@xmath3@xmath80.8@xmath3of the gc ( 300@xmath8120 pc at a gc distance of 8.5 kpc ; wang et al .  2002 ,
muno et al .
2003 , muno et al .  2006 ) .
many of these @xmath04200 discrete x - ray sources are likely to be accreting binaries , including high and low mass x - ray binaries and cataclysmic variables .
however , it is worth noting that these detected sources only account for 10% of the previously observed diffuse 2 - 10 kev emission ( ebisawa et al .
2001 , muno et al .
2003 ) , so an even larger population of still fainter sources ( with @xmath9@xmath10erg@xmath10s@xmath6 ) could exist at the gc ( but see muno et al .
2004 who argue that the spectral characteristics of the remaining diffuse x - ray emission are inconsistent with a stellar x - ray source origin ) . in any case , it is not clear how much these new populations might contribute to the diffuse flux at lower ( _ e.g .
_ wmap ) or higher ( _ e.g .  _ integral ) energies .    in this paper
, we consider the hypothesis that jet outflows from x - ray binary systems ( xrb ) , which are accretion - powered mass - transferring binaries containing a black hole ( bh ) or neutron star ( ns ) , are the main source of the 511 kev emission in the gc . this idea has been explored previously by various authors , notably ramaty & lingenfelter ( 1979 ) , prantzos ( 2004 ) , kndlseder et al .
( 2005 ) , and guessoum et al .
these previous studies generally focused on the large - scale discrete jet ejections produced by the class of luminous black hole xrbs known as `` microquasars '' .
however , it is now thought that luminous black hole xrbs much more commonly produce lower - luminosity `` steady '' jets , and that these outflows are `` on '' for a substantially greater fraction of the xrb duty cycle than the large - scale ejection events ( gallo et al .
we note that neutron star x - ray binaries are , in principle , also possible sources of jet positrons
. the fraction of low magnetic field ns xrbs with outflows could be as high as @xmath0 100% ( fender 2006 ; migliari & fender 2006 ) .
however , they show a different scaling than black hole xrbs between x - ray luminosity and radio luminosity ( i.e. @xmath11 in bh systems and @xmath12 in ns systems ; miglari & fender 2006 ) . as a result of this scaling , the jets from quiescent neutron star x - ray binaries are likely to be several orders of magnitude weaker than those from quiescent bh x - ray binaries , if one assumes the same scaling relations continue into quiescence .
more likely , though , is that the scaling relation becomes even steeper for neutron stars as they fade more deeply into quiescence than the current radio flux limits allow us to probe ; the emission from the faintest neutron star xrbs is generally dominated by thermal crustal emission from cooling neutron stars , rather than by accretion power ( _ e.g .  _
rutledge et al .  2001 ) .    also ,
while some luminous high - mass x - ray binaries ( hmxbs ) have been observed to emit jets ( e.g. cyg x-1 , cyg x-3 ) , these systems are predominantly located in the galactic disk ( grimm et al .
thus these canonical bh hmxbs  of which there are only a few known in the entire milky way  are not a class of objects which can cause an excess of high - energy flux in the bulge relative to the galactic disk .
recent integral observations have detected a population of lower - luminosity , x - ray hard , high - mass xrbs including highly - obscured hmxbs and `` supergiant fast x - ray transients '' , a number of which are located in the bulge ( chaty et al .
however , there is as yet no evidence for jet outflows in these hmxbs .
furthermore , the nature of the compact objects in these systems is currently not known ; but we note that of those canonical hmxbs for which the nature of the compact object has been identified , the majority contain neutron stars rather than black holes .
finally , in a detailed study of the spatial distribution of integral - detected xrbs ( including the new highly - obscured systems ) , lutovinov et al .
( 2005 ) find that the angular distribution of hmxbs in the inner galaxy is significantly different from that of lmxbs  specifically , lmxbs are clearly the dominant population within the bulge , significantly overabundant as compared with the hmxbs in this region .
thus while we can not rule out a high - energy flux contribution in the bulge from these newly discovered low - luminosity hmxbs , we will not consider them further here .
therefore in this paper we primarily consider jets from low - mass black hole binaries .
it seems plausible that steady , low - luminosity outflows from galactic bh xrbs contribute substantially to the annihilation line emission , and possible also to the diffuse emission observed at other wavelengths .
the outline of the paper is as follows . in section 2 ,
we first review the 511 kev observations of the gc and discuss possible sources for the positrons . in section 3
, we outline a simple model for positron production in ( quiescent ) lmxb jets . in section 4 ,
we briefly examine the unexplained diffuse gc emission observed at microwave and x - ray wavelengths , and consider whether this emission could also originate in outflows from low - luminosity lmxbs . in section 5 , we discuss the recent association of the disk component of the 511 kev emission with bright lmxbs detected by ibis , pointing out some unresolved problems with this association .
we conclude by proposing several observational tests that may help elucidate the nature of the population responsible for the 511 kev emission .
since its initial discovery almost 40 years ago , our picture of the annihilation emission from the gc has gradually become clearer
. the emission amounts to @xmath13 photons @xmath14 s@xmath6 , coming from a region roughly @xmath15 in radius around the gc . assuming the mean distance to the positron sources is the distance to the gc , 8.5 kpc , this flux corresponds to an integrated luminosity of @xmath16 photons / s emitted within a region 1.5 kpc in radius .
after initial suggestions of temporal variability in the flux , extensive observations over the 1990s have ruled this out at any substantial level ( see purcell et al .
1997 for a summary of this evidence ) .
the detailed spatial distribution of the emission has become much clearer since observations first by osse on cgro , and then more recently by spi on integral .
the most recent analyses of 4 years of spi / integral data ( weidenspointner et al .
2008 ) suggest two main components : a central bulge and an asymmetric disk .
the bulge component is reasonably well described by a single gaussian with a fwhm of 6@xmath17 , but even better described by a superposition of two gaussians of fwhm of 3@xmath17 and 12@xmath17 , or alternately a compact , symmetric bulge component from @xmath180.5 kpc , and an extended shell of emission from @xmath191.5 kpc .
the disk component is now detected at @xmath20 in 4 years of spi , and appears to be be asymmetric at 3.8@xmath21 significance ( weidenspointner et al .
2008 ) , with 1.8 times more emission at negative longitudes than at positive ones .
the total flux from the disk is @xmath22 photons @xmath14 s@xmath6 , _
i.e.  _ comparable to the bulge flux .
there is also marginal evidence for emission more than 1.5 kpc from gc ( kndlseder et al .
2005 ) , possibly extending out as much as 40@xmath17/5 kpc ( bouchet et al .
2008 ) , though detection here is hampered by the very uneven exposure maps of integral away from the gc . on the other hand
there has been no significant detection of the emission more than 4050 degrees away from the gc ( teegarden et al .
2005 ; weidenspointner et al .
2007 ) .
detailed analysis of the annihilation line profile , the positronium continuum below 511 kev , and the spectrum of the diffuse gamma - ray background at higher energies place further limits on the origin of the line .
integral and comptel measurements of the diffuse background at 110 mev indicates that the positrons must be produced at relatively low energy , since otherwise inflight annihilation of relativistic positrons off background electrons would produce a visible bump in the spectrum .
this constraint on the injection energy , first identified by agaronyan & atoyan ( 1981 ) , places an upper limit of @xmath03 mev on the mass of a light dark matter candidate producing positrons through annihilation in a neutral medium ( beacom & yksel 2006 ; note that in this case internal bremsstrahlung in the annihilation process also contributes to the high - energy emission ) . allowing for a partially ionized medium ( and for production mechanisms without associated internal bremsstrahlung emission ) , the more general limit on the injection energy is @xmath048.5 mev ( sizun , cass , & schanne 2006 , 2007 ) . furthermore
, low - energy positrons rarely annihilate directly ; instead the majority form positronium , a short - lived bound system composed of an electron - positron pair .
positronium then decays either from the singlet ( `` para - positronium '' , spins anti - parallel ) state , via the emission of two photons at 511 kev , or from the triplet ( `` ortho - positronium '' , spins parallel ) state by the emission of three photons , leading to a continuum below 511 kev .
detailed analysis of the line profile and line - to - continuum ratio can constrain the properties of the medium in which the positrons propagate and annihilate .
the recent analyses of churazov et al .
( 2005 ) and jean et al .
( 2006 ) indicate that the dominant emission source can not be located in the very hot or very cold components of the ism , but that annihilation probably occurs in the warm neutral and ionized medium .    given these constraints and the expected lifetimes for positrons in different components of the ism
, the implication is that positrons are either produced in , and annihilate in , the warm medium , or are produced in the hot medium but propagate further and annihilate in the warm medium at the edge of hot bubbles . in the former case they would travel only 50100 pc ( @xmath23 at gc ) from their source before annihilating , and in even in the latter they would annihilate within @xmath24 pc of their source ( jean et al .
thus , in the absence of large - scale magnetic fields ( which could cause the positrons to propagate even further from their sources ; prantzos 2006 ) the spatial extent of the observed emission implies sources distributed over a similar area on the sky .      since its discovery , many possible sources have been invoked to explain the 511 kev emission from the galactic centre .
a number that were initially consistent with early detections are now disfavoured , given more accurate maps and flux measurements .
some sources , _ e.g.  _ cosmic rays interacting with the intergalactic medium ( ramaty et al .  1970 ; lingenfelter & ramaty 1982 ) , or populations of young stellar objects such as pulsars ( sturrock 1971 ) , or supernovae or wolf - rayet stars ( via the radioactive nuclei they produce
clayton 1973 ; ramaty & lingenfelter 1979 ; signore & vedrenne 1988 ; woosley & pinto 1988 ; lingenfelter & ramaty 1989 ; milne et al .
2002 ) , would produce a more flattened distribution on the sky , inconsistent with the bulge component .
some other possible candidates , _
e.g.  _ sgr a * ( lingenfelter & ramaty 1982 ; rees 1982 ; ozernoy 1989 ; ramaty et al .
1992 ) , a single grb or hypernova at galactic centre ( lingenfelter & hueter 1984 ) , or a population of classical novae ( purcell et al .
1997 ) , should appear as a single point source and/or show temporal variability ( although models where stronger emission of positrons from sgr a * occured at some time in the past may be possible  see cheng , chernyshov & dogiel 2006 and 2007 ; and totani 2006 ) . while some of these sources may account for part of the annihilation flux ( _ e.g .
_ the radioactive decay of @xmath25al from young massive stars should account for 20 - 30% of the 511 kev emission in the central part of the galactic disk ; bouchet et al .
2008 ) , the majority of the 511 kev flux now seems most likely to come from a distributed population of faint sources that traces the old stellar bulge .
we refer the reader to _ e.g.  _ kndlseder et al .
( 2005 ) for further discussion of the alternatives .    of sources associated with old stellar populations , type ia sne are too rare to account for much of the flux .
hypernovae / grb progenitors ( cass et al .
2004 ) or grbs ( parizot et al .
2005 ; bertone et al .
2006 ) might produce enough positrons , but it is not clear they could necessarily reproduce the smoothly distributed emission seen by spi . another possibility worth mentioning is pulsars .
rotationally powered pulsars are well known to produce high energy particles . in recent years , it has become clear through the observation of a synchrotron nebula around the pulsar 1957 + 20 ( stappers et al .
2003 ) that even millisecond pulsars ( msps ) can have significant pair - dominated winds .
given their considerably larger numbers compared with young pulsars , especially in regions of old stellar populations like the galactic bulge , the pair flux from msps should dominate the total pair flux from pulsars , and it has been shown that reasonable parameter values for pulsar numbers and pair flux rates can reproduce the observed annihilation line rate ( wang , pun & cheng 2006 ) .
thus msps are a plausible source of the 511 kev line emission .
however , pulsars are expected to produce very high energy ( @xmath110 mev ) positrons ; but as noted earlier , the integral and comptel measurements of the diffuse 1 - 10 mev background indicate that the positrons responsible for the observed annihilation line must be produced at relatively low energy , as otherwise a visible bump in the spectrum from inflight annihilation of relativistic positrons would be observed ( agaronyan & atoyan 1981 ) .
thus we will not consider msps further in this paper .
finally , a large number of more exotic possibilities have been suggested to explain the 511 kev emission .
they include annihilation of an mev - scale particle , such as `` light '' dark matter ( boehm et al .
2004 ) ; sterile neutrinos or pseudo - scalar relics with masses @xmath26 mev ( picciotto & pospelov 2005 ) ; decays of axions ( hooper & wang 2004 ) , sub - gev scale neutralinos ( gunion et al .
2006 ; bird et al .
2006 ) , or other supersymmetric particles ( takahashi & yanagida 2006 ) ; q - balls ( kasuya and takahashi 2005 ) , mirror matter ( foot & silagadze 2005 ) , moduli ( kawasaki & yanagida 2005 ; kasuya and kawsaki 2006 ) , superconducting cosmic strings ( ferrer & vachaspati ) , droplets of superconducting quark matter ( oaknin & zhitnitsky 2004 ; mcneil , forbes , & zhitnitsky 2008 ) , tev - scale particles with an excitation at the mev scale ( finkbeiner & weiner 2007 ; pospelov & ritz 2007 ) or small , accreting black holes ( titarchuk & chardonnet 2006 ) .
over the past decade , multiwavelength observations of x - ray binaries have clearly shown that these systems produce relativistic jet outflows , analogous to those observed in agn and quasars ( see fender 2006 for a review ) .
there are known accreting binary populations in the gc , and there is increasing evidence that all accreting sources containing black holes and neutron stars have a _ compact , steady _ jet outflow during their `` hard '' states , when their x - ray luminosity is relatively low ( indeed , there is evidence that these compact jets are also present during the `` quiescent '' state when the source x - ray luminosity is extremely low ; gallo et al .  2006 , 2007 ) .
several ( perhaps all ) bh xrbs also have _ transient _ powerful , large - scale , extended jets , which are associated with the transition between the `` hard '' or `` quiescent '' states and the x - ray luminous `` high / soft '' state .
these large - scale ejection events are episodic but their duty cycle is poorly known ; however , it is clear that most bh xrbs spend less time in the transitional regime where the large - scale jets are emitted than in the lower x - ray luminosity hard ( or quiescent ) states .
we therefore focus here on the low - luminosity steady jets .    extending the results of deep x - ray surveys of the central galactic bulge ( wang et al .
2002 , muno et al .
2003 , muno et al .
2006 ) to the entire bulge , we would expect roughly @xmath27 x - ray point sources similar to those detected by the chandra surveys . while a large fraction of these are likely to be cataclysmic variables ( see _ e.g.  _ muno et al .
2003 ) , a few percent of the sources are likely to be quiescent low - mass bh x - ray binaries , sources which trace the older stellar population of the galaxy and thus are observed to be concentrated in the inner galaxy .
such quiescent systems might be good candidates for the jet positron source , consistent with known point sources down to @xmath28ergs / s .
these jets could be sources of high - energy electrons and protons , and also , as they interact with the ism , of positrons .
alternatively , this could be done by low energy cosmic ray injection in jets with associated acceleration to high energies in the jet - ism interaction sites ( _ e.g .  _
heinz & sunyaev 2003 ; fender , maccarone & van kesteren 2005 ; heinz & grimm 2005 ) .
these two distinct components would in turn produce diffuse emission across the electromagnetic spectrum via positron annihilation , synchrotron emission , and perhaps heating of the ism .
this solution is preferable to many of the more exotic scenarios , which require fine tuning to avoid constraints on positron production at energies above @xmath010 mev , and can not simultaneously produce both low - energy positrons and high - energy electrons and protons .
( light dark matter , for instance would produce the former , whereas conventional heavy dark matter would generate the latter via pion production . )      the jets in low / hard state or quiescent x - ray binaries are thought to be mildly relativistic ( see gallo , fender , pooley 2003 ) . while there are some arguments that the data on xrbs do allow for higher jet velocities in the low / hard states ( heinz & merloni 2004 ) , additional indirect evidence supports the former assertion .
the giant jet ejections that take place at transitions from hard to soft states are well explained by a jet speed that increases as the state transition proceeds , leading to a shock of the faster jet material against the recently ejected slower material ( vadawale et al .
2003 ; fender , belloni & gallo 2004 ) .
furthermore , the jets in low luminosity active galactic nuclei are typically two - sided , while those in high luminosity agn are typically one - sided , consistent with the idea that doppler boosting is a more important effect in high luminosity agn than low luminosity ones .
we thus take a jet speed of 0.7c , meaning that the kinetic luminosity of the jet is about @xmath29 .
this gives @xmath30 g / sec for a jet power of about @xmath31 @xmath10erg@xmath10s@xmath6 , typical in the quiescent systems whose x - ray luminosities are about @xmath32 @xmath10erg@xmath10s@xmath6 .
theoretical studies suggest a range of 1000 - 10000 for the number of quiescent bh xrbs in the entire galaxy ( romani 1992 ; portegies zwart , verbunt & ergma 1997 ) . from this range
, we derive an estimate of @xmath33 ergs / sec of total kinetic power input into the galactic interstellar medium ( ism ) from quiescent black hole xrbs .
since roughly 1/3 of the stellar mass of the milky way is in the bulge , and low mass xrbs are good tracers of stellar populations ( gilfanov 2004 ) , this results in an estimate of @xmath0 3003000 bh in the bulge itself .
we can then estimate that the kinetic power injected by quiescent bh x - ray binaries into the bulge is about @xmath34 ergs / s , and that the total mass injected into the bulge ism from these jets is about @xmath35 g / s , yielding a total proton injection rate of about @xmath36 per second .
if we see @xmath37 photons / s/@xmath5 , then this means we see @xmath16 511 kev photons per sec .
if we assume that 3/4 of the annihilations go through the 3-photon positronium channel , then we need 2@xmath8@xmath16 positrons / s produced to get the @xmath16/s 511 kev photons needed ( 75% produce no 511 , 25% produce two 511 photons ) .
we thus need a pair to proton ratio of about 40 - 400 to account for the observed 511 kev luminosity .    the best attempts at estimating the pair fractions for jets come from active galactic nuclei .
it has been shown by sikora & madejski ( 2000 ) that excessive pair fractions in quasar jets would lead to a strong bump in the soft x - rays due to the bulk compton upscattering of the thermal photons from the accretion disk of the quasar , in constrast to observations . on the other hand , for lower luminosity agn , which are more likely to be analogous to the quiescent bh x - ray binaries discussed here ,
the situation is less clear  these still could be pair - dominated as they do not have strong thermal accretion disks to contribute photons for upscattering .
comparisons in m87 between the bulk kinetic power observed from jet - intracluster medium interactions and the synchrotron luminosity argue that there must be a large number of leptons per unit kinetic power , and hence that the pair fraction must be large ( reynolds et al .
1996 ; dunn , fabian & celotti 2006 ) .
reynolds et al .  ( 2006 ) also find that the pairs in these jets are most likely to be predominantly cold ( i.e. the energy spectrum for the electrons has no low energy cutoff , so that the number density is dominated by electrons with low enough energies to satisfy the constraint discussed in section 2.1 , that high energy pairs would produce excessive emission in @xmath0 mev range via in - flight annihilation ) .
guessoum , jean , & prantzos ( 2006 ) have estimated the production rate of positrons in `` canonical '' jet - producing microquasars , based on the energetics and models of these luminous xrbs which have been presented in the literature ; we summarize their results here .
they use an average value of 10@xmath38 pairs / sec from a luminous microquasar producing `` steady '' jets ( e.g. in the low / hard state , rather than the large - scale episodic jets ) at @xmath39 0.01 - 0.1@xmath40 . using an estimate of @xmath0100 for the total number of microquasars in the galaxy , together with the galactic positional distribution of observationally - confirmed microquasars
, they derive an estimate of @xmath0 4.1@xmath810@xmath41 positrons / s for the rate of annihilating positrons in the bulge .
they note that the positron production rate they derive is smaller than what is inferred from the integral 511 kev observations . comparing their results with ours
, we see that their calculated positron injection rate from luminous microquasars within the bulge  a fairly small population , of order @xmath040 sources  is an order of magnitude smaller than the @xmath42 positrons / s we calculate as being produced by quiescent bh xrbs in the bulge  a population we estimate to have @xmath03000 members . as such ,
in the scenario we describe in this paper , the quiescent bh xrbs would be the dominant source of the bulge 511 kev emission , although the luminous microquasars would also make a significant contribution .
from one year of integral / spi observations , kndlseder et al .
( 2005 ) found that the spatial distribution of 511 kev luminosity shows a bulge - to - disk ( b / d ) ratio of 3 - 9 , which is higher than the mass of the galaxy in general .
subsequently , using two years of integral / spi data , weidenspointner et al .
( 2007 ) revised this ratio downward to a range of 1 - 4 . since there
exist mechanisms for producing 511 kev emission in the galactic plane which involve young stars not present in the bulge , any viable mechanism for producing the bulk of the 511 kev emission in the bulge must be one in which a larger amount of annihilation per unit mass comes from the bulge than from the galactic plane . at first glance , this seems to represent a problem for our model , in which we suggest that 1/3 of the quiescent bh xrbs are located in the bulge ; if the remaining 2/3 are simply assumed to be in the galactic disk , then the 511 kev luminosity b / d ratio would be 0.5 , well below the lower end of the range determined by weidenspointner et al .
( 2007 ) .    however , this simple calculation neglects two important factors , highlighted by guessoum et al .
first , a significant portion of the galactic lmxb population is located in the galactic halo , distinct from the bulge and disk lmxb populations .
grimm et al .  ( 2002 ) find that 25% of the total number of lmxbs in the galaxy are located in the halo .
they also find that 1/3 of bright lmxbs are located in the galactic bulge , consistent with the expectation from the stellar mass distribution of the galaxy discussed above .
thus if we assume that the quiescent black hole xrbs described here have a similar distribution to canonical luminous low mass xrbs , we expect @xmath01/3 in the bulge , @xmath01/4 in the halo , and the remainder to be located in the disk .
the halo sources are physically located well outside of the bulge and the plane ; thus they will not significantly contribute to the 511 kev luminosity in the spatially - constrained bulge and inner disk areas ( within @xmath43 1.5 kpc of the galactic centre ) over which the 511 kev emission has been detected ( weidenspointner et al .
2008 ) . removing the halo sources results in a b / d luminosity ratio of 0.8
 still below the lower limit of weidenspointner et al .
( note that guessoum et al .  also made an estimate for the number of luminous microquasars in the halo , and removed those sources before calculating their bulge - to - disk luminosity ratio . )    the second factor , as discussed by kndlseder et al .
( 2005 ) , is that the scale height of xrbs in the galactic disk is about 700 pc ( jonker & nelemans 2004 ) , considerably larger than that of the gas in the galaxy , and that this can have profound effects on the inferred rate of positron production in different parts of the galaxy .
if positrons are injected into gas poor parts of the galaxy , they may travel fairly large distances before annihilating , yielding a situation where the distribution of locations for positron annihilation is not the same as the distribution of locations for positron production .
the largest effect would be to transfer positrons from production sites several gas scale heights above the galactic plane into the halo or bulge before they undergo annihilation . following guessoum et al .
( 2006 ) , if we estimate that 50% of positrons produced in the disk escape into the halo and/or propagate along field lines towards the bulge , while all positrons produced in the bulge are retained and annihilate therein ( see _ e.g.  _ jean et al .
2006 ) , then we must reduce the disk 511 kev luminosity by 1/2 . combining this factor with the bulge and disk population estimates above
, we now find a b / d 511 kev luminosity ratio for the quiescent bh xrb population of @xmath01.6 , well within the range for the b / d ratio found by weidenspointner et al .
finally , we note that some positrons which escape from the disk may end up annihilating in the bulge , rather than in the halo , resulting in a still larger b / d ratio .
therefore , it seems plausible that the 511 kev emission could come from the jets of quiescent ( x - ray faint ) black hole x - ray binaries .
the requirements to make this happen  _
( i ) _ that the jets have @xmath44 positrons per proton ; _ ( ii ) _ that there are on the order of 3000 quiescent bh x - ray binaries in the bulge ; and _ ( iii ) _ that the pairs are mostly cold  are all within the range of reasonably standard assumptions and well within the range of observational constraints .
we first introduce a few standard assumptions about jet kinetic power from accreting binaries , and its relationships with observables such as radio and x - ray luminosities .
the kinetic power input into a relativistic jet is assumed to be a constant fraction of the accretion power : @xmath45 this follows in a straightforward manner from the standard mechanisms for producing jets by extracting either the spin energy of the central black hole ( blandford & znajek 1977 ) , or the rotational energy of the accretion disk ( blandford & payne 1982 ) , provided that the height to radius relation for the accretion disk does not change as a function of accretion rate ( _ e.g .  _ livio , ogilvie & pringle 1999 ; meier 2001 ) .
based on the results of standard synchrotron theory ( _ e.g .
_ blandford & knigl 1979 ; falcke & biermann 1995 ; heinz & sunyaev 2003 ) , it is normally assumed that the observed radio luminosity from a jet is proportional to its kinetic luminosity to the 1.4 power : @xmath46    next , it is assumed that black holes at low accretion rates ( in the hard or quiescent states ) are radiatively inefficient , because they can advect energy across their event horizons , leading to a scaling of the bolometric luminosity on the square of the mass accretion rate ( narayan & yi 1994 ) @xmath47 whereas neutron stars , with their solid surfaces , can not advect matter or energy , leading to a linear proportionality between mass transfer rate and luminosity : @xmath48    the resulting expectations are that black holes should have a radio luminosity which depends on the x - ray luminosity to the 0.7 power , assuming that the radio emission comes from the jet , and the x - ray emission comes from an advection - dominated accretion flow : @xmath49 similarly , neutron stars should have a radio luminosity which scales as the x - ray luminosity to the 1.4 power .
both these correlations are indeed observed ; see _
e.g.  _ corbel et al .
( 2003 ) and gallo , fender & pooley ( 2003 ) for the case of black holes , and migliari and fender ( 2006 ) for the case of neutron stars .    the kinetic energy input into the ism from black hole x - ray transients in quiescence can then be estimated based on their x - ray luminosities .
the characteristic x - ray luminosities of quiescent bh x - ray transients are @xmath32 ergs / sec .
jets are likely to take away a substantial fraction of kinetic power in the low / hard state ( _ e.g .
_ malzac , merloni & fabian 2004 ) , but , given that state transitions between the radiatively efficient high / soft state in which little or no jet power is seen , and the radiatively inefficient low / hard state in which there is a steady jet , do not correspond with abrupt luminosity changes , the jet power can not be much greater than the radiated power at the state transition ( maccarone 2005b ) .
therefore , the best estimate of the jet kinetic power is that it scales with @xmath50 , as predicted by the model , with the normalization fixed such that the jet power and the x - ray luminosity are equal at the state transition luminosity which is typically about 2% of the eddington luminosity ( maccarone 2003 ) .
such arguments have been used to estimate that the total kinetic power input into the ism from _ bright _ xrbs is about @xmath51 ergs / sec ( fender , maccarone & van kesteren 2005 ; heinz & grimm 2006 ) , while the kinetic power input from _ quiescent _ black hole x - ray binaries may be @xmath33 ergs / sec ( as derived in section 3.2 ; see also maccarone 2005a ) .
( note that we use this power estimate based on the theoretical numbers of the bh xrb population rather than using the luminosity function derived from observed bright bh x - ray transients , as the latter option would involve extrapolating the luminosity function to x - ray luminosities 36 orders of magnitude lower than what has been directly measured for the bright sources . ) since the total kinetic power in jets from quiescent bh x - ray binaries is likely to be of the same order as that from the most luminous systems , and the quiescent systems will be more strongly concentrated in the bulge than will the luminous xrbs ( a population which includes hmxbs as well as lmxbs ) , it is to be expected that a substantial fraction of the bulge positrons come from quiescent black hole x - ray binaries .      finally , we note two other diffuse components in the galactic centre that may be related to the annihilation radiation .
+ _ x - ray : _
+ in the bulge core , diffuse chandra emission amounts to @xmath52ergs / s , with a spectrum equivalent to an 8 kev thermal plasma over the 17x17 sq .
arcmin chandra field ( muno et al .  2004 ) .
the observed spectral shape is indicative of a truly diffuse component rather than originating from a collection of unresolved discrete sources .
the flux limit of the muno et al .
( 2003 ) x - ray survey is @xmath010@xmath53 ergs / s .
normal stars have luminosities of @xmath54ergs / s or less , and so at least @xmath55 normal stars would be needed to account for the diffuse emission component .
however , @xmath55 stars are all the ( solar mass ) stars in the bulge , not just those within the central 40 square parsecs covered by the muno et al .  chandra survey
it has been argued that this plasma can be thermally maintained by low energy cosmic ray heating ( yusef - zadeh et al .
could these cosmic rays possibly come from the x - ray binary jets themselves ?
the energetics should be adequate .
one question is whether this fraction of the energy actually comes out in cosmic rays , rather than just leading to bulk kinetic motions of the gas at the collisional interface of the jets .
+ _ microwave : _
+ wmap finds a likely synchrotron background with an integrated luminosity of about 2@xmath56 ergs / sec in the 23 - 61 ghz frequency range from a region 2030@xmath17 in radius around the galactic centre region ( finkbeiner 2004a ) .
the total power emitted at these frequencies is estimated to be between 15@xmath57 erg s@xmath6 . assuming a distance of 8.5 kpc , this corresponds to a flux level between 3000 and 15000 jy .
we note that there are large uncertainties in this estimate , given the need to subtract many other contributions , including thermal dust , spinning dust , thermal bremsstrahlung emission and synchrotron from electrons accelerated in sne shocks , from the microwave maps .
moreover , use of the wmap internal linear combination ( ilc ) dust extinction template leaves much uncertainty in possible spatial variations of the composition - dependent frequency sensitivity of the dust emissivity .
nonetheless , the signal has generated interest given its possible connection to exotic processes such as the annihilation of massive wimps ( finkbeiner 2004b ; hooper , finkbeiner & dobler 2007 ) , or states of ` excited ' dark matter ( finkbeiner & weiner 2007 ) .
the reported haze flux level can not be produced from core emission from individual black hole x - ray binaries  as previously discussed , no more than about 3000 quiescent bh xrbs are thought to be in the entire gc region ( _ e.g .
_ romani 1992 ; portegies zwart , verbunt & ergma 1997 ) , meaning that the flux of the typical source would have to be @xmath01 to several jy .
sources above even 100 mjy would be well - known radio sources at lower frequencies ( since they would likely be flat spectrum sources , or sources whose flux density drops with increasing frequency ) , and an excess of such sources would be clear from existing radio surveys . the typical flux of a quiescent low mass x - ray binary in the radio at the galactic centre distance should be @xmath58 1020 @xmath59jy ( see _ e.g.  _ gallo et al .
2006 for the faintest known system of this sort ; hynes et al .
2004 for v404 cyg , the brightest one ) . given @xmath03000 bh with an average quiescent radio flux level of @xmath0100 @xmath59jy , the integrated luminosity of those outflows at wmap wavelengths
would be far less than that of the wmap gc haze ( even if the haze fluz has been significantly overestimated ) .
this may support the interpretation of the haze emission source as relativistic electrons , produced by annihilating 100 gev dark matter particles ( finkbeiner 2004b ; hooper , finkbeiner & dobler 2007 ) .
it thus seems reasonable that most or all of the galactic centre 511 kev emission line could come from low luminosity bh x - ray binaries .
we note that this scenario is not required , since the positron - to - proton ratios for x - ray binary jets are largely unconstrained by observations . what about the contribution from high luminosity ( `` canonical '' ) xrbs ? we need to estimate the fraction of the overall 511 kev line flux that can be accounted for by the well - studied canonical jet sources , and correspondingly the percentage of the flux which needs to be accounted for by the low luminosity population . however , if we only consider black hole xrbs , since ( as previously discussed ) the ns jet flux is too small , then at any given time there are only a few active luminous hard state black holes which would contribute to the 511 kev emission .
but in this case , if a significant fraction of the overall 511 kev flux originated from a handful of sources , and if the positrons do not propagate and annihilate far from their production sites , we would expect to see these individual sources in the 511 kev flux maps - the 511 kev line emission would not appear to be as smooth as it does .
there is no convincing evidence for time variability of the 511 kev line .
it is clear that the mechanism proposed here  summed emission from hundreds to thousands of sources of roughly equal importance  should predict low variability levels in the 511 kev emission .
it is less clear whether this would be true from many of the other mechanisms proposed which rely more heavily on a smaller number of sources .
however , temporal variability is not useful for distinguishing the total number of sources if the characteristic positron lifetime is @xmath27 years as suggested by ferrer & vachaspati ( 2005 )
. only spatial variability would be useful in this case .
weidenspointner et al .
( 2008 ) suggest that an asymmetry in the 511 kev emission is correlated with an asymmetry in the lmxb distribution around the inner galaxy .
the asymmetry argument is that the disk 511 kev flux is asymmetric , and so is the hard lmxb population , with the same ratio between halves ( positive and negative galactic longitudes ) of the disk .
furthermore , the number of objects ( @xmath070 ) times a plausible mean flux per source ( @xmath60 photons/@xmath5/s each ) gives the right total disk flux ( @xmath61 photons/@xmath5/s ) ; thus the luminous hard lmxbs may be the source of the disk flux , if not the ( @xmath13 photons/@xmath5/s ) bulge flux ( note that the latter corresponds to a larger luminosity , since the bulge is further away ; overall it should be 3 - 9 times the disk luminosity ) .    while the positional asymmetries in the known luminous x - ray binary distribution do appear to be in the same sense as the asymmetry in the 511 kev emission , it is not clear that the asymmetry in the bulge component of the x - ray binary population is real .
the inner 20@xmath3of the galaxy show only a 1.5@xmath21 asymmetry - 30 ( negative longitude ) versus 18 ( positive longitude ) sources . in other words , given a total of 48 sources , the probability of having @xmath6230 sources at negative latitudes is 5.6% .
we note that at least eight of the x - ray binaries in the integral catalog ( 5 at negative longitudes , 3 at positive ) used by weidenspointner et al .
( 2008 ) in their determination of the asymmetry are `` foreground '' sources , with known distances which are not consistent with being in the galactic bulge ( jonker & nelemans 2004 ) .
if the 511 kev emission is physically associated with the population of hard xrbs , as is suggested by the asymmetry , then the observed enhancement of 511 kev flux in the central region of the galactic plane is simply a projection effect along our line of sight towards the gc , which coincidentally results in an apparent concentration of 511 kev line emission within @xmath63@xmath64@xmath65@xmath3 .
thus in this scenario , the 511 kev enhancement is not physically associated with the galactic bulge itself , and the morphology and intensity of the 511 kev map is dependent upon the longitudinal location of bright , hard xrbs .
however , we note that grs  1915 + 105 , which is almost certainly the strongest emitter of positrons from jets outside of the innermost region of the bulge , is on the other side of the galaxy ( at positive galactic longitude ) from the bulk of the integral sources and the observed 511 kev enhancement ( which are at negative galactic longitudes ) .
the asymmetry interpretation has at least 4 distinct problems :    1 .
the lmxb luminosity function is steep near the lower end ; changing the sensitivity limit of the ibis catalog would change the positive / negative longitude number ratio .
integrating flux down the luminosity function , the asymmetry also depends on the catalogue limit , in that the total flux asymmetry is actually the reverse of the number asymmetry , at least at high luminosities .
a few sources ( e.g. grs  1915 + 105 ) are responsible for much of the flux ; if this is always true , then the numbers of objects in the catalog may not mean much ; a few bright sources could determine how many positrons are produced at any given time ( i.e. the total flux need not correlate with the number of sources over the ibis limit ) .
4 .   since lmxb x - ray emission is time - variable ,
there is no indication that any current asymmetry in numbers or flux would be constant in time .
1a shows the cumulative ( 20 - 100 kev ) luminosity function for all 72 galactic lmxbs within @xmath6410@xmath3  latitude of the plane in the catalogue of bird et al .
( 2007 ) , divided up into objects at positive and at negative longitudes ( solid and dashed lines respectively ) .
note this scale height excludes high - latitude luminous lmxbs such as sco x-1 .
1b shows the integrated flux contributed by binaries over a given flux limit for each of these samples .
clearly the longitudinal asymmetry in number counts is sensitive to the lower flux limit of the catalogue ; here , this is set to the integral / ibis 20 - 100 kev detection limit .
the current integrated flux is dominated by a small number of bright sources , with the majority of the sources in the integral catalogue being just at the flux detection limit . given the recently identified large population of x - ray faint xrbs discussed above ,
it is clear that there are many lower luminosity sources below the integral detection threshold .
the asymmetry in the source number counts could thus easily be an artifact of the flux bias of the integral sample .
therefore the source numbers used to determine the positional asymmetry could be greatly changed by a slight change in the flux cutoff ( to either higher or lower luminosities ) .
cutting objects below 10 mcrab , for instance , would produce no asymmetry at all , while cutting at a high flux limit would produce more sources at positive longitudes .
so overall , the observed positional asymmetry seen in the integral catalogue , with its instrumentally - determined bias towards luminous sources , may not be significant even if the observed current 20 - 100 kev flux were to correlate exactly with the 511 kev flux .
furthermore , the integrated flux from lmxbs in the catalogue is dominated by objects at positive longitudes at all flux limits ( fig.1b ) , although admittedly this is mainly due to the strong contribution from the single brightest source , grs  1915 + 105 .
thus the asymmetry in the number of sources does not agree with the asymmetry in the total flux from the integral catalogue sources  there is more integrated flux where there are fewer sources ( positive longitudes ) , and less integrated flux where there are more sources ( negative longitudes ) .
the fact that the current `` snapshot '' distribution of the integrated flux does not match the 511 kev asymmetry may in itself not be problematic for the weidenspointner et al .
( 2008 ) hypothesis , since the timescale for positrons to annihilate and produce 511 kev emission is @xmath66 years .
however , we note that a large fraction of the sources observed by integral and used to `` find '' the positional distribution asymmetry are transients . in addition , those x - ray binaries which we call `` persistent '' merely means that the sources have been consistently luminous over the @xmath035 years of observational x - ray astronomy , which provides very little information about the persistence of their luminosity over the @xmath27 year timescale of photon interaction
. thus the current apparent positional asymmetry is merely a snapshot in time , and does not constitute evidence that the total absolute numbers of 511 kev - producing binaries in the direction of the inner galaxy  including those currently in quiescence , which are likely to be the majority  at negative longitudes is larger than at positive longitudes .    over the long lifetime of positron interaction , the integrated flux from all sources which become active during that time may indeed be larger at negative longitudes than positive ones , resulting in the observed asymmetry in the 511 kev emission . to determine this , however , we would need to be certain that there is a true asymmetry in the distribution of all positron - producing xrbs in the inner galaxy - not just during the current epoch , when only a small fraction of such xrbs are observed to be active and luminous .
we would have to assume that the asymmetric distribution of currently luminous xrbs - a sample of @xmath070 sources - reflects an underlying asymmetry in the overall distribution of all xrbs - on the order of @xmath03000 bh binaries - which would contribute to the 511 kev emission over @xmath67 years . while this is certainly possible , it can not be considered conclusive , as it is dependent upon both the arbitrary lower flux cutoff of the integral catalogue ( set by the instrument sensitivity rather than by any intrinsic property of the sources themselves ) and the arbitrary time of observation ( _ e.g .  _ the modern era of high - energy astronomy ) .    a much deeper census of the black hole x - ray binary population , which explores down to the quiescent luminosity of these sources ( @xmath68 erg / s ) , is needed in order to search for a true asymmetry in the physical distribution of jet - emitting xrbs in the inner galaxy .
such a census would require both a deep x - ray survey and infrared follow - up observations to identify stellar counterparts to a representative sample of the x - ray sources , in order to conclusively determine which sources contain black holes .
it would then be possible to assess whether or not the asymmetry in the 511 kev flux is due to an intrinsic spatial asymmetry in the number of xrbs which episodically exhibit large x - ray luminosities integrated over the timescale for 511 kev production .
if stellar sources do account for 511 kev emission , it is unlikely that they would show up as point sources at higher spatial resolution at other wavelengths than the x - ray , as the positrons likely propagate a significant distance ( @xmath050 - 250 pc , which is @xmath00.5@xmath3 1.5@xmath3at the gc ; jean et al .
2006  but see also prantzos et al .
2006 , which suggested a larger distance ) before annihilating .
for the brightest of the low - luminosity sources ( @xmath31 erg / s ) , we could perhaps detect a flat near - ir spectrum which would not be consistent with the flux of a mass donor star alone , but which instead would denote the presence of another component - _
e.g.  _ a jet outflow .
it is not clear if there is enough sensitivity in the mid - ir for ground - based observations _ e.g.  _ at 4 and 8 microns to detect the flux from these sources .
similarly , for sources with this x - ray luminosity , high frequency ( 8.6 ghz ) radio emission might be detectable ( _ e.g .
_ with the vla ) to search for the flat spectrum signature associated with the steady jets from hard state x - ray binaries .
the authors wish to thank tony bird , sera markoff , and philipp podsiadlowski for helpful discussions . we also thank mark rayner for his preliminary work on extracting osse observations of x - ray binaries from the heasarc archives .
we thank the referee for a close reading of the manuscript and useful suggestions .
jet gratefully acknowledges support from pparc , the aspen center for physics , the us doe ( grant ast-0307859 ) , the us nsf ( contract de - fg02 - 04er41316 ) , and nserc canada .
beacom , j.  f. , yksel , h.  2006 , physical review letters , 97 , 071102 bertone , g. , kusenko , a. , palomares - ruiz , s. , pascoli , s. , & semikoz , d.  2006 , physics letters b , 636 , 20 bird , c. , kowalewski , r. , & pospelov , m.  2006 , modern physics letters a , 21 , 457              bouchet , l. , jourdain , e. , roques , j.  p. , strong , a. , diehl , r. , lebrun , f. , & terrier , r.  2008 , apj , 679 , 1315 cass , m. , cordier , b. , paul , j. , & schanne , s.  2004 , apj , 602 , l17 chaty , s. , rahoui , f. , foellmi , c. , tomsick , j.  a. , rodriguez , j. , & walter , r.  2008 , a&ap , 484 , 783            de cesare , g. , bazzano , a. , capitanio , f. , del santo , m. , lonjou , v. , natalucci , l. , ubertini , p. , & von ballmoos , p.  2006
, advances in space research , 38 , 1457 dobler , g. , & finkbeiner , d.  p.  2007
, arxiv e - prints , 712 , arxiv:0712.2238                  finkbeiner , d.  p.  2004a , apj , 614 , 186 finkbeiner , d.  p.  2004b , arxiv astrophysics e - prints , arxiv : astro - ph/0409027 finkbeiner , d.  p. , & weiner , n.  2007 , phys .  rev .
d , 76 , 083519 foot , r. , & silagadze , z.  k.  2005 , international journal of modern physics d , 14 , 143                haymes , r.  c. , ellis , d.  v. , fishman , g.  j. , glenn , s.  w. , & kurfess , j.  d.  1969 , apj , 157 , 1455 haymes , r.  c. , walraven , g.  d. , meegan , c.  a. , hall , r.  d. , djuth , f.  t. , & shelton , d.  h.  1975 , apj , 201 , 593 heinz , s. , & grimm , h.  j.  2005 , apj , 633 , 384              jean , p. , et al .
2003 , a&ap , 407 , l55 jean , p. , kndlseder , j. , gillard , w. , guessoum , n. , ferrire , k. , marcowith , a. , lonjou , v. , & roques , j.  p.  2006 ,
a&ap , 445 , 579 johnson , w.  n. , iii , & haymes , r.  c.  1973 , apj , 184 , 103 johnson , w.  n. , iii , harnden , f.  r. , jr . , & haymes , r.  c.  1972 , apj , 172 , l1 jonker , p.  g. , & nelemans , g.  2004 , mnras , 354 , 355          kndlseder , j. , et al .  2005 , a&ap , 441 , 513 leventhal , m. , maccallum , c.  j. , & stang , p.  d.  1978 , apj , 225 , l11 leventhal , m. , maccallum , c.  j. , huters , a.  f. , & stang , p.  d.  1980 , apj , 240 , 338 lingenfelter , r.  e. , & hueter , g.  j.  1984 , american institute of physics conference series , 115 , 558


the burrows - wheeler transform ( bwt ) is a widely used preprocessing technique in lossless data compression @xcite .
it brings every word into a form which is likely to be easier to compress @xcite .
its compression performance is almost as good as ppm ( prediction by partial matching ) schemes @xcite while its speed is comparable to that of lempel - ziv algorithms @xcite .
therefore , bwt based compression schemes are a very reasonable trade - off between running time and compression ratio .    in the classic setting , the bwt maps a word of length @xmath0 to a word of length @xmath0 and an index ( comprising @xmath3 bits ) . thus , the bwt is not bijective and hence , it is introducing new redundancies to the data , which is cumbersome and undesired in applications of data compression or cryptography . instead of using an index ,
a very common technique is to assume that the input has a unique end - of - string symbol @xcite .
even though this often simplifies proofs or allows speeding up the algorithms , the use of an end - of - string symbol introduces new redundancies ( again @xmath3 bits are required for coding the end - of - string symbol ) .
we discuss bijective versions of the bwt which are one - to - one correspondences between words of length @xmath0 .
in particular , no index and no end - of - string symbol is needed .
not only does bijectivity save a few bits , for example , it also increases data security when cryptographic procedures are involved ; it is more natural and it can help us to understand the bwt even better .
moreover , the bijective variants give us new possibilities for enhancements ; for example , in the bijective bwt different orders on the letters can be used for the two main stages .
several variants of the bwt have been introduced @xcite .
an overview can be found in the textbook by adjeroh , bell , and mukherjee @xcite .
one particularly important variant for this paper is the sort transform ( st ) , which is also known under the name schindler transform @xcite . in the original paper
, the inverse of the st is described only very briefly .
more precise descriptions and improved algorithms for the inverse of the st have been proposed recently @xcite . as for the bwt
, the st also involves an index or an end - of - string symbol .
in particular , the st is not onto and it introduces new redundancies .
the bijective bwt was discovered and first described by scott ( 2007 ) , but his exposition of the algorithm was somewhat cryptic , and was not appreciated as such . in particular , the fact that this transform is based on the lyndon factorization went unnoticed by scott .
gil and scott @xcite provided an accessible description of the algorithm .
here , we give an alternative description , a proof of its correctness , and more importantly , draw connections between scott s algorithm and other results in combinatorics on words .
further , this variation of the bwt is used to introduce techniques which are employed at the bijective sort transform , which makes the main contribution of this paper .
the forward transform of the bijective st is rather easy , but we have to be very careful with some details .
compared with the inverse of the bijective bwt , the inverse of the bijective st is more involved
.    * outline . *
the paper is organized as follows . in section  [ sec : prelim ] we fix some notation and repeat basic facts about combinatorics on words . on our way to the bijective sort transform ( section  [ sec : lst ] ) we investigate the bwt ( section  [ sec : bwt ] ) , the bijective bwt ( section  [ sec : lbwt ] ) , and the sort transform ( section  [ sec : st ] ) .
we give full constructive proofs for the injectivity of the respective transforms .
each section ends with a running example which illustrates the respective concepts .
apart from basic combinatorics on words , the paper is completely self - contained .
throughout this paper we fix the finite non - empty alphabet @xmath4 and assume that @xmath4 is equipped with a linear order @xmath5 . a _ word _ is a sequence @xmath6 of letters @xmath7 , @xmath8 .
the set of all such sequences is denoted by @xmath9 ; it is the free monoid over  @xmath4 with concatenation as composition and with the empty word @xmath10 as neutral element .
the set @xmath11 consists of all non - empty words . for words
@xmath12 we write @xmath13 if @xmath14 or if @xmath15 is lexicographically smaller than @xmath16 with respect to the order @xmath5 on the letters .
let @xmath17 be a non - empty word with letters @xmath18 .
the _ length _ of @xmath19 , denoted by @xmath20 , is @xmath0 .
the empty word is the unique word of length @xmath21 .
we can think of @xmath19 as a labeled linear order : position @xmath22 of @xmath19 is labeled by @xmath18 and in this case we write @xmath23 , so each word @xmath19 induces a labeling function @xmath24 .
the first letter @xmath25 of @xmath19 is denoted by @xmath26 while the last letter @xmath27 is denoted by @xmath28 .
the _ reversal _ of a word @xmath19 is @xmath29 .
we say that two words @xmath12 are _ conjugate _ if @xmath30 and @xmath31 for some words @xmath32 , i.e. , @xmath15 and @xmath16 are cyclic shifts of one another .
the @xmath33-fold concatenation of @xmath19 with itself is denoted by @xmath34 .
a word @xmath15 is a _ root _ of @xmath19 if @xmath35 for some @xmath36 .
a word @xmath19 is _ primitive _ if @xmath35 implies @xmath37 and hence @xmath38 , i.e. , @xmath19 has only the trivial root @xmath19 .
the _ right - shift _ of @xmath39 is @xmath40 and the @xmath22-fold right shift  @xmath41 is defined inductively by @xmath42 and @xmath43 .
we have @xmath44 for @xmath45 .
the word @xmath41 is also well - defined for  @xmath46 and then @xmath47 where @xmath48 .
we define the _ ordered conjugacy class _ of a word @xmath49 as @xmath50 = ( w_1 , \ldots , w_n)$ ] where @xmath51 .
it is convenient to think of  @xmath50 $ ] as a cycle of length @xmath0 with a pointer to a distinguished starting position .
every position @xmath22 , @xmath8 , on this cycle is labeled by @xmath52 . in particular
, @xmath25 is a successor of @xmath27 on this cycle since the position @xmath1 is a successor of the position @xmath0
. the mapping @xmath53 moves the pointer to its predecessor .
the ( unordered ) conjugacy class of @xmath19 is the multiset @xmath54 . whenever there is no confusion , then by abuse of notation we also write @xmath50 $ ] to denote the ( unordered ) conjugacy class of @xmath19 .
for instance , this is the case if @xmath19 is in some way distinguished within its conjugacy class , which is true if @xmath19 is a lyndon word .
a _ lyndon word _ is a non - empty word which is the unique lexicographic minimal element within its conjugacy class .
more formally , let @xmath50 = ( w , w_2 , \ldots , w_n)$ ] , then @xmath55 is a lyndon word if @xmath56 for all @xmath57 .
lyndon words have a lot of nice properties @xcite .
for instance , lyndon words are primitive .
another interesting fact is the following .
[ thm : lyndon ] every word @xmath58 has a unique factorization @xmath59 such that @xmath60 is a non - decreasing sequence of lyndon words .
an alternative formulation of the above fact is that every word @xmath19 has a unique factorization @xmath61 where @xmath62 for all @xmath22 and where @xmath63 is a strictly increasing sequence of lyndon words .
the factorization of @xmath19 as in fact  [ thm : lyndon ] is called the _ lyndon factorization _ of @xmath19 .
it can be computed in linear time using duval s algorithm @xcite .
suppose we are given a multiset @xmath64 of lyndon words enumerated in non - decreasing order @xmath65 .
now , @xmath66 uniquely determines the word @xmath67 .
therefore , the lyndon factorization induces a one - to - one correspondence between arbitrary words of length @xmath0 and multisets of lyndon words of total length @xmath0 . of course , by definition of lyndon words , the multiset @xmath68 of lyndon words and the multiset @xmath69 , \ldots , [ v_s]}\right\}}$ ] of conjugacy classes of lyndon words are also in one - to - one correspondence .
we extend the order @xmath5 on @xmath4 as follows to non - empty words .
let @xmath70 be the infinite sequences obtained as the infinite power of @xmath19 .
for @xmath71 we write @xmath72 if either @xmath73 or @xmath74 and @xmath75 for @xmath76 , @xmath77 with @xmath78 , and infinite sequences @xmath79 ; phrased differently , @xmath72 means that the infinite sequences  @xmath80 and @xmath81 satisfy @xmath82 .
if @xmath15 and @xmath16 have the same length , then @xmath83 coincides with the lexicographic order induced by the order on the letters . for arbitrary words , @xmath83 is only a preorder since for example @xmath84 and @xmath85 . on the other hand , if @xmath86 and @xmath87 then @xmath88 .
hence , by the periodicity lemma @xcite , there exists a common root @xmath89 and @xmath90 such that @xmath91 and @xmath92 .
also note that @xmath93 whereas @xmath94 for @xmath78 .    intuitively , the _ context of order @xmath2 _ of @xmath19 is the sequence of the first @xmath2 letters of @xmath19 .
we want this notion to be well - defined even if @xmath95 .
to this end let @xmath96 be the prefix of length @xmath2 of @xmath97 , i.e. , @xmath96 consists of the first @xmath2 letters on the cycle @xmath50 $ ] .
note that our definition of a context of order @xmath2 is left - right symmetric to the corresponding notion used in data compression .
this is due to the fact that typical compression schemes are applying the bwt or the st to the reversal of the input .
an important construction in this paper is the _ standard permutation _
@xmath98 on the set of positions @xmath99 induced by a word @xmath100 @xcite .
the first step is to introduce a new order @xmath101 on the positions of @xmath19 by sorting the letters within @xmath19 such that identical letters preserve their order .
more formally , the linear order @xmath101 on @xmath102 is defined as follows : @xmath103 if @xmath104 let @xmath105 be the linearization of @xmath106 according to this new order .
now , the standard permutation @xmath98 is defined by @xmath107 .
[ exa : start ] consider the word @xmath108 over the ordered alphabet @xmath109 .
we have @xmath110 .
therefore , the positions in @xmath19 are @xmath111 . for instance , the label of position @xmath112 is @xmath113 .
its lyndon factorization is @xmath114 .
the context of order @xmath115 of the prefix @xmath116 of length @xmath117 is @xmath118 and the context of order @xmath115 of the factor @xmath119 is @xmath120 .
for computing the standard permutation we write @xmath19 column - wise , add positions , and then sort the pairs lexicographically :    [ cols="^,^,^",options="header " , ]     this yields the standard permutation @xmath121 the conjugacy class @xmath50 $ ] of @xmath19 is depicted in figure  [ sfg : w ] ; the @xmath22-th word in @xmath50 $ ] is written in the @xmath22-th row .
the last column of the matrix for @xmath50 $ ] is the reversal @xmath122 of @xmath19 .
the _ burrows - wheeler transform _ ( bwt ) maps words @xmath19 of length @xmath0 to pairs
@xmath123 where @xmath124 is a word of length @xmath0 and @xmath22 is an index in @xmath125 .
the word @xmath124 is usually referred to as the burrows - wheeler transform of @xmath19 . in particular , the bwt is not surjective .
we will see below how the bwt works and that it is one - to - one .
it follows that only a fraction of @xmath126 of all possible pairs @xmath123 appears as an image under the bwt . for instance @xmath127 where @xmath128 is not an image under the bwt .    for @xmath58
we define @xmath129 where @xmath130 $ ] and @xmath131 .
now , the burrows - wheeler transform of @xmath19 consists of the word @xmath132 and an index @xmath22 such that @xmath133 .
note that in contrast to the usual definition of the bwt , we are using right shifts ; at this point this makes no difference but it unifies the presentation of succeeding transforms . at first glance , it is surprising that one can reconstruct @xmath134 from @xmath135 . moreover , if we know the index @xmath22 of @xmath19 in the sorted list @xmath134 , then we can reconstruct @xmath19 from @xmath135 .
one way of how to reconstruct @xmath134 is presented in the following lemma . for later use , we prove a more general statement than needed for computing the inverse of the bwt .    [
lem : contextretrieval ] let @xmath136 .
let @xmath137 = { \left\{\mathinner{w_1 ,      \ldots , w_n}\right\ } } \subseteq \sigma^+$ ] be a multiset built from conjugacy classes @xmath138 $ ] .
let @xmath139 satisfy @xmath140 and let @xmath141 be the sequence of the last symbols .
then @xmath142 where @xmath143 denotes the @xmath144-fold application of @xmath145 and @xmath146 .
by induction over the context length @xmath144 , we prove that for all @xmath147 we have @xmath148 .
for @xmath149 we have @xmath150 and hence , the claim is trivially true .
let now @xmath151 . by the induction hypothesis ,
the  @xmath152-order context of each @xmath153 is @xmath154 . by applying one right - shift
, we see that the @xmath144-order context of @xmath155 is @xmath156 .
the list @xmath157 meets the sort order induced by @xmath2-order contexts .
in particular , @xmath158 is sorted by @xmath152-order contexts .
let @xmath159 be a stable sort by @xmath144-order contexts of the right - shifts @xmath160 .
the construction of @xmath159 only requires a sorting of the first letters of @xmath161 such that identical letters preserve their order .
the sequence of first letters of the words @xmath162 is exactly @xmath124 . by construction of @xmath163
, it follows that @xmath164 .
since @xmath157 is built from conjugacy classes , the multisets of elements occurring in @xmath158 and @xmath165 are identical .
the same holds for the multisets induced by @xmath166 and @xmath159 .
therefore , the sequences of @xmath144-order contexts induced by @xmath167 and @xmath168 are identical .
moreover , we conclude @xmath169 which completes the induction .
we note that in general @xmath170 since the sort order of @xmath157 beyond @xmath2-order contexts is arbitrary .
moreover , for @xmath171 the property @xmath172 does not need to hold ( even though the multisets of @xmath173-order contexts coincide ) .
note that in lemma  [ lem : contextretrieval ] we do not require that all @xmath174 have the same length .
applying the bwt to conjugacy classes of words with different lengths has also been used for the _ extended bwt _ @xcite .
the bwt is invertible , i.e. , given @xmath175 where @xmath22 is the index of  @xmath19 in @xmath134 one can reconstruct the word @xmath19 .
we set @xmath176 .
let @xmath177 and @xmath178 .
now , by lemma  [ lem : contextretrieval ] we see that @xmath179 in particular , @xmath180 only depends on @xmath124 and @xmath22 .    in the special case of the bwt it is possible to compute the @xmath22-th element @xmath153 of @xmath134 by using the inverse @xmath181 of the permutation @xmath163 : @xmath182 this justifies the usual way of computing the inverse of @xmath175 from right to left ( by using the restriction of @xmath181 to the cycle containing the element @xmath22 ) .
the motivation is that the ( required cycle of the ) inverse @xmath181 seems to be easier to compute than the standard permutation @xmath163 .
[ exa : bwt ] we compute the bwt of @xmath108 from example  [ exa : start ] .
the lexicographically sorted list @xmath134 can be found in figure  [ sfg : m ] .
this yields the transform @xmath183 where @xmath178 is the last column of the matrix @xmath134 and @xmath19 is the @xmath22-th row in @xmath134 .
the standard permutation of @xmath124 is @xmath184 now , @xmath185 gives us the following sequence of positions starting with @xmath186 : @xmath187 applying the labeling function @xmath188 to this sequence of positions yields @xmath189 i.e. , we have successfully reconstructed the input @xmath19 from @xmath175 .
now we are ready to give a comprehensive description of scott s bijective variant of the bwt and to prove its correctness .
it maps a word of length  @xmath0 to a word of length  @xmath0without any index or end - of - string symbol being involved .
the key ingredient is the lyndon factorization : suppose we are computing the bwt of a lyndon word @xmath16 , then we do not need an index since we know that @xmath16 is the first element of the list @xmath190 .
this leads to the computation of a multi - word bwt of the lyndon factors of the input .
the bijective bwt of a word @xmath19 of length @xmath0 is defined as follows .
let @xmath191 with @xmath192 be the lyndon factorization of @xmath19 .
let @xmath193 where @xmath194 and where the multiset @xmath195 $ ] .
then , the bijective bwt of @xmath19 is @xmath196 .
the _ s _ in @xmath197 is for _ scottified_. note that if @xmath19 is a power of a lyndon word , then @xmath198 .    in some sense
, the bijective bwt can be thought of as the composition of the lyndon factorization @xcite with the inverse of the gessel - reutenauer transform @xcite . in particular , a first step towards a bijective bwt can be found in a 1993 article by gessel and reutenauer @xcite ( prior to the publication of the bwt @xcite ) .
the link between the gessel - reutenauer transform and the bwt was pointed out later by crochemore et al
. a similar approach as in the bijective bwt has been employed by mantaci et al .
@xcite ; instead of the lyndon factorization they used a decomposition of the input into blocks of equal length .
the output of this variant is a word and a sequence of indices ( one for each block ) . in its current form
, the bijective bwt has been proposed by scott @xcite in a newsgroup posting in 2007 .
gil and scott gave an accessible version of the transform , an independent proof of its correctness , and they tested its performance in data compression @xcite .
the outcome of these tests is that the bijective bwt beats the usual bwt on almost all files of the calgary corpus @xcite by at least a few hundred bytes which exceeds the gain of just saving the rotation index .
[ lem : cycleretrieval ] let @xmath191 with @xmath192 be the lyndon factorization of  @xmath19 , let @xmath193 , and let @xmath199 .
consider the cycle @xmath200 of the permutation @xmath163 which contains the element @xmath1 and let @xmath201 be the length of @xmath200 . then @xmath202 .    by lemma  [ lem : contextretrieval ]
we see that @xmath203 .
since @xmath204 is primitive it follows @xmath205 for some @xmath206 . in particular , the lyndon factorization of @xmath19 ends with @xmath207 .
let @xmath208 be the subsequence of @xmath209 which consists of those @xmath210 which come from this last factor @xmath207 .
the sequence @xmath208 contains each right - shift of @xmath204 exactly @xmath211 times .
moreover , the sort - order within @xmath208 depends only on @xmath212-order contexts .
the element @xmath213 is the first element in @xmath208 since @xmath204 is a lyndon word . in particular
, @xmath214 is the first occurrence of @xmath215 within @xmath208 .
suppose @xmath216 is the first occurrence of @xmath217 within @xmath208 .
let @xmath218 be the indices of all occurrences of @xmath217 in @xmath208 . by construction of @xmath163 , we have @xmath219 and therefore @xmath220 is the first occurrence of @xmath221 within @xmath208 .
inductively , @xmath216 always refers to the first occurrence of @xmath217 within @xmath208 ( for all @xmath222 ) . in particular
it follows that @xmath223 and @xmath224 .
[ thm : bijbwt ] the bijective bwt is invertible , i.e. , given @xmath225 one can reconstruct the word @xmath19 .
let @xmath199 and let @xmath191 with @xmath226 be the lyndon factorization of @xmath19 .
each permutation admits a cycle structure .
we decompose the standard permutation @xmath163 into cycles @xmath227 .
let @xmath228 be the smallest element of the cycle @xmath229 and let @xmath230 be the length of @xmath229 .
we can assume that @xmath231 .
we claim that @xmath232 , @xmath233 , and @xmath234 . by lemma  [ lem : cycleretrieval ]
we have @xmath235 .
let @xmath236 denote the restriction of @xmath163 to the set @xmath237 , where by abuse of notation @xmath238 denotes the set of all elements occurring in @xmath239 .
let @xmath240 .
the word @xmath241 can be obtained from @xmath124 by removing all positions occurring in the cycle @xmath242 .
this yields a monotone bijection @xmath243 such that @xmath244 and @xmath245 for all @xmath246 .
in particular , @xmath247 has the same cycle structure as @xmath236 and @xmath248 is the sequence of the minimal elements within the cycles . by induction on the number of lyndon factors ,
@xmath249 appending @xmath250 to the last line allows us to reconstruct @xmath19 by @xmath251 moreover , @xmath252 and @xmath233 .
we note that this formula for @xmath19 only depends on @xmath124 and does not require any index to an element in @xmath209 .
[ exa : bijbwt ] we again consider the word @xmath108 from example  [ exa : start ] and its lyndon factorization @xmath253 where @xmath254 , @xmath255 , @xmath256 , @xmath257 , @xmath258 , and @xmath259 .
the lists @xmath260 , \ldots , [ v_6])$ ] and @xmath209 are :    r|*5p1.75mm| & + & @xmath261 & & & & + & @xmath261 & @xmath261 & @xmath262 & & + & @xmath262 & @xmath261 & @xmath261 & & + & @xmath261 & @xmath262 & @xmath261 & & + & @xmath261 & @xmath262 & @xmath262 & & + & @xmath262 & @xmath261 & @xmath262 & & + & @xmath262 & @xmath262 & @xmath261 & & + & @xmath262 & @xmath263 & & & + & @xmath263 & @xmath262 & & & + & @xmath262 & @xmath263 & & & + & @xmath263 & @xmath262 & & & + & @xmath262 & @xmath263 & @xmath262 & @xmath263 & @xmath263 + & @xmath263 & @xmath262 & @xmath263 & @xmath262 & @xmath263 + & @xmath263 & @xmath263 & @xmath262 & @xmath263 & @xmath262 + & @xmath262 & @xmath263 & @xmath263 & @xmath262 & @xmath263 + & @xmath263 & @xmath262 & @xmath263 & @xmath263 & @xmath262 +    r|*5p1.75mm| & + & @xmath261 & & & & + & @xmath261 & @xmath261 & @xmath262 & & + & @xmath261 & @xmath262 & @xmath261 & & + & @xmath261 & @xmath262 & @xmath262 & & + & @xmath262 & @xmath261 & @xmath261 & & + & @xmath262 & @xmath261 & @xmath262 & & + & @xmath262 & @xmath262 & @xmath261 & & + & @xmath262 & @xmath263 & & & + & @xmath262 & @xmath263 & & & + & @xmath262 & @xmath263 & @xmath262 & @xmath263 & @xmath263 + & @xmath262 & @xmath263 & @xmath263 & @xmath262 & @xmath263 + & @xmath263 & @xmath262 & & & + & @xmath263 & @xmath262 & & & + & @xmath263 & @xmath262 & @xmath263 & @xmath262 & @xmath263 + & @xmath263 & @xmath262 & @xmath263 & @xmath263 & @xmath262 + & @xmath263 & @xmath263 & @xmath262 & @xmath263 & @xmath262 +    hence , we obtain @xmath264 as the sequence of the last symbols of the words in @xmath209 .
the standard permutation @xmath163 induced by @xmath124 is @xmath265 the cycles of @xmath163 arranged by their smallest elements are @xmath266 , @xmath267 , @xmath268 , @xmath269 , @xmath270 , and @xmath271 .
applying the labeling function @xmath188 to the cycle @xmath272 ( starting with the second element ) yields the lyndon factor @xmath174 . with this procedure , we reconstructed @xmath273 from @xmath199 .
[ sec : st ]    the _ sort transform _
( st ) is a bwt where we only sort the conjugates of the input up to a given depth @xmath2 and then we are using the index of the conjugates as a tie - breaker . depending on the depth @xmath2 and the implementation details this can speed up compression ( while at the same time slightly slowing down decompression ) .
in contrast to the usual presentation of the st , we are using right shifts .
this defines a slightly different version of the st .
the effect is that the order of the symbols occurring in some particular context is reversed .
this makes sense , because in data compression the st is applied to the reversal of a word .
hence , in the st of the reversal of @xmath19 the order of the symbols in some particular context is the same as in @xmath19 . more formally ,
suppose @xmath274 for @xmath275 then in the sort transform of order @xmath276 of @xmath19 , the order of the occurrences of the letters @xmath52 is not changed .
this property can enable better compression ratios on certain data .    while the standard permutation is induced by a sequence of letters ( i.e.
, a word ) we now generalize this concept to sequences of words . for a list of non - empty words
@xmath277 we now define the _ @xmath2-order standard permutation _
@xmath278 induced by @xmath66 . as for the standard permutation ,
the first step is the construction of a new linear order @xmath101 on @xmath102 .
we define @xmath103 by the condition @xmath279 let @xmath105 be the linearization of @xmath102 according to this new order .
the idea is that we sort the line numbers of @xmath280 by first considering the @xmath2-order contexts and , if these are equal , then use the line numbers as tie - breaker . as before , the linearization according to @xmath101 induces a permutation @xmath278 by setting @xmath281 .
now , @xmath282 is the position of @xmath174 if we are sorting @xmath66 by @xmath2-order context such that the line numbers serve as tie - breaker .
we set @xmath283 where @xmath284 .
now , we are ready to define the sort transform of order @xmath2 of a word  @xmath19 : let @xmath285 ) = ( w_1 , \ldots , w_n)$ ] ; then @xmath286 , i.e. , we first sort all cyclic right - shifts of @xmath19 by their @xmath2-order contexts ( by using a stable sort method ) and then we take the sequence of last symbols according to this new sort order as the image under @xmath287 . since the tie - breaker relies on right - shifts , we have @xmath288 , i.e. , @xmath289 is the reversal mapping . the @xmath2-order
sort transform of @xmath19 is the pair @xmath290 where @xmath22 is the index of @xmath19 in @xmath285)$ ] . as for the bwt
, we see that the @xmath2-order sort transform is not bijective .
next , we show that it is possible to reconstruct @xmath285)$ ] from @xmath291 . hence , it is possible to reconstruct @xmath19 from the pair @xmath290 where @xmath22 is the index of  @xmath19 in  @xmath285)$ ] .
the presentation of the back transform is as follows .
first , we will introduce the _
@xmath2-order context graph _ @xmath292 and we will show that it is possible to rebuild  @xmath285)$ ] from @xmath292
. then we will show how to construct @xmath292 from @xmath291 .
again , the approach will be slightly more general than required at the moment ; but we will be able to reuse it in the presentation of a bijective st .
let @xmath293 , \ldots , [ u_s ] ) = ( v_1 , \ldots , v_n)$ ] be a list of words built from conjugacy classes @xmath294 $ ] of non - empty words @xmath210 .
let @xmath139 be an arbitrary permutation of the elements in @xmath66 .
we are now describing the edge - labeled directed graph   @xmath2-order context graph of @xmath157    which will be used later as a presentation tool for the inverses of the st and the bijective st .
the vertices of @xmath295 consist of all @xmath2-order contexts @xmath96 of words @xmath19 occurring in @xmath157 .
we draw an edge @xmath296 from context @xmath297 to context @xmath298 labeled by @xmath22 if @xmath299 and @xmath300 .
hence , every index @xmath301 of @xmath157 defines a unique edge in @xmath295 .
we can also think of @xmath302 as an additional implicit label of the edge @xmath296 , since @xmath303 .    a _ configuration _
@xmath304 of the @xmath2-order context graph @xmath295 consists of a subset of the edges @xmath305 and a vertex @xmath263 .
the idea is that ( starting at context @xmath263 ) we are walking along the edges of @xmath295 and whenever an edge is used , it is removed from the set of edges @xmath305 .
we now define the transition @xmath306 from a configuration @xmath307 to another configuration @xmath308 with output @xmath309 more formally .
if there exists an edge in @xmath310 starting at @xmath297 and if @xmath311 is the unique edge with the smallest label @xmath22 starting at @xmath297 , then we have the single - step transition @xmath312 if there is no edge in @xmath310 starting at @xmath297 , then the outcome of @xmath313 is undefined .
inductively , we define @xmath314 and for @xmath315 and @xmath316 we have @xmath317 for some configuration @xmath318 .
hence , the reversal @xmath319 is the label along the path of length @xmath320 starting at configuration @xmath307 . in particular ,
if @xmath321 holds , then it is possible to chase at least @xmath322 transitions starting at @xmath307 ; vice versa , if we are chasing @xmath323 transitions then we obtain a word of length @xmath323 as a label .
we note that successively taking the edge with the smallest label comes from the use of right - shifts .
if we had used left - shifts we would have needed to chase largest edges for the following lemma to hold .
the reverse labeling of the big - step transitions is motivated by the reconstruction procedure which will work from right to left .
[ lem : smallestedgechasing ] let @xmath136 , @xmath324 , \ldots , [ v_s])$ ] , @xmath325 , and @xmath326 .
let @xmath310 consist of all edges of @xmath327 .
then @xmath328      & \ \ \vdots \\      ( \mathcal{c}_s , c_s ) & \stackrel{v_s}{\to } ( \mathcal{c}_{s+1},c_s ) .
\end{aligned}\ ] ]    let @xmath329 .
consider some index @xmath22 , @xmath330 , and let @xmath331 , \ldots ,    [ v_{i-1}])$ ] .
suppose that @xmath332 consists of all edges of @xmath327 except for those with labels @xmath333 for @xmath334 .
let @xmath335 .
we write @xmath336 and @xmath337 , i.e. , @xmath138 = ( u_{t+1 } , \ldots ,    u_{t+q})$ ] . starting with @xmath338 , we show that the sequence of transitions @xmath339 is defined .
more precisely , we will see that the transition @xmath340 walks along the edge @xmath341 and hence indeed is labeled with the letter @xmath342 .
consider the context @xmath343 . by induction
, we have @xmath344 and no edge with label @xmath345 for @xmath346 occurs in  @xmath347 while all other labels do occur . in particular , @xmath348 for @xmath349 is an edge in @xmath347 ( where @xmath350 only holds for @xmath351 ; we will consider the case @xmath352 below ) .
suppose there were an edge @xmath353 with @xmath354 .
then @xmath355 and hence , @xmath356 has the same @xmath2-order context as @xmath357 .
but in this case , in the construction of @xmath358 we used the index in @xmath66 as a tie - breaker .
it follows @xmath359 which contradicts the properties of @xmath347 .
hence , @xmath348 is the edge with the smallest label starting at context @xmath343 .
therefore , @xmath360 and @xmath340 indeed walks along the edge @xmath348 .
it remains to verify that @xmath361 , but this is clear since @xmath362 .    [
lem : reconstructingg ] let @xmath136 , @xmath324 , \ldots , [ v_s])$ ] , @xmath363 , and @xmath364
. then it is possible to reconstruct @xmath295 from @xmath124 .    by lemma  [ lem : contextretrieval ] it is possible to reconstruct the contexts @xmath365 .
this gives the vertices of the graph @xmath295 .
write @xmath366 . for each @xmath367
we draw an edge @xmath368 .
this yields the edges of @xmath295 .
the @xmath2-order st is invertible , i.e. , given @xmath290 where @xmath22 is the index of @xmath19 in @xmath285)$ ] one can reconstruct the word @xmath19 .
the construction of @xmath19 consists of two phases .
first , by lemma  [ lem : reconstructingg ] we can compute @xmath369))$ ] . by lemma  [ lem : contextretrieval ] we can compute @xmath370 from @xmath290 . in the second stage , we are using lemma  [ lem : smallestedgechasing ] for reconstructing @xmath19 by chasing @xmath371 where @xmath305 consists of all edges in @xmath369))$ ] .
efficient implementations of the inverse transform rely on the fact that the @xmath2-order contexts of @xmath285)$ ] are ordered .
this allows the implementation of the @xmath2-order context graph @xmath292 in a vectorized form @xcite .
[ exa : st ] we compute the sort transform of order @xmath372 of @xmath108 from example  [ exa : start ] .
the list @xmath373)$ ] is depicted in figure  [ sfg : m2 ] .
this yields the transform @xmath374 where @xmath375 is the last column of the matrix  @xmath373)$ ] and @xmath19 is the @xmath22-th element in @xmath373)$ ] .
next , we show how to reconstruct the input @xmath19 from @xmath123 .
the standard permutation induced by @xmath124 is @xmath376 note that @xmath163 has four cycles @xmath377 , @xmath378 , @xmath379 , and @xmath380 .
we obtain the context of order @xmath372 of the @xmath33-th word by @xmath381 .
in particular , @xmath382 , @xmath383 , @xmath384 , @xmath385 , @xmath386 , @xmath387 , @xmath388 , and @xmath389 . with @xmath124 and these contexts we can construct the graph @xmath390)$ ] .
the vertices of @xmath327 are the contexts and the edge - labels represent positions in @xmath124 .
the graph @xmath327 is depicted below :    ( 0,0 ) node[circle , draw , inner sep=2.5pt ] ( ba ) @xmath391 ; ( 3,0 ) node[circle , draw , inner sep=2.5pt ] ( aa ) @xmath392 ; ( 6,0 ) node[circle , draw , inner sep=2.5pt ] ( ca ) @xmath393 ; ( 9,0 ) node[circle , draw , inner sep=2.5pt ] ( cb ) @xmath394 ; ( 0,3 ) node[circle , draw , inner sep=2.5pt ] ( bb ) @xmath395 ; ( 3,3 ) node[circle , draw , inner sep=2.5pt ] ( ab ) @xmath396 ; ( 6,3 ) node[circle , draw , inner sep=2.5pt ] ( bc ) @xmath119 ; ( 9,3 ) node[circle , draw , inner sep=2.5pt ] ( cc ) @xmath397 ;    ( aa )
node[above ] @xmath1 ( ba ) ; ( ab ) .. controls ( 1.25,1.75 )
.. node[sloped , above ] @xmath372 ( ba ) ; ( ab )
node[left ] @xmath398 ( aa ) ; ( ab )
node[above right ] @xmath399 ( ca ) ; ( ba ) .. controls ( 1.75,1.25 )
.. node[sloped , above ] @xmath117 ( ab ) ; ( ba )
node[left ] @xmath112 ( bb ) ; ( bb )
node[above ] @xmath115 ( ab ) ; ( bc )
node[above ] @xmath400 ( ab ) ; ( bc )
node[sloped , above ] @xmath401 ( cb ) ; ( bc ) .. controls ( 8,2 ) ..
node[sloped , above ] @xmath402 ( cb ) ; ( bc ) .. controls ( 8.5,2.5 ) .. node[sloped , above ] @xmath403 ( cb ) ; ( ca )
node[left ] @xmath404 ( bc ) ; ( cb ) .. controls ( 7,1 ) .. node[sloped , above ] @xmath405 ( bc ) ; ( cb )
node[right ] @xmath406 ( cc ) ; ( cb ) .. controls ( 6.5,0.5 )
.. node[sloped , above ] @xmath407 ( bc ) ; ( cc )
node[above ] @xmath408 ( bc ) ;    we are starting at the context @xmath409 and then we are traversing @xmath327 along the smallest edge - label amongst the unused edges . the sequence of the edge labels obtained this way is @xmath410 the labeling of this sequence of positions yields @xmath411 . since we are constructing the input from right to left , we obtain @xmath108 .
the bijective sort transform combines the lyndon factorization with the st .
this yields a new algorithm which serves as a similar preprocessing step in data compression as the bwt . in a lot of applications
, it can be used as a substitute for the st .
the proof of the bijectivity of the transform is slightly more technical than the analogous result for the bijective bwt .
the main reason is that the bijective sort transform is less modular than the bijective bwt ( which can be grouped into a ` lyndon factorization part ' and a ` gessel - reutenauer transform part ' and which for example allows the use of different orders on the alphabet for the different parts ) .    for the description of the bijective st and of its inverse , we rely on notions from section  [ sec : sorttransform ] .
the bijective st of a word @xmath19 of length @xmath0 is defined as follows .
let @xmath67 with @xmath192 be the lyndon factorization of @xmath19 .
let @xmath412 , \ldots , [ v_s ] ) = ( u_1 , \ldots , u_n)$ ]
. then the bijective st of order @xmath2 of @xmath19 is @xmath413 .
that is , we are sorting the conjugacy classes of the lyndon factors by @xmath2-order contexts and then take the sequence of the last letters . the letter _
l _ in @xmath414 is for _
[ thm : bijst ] the bijective st of order @xmath2 is invertible , i.e. , given @xmath415 one can reconstruct the word @xmath19 .
let @xmath191 with @xmath192 be the lyndon factorization of @xmath19 , let @xmath416 , and let @xmath417 . by lemma  [ lem : reconstructingg ]
we can rebuild the @xmath2-order context graph @xmath418 , \ldots , [ v_s ] ) ) =    ( w_1 , \ldots , w_n)$ ] from @xmath124 .
let @xmath310 consist of all edges in @xmath327 .
then by lemma  [ lem : smallestedgechasing ] we see that @xmath419      & \ \ \vdots \\      ( \mathcal{c}_s , c_s ) & \stackrel{v_s}{\to } ( \mathcal{c}_{s+1},c_s ) .
\end{aligned}\ ] ] we can not use this directly for the reconstruction of @xmath19 since we do not know the lyndon factors @xmath174 and the contexts @xmath420 .    the word @xmath204 is the first element in the list @xmath412 , \ldots ,    [ v_s])$ ] because @xmath204 is lexicographically minimal and it appears as the first element in the list @xmath260 , \ldots , [ v_s])$ ] .
therefore , by lemma  [ lem : contextretrieval ] we obtain @xmath421 .
the reconstruction procedure works from right to left .
suppose we have already reconstructed @xmath422 for @xmath423 with @xmath424 being a ( possibly empty ) suffix of @xmath425 .
moreover , suppose we have used the correct contexts @xmath426 .
consider the configuration @xmath318 defined by @xmath419      & \ \ \vdots \\      ( \mathcal{c}_j , c_j ) & \stackrel{v_j}{\to } ( \mathcal{c}_{j+1},c_j ) \\
( \mathcal{c}_{j+1},c_{j+1 } ) & \stackrel{w'}{\to } ( \mathcal{c}',c ' )    \end{aligned}\ ] ] we assume that the following invariant holds : @xmath427 contains no edges @xmath428 with @xmath429 .
we want to rebuild the next letter .
we have to consider three cases .
first , if @xmath430 then @xmath431 yields the next letter @xmath261 such that @xmath432 is a suffix of @xmath425 .
second , let @xmath433 and suppose that there exists an edge @xmath434 starting at @xmath435 . then there exists a word @xmath436 in @xmath437 ,    \ldots , [ v_s]$ ] such that @xmath438 . if @xmath439 then from the invariant it follows that @xmath440 .
this is a contradiction , since @xmath441 is minimal among the words in @xmath437 , \ldots , [ v_s]$ ] .
hence , @xmath442 and the invariant still holds for @xmath443 .
the last letter @xmath261 of @xmath441 is obtained by @xmath444 the third case is @xmath433 and there is no edge @xmath434 starting at @xmath435 . as before , @xmath441 is minimal among the ( remaining ) words in @xmath437 , \ldots , [ v_s]$ ] . by construction of @xmath327 , the unique edge @xmath445 with the minimal label @xmath323 has the property that @xmath446 . in particular ,
since @xmath441 is minimal , the invariant for @xmath448 is established . in this case , the last letter @xmath261 of @xmath441 is obtained by @xmath449 we note that we can not distinguish between the first and the second case since we do not know the length of @xmath425 , but in both cases , the computation of the next symbol is identical . in particular ,
in contrast to the bijective bwt we do not implicitly recover the lyndon factorization of @xmath19 .
we note that the proof of theorem  [
thm : bijst ] heavily relies on two design criteria .
the first one is to consider @xmath412 , \ldots , [ v_s])$ ] rather than @xmath450 , \ldots , [ v_1])$ ] , and the second is to use right - shifts rather than left - shifts .
the proof of theorem  [ thm : bijst ] yields the following algorithm for reconstructing @xmath19 from @xmath451 :    1 .
compute the @xmath2-order context graph @xmath452 and the @xmath2-order context @xmath297 of the last lyndon factor of @xmath19 .
2 .   start with the configuration @xmath304 where @xmath305 contains all edges of @xmath327 and @xmath453 .
3 .   if there exists an outgoing edge starting at @xmath263 in the set @xmath305 , then * let @xmath454 be the edge with the minimal label @xmath323 starting at @xmath263 .
* output @xmath455 . *
set @xmath456 and @xmath457 .
* continue with step ( 3 ) .
4 .   if there is no outgoing edge starting at @xmath263 in the set @xmath305 , but @xmath458 , then * let @xmath459 be the edge with the minimal label @xmath323
. * output @xmath455 . * set @xmath460 and @xmath461 . * continue with step ( 3 ) .
the algorithm terminates as soon as @xmath462 .
the sequence of the outputs is the reversal @xmath122 of the word @xmath19 .
we consider the word @xmath108 from example  [ exa : start ] and its lyndon factorization @xmath253 where @xmath254 , @xmath255 , @xmath256 , @xmath257 , @xmath258 , and @xmath259 .
for this particular word @xmath19 the bijective burrows - wheeler transform and the bijective sort transform of order @xmath372 coincide . from example
[ exa : bijbwt ] , we know @xmath463 and the standard permutation @xmath163 .
as in example  [ exa : st ] we can reconstruct the @xmath372-order contexts @xmath464 of @xmath465,\ldots,[v_6])$ ] : @xmath466 , @xmath467 , @xmath468 , @xmath385 , @xmath469 , @xmath470 , and @xmath471 . with @xmath124 and the @xmath372-order contexts
we can construct the graph @xmath472,\ldots,[v_6]))$ ] :    ( 0,0 ) node[circle , draw , inner sep=2.5pt ] ( ba ) @xmath391 ; ( 3,0 ) node[circle , draw , inner sep=2.5pt ] ( aa ) @xmath392 ; ( 9,0 ) node[circle , draw , inner sep=2.5pt ] ( cb ) @xmath394 ; ( 0,3 ) node[circle , draw , inner sep=2.5pt ] ( bb ) @xmath395 ; ( 3,3 ) node[circle , draw , inner sep=2.5pt ] ( ab ) @xmath396 ; ( 6,3 ) node[circle , draw , inner sep=2.5pt ] ( bc ) @xmath119 ; ( 9,3 ) node[circle , draw , inner sep=2.5pt ] ( cc ) @xmath397 ;    ( aa ) .. controls ( 4,-0.5 ) and ( 4,+0.5 ) .. node[right ] @xmath1 ( aa ) ; ( aa )  node[above ] @xmath372 ( ba ) ; ( ab )
 node[left ] @xmath398 ( aa ) ; ( ab ) .. controls ( 1.25,1.75 )
.. node[sloped , above ] @xmath399 ( ba ) ; ( ba ) .. controls ( 1.75,1.25 )
.. node[sloped , above ] @xmath117 ( ab ) ; ( ba )
node[left ] @xmath112 ( bb ) ; ( bb )  node[above ] @xmath115 ( ab ) ; ( bc ) .. controls ( 7,1 )
.. node[sloped , above ] @xmath400 ( cb ) ; ( bc )
node[sloped , above ] @xmath401 ( cb ) ; ( bc ) .. controls ( 8,2 )
.. node[sloped , above ] @xmath402 ( cb ) ; ( bc ) .. controls ( 8.5,2.5 ) ..
node[sloped , above ] @xmath403 ( cb ) ; ( cb ) .. controls ( 6.5,0.5 ) .. node[sloped , above ] @xmath404 ( bc ) ; ( cb ) .. controls ( 6.0,0.0 )
.. node[sloped , above ] @xmath405 ( bc ) ; ( cb )
node[right ] @xmath406 ( cc ) ; ( cb ) .. controls ( 5.5,-0.5 ) .. node[sloped , above ] @xmath407 ( bc ) ; ( cc )
node[above ] @xmath408 ( bc ) ;    we are starting with the edge with label @xmath1 and then we are traversing @xmath327 along the smallest unused edges .
if we end in a context with no outgoing unused edges , then we are continuing with the smallest unused edge .
this gives the sequence @xmath473 after which we end in context @xmath392 with no unused edges available .
then we continue with the sequences @xmath474 and @xmath475 .
the complete sequence of edge labels obtained this way is @xmath476 and the labeling of this sequence with @xmath188 yields @xmath477 . as for the st
, we are reconstructing the input from right to left , and hence we get @xmath108 .
we discussed two bijective variants of the burrows - wheeler transform ( bwt ) .
the first one is due to scott . roughly speaking , it is a combination of the lyndon factorization and the gessel - reuternauer transform .
the second variant is derived from the sort transform ( st ) ; it is the main contribution of this paper .
we gave full constructive proofs for the bijectivity of both transforms .
as a by - product , we provided algorithms for the inverse of the bwt and the inverse of the st .
for the latter , we introduced an auxiliary graph structure  the @xmath2-order context graph .
this graph yields an intermediate step in the computation of the inverse of the st and the bijective st .
it can be seen as a generalization of the cycle decomposition of the standard permutation  which in turn can be used as an intermediate step in the computation of the inverse of the bwt and the bijective bwt .
* acknowledgments . *
the author would like to thank yossi gil and david a.  scott for many helpful discussions on this topic as well as alexander lauser , antonio restivo , and the anonymous referees for their numerous suggestions which improved the presentation of this paper .