Posts

Showing posts with the label DEVADAS:

Puzzle 9 The Disorganized Handyman

SRINI DEVADAS: Good morning, everyone. Thanks for making it here through the snow and sleet. You will be, quote unquote, rewarded with a cool little puzzle that has both recreational value as well as a deep connection to the most popular sorting algorithm, or at least the most commonly used sorting algorithm, called quicksort. And so what we have up here is what I call the disorganized handyman puzzle. This is not a puzzle of my invention, but I called it this because I think at some point when I read this, it was a carpenter who had a bunch of nuts and bolts in his bag, and they were all mixed up. So rather than having these nuts attached to the bolts, he was disorganized and the nuts and bolts were separate. And then they all got mixed up together in a bag, OK? Now, obviously, all puzzles are a little bit contrived. And so we're going to assume here that there's 100 different nuts and 100 associated bolts. And these 200 objects are all mixed up into this one bag...

Puzzle 8 You Won't Want to Play Sudoku Again

SRINI DEVADAS: All right good morning, everyone. Welcome back. I hope you had a good long weekend. So today's puzzle is, I guess, a classic puzzle. It's Sudoku. I've never actually successfully managed to complete a Sudoku puzzle by myself, because they've fallen into two categories for me. Either they're easy, and I get bored and I stop. Or they're too hard, and I get lazy and I stop. But what I have done is write a computer program that essentially solves any Sudoku puzzle that is put in front of it in seconds. Maybe there exist puzzles for which it would take minutes, but I haven't discovered such puzzles. And what we're going to do today is talk about Sudoku, compare and contrast the human way of solving Sudoku puzzles against a brute force way, and then try and integrate the two together. You know perhaps this is the closest we're going to get to AI in this class, where we're going to try and marry an exhaustive search method w...

Puzzle 7 Tile that Courtyard, Please

SRINI DEVADAS: We're going to do something quite different in terms of a puzzle. And while it's a recursive puzzle, it's going to play out to be a recursive solution. It looks quite different from the N-queens puzzle. And so this is going to be a tiling puzzle. And so I set up the puzzle, and then we're going to take a little segue off into a canonical recursive algorithm called merge sort because I think it's good for you to see that algorithm before you dive into solving this particular puzzle because it kind of shows you the way. All right, and but I'll set up the puzzle. I guess I didn't have to erase this square. It's a courtyard that has a bunch-- of tiles. You're supposed to tile it, and it's all square tiles. And I'll just make it eight by eight like a chessboard. And in general, we are going to say that this is a 2 raised to n by 2 raised to n courtyard. And I want to tile this courtyard. So this is a three tile-- some ...