How do Golomb Coded Sets work?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












From my understanding Golomb coded sets are a probabilistic data structure that encodes the deltas of an order set of elements.



With things like txids, which are evenly distributed, Golomb coded sets are an efficient way to encode things inside of a block.



What is the ordering used to determine how txids are encoded in the set? It seems we need a base txid, and then compute deltas from that original txid? Is it just as simple as the lowest big endian numeric interpretation of a txid in a block?










share|improve this question



























    up vote
    2
    down vote

    favorite












    From my understanding Golomb coded sets are a probabilistic data structure that encodes the deltas of an order set of elements.



    With things like txids, which are evenly distributed, Golomb coded sets are an efficient way to encode things inside of a block.



    What is the ordering used to determine how txids are encoded in the set? It seems we need a base txid, and then compute deltas from that original txid? Is it just as simple as the lowest big endian numeric interpretation of a txid in a block?










    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      From my understanding Golomb coded sets are a probabilistic data structure that encodes the deltas of an order set of elements.



      With things like txids, which are evenly distributed, Golomb coded sets are an efficient way to encode things inside of a block.



      What is the ordering used to determine how txids are encoded in the set? It seems we need a base txid, and then compute deltas from that original txid? Is it just as simple as the lowest big endian numeric interpretation of a txid in a block?










      share|improve this question















      From my understanding Golomb coded sets are a probabilistic data structure that encodes the deltas of an order set of elements.



      With things like txids, which are evenly distributed, Golomb coded sets are an efficient way to encode things inside of a block.



      What is the ordering used to determine how txids are encoded in the set? It seems we need a base txid, and then compute deltas from that original txid? Is it just as simple as the lowest big endian numeric interpretation of a txid in a block?







      neutrino






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 16 mins ago









      Murch♦

      34k26110315




      34k26110315










      asked 3 hours ago









      Chris Stewart

      579414




      579414




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          The data-structure is encoding a set which means it is not encoding an order.



          If you draw numbers uniformly at random from some universe then sort the result (thus destroying the order information), the differences between the numbers follow an exponential distribution. The GCS uses a golomb coder to efficiently store these differences. The sort method used is irrelevant so long as its consistent with the differencing method used.



          There is nothing probabilistic about the set encoding itself. But for BIP158 the set being encoded is not TXIDs but short hashes of relevant outputs. Because the hashes are short they can have collisions, making the result probabilistic.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "308"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f80481%2fhow-do-golomb-coded-sets-work%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            The data-structure is encoding a set which means it is not encoding an order.



            If you draw numbers uniformly at random from some universe then sort the result (thus destroying the order information), the differences between the numbers follow an exponential distribution. The GCS uses a golomb coder to efficiently store these differences. The sort method used is irrelevant so long as its consistent with the differencing method used.



            There is nothing probabilistic about the set encoding itself. But for BIP158 the set being encoded is not TXIDs but short hashes of relevant outputs. Because the hashes are short they can have collisions, making the result probabilistic.






            share|improve this answer
























              up vote
              2
              down vote













              The data-structure is encoding a set which means it is not encoding an order.



              If you draw numbers uniformly at random from some universe then sort the result (thus destroying the order information), the differences between the numbers follow an exponential distribution. The GCS uses a golomb coder to efficiently store these differences. The sort method used is irrelevant so long as its consistent with the differencing method used.



              There is nothing probabilistic about the set encoding itself. But for BIP158 the set being encoded is not TXIDs but short hashes of relevant outputs. Because the hashes are short they can have collisions, making the result probabilistic.






              share|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                The data-structure is encoding a set which means it is not encoding an order.



                If you draw numbers uniformly at random from some universe then sort the result (thus destroying the order information), the differences between the numbers follow an exponential distribution. The GCS uses a golomb coder to efficiently store these differences. The sort method used is irrelevant so long as its consistent with the differencing method used.



                There is nothing probabilistic about the set encoding itself. But for BIP158 the set being encoded is not TXIDs but short hashes of relevant outputs. Because the hashes are short they can have collisions, making the result probabilistic.






                share|improve this answer












                The data-structure is encoding a set which means it is not encoding an order.



                If you draw numbers uniformly at random from some universe then sort the result (thus destroying the order information), the differences between the numbers follow an exponential distribution. The GCS uses a golomb coder to efficiently store these differences. The sort method used is irrelevant so long as its consistent with the differencing method used.



                There is nothing probabilistic about the set encoding itself. But for BIP158 the set being encoded is not TXIDs but short hashes of relevant outputs. Because the hashes are short they can have collisions, making the result probabilistic.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 2 hours ago









                G. Maxwell

                1,691218




                1,691218



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f80481%2fhow-do-golomb-coded-sets-work%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery