Forum — Daily Challenge
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    What??? What is going on here???

    Module 3 Day 11 Your Turn Part 4
    2
    6
    57
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • The Blade DancerT
      The Blade Dancer M0★ M1★ M2★ M3★ M4 M5
      last edited by debbie

      Module 3 Week 3 Day 11 Your Turn Part 4 Explanation

      😵 What is going on here??? So lost lol

      The Blade Dancer
      League of Legends, Valorant: Harlem Charades (#NA1)
      Discord: Change nickname if gay#7585

      debbieD 1 Reply Last reply Reply Quote 2
      • debbieD
        debbie ADMIN M0★ M1 M5 @The Blade Dancer
        last edited by

        @The-Blade-Dancer Thanks for asking. 🙂 Are you wondering about just Part 4, or the entire Your Turn explanation?

        1 Reply Last reply Reply Quote 2
        • The Blade DancerT
          The Blade Dancer M0★ M1★ M2★ M3★ M4 M5
          last edited by

          Part four please

          The Blade Dancer
          League of Legends, Valorant: Harlem Charades (#NA1)
          Discord: Change nickname if gay#7585

          debbieD 1 Reply Last reply Reply Quote 2
          • debbieD
            debbie ADMIN M0★ M1 M5 @The Blade Dancer
            last edited by

            @The-Blade-Dancer Are you asking about the mini-question, or just the Your Turn question explanation? 🙂

            1 Reply Last reply Reply Quote 1
            • The Blade DancerT
              The Blade Dancer M0★ M1★ M2★ M3★ M4 M5
              last edited by

              Explanation

              The Blade Dancer
              League of Legends, Valorant: Harlem Charades (#NA1)
              Discord: Change nickname if gay#7585

              debbieD 1 Reply Last reply Reply Quote 2
              • debbieD
                debbie ADMIN M0★ M1 M5 @The Blade Dancer
                last edited by debbie

                @The-Blade-Dancer Sure!
                Let's take a quick look at the question statement again. 🙂

                We're trying to create a line of \(6\) beads, either black or white, and the only constraint is that we can have at most two consecutive white beads.

                M3W3D11-y-part-4-xiao-ma-forum-ok-not-ok.png

                Earlier, in Parts 1 through 3, Prof. Loh showed us a solution using recursion (building upon a smaller line of beads in order to get the next bigger string). In Part 4, he's going to resurrect a method that he introduced in Day 10, tiling. It's a remarkably different but totally valid way of doing this problem. Pretend you had a set of tiles which consisted of three types: 1.) a single black square; 2.) a white square followed by a black square; and 3.) two white squares followed by a black square. Pretend that they have letters on them to denote which way is up, so that, when placed down, the white square is always to the left of the black square.

                M3W3D11-y-part-4-xiao-ma-forum-tiles-rotated.png

                When arranged in a line right-side-up, the tiles magically produce a string of black and white "beads" which obey the rules of the problem which we are trying to solve!

                M3W3D11-y-part-4-xiao-ma-forum-one-way.png

                ...but is this any easier, though, than what we did before?

                ....well, the answer is yes! 🙂

                You see, these tiles above are colored black and white, but we actually don't have to color them black and white. We can think of them as "blind" tiles. Or, rather, that we are blind to the tiles. This is because only the length of the tile really matters. The single square is always black. The \(2\)-length rectangle always has white on the left, black on the right. And the \(3\)-length rectangle always has two whites on the left with one black on the right.

                M3W3D11-y-part-4-xiao-ma-forum-blind-tiles.png

                $$ \text{ Blind tiles. } $$

                Okay, we're in good shape now! Now we don't even have colors anymore! Amazing; how did that happen? Now all we have to worry about is the length of the tiles and how to assemble \(6\) of them in a line.

                In order to make a \(6\)-length line, we can start with a \(5\)-length line and add a \(1 \times 1\) square, we can start with a \(4\)-length line and add a \(1 \times 2\)-rectangle, or we can start with a \(3\)-length line and add a \(1 \times 3\)-rectangle.

                Remember this? 🙂 This recursion illustration hopefully looks familiar by now.

                M3W3D11-y-part-4-recursion-with-tiles.svg.png

                We're still not caring anymore about whether the individual squares (beads, in reality) plastered together inside the rectangular tiles are black or white. We just think of them as \(1 \times 1\) tiles, \(1 \times 2\) tiles, and \(1 \times 3\) tiles.

                In general, the formula for the number of ways to make a line of length \(n\), for this problem, is

                $$ a_n = a_{n-1} + a_{n-2} + a_{n-3} $$

                which, again, isn't Fibonacci either, but it's very similar!

                From there, you can calculate the ways to make a string of length \(n\) if \(n\) is very small, and then use the recursion to work your way up to finding \(a_6\) for a string of length \(6.\)

                🙂

                1 Reply Last reply Reply Quote 3

                • 1 / 1
                • First post
                  Last post
                Daily Challenge | Terms | COPPA