{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

21.pdf - CMPSCI 250 Introduction to Computation Lecture#21...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPSCI 250: Introduction to Computation Lecture #21: Induction for Problem Solving David Mix Barrington 23 October 2017
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Induction for Problem Solving The L-Shaped Tile Problem Recursively Tiling a Chessboard Cutting Pizzas The Pizza-Cutting Theorem Cutting a Block of Cheese With a Katana The Speed of the Euclidean Algorithm
Image of page 2
Polyominoes Samuel Golomb initiated the study of generalized dominos called polyominos . An ordinary domino is made from two connected squares, and there is basically only one way to do it. A tromino is made from three connected squares, and there are two different ones, I-shaped and L- shaped.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
More Polyominoes There are five kinds of tetrominos and twelve kinds of pentominos (six of which are shown twice below, in two reflective forms).
Image of page 4
The L-Shaped Tile Problem Golomb posed the question of what kinds of figures can be tiled by various kinds of polyominos. In particular, can an 8 × 8 chessboard be tiled by L-shaped trominos? (No, because 64 % 3 0.) What about an 8 × 8 board with one square missing ?
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Recursively Tiling a Chessboard In the figure below, an 8 × 8 board with one (black) square missing has been tiled by 21 L-shaped trominos. How did we do it, and can we always do it? We do it with a recursive algorithm that provides an inductive proof that any 2 n × 2 n board, with any one square missing, can be tiled . (The bold-faced statement will be the P(n) of our inductive proof.)
Image of page 6
The Recursive Tiling The base case of P(0) says that any 1 × 1 board, with any one square missing, can be tiled. (Use 0 tiles!) The key step of the recursive algorithm is to reduce a 2 n+1 × 2 n+1 problem to four 2 n × 2 n problems. We do this by placing one tile (the orange one in the figure) in a particular position.
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The Recursive Tiling The orange tile takes one square from three of the four quarters, the three that are not already missing a square. Then we recursively tile each of the quarters -- in this example by placing the green tile to make 2 × 2 boards with one square missing -- these are covered by the red and blue tiles.
Image of page 8
Clicker Question #1
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern