Find the row/column of the $n^textth$ word in a list of words arranged in a grid

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











up vote
1
down vote

favorite












Here is a list of twelve words arranged in a grid with four rows and three words per row



begingather
textalpha betta gamma
\textone two three
\textbetter faster stronger
\textmajor captain colonel
endgather



How can I find out which row and column the $11^textth$ word, the word "captain", is in? Like, knowing that it's the $11^textth$ word, how can I tell mathematically that it's the second word in the forth row? Or similarly how can I tell the position of the word "better" knowing only that it's the $7^textth$ word in the list?







share|cite|improve this question

























    up vote
    1
    down vote

    favorite












    Here is a list of twelve words arranged in a grid with four rows and three words per row



    begingather
    textalpha betta gamma
    \textone two three
    \textbetter faster stronger
    \textmajor captain colonel
    endgather



    How can I find out which row and column the $11^textth$ word, the word "captain", is in? Like, knowing that it's the $11^textth$ word, how can I tell mathematically that it's the second word in the forth row? Or similarly how can I tell the position of the word "better" knowing only that it's the $7^textth$ word in the list?







    share|cite|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Here is a list of twelve words arranged in a grid with four rows and three words per row



      begingather
      textalpha betta gamma
      \textone two three
      \textbetter faster stronger
      \textmajor captain colonel
      endgather



      How can I find out which row and column the $11^textth$ word, the word "captain", is in? Like, knowing that it's the $11^textth$ word, how can I tell mathematically that it's the second word in the forth row? Or similarly how can I tell the position of the word "better" knowing only that it's the $7^textth$ word in the list?







      share|cite|improve this question













      Here is a list of twelve words arranged in a grid with four rows and three words per row



      begingather
      textalpha betta gamma
      \textone two three
      \textbetter faster stronger
      \textmajor captain colonel
      endgather



      How can I find out which row and column the $11^textth$ word, the word "captain", is in? Like, knowing that it's the $11^textth$ word, how can I tell mathematically that it's the second word in the forth row? Or similarly how can I tell the position of the word "better" knowing only that it's the $7^textth$ word in the list?









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 21 at 0:07









      Mike Pierce

      11k93574




      11k93574









      asked Jul 20 at 18:39









      Robbie KN

      83




      83




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          To answer this, you need to be familiar with modular arithmetic and the floor function.



          If your grid has $m$ words per row, then the $k^textth$ word will be the $(k bmod m)^textth$ word in the $(lfloor (k-1)/m rfloor +1)^textth$ row. I think the best way to realize why these formulas work is to try them on a few example words, so for a few specific cases of $k$, and see what happens. A quick point though, the $+1$ and $-1$ in the formula for the row only need to be there because we are indexing our rows and columns starting at $1$ instead of $0$ (i.e. in the above grid we're saying that the word alpha is the first word of the first row, and not the zeroth word of the zeroth row).






          share|cite|improve this answer























          • $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
            – Mike Pierce
            Jul 20 at 20:19










          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%2f2857919%2ffind-the-row-column-of-the-n-textth-word-in-a-list-of-words-arranged-in-a-g%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










          To answer this, you need to be familiar with modular arithmetic and the floor function.



          If your grid has $m$ words per row, then the $k^textth$ word will be the $(k bmod m)^textth$ word in the $(lfloor (k-1)/m rfloor +1)^textth$ row. I think the best way to realize why these formulas work is to try them on a few example words, so for a few specific cases of $k$, and see what happens. A quick point though, the $+1$ and $-1$ in the formula for the row only need to be there because we are indexing our rows and columns starting at $1$ instead of $0$ (i.e. in the above grid we're saying that the word alpha is the first word of the first row, and not the zeroth word of the zeroth row).






          share|cite|improve this answer























          • $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
            – Mike Pierce
            Jul 20 at 20:19














          up vote
          1
          down vote



          accepted










          To answer this, you need to be familiar with modular arithmetic and the floor function.



          If your grid has $m$ words per row, then the $k^textth$ word will be the $(k bmod m)^textth$ word in the $(lfloor (k-1)/m rfloor +1)^textth$ row. I think the best way to realize why these formulas work is to try them on a few example words, so for a few specific cases of $k$, and see what happens. A quick point though, the $+1$ and $-1$ in the formula for the row only need to be there because we are indexing our rows and columns starting at $1$ instead of $0$ (i.e. in the above grid we're saying that the word alpha is the first word of the first row, and not the zeroth word of the zeroth row).






          share|cite|improve this answer























          • $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
            – Mike Pierce
            Jul 20 at 20:19












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          To answer this, you need to be familiar with modular arithmetic and the floor function.



          If your grid has $m$ words per row, then the $k^textth$ word will be the $(k bmod m)^textth$ word in the $(lfloor (k-1)/m rfloor +1)^textth$ row. I think the best way to realize why these formulas work is to try them on a few example words, so for a few specific cases of $k$, and see what happens. A quick point though, the $+1$ and $-1$ in the formula for the row only need to be there because we are indexing our rows and columns starting at $1$ instead of $0$ (i.e. in the above grid we're saying that the word alpha is the first word of the first row, and not the zeroth word of the zeroth row).






          share|cite|improve this answer















          To answer this, you need to be familiar with modular arithmetic and the floor function.



          If your grid has $m$ words per row, then the $k^textth$ word will be the $(k bmod m)^textth$ word in the $(lfloor (k-1)/m rfloor +1)^textth$ row. I think the best way to realize why these formulas work is to try them on a few example words, so for a few specific cases of $k$, and see what happens. A quick point though, the $+1$ and $-1$ in the formula for the row only need to be there because we are indexing our rows and columns starting at $1$ instead of $0$ (i.e. in the above grid we're saying that the word alpha is the first word of the first row, and not the zeroth word of the zeroth row).







          share|cite|improve this answer















          share|cite|improve this answer



          share|cite|improve this answer








          edited Jul 21 at 1:28


























          answered Jul 20 at 18:48









          Mike Pierce

          11k93574




          11k93574











          • $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
            – Mike Pierce
            Jul 20 at 20:19
















          • $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
            – Mike Pierce
            Jul 20 at 20:19















          $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
          – Mike Pierce
          Jul 20 at 20:19




          $(k bmod m)$ is the remainder when $k$ is divided by $m$. You can't really "replace" it. Instead, learn to love it.
          – Mike Pierce
          Jul 20 at 20:19












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2857919%2ffind-the-row-column-of-the-n-textth-word-in-a-list-of-words-arranged-in-a-g%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?