Finding a binary prefix code provided lengths












0














Firstly, I am relatively new to this particular forum, and I usually use Stack exchange (maths). I do not know if this is the right place to post so please be aware in case, I should ask this question on a different stack exchange.



For the following numbers: 1,2,3,3,3. Find a binary prefix code for these lengths.



In my working out I realise by the sum of 3^x, where x is each of the respective numbers is {/frac 5/9}



Then with 3 symbols I have the following prefix code:



With length 1, I have the code 0. With length 2, I have the code 10. With 3 words that have length 3 I have the codes: 110, 111, 112.



I am asking this question because my tutor said that 112 was a possible code. I have only thought of this now, but since I am required to find a binary code how can there be a code 112? Should it not be something like 011? From my understanding, the code which is binary should only contain 0's and 1's.



I have attempted to contact my tutor but to no avail.



Any help would be welcome.



Thnx










share|cite|improve this question



























    0














    Firstly, I am relatively new to this particular forum, and I usually use Stack exchange (maths). I do not know if this is the right place to post so please be aware in case, I should ask this question on a different stack exchange.



    For the following numbers: 1,2,3,3,3. Find a binary prefix code for these lengths.



    In my working out I realise by the sum of 3^x, where x is each of the respective numbers is {/frac 5/9}



    Then with 3 symbols I have the following prefix code:



    With length 1, I have the code 0. With length 2, I have the code 10. With 3 words that have length 3 I have the codes: 110, 111, 112.



    I am asking this question because my tutor said that 112 was a possible code. I have only thought of this now, but since I am required to find a binary code how can there be a code 112? Should it not be something like 011? From my understanding, the code which is binary should only contain 0's and 1's.



    I have attempted to contact my tutor but to no avail.



    Any help would be welcome.



    Thnx










    share|cite|improve this question

























      0












      0








      0


      1





      Firstly, I am relatively new to this particular forum, and I usually use Stack exchange (maths). I do not know if this is the right place to post so please be aware in case, I should ask this question on a different stack exchange.



      For the following numbers: 1,2,3,3,3. Find a binary prefix code for these lengths.



      In my working out I realise by the sum of 3^x, where x is each of the respective numbers is {/frac 5/9}



      Then with 3 symbols I have the following prefix code:



      With length 1, I have the code 0. With length 2, I have the code 10. With 3 words that have length 3 I have the codes: 110, 111, 112.



      I am asking this question because my tutor said that 112 was a possible code. I have only thought of this now, but since I am required to find a binary code how can there be a code 112? Should it not be something like 011? From my understanding, the code which is binary should only contain 0's and 1's.



      I have attempted to contact my tutor but to no avail.



      Any help would be welcome.



      Thnx










      share|cite|improve this question













      Firstly, I am relatively new to this particular forum, and I usually use Stack exchange (maths). I do not know if this is the right place to post so please be aware in case, I should ask this question on a different stack exchange.



      For the following numbers: 1,2,3,3,3. Find a binary prefix code for these lengths.



      In my working out I realise by the sum of 3^x, where x is each of the respective numbers is {/frac 5/9}



      Then with 3 symbols I have the following prefix code:



      With length 1, I have the code 0. With length 2, I have the code 10. With 3 words that have length 3 I have the codes: 110, 111, 112.



      I am asking this question because my tutor said that 112 was a possible code. I have only thought of this now, but since I am required to find a binary code how can there be a code 112? Should it not be something like 011? From my understanding, the code which is binary should only contain 0's and 1's.



      I have attempted to contact my tutor but to no avail.



      Any help would be welcome.



      Thnx







      computability information-theory coding-theory binary






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked 18 hours ago









      princetongirl818

      808




      808






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I would think but cannot be certain that 112 is not a binary code because 2 is not a binary number, and that it should be 0's and 1's only. However I am not completely sure.






          share|cite|improve this answer





















            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            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%2fmath.stackexchange.com%2fquestions%2f3061678%2ffinding-a-binary-prefix-code-provided-lengths%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I would think but cannot be certain that 112 is not a binary code because 2 is not a binary number, and that it should be 0's and 1's only. However I am not completely sure.






            share|cite|improve this answer


























              1














              I would think but cannot be certain that 112 is not a binary code because 2 is not a binary number, and that it should be 0's and 1's only. However I am not completely sure.






              share|cite|improve this answer
























                1












                1








                1






                I would think but cannot be certain that 112 is not a binary code because 2 is not a binary number, and that it should be 0's and 1's only. However I am not completely sure.






                share|cite|improve this answer












                I would think but cannot be certain that 112 is not a binary code because 2 is not a binary number, and that it should be 0's and 1's only. However I am not completely sure.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered 9 hours ago









                Teddy Montgomery

                132




                132






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3061678%2ffinding-a-binary-prefix-code-provided-lengths%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Mario Kart Wii

                    What does “Dominus providebit” mean?

                    Antonio Litta Visconti Arese