In a line of ones and zeroes, $10$ changes to $01$ every second. Prove that it takes no longer than $10n$ seconds until there are no more $10$s.

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











up vote
3
down vote

favorite













There is a line of ones and zeroes of length $n$. Every second, $10$
changes to $01$. Prove that it takes no longer than $10n$ seconds
until there is nothing to change in the line.




Example:



  1. 1110010

  2. 1101001

  3. 1010101

  4. 0101011

  5. 0010111

  6. 0001111

My reasoning went like this:



  1. base case: obvious (for $0$ and $1$, there's nothing to change from the start);

  2. hypothesis: let's assume the statement is true for a line of length $n$;

  3. step: what can we say about a line of length $n+1$, then?
    Let's note that a line of length $n+1$ is just a line of length $n$ from the hypothesis with a $1$ or a $0$ added to it (let's say at the right).

If (line of length $n$)$1$, then $1$ stays intact, and we can apply the hypothesis.



If (line of length $n$ ending with $1$)$0$, then it changes to (line of length $n$)$1$, and our time becomes $10n+1$ at most.



However, if (line of length $n$ ending with $0$)$0$, I don't know how to see the following: that, at the last second of $10n$, it's not possible for the before-last $0$ in the line to change to $1$ and start a chain reaction inside the subline of length $n$, giving us $10n+10n=20n>10(n+1)=10n+10$ seconds of time.



While my book suggests induction for this problem, I am interested in and will be grateful for any proof, no matter inductive or not.



Thank you.







share|cite|improve this question

















  • 1




    See puzzling.stackexchange.com/questions/17403/confused-soldiers. This puzzle is equivalent one linked, where 1 = "soldier facing east" and 0 = "soldier facing west".
    – Mike Earnest
    2 days ago














up vote
3
down vote

favorite













There is a line of ones and zeroes of length $n$. Every second, $10$
changes to $01$. Prove that it takes no longer than $10n$ seconds
until there is nothing to change in the line.




Example:



  1. 1110010

  2. 1101001

  3. 1010101

  4. 0101011

  5. 0010111

  6. 0001111

My reasoning went like this:



  1. base case: obvious (for $0$ and $1$, there's nothing to change from the start);

  2. hypothesis: let's assume the statement is true for a line of length $n$;

  3. step: what can we say about a line of length $n+1$, then?
    Let's note that a line of length $n+1$ is just a line of length $n$ from the hypothesis with a $1$ or a $0$ added to it (let's say at the right).

If (line of length $n$)$1$, then $1$ stays intact, and we can apply the hypothesis.



If (line of length $n$ ending with $1$)$0$, then it changes to (line of length $n$)$1$, and our time becomes $10n+1$ at most.



However, if (line of length $n$ ending with $0$)$0$, I don't know how to see the following: that, at the last second of $10n$, it's not possible for the before-last $0$ in the line to change to $1$ and start a chain reaction inside the subline of length $n$, giving us $10n+10n=20n>10(n+1)=10n+10$ seconds of time.



While my book suggests induction for this problem, I am interested in and will be grateful for any proof, no matter inductive or not.



Thank you.







share|cite|improve this question

















  • 1




    See puzzling.stackexchange.com/questions/17403/confused-soldiers. This puzzle is equivalent one linked, where 1 = "soldier facing east" and 0 = "soldier facing west".
    – Mike Earnest
    2 days ago












up vote
3
down vote

favorite









up vote
3
down vote

favorite












There is a line of ones and zeroes of length $n$. Every second, $10$
changes to $01$. Prove that it takes no longer than $10n$ seconds
until there is nothing to change in the line.




Example:



  1. 1110010

  2. 1101001

  3. 1010101

  4. 0101011

  5. 0010111

  6. 0001111

My reasoning went like this:



  1. base case: obvious (for $0$ and $1$, there's nothing to change from the start);

  2. hypothesis: let's assume the statement is true for a line of length $n$;

  3. step: what can we say about a line of length $n+1$, then?
    Let's note that a line of length $n+1$ is just a line of length $n$ from the hypothesis with a $1$ or a $0$ added to it (let's say at the right).

If (line of length $n$)$1$, then $1$ stays intact, and we can apply the hypothesis.



If (line of length $n$ ending with $1$)$0$, then it changes to (line of length $n$)$1$, and our time becomes $10n+1$ at most.



However, if (line of length $n$ ending with $0$)$0$, I don't know how to see the following: that, at the last second of $10n$, it's not possible for the before-last $0$ in the line to change to $1$ and start a chain reaction inside the subline of length $n$, giving us $10n+10n=20n>10(n+1)=10n+10$ seconds of time.



While my book suggests induction for this problem, I am interested in and will be grateful for any proof, no matter inductive or not.



Thank you.







share|cite|improve this question














There is a line of ones and zeroes of length $n$. Every second, $10$
changes to $01$. Prove that it takes no longer than $10n$ seconds
until there is nothing to change in the line.




Example:



  1. 1110010

  2. 1101001

  3. 1010101

  4. 0101011

  5. 0010111

  6. 0001111

My reasoning went like this:



  1. base case: obvious (for $0$ and $1$, there's nothing to change from the start);

  2. hypothesis: let's assume the statement is true for a line of length $n$;

  3. step: what can we say about a line of length $n+1$, then?
    Let's note that a line of length $n+1$ is just a line of length $n$ from the hypothesis with a $1$ or a $0$ added to it (let's say at the right).

If (line of length $n$)$1$, then $1$ stays intact, and we can apply the hypothesis.



If (line of length $n$ ending with $1$)$0$, then it changes to (line of length $n$)$1$, and our time becomes $10n+1$ at most.



However, if (line of length $n$ ending with $0$)$0$, I don't know how to see the following: that, at the last second of $10n$, it's not possible for the before-last $0$ in the line to change to $1$ and start a chain reaction inside the subline of length $n$, giving us $10n+10n=20n>10(n+1)=10n+10$ seconds of time.



While my book suggests induction for this problem, I am interested in and will be grateful for any proof, no matter inductive or not.



Thank you.









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited 2 days ago
























asked 2 days ago









fragileradius

938




938







  • 1




    See puzzling.stackexchange.com/questions/17403/confused-soldiers. This puzzle is equivalent one linked, where 1 = "soldier facing east" and 0 = "soldier facing west".
    – Mike Earnest
    2 days ago












  • 1




    See puzzling.stackexchange.com/questions/17403/confused-soldiers. This puzzle is equivalent one linked, where 1 = "soldier facing east" and 0 = "soldier facing west".
    – Mike Earnest
    2 days ago







1




1




See puzzling.stackexchange.com/questions/17403/confused-soldiers. This puzzle is equivalent one linked, where 1 = "soldier facing east" and 0 = "soldier facing west".
– Mike Earnest
2 days ago




See puzzling.stackexchange.com/questions/17403/confused-soldiers. This puzzle is equivalent one linked, where 1 = "soldier facing east" and 0 = "soldier facing west".
– Mike Earnest
2 days ago










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Your hypothesis could be stated more clearly as



For any string of length $n$ there will be no changes after $10n$ seconds



and your induction argument goes through. As you say, a string of length $n+1$ can be considered as a string of length $n$ followed by one more bit. You have justified that a string of length $n+1$ will not change after $10n+1$ seconds. Now observe $10n+1 le 10(n+1)$ and you have verified the statement for length $n+1$. Yes, the string of length $n$ might change after the first second, but we assumed that any string of that length will not change after $10n$ seconds so we don't care if it changes. The important thing is that you noted the last bit cannot change after the first second.



In fact you don't need the factor $10$ out front. You can do the same proof without it and show that no changes will happen after $n$ seconds for a string of length $n$.






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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fmath.stackexchange.com%2fquestions%2f2871990%2fin-a-line-of-ones-and-zeroes-10-changes-to-01-every-second-prove-that-it-t%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
    1
    down vote



    accepted










    Your hypothesis could be stated more clearly as



    For any string of length $n$ there will be no changes after $10n$ seconds



    and your induction argument goes through. As you say, a string of length $n+1$ can be considered as a string of length $n$ followed by one more bit. You have justified that a string of length $n+1$ will not change after $10n+1$ seconds. Now observe $10n+1 le 10(n+1)$ and you have verified the statement for length $n+1$. Yes, the string of length $n$ might change after the first second, but we assumed that any string of that length will not change after $10n$ seconds so we don't care if it changes. The important thing is that you noted the last bit cannot change after the first second.



    In fact you don't need the factor $10$ out front. You can do the same proof without it and show that no changes will happen after $n$ seconds for a string of length $n$.






    share|cite|improve this answer

























      up vote
      1
      down vote



      accepted










      Your hypothesis could be stated more clearly as



      For any string of length $n$ there will be no changes after $10n$ seconds



      and your induction argument goes through. As you say, a string of length $n+1$ can be considered as a string of length $n$ followed by one more bit. You have justified that a string of length $n+1$ will not change after $10n+1$ seconds. Now observe $10n+1 le 10(n+1)$ and you have verified the statement for length $n+1$. Yes, the string of length $n$ might change after the first second, but we assumed that any string of that length will not change after $10n$ seconds so we don't care if it changes. The important thing is that you noted the last bit cannot change after the first second.



      In fact you don't need the factor $10$ out front. You can do the same proof without it and show that no changes will happen after $n$ seconds for a string of length $n$.






      share|cite|improve this answer























        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        Your hypothesis could be stated more clearly as



        For any string of length $n$ there will be no changes after $10n$ seconds



        and your induction argument goes through. As you say, a string of length $n+1$ can be considered as a string of length $n$ followed by one more bit. You have justified that a string of length $n+1$ will not change after $10n+1$ seconds. Now observe $10n+1 le 10(n+1)$ and you have verified the statement for length $n+1$. Yes, the string of length $n$ might change after the first second, but we assumed that any string of that length will not change after $10n$ seconds so we don't care if it changes. The important thing is that you noted the last bit cannot change after the first second.



        In fact you don't need the factor $10$ out front. You can do the same proof without it and show that no changes will happen after $n$ seconds for a string of length $n$.






        share|cite|improve this answer













        Your hypothesis could be stated more clearly as



        For any string of length $n$ there will be no changes after $10n$ seconds



        and your induction argument goes through. As you say, a string of length $n+1$ can be considered as a string of length $n$ followed by one more bit. You have justified that a string of length $n+1$ will not change after $10n+1$ seconds. Now observe $10n+1 le 10(n+1)$ and you have verified the statement for length $n+1$. Yes, the string of length $n$ might change after the first second, but we assumed that any string of that length will not change after $10n$ seconds so we don't care if it changes. The important thing is that you noted the last bit cannot change after the first second.



        In fact you don't need the factor $10$ out front. You can do the same proof without it and show that no changes will happen after $n$ seconds for a string of length $n$.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered 2 days ago









        Ross Millikan

        275k21184350




        275k21184350






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2871990%2fin-a-line-of-ones-and-zeroes-10-changes-to-01-every-second-prove-that-it-t%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?