1. Home
  2. Explore
  3. Mathematics
  4. AI and Math Olympiads

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

AI and Math Olympiads

Transcript

[Submit subtitle corrections at criblate.com] In 2025, over 600 teenagers from all around the world gathered in the Sunshine Coast of Australia to compete in the International Math Olympiad. This contest consists of six highly challenging problems, and problem number six was the hardest by far. Despite every participant there clearly being a world class problem solver among the best of their country, less than 1% of the students managed to get full marks on it. It also seems likely to be the last IMO problem to be solved. No problem that AI could not solve. And that sentence would have sounded ridiculous to most people familiar with contest math even as few as five years ago, I think it's fair to say. If you're outside this world, the thing you have to understand is that these problems are designed to require elements of imagination and creativity. It's not at all just rote memorization or computation.

To solve one of these problems does not simply mean giving a correct numerical answer or anything like that. like that. It means writing up a full rigorous proof, and the spirit of the contest is that the act of finding a proof should require gaining a nuanced and deep understanding of some particular setup. So if we step back in time, say to 2021, even though by then there had been plenty of impressive results with AI in games, and even though by then scaling laws for natural language had become clear, a lot of people would have seen the IMO as a different ballgame entirely. It requires this mixture of rigor and creativity, and the search space of logical moves that you can make when you're writing up a proof is effectively infinite. In fact, when I was on Dwarkesh Patel's podcast in 2023, this was one of his questions. By the time that an AI model can get gold in the International Math Olympiad, is that just AGI?

But just the very next year, in 2024, Google DeepMind's AlphaProof team produced a model that answered four out of the six questions on that year's exam. There is a slight asterisk here because that system required that humans manually translate the problems from English into Lean, which is basically a programming language where mathematical proofs are programs. But the AlphaProof system was handling the substance of finding the proof, even if it was just in a different language, and that alone was a surprise to many. And then in 2025 multiple different organizations had their models try the test, and this time there was a mixture of those taking the Lean approach and some doing it purely with natural language end to end. And now models answered every single question on the contest, except for this problem number six. And then by 2026... Simply prompting reasoning models that are available to the public

would be enough to get correct answers on all six problems. And that really undersells exactly how far these models have come over the last few years when it comes to doing math. The IMO almost feels like ancient history as a benchmark, as everything has speed run its way into the domain of research math over the last year. I will talk more about that at the end, and in due time, trust me, I have lots to say about the AI and math. math matter. But for right now, this video is mostly not about AI. More than anything, it's just a deep dive into a very beautiful problem. But as we see the path to solving it, and the insights required to get there, I do think it's interesting to reflect on what it is about this problem that allowed a few brilliant students to find the answer when no machine could. And I actually asked this question to Thang Luong, a director of research on the Google DeepMind team that made It made

their reasoning model attacking that year's test, and he gave a really interesting answer. He said, we didn't really have a way to teach the model to be patient. It didn't take the time to understand the problem, to get a feel for the problem, to not try to solve the problem. As we step through today, I think you will agree that patience is definitely one thing that's required, and you'll also see what he means about understanding before you try to solve, but I want to submit at least one additional ingredient. Models, at least as I've interacted with them, don't really seem to have a great sense for what makes a problem or a strategy beautiful, and finding the solution here absolutely benefits from an appreciation of beauty.

And with that, let's get into it. What is this problem, and what would it feel like for you to be a student figuring out how to solve it? Pulling up the problem, it begins, consider a 2025 by 2025 grid of unit squares. Okay, that's obviously a little unwieldy to illustrate, so for animations on screen let's start with something smaller, like 10 by 10. Matilda wishes to place on the grid some rectangular tiles, possibly of different sizes, such that each side of every tile lies on the grid lines, and every unit square is covered by at most one tile. Reasonable enough, the tiles don't overlap with each other.

Now the problem statement asks us to find the minimum number of tiles that follow a certain key rule, which is that each row has to have exactly one unit square not covered by any tile. I'll go ahead and mark each of those gaps with an X, and then likewise each column has exactly one unit square not covered by any tiles. So one X in each column. This means in our small 10x10 case, we have 10 different gaps in the tiling. But up in the full grid from the actual problem statement, there would be 2025 total gaps in the tiling. We might as well start by building a little intuition for what these kind of tilings look like. For example, back in our 10x10 case, here's an example that uses 21 total tiles, and you'll notice it follows the key rule: no two X's lie in the same row or column. But if we want the smallest number of tiles, this is certainly not the best. By choosing a different set, leaving gaps in different spots, this example here gives us seventeen tiles.

Even this leaves room for improvement; here is yet another attempt that manages to do it with only sixteen tiles. This being the International Math Olympiad, your task is not merely to give a numerical answer for this smallest number of tiles, and it's also more than to just show a construction for how to achieve that minimum tiling. That construction will be part of it, but the real challenge here is to rigorously prove that whatever minimum you find really is the best. As you play around with this in your head, you can get a feel for why this is a hard problem because it's hard to even think of... Think of generalizable descriptions for where the tiles go. Maybe the easiest case would be to place all of the X's on a diagonal like this, and then to use horizontal tiles to cover the remaining area. If you add a grid with side length n, you'll notice that the number of tiles on the right side here is n-1, and likewise for the left side, which gives us a total of 2(n-1) tiles.

This construction is kind of obvious, though, and it's unlikely to be what the IMO is asking us for. So what you would love is some other general way to place the Xs and a general way to place tiles around them that gives us a count smaller than this as a function of n. So how do you even approach a problem like this? Where on earth do you begin? Now if you step back, I think a very important general lesson about problem solving is that what can look like genius is usually the residue of experience. Insights don't come from nowhere, and in this case, before we jump headfirst into that challenging problem number six, I want you to be patient. I want to tell you about a seemingly completely different brain teaser about slicing up a cube.

It's simpler than an IMO problem, and it's very fun, and even though it might not seem like it has anything to do with the tiling puzzle, my point is to highlight this as the kind of past experience that might inform the first steps for making headway into the main problem that we have. So here's the brain teaser. Imagine you have a 3x3x3 cube, and you want to cut it into 27 different 1x1x1 cubes. How do you do this using as few cuts as possible? The rule is that each slice you're making with your knife cuts along a single plane; there's no zigging or zagging or anything like that. And right off the bat there's a pretty obvious way that you can do this with six slices: you take two parallel cuts along each coordinate direction, dividing up the edges into thirds, dividing up each face into ninths, and dividing up the whole cube into these 27 one by one by one pieces. But here's the main variation that'll make the problem interesting:

let's say that after each slice you're allowed to rearrange whatever pieces you have, maybe stacking the existing chunks so that the next slice can go through more total material. Again the question is: how can you cut down to these 27 different one by one by one cubes using as few slices as possible? Generalizing away from the cube for a second, if you were just cutting up any shape, each new slice will at most double the current number of pieces you have. This happens assuming you can rearrange all the pieces to fall into the plane of whatever that next cut is. What this means is that four slices will give you at most sixteen different pieces, so we could rule out that possibility for the specific case of a cube that we're trying to get into these 27 pieces. Now five is a bit more interesting. In principle, five slices with rearrangement could get you as many as 32 little pieces, but here we specifically need those little pieces to be in a plane.

This is to be 1x1x1 cubes. And it's not immediately obvious what clever rearranging we can do while cutting things up that makes this possible. If you've never seen this before, please do pause, give it a try. I kind of hate spoiling such a good question too soon, but for the video today I kind of have to. My only reason for bringing this up is that the answer is going to help highlight the insight for how we might approach that challenging problem number six. Alright, are you ready? The trick is to focus on that inner 1x1x1 cube. In order for it to be fully cut out, every one of its six faces requires one unique slice.

A single slice could never free more than one face at a time. Therefore, even if you're allowed to rearrange and stack them however you want, however creatively you can imagine, there's simply no possible way to use fewer than 6 total cuts. My point in bringing this up is that the insight is not about some clever strategy for finding fewer cuts, it's about how to prove that 6 is the optimal number. And that that proof involves focusing on the faces of that inner cube. And you can maybe see how this would relate to our tiling puzzle. The ultimate goal is not merely to find the smallest number of tiles that we can use (although on its own that's already a meaningful challenge); the ultimate goal is going to be to prove that what we find is the best! I want to posit that if you had seen this cube puzzle sometime in your past, or something like it, it might direct your mind to think about the edges of all of those Xed out squares on our diagram.

And you might notice how each one of those edges has to be associated with one tile. And we have something nice in the other direction too. Since no two X's are in the same column, the left or right edge of a given tile can only touch at most one of the X's. And then likewise for the top and the bottom, each of the four sides of a given tile touches at most one X. To get some intuition for how you might actually use this, I want you to take a look at these two different tiling patterns, where the one on the right uses notably fewer tiles than the one on the left. What is it about that pattern on the right that's more efficient? It's helpful to imagine first placing down the X's, where in my mind this key rule that no two can share a row or column makes me think of rooks that can't attack each other.

Let's imagine highlighting the four different edges of each X. Xed out square and then every time you add a tile to the board we're going to turn off the highlighted edges that that tile touches. As you keep dropping down new tiles, turning off whatever highlighted edges they touch, some of these tiles manage to turn off multiple edges, sometimes as many as 4, whereas other tiles that you drop down only turn off 1 or even 0 highlighted edges. But no matter what the arrangement of tiles, you know that eventually every highlighted edge has to get turned off. Well, almost all. There are four exceptions based on those four edges touching the outer boundary of the diagram. And this actually gives us a really nice way to describe what exactly about that left image is less efficient. Notice how all of these tiles are touching only 1 or even 0 X's. But by contrast, looking on the right, notice how each of these tiles is touching 4 total X's.

Each of those is kind of as efficient as it possibly can be from this perspective where tiles have a primary duty to cover one of the edges of one of those gaps. This intuition is actually fundamental enough to everything that follows that it's worth writing down as a conjecture: The most efficient tiling should be one that has as many tiles as possible touching 4 different X's. If any tile ever touches fewer than that, it kind of feels like a waste of its potential. So with that in mind, we can abstract away from the grid for a second, and just imagine these tiles freely floating, each one touching 4 X's somewhere around its boundary. The goal will be to somehow fit all of these together kind of like a puzzle.

To understand the constraints here, I want you to focus on just one of them and imagine fitting two other tiles above and below the X that it has on its right side. As I do that, do you notice anything that's kind of inefficient, or at least is about to be inefficient, about this diagram? What you want is for every tile in the diagram to touch four X's, but these two new ones that we've introduced are going to have a conflict on their left edges. Because those left sides align, and because no two X's can show up in the same column, they can't both be touching an X on their left side. One of them would have to give it up. And the same basic issue is going to come up whenever an X is touching a tile somewhere in the middle of its edge. On the other hand, if we slide up that X to the corner, notice how we can comfortably fit four tiles around it in this kind of windmill pattern without causing any necessary conflicts.

And this gives us the next bit of intuition, which is that not only do we want our tiles to touch four X's each, but more specifically, if they're going to work in harmony with each other, those X's have to specifically be at the corners of the tiles. As stated so far, we still have freedom to choose tiles of any shape, but we might as well start out by trying squares, since for one thing squares are very symmetric and math tends to reward you when you respect its symmetries, and for another squares cover more total area for a given perimeter, so it just kind of feels like the efficient choice when we want to ultimately cover a full grid using as few tiles as possible.

As soon as you hypothesize that the optimal tiling uses square tiles where the X's are going to show up in this windmill pattern around their corners, fitting them together really is like a puzzle, and a very satisfying physical one at that. Notice how these pieces stack together really nicely like this. And here we've made the arbitrary choice to try square tiles that measure 5 by 5. So after we stack four of them on top of each other, if we were to add just one more... It would cause this X up here to fall in the same column as this one down here. So instead, trying to fit as many together as we can, let's attach the next one down over here. And then keep building up the diagram.

If you continue like this, what you end up with is a very pleasing slightly tilted 4 by 4 pattern of square tiles, each one with a windmill of Xs around it using 25 Xs in total. And you'll notice these Xs really do sit in distinct rows and columns, so if we draw a big grid around this, it fits the initial problem description. We do need to add a couple tiles around the edges to fill them in, so it's not true that every tile is touching four Xs, but all of them on the interior do, so this really does feel very efficient.

Starting with 5 by 5 tiles is an arbitrary choice; if we had instead started with 4 by 4 square tiles, we would get this smaller arrangement with 16 total holes. If we'd started with 3 by 3 tiles, that would give us something with 9 total gaps. And in general, if we let the variable k represent the side lengths of those square tiles that we started with, this pattern that we formed gives us a very satisfying way to tile a big Big grid whose side lengths are k^2. Now if you're a problem solver, at this point you should be smiling, because if you're going into the IMO in 2025, you would absolutely know that 2025 is a square number, specifically 45^2. So if we set k equal to 45, that gives us a very pretty tiling for the original problem statement, something that we can now conjecture represents the smallest possible number of tiles. The fact that we're using the squareness of the number 2025 makes this feel extremely

promising as the kind of optimal construction that the IMO might want us to find. And again, on the theme that genius is the residue of experience, there's also one other way that you might be drawn to this pattern if you were a contestant at the 2025 IMO. Which is that in Australia's Sunshine Coast Airport, where you would have landed for that year's contest, this is actually the pattern of tiles that you would see on the airport's floor. This is great, we now have at least a conjecture for what the best tiling looks like, and let's go ahead and write it down as a formula, namely a formula describing how many total tiles we used. Throughout the rest of the video I want to keep letting k represent the side lengths of those square tiles and k^2 is going to represent the side lengths of the big grid. In the original case we drew with k equals 5 you'll notice that the total number

of square tiles is 16, and more generally we can write that down as (k-1)^2. But how about those tiles around the boundary, how many of those are we using? In this case you'll notice each side of the boundary uses 4 such tiles. And it's not hard to see that generalizes to k-1. So we can add another 4 times k-1 to our total. If you prefer to expand it out, this would suggest that the final count looks like k^2 plus 2k minus 3. Circling this on our page, this gives us a real tangible conjecture we can sink our teeth into. It feels good, but we are very far from done with the original question, because our aim now is to prove that this expression gives the minimum number of tiles required. That every other possible arrangement, no matter where the X's are and no matter how the tiles sit around them, must use more tiles than this. Or at least we need to prove that in the special case where the side length of the grid is a square number. But how do you do that?

How do you prove something like this? The collection of every possible arrangement of X's and every possible pattern of tilings around them is incredibly complicated. So how do you even get a foothold into making a rigorous claim that encompasses all of those patterns? See, this is the real challenge. And of course there's going to be a real challenge. This is the hardest problem on an IMO; there is no world in which this was going to be easy for us.

But we actually do have an advantage, because remember how I motivated the whole construction. We were focusing on the fact that the tiles need to cover every edge of one of those X's. The appeal of that intuition is not just that it guides us to the construction, although that on its own is very pleasing; it also gives us a toehold into finding the proof that we want. You see, the total number of Xs in this diagram is k^2, which for the small example on screen is just 9. If you highlight all of the edges of those Xed out squares, that gives you 4k^2 highlighted edges, and you know that every tile you drop down touches at most 4 highlighted edges. So right away this actually gives you a bound, telling you that you need at least k^2 total tiles. Actually, that's not quite right, because the four highlighted edges at the boundary of our whole diagram don't need to be hit by any tiles. So really there are 4k^2 minus four relevant highlighted edges,

in the sense that they need to eventually touch a tile. Again, each tile touches at most four of those edges. So the real implication is that you need at least k^2 minus one tiles. Now on the one hand, great! We have managed to prove some kind of lower bound and write an expression for it. But on the other hand, it's a weaker bound than what we need. If you look at our actual conjecture, the one that comes from the hopefully optimal construction, we have this other term in there, proportional to k, which is the square root of the grid size. And it makes sense that we should have another term, because if you look at the optimal arrangement that we made, or at least the one we hope is optimal, not every tile touches four Xs. You have all of these ones around the boundary that only touch two.

And I'll level with you, when I was noodling through this problem on a notebook, I spent a very long time trying to work out some elegant argument that would be based on bounding the total number of tiles that must be on the edge of the diagram like this. If I was going to give you an honest portrayal of the problem solving journey that would 347 00:20:56,327 --> 00:20:60,000 have me showing you all of those dead ends, it would also make this something like a 348 00:20:60,000 --> 00:21:02,981 nine hour video, so I'll spare you all of the detail and simply say, nothing really worked. And actually there's a fundamental reason why. But that's not to say that we can't still productively run with the idea of focusing on highlighted edges. And let's think back to that cube slicing puzzle that I used to motivate everything in the first place. The key to that puzzle was how you could prove that you needed at least 6 slices by using a one-to-one correspondence, namely, a correspondence between the faces of that inner cube and the slices of the knife.

And our tiling question, so far what I've described is not quite that clean; it's something more like a four to one correspondence between the edges of the x'd out squares and the tiles that have to touch them. But there's actually a much simpler way to argue that you need at least k^2 minus one tiles by instead trying to make this a one-to-one association. Rather than highlighting every edge of the x'd out squares, just highlight all of their right edges. Each of those right edges must touch a tile and importantly any given tile can touch at most one such edge, the reason being no two x's show up in the same column. Column. And again we have this exception at the boundary where that rightmost edge actually doesn't need to touch a tile. So once more this gives us a way to prove that you need at least k^2 minus 1 total tiles. But this framing feels a little bit more productive because you can see a little bit more clearly where it's inefficient.

You'll notice we miss a lot of tiles specifically on the left side of the diagram, and similarly if you chose to just highlight the top edges and you associate those with their corresponding tiles, you would miss out on many tiles specifically around the bottom of the diagram, and it's the same for any one direction; the tiles you miss are clustered to one side. I often say that math rewards you when your respected symmetries, and what we're seeing right now is how it punishes you if you don't. Choosing an arbitrary direction shows a clear weakness in the association, and that weakness is reflected in the weakness of the inequality that we have written up top. This association proves that you need at least k^2 minus one tiles, but remember what we actually want. What we're trying to prove is that there are at least k^2 plus 2k minus 3 Three total tiles. That was the number that came from what we hope is the optimal arrangement.

So for you, the savvy problem solver sitting down competing at the IMO aiming to prove this sharper bound, what can you do? Now is a good time to pause and ponder. I want to emphasize again just what a hard problem it is that we're working on. Remember, this is P6 on an IMO, only six students there got a perfect score on this problem, and it is the only one that all of the AI stumbled on. So it's fair to say any proof that we write is going to be something difficult to find. In fact, before plowing forward, I think now is as good a time as any to stretch out and take a quick breather. And for any of you watching who might be interested in technical career opportunities, whether internships or full-time, at some point here I wanted to make a very brief pitch. Basically, the deal here is that instead of ordinary video sponsorships, where I would pop in and try to sell you some product or subscription,

it felt more aligned to me to have 3Blue1Brown operate with a set of recruiting partnerships. memberships. So if you go to 3b1b.co slash talent, you'll find a set of companies that share two properties. One is that they want to hire curious technically minded people like you, the people watching videos about the hardest problem on an IMO, and two, I've met the teams there and see clear evidence that people love working there. On the page you'll find technical puzzlers, interviews between me and the teams, and other material helping you get a feel for what makes each team culture unique. That's all I wanted to say. They take a look if it seems relevant, but for now on to the hardest step of our proof. Let's step back and take stock of where we are right now. We have this strategy of highlighting a specific subset of edges and then arguing that every edge touches a unique tile,

therefore deducing the number of tiles is at least as large as the number of highlighted edges. Although it doesn't give the bound we want, we do have this intuition for where specifically this strategy is weak. Highlighting edges in just one direction gives what looks like a tighter correspondence for tiles near one side of the diagram, but many of the tiles it misses are clustered on the other side. What we want, the goal at this point, is to improve that bound of k^2 minus 1 to a larger number, k^2 plus 2k minus 3, and a natural question that you, the problem solver, might ask You might ask, is how to modify that same strategy to fix the weakness. Can you highlight a few more edges, preferably k^2 plus 2k minus 3 specifically, in a way that somehow avoids the inefficiency that comes from focusing on any one direction. Now, as you do this you have to be very careful. In order for any strategy like this to work, you have to be sure

that if you go through all of the tiles and you ask how many highlighted edges is one tile touching, the answer is always at most one. The whole premise of the strategy is to argue that there is at least one tile per highlighted edge, so we have to make sure we're not doing any double counting. Now there is something a little bit weird about the goal that I'm describing. Think about this expression, k^2 plus 2k minus 3, and how each of those terms looks as we let k get bigger and bigger. If this is supposed to describe the final number of highlighted edges, what it suggests is that somehow in those larger cases, somehow most but not all of our x's get a single highlighted edge, and then some of them, on the order of 2 times the square root of them, get multiple highlighted edges. And that might feel strange, that might feel almost antithetical to our goals of a beautiful symmetric construction. And I will be honest, the next step is probably the hardest in this whole argument to motivate, but I think it helps to start with a high-level sketch of the idea.

As I said, we know that just highlighting the rightward edges of all the x's feels more efficient near the right side of the diagram. So what if you say, "just highlight the right edge for an x only if it falls in some specific rightward region of that full grid." Where for the moment I'm going to be a little vague about what specifically I mean about that rightward region. Similarly, maybe you want to highlight the top edges of an x only if it sits somewhere in an upward region of the diagram. giving what you hope will be a tighter association with the tiles up in that region, and then likewise highlight the left edges only if they sit in some leftward region, and the bottom edges only if they sit in some bottom region. Again, I am being vague about what exactly these four regions are and what defines the boundaries between them, but all I want to do right now is sketch a strategy motivated by this idea of avoiding the source

of the weakness that we saw when we focused on just one direction at a time. This vague intuition also has the benefit of suggesting where the extra highlighted edges might come from. We know that we need more tiles than there are X's, so perhaps however we do end up defining these four regions, any X that sits on the boundaries between them could get multiple highlighted edges, since it's kind of part of two regions at once. To make this all concrete, let's scale down to a smaller example, motivated by this loose idea of dividing the diagram diagram into four regions, each of which favors one direction, I'm going to draw a path going up and to the right connecting a sequence of X's, and likewise I'm going to draw another one going down and to the right, leaving us with this big wobbly cross over the whole diagram. The reason I want to go through X's is that we kind of want them to fall on the boundary so that we get that higher number if

we're going to highlight multiple edges for those on the boundary. Now having chosen two paths like this, we can be more exact about how the regions are defined. If an X lies on the right of both paths, you highlight its right edge; if it sits above both paths, you highlight its top edge, and likewise for those on the left and on the bottom. For any x on the boundary, highlight two of its edges depending on which quadrant it sits in. And again, this feels like a desirable thing to do. We know that we ultimately need a few more highlighted edges than the total number of x's. Remember the goal: why is it that we're highlighting edges in the first place? We want to be able to argue that no matter what the arrangement of x's on this grid, and no matter what pattern of tiles covers the remaining squares, We want to prove that the number of tiles used has to be at least as big as the number of edges that we're highlighting.

This is going to be true as long as every edge touches one tile and, importantly, every tile touches at most one highlighted edge. You'll notice for the example on screen if we put a number on each tile indicating how many highlighted edges it's touching, you do indeed only ever get zero or one. There's never a single tile touching multiple highlighted edges. And it's worth thinking through why exactly that's the case here. Why can't a tile touch two highlighted edges with the setup that we've defined so far? That's a very important question to answer because the entire argument rests on this assumption. It helps to focus on one specific tile, maybe this specific tile sitting in the left region. You'll notice this tile is actually touching four total X's, but only one of them has a highlighted edge touching the tile. And so you might ask, why can't any of those other X's that

it's touching have a highlighted edge that touches this tile? Well this tile is sitting in the leftward region, so any X above it could only ever have its left edge or its top edge highlighted. We know from how we even defined these regions, the bottom edge simply cannot be highlighted. Likewise for any X below the tile, that can't possibly have its top edge highlighted, and then the X to the left certainly can't have its right edge highlighted that would require that it's in the rightward region of the diagram. So in other words, this intuition we had to divide up the grid into four for total regions not only makes for a tighter association between the highlighted edges and the tiles, it also maintains that critical property that no two highlighted edges could possibly touch the same tile. And this right here, this diagram, is the core of the proof for this video.

But we do have some work ahead of us to show why exactly this setup gives us that specific tight bound that we're going for, that k^2 + 2k - 3 number. And really this just comes down to counting how many total edges have we highlighted with this new scheme, and that in turn comes down to understanding how many x's lie on these two boundary lines, the ones that criss-cross through the diagram. And it's at this point that it finally helps to put some labels down to describe the positions of all of our Xs rather than thinking purely pictorially. Maybe above each X you write down a number describing what row it sits in. And the fact that every row has exactly one X means that all of these labels represent every possible number from 1 up to k^2, but in some shuffled order. In other words, it is a permutation. When you draw a path going up and to the right connecting some of these Xs, you'll notice how the labels they correspond to are strictly increasing.

In the nomenclature, people would call this an increasing subsequence of the permutation. And likewise, for a path that you draw going down and to the right, if you circle the numbers corresponding to each x, what you get is a decreasing subsequence. Let's call the length of that increasing subsequence A_ and the length of that decreasing subsequence B_ If you want to count the number of highlighted edges, notice that each of the X_s in the diagram, all k^2 of them, get at least one highlighted edge. Or rather, almost all of them do. There actually should be four exceptions, which are the four touching the boundary of the grid, since those don't need to touch a tile. So we'll subtract that off. But then there's some extras, because each X on the increasing subsequence gets a second edge, so that adds a to our expression, and likewise each X on the decreasing subsequence also gets a highlighted edge, adding another b to our total. And if we really want to be detail-oriented, which we have to be,

there's also one other possibility, which is that an X sits on both paths, the increasing and the decreasing subsequence. And in that case it would actually have all four of its edges highlighted, but as we've counted things so far it would have only been counted three total times-once merely for existing, once for being on the increasing subsequence, and once for being on the decreasing subsequence. So in this special case we would need to add another one to our total. And this right here is a concrete expression now tantalizingly close to what we want. What we're saying, what we have effectively proven by this point, is that for any possible arrangement of x's that you dream up, described by some permutation of the numbers from one up to k^2, if you choose an increasing subsequence with length a, and you choose a decreasing subsequence with length b, you can guarantee that no matter what, the number of tiles you need to use is equal

to the number of tiles you need to use. must be at least this big. If you contrast this with the conjecture that we're trying to prove, the natural hope is to be able to argue that A plus B must be greater than or equal to 2k, which is two times the square root of the side length of the grid. So this is obviously close and very tantalizing, but it also might sound a little bit weird, like how can you guarantee that no matter what the arrangement of X's look like, it's possible to choose an increasing subsequence and a decreasing subsequence so that the sum of their lengths is at least twice the square root of the grid size?

First we might as well specify that A represents not just any increasing subsequence, but that it's the length of the longest possible one. In fact, to be more descriptive, let's change its name and call this quantity LIS. Likewise we have the freedom to specify which specific downward path we're choosing, so it might as well be the longest possible decreasing subsequence, and let's call the length of that LDS. Rearranging slightly, the final step of our proof is going to be is going to be to show that the average of these two lengths always has to be greater than or equal to k, and k here is the square root of the size of the permutation. This final fact no longer really has anything to do with the grid; it is a pure fact about permutations, and we can let our visuals abstract away from the grid for a moment. Maybe instead representing each one of these numbers with a bar whose height equals that number. You might notice that permutations where all of the decreasing

subsequences are very short tend to have a very long increasing subsequence, and on the flip side, any permutation where all of the increasing subsequences are short would have a very long decreasing subsequence. To finish out our proof, we need to make this trade-off quantitative. We need to show that no matter what permutation we're dealing with, the average of these two quantities has to be at least the square root of the size of the permutation. That is a little bit of a mouthful, so no sweat if it takes a moment to pause and digest what exactly this goal is. I also want to acknowledge that we have been through a lot so far, and throwing down one more proof within a proof might be straining the amount of focus that I can reason. can reasonably ask from you, but hang with me here. The final step that we're going to do is a real gem. I also want to say an honest depiction of what would happen for an actual Olympiad

student at this point who made it this far would be that they reference something that they might have seen in their training, the Erdős-Szekeres theorem, which we'll talk about in a second, but what I want to do for the purposes of this video is not just pull in some fact from out of the blue, I really like everything to feel like something you could have discovered Discovered yourself. It adds a couple minutes to what's already a long journey, but I think you'll agree it's worth it. Alright, so we're thinking about longest increasing and longest decreasing subsequences, and to build up some intuition let's just look at the extreme case the trivial permutation that lists all of the numbers in order from one up to N. This has a longest increasing subsequence of length N, and then every decreasing subsequence only has a length of one. Something else you could do would be to list all of the even numbers in order, first, and then all the odd numbers after that.

In this case, the length of the longest increasing subsequence would be at least n/2, and now the length of the longest decreasing subsequence is 2. The reason I'm saying at least n/2 instead of n/2 exactly is because of the case where n might be an odd number. Continuing with this trend, if you were to count up by three instead, you end up with a permutation where the longest increasing subsequence has a size at least n/3, and then a longest decreasing subsequence of size three. Now if you mull over this family of examples, you might be led to conjecture that the product of these two numbers always has to be greater than or equal to n. There's actually one example in this family that might look very familiar.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent