A perfect type polynomial is a sequence of Pokémon types where each type is super effective against the next type in the sequence, resists the previous type, and the sequence wraps around to form a loop. Using graph theory, we can model the 18 Pokémon types as nodes and reversible type interactions as directed edges. In the current Pokémon type system, there are exactly 18 perfect type polynomials: 4 triangles, 3 squares, 3 pentagons, 1 hexagon, 3 septagons, 3 octagons, and 1 nonagon. However, only the 4 triangles are perfectly fair, as larger polynomials inevitably create imbalances where some types have more advantages or disadvantages than others.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Every Pokémon Type Triangle (And Other Shapes, Too)
Added:Fire is good against grass. Grass is good against water. Water is good against fire. These are the sacred tenants of the Pokemon world. The iconic starter type triangle that we all know and love.
Or maybe you don't love it. I don't know you. However, this isn't the only type triangle you can make in the current world of Pokémon. There are actually 16 of them. Dark is strong against psychic, which is strong against fighting, which is strong against dark. Flying is good against grass, which is good against rock. Why, you ask, has Pokemon stuck with the same boring starter triangle generation after generation, depriving us of the opportunity to have a ghost, a ghost, and another ghost? Well, probably because the grass, water, fire trio has another property that people don't talk about as often. It is perfectly reversible. Every type is super effective against the next one in the sequence, but it also resists the one that comes before it. This makes it one of the rare examples of a perfect type triangle, unlike these other three.
But is it the only one? Are there any other type triangles that could form the basis for a totally fair starter trio?
And do we even need to stop at a triangle? Could you make a perfect type square pentagon? Could you go absolutely crazy and make a perfectly balanced starter nonogon of types? How many perfect type shapes could you possibly make? In this next installment of questions you didn't know you had until you saw it in a thumbnail and thought, "Huh, yeah, I guess I am kind of curious about that." We find out and I promise it only involves a little bit of combinotaurics and graph theory.
Richard, hit that intro.
Right. So, our goal today is to try and find every possible perfect type polomial because I'm a pretentious math guy and don't want to just use the word shape.
And for the purposes of today's video, a [music] perfect type polomial must satisfy these three conditions. Each type is super effective against the next type in the sequence, resists the previous type in the sequence, and the sequence must wrap around back to where it started, forming a loop. I'm also going to add in a caveat and say that each type may only be used once in the sequence. This is to remove trivial solutions that are basically just the same as a smaller one, just stretched out. For example, you could technically say that fire is strong against grass, which is strong against water, which is strong against a different fire than water, and back to grass. And you could just keep like expanding this out to infinity, but you haven't really added anything new here. We're only interested in wholly unique perfect type polomials.
Now, I could painstakingly go through every single type interaction and manually search for every reversible loop. There's just two problems with that approach. It sounds terrible and I'm very lazy. But don't worry, because there's an area of math that can help us out called graph theory. Because yeah, that's the real secret to math that none of your teachers filled you in on. It's just a way to get away with being lazy.
Graph theory is a branch of math all about well graphs. But not these type of graphs. These type of graphs often referred to as networks that model how different things are related. Every graph is comprised of two main pieces.
You have nodes represented by points and edges represented by lines connecting nodes together. And you can use this sort of network graph to model all sorts of things from food supply chains to social ties to literal [music] internet networks to something even more important than any of that.
Pokemon's type chart. Let's start by creating a node for all 18 types currently [music] in Pokemon. Awesome.
Step one done. See, math is easy. Now, we could go in here and add an edge for every single interaction in Pokemon's insane type chart and wind up with a complicated unreasonable mess. But remember, math is all about being lazy.
We actually don't have to do any of that. In a perfect type polomial, every type needs to be strong against the one that comes after and resists the one that comes before. So rather than modeling every type interaction, we actually only care about type pairs that are reversible. Type A is strong against type B and also resists type B coming the other way. If a type interaction like say flying and ice doesn't satisfy both of these conditions, then it can never appear as a part of a [music] type polomial. Ice is good against flying, but flying is neutral against ice. It's not reversible. Let's call any set of types that satisfy both these conditions a perfect pair and draw an edge on our graph connecting every perfect pair together. And rather than just drawing a straight line, let's draw an arrow pointing from the strong type towards the weak type. This is called a [music] directed graph. A network with directions. And that leaves us with something like this. Pokemon's perfect type graph. As you can see, there are four types that are totally unconnected.
Dragon, ghost, ice and normal have no perfect pairs and as such cannot possibly feature in any perfect type polomial. Rest in peace ghost dream.
They're like literally rip they're ghosts you know they're dead. That leaves us with this 14 node directed graph. In order to locate type polomials we need to find what are called loops. a sequence of directed edges that eventually circle back around to where you started. You can probably spot a couple already, like the famous grass, fire, water triangle down here. If you start on fire and follow the arrows around, you'll eventually get right back to fire. Now, again, I could find all of these by hand, but that's annoying. So instead, I wrote a program that will search this graph for [music] any loop, ensuring that no type is repeated and ignoring any loop that is functionally the same as another, just rotated. And just like that, we have our answer. See, I told you it was only a little bit of graph theory. So leave your guesses in the comment section down below on how many perfect type polomials you think there are and what the biggest possible shape is.
No, I'm serious. Like, go do it right now. I'm about to give you the answer in like two seconds. In the current state of Pokemon, there are a grand total of 18 perfect type polomials. Four triangles, three squares, three pentagons, one hexagon, three septagons, three octagons, and the largest one type nonagon. starting on bug, then moving to grass, then water, fire, steel, fairy, fighting, rock, flying, and back to bug.
And because all of these sequences are perfect, they could technically be used to create a balanced set of starters.
You could create a sort of industrial region with a fire, steel, and a rock starter. But maybe it'd be fun to make the secondary types of each starter another perfect type triangle going the other way around where the primary type is strong against one starter and then the secondary type is strong against the other. Something like a grass and flying type, a water and rock type, and a fire and fighting type. So, we could sure use more of those, couldn't we? And of course, there's absolutely no reason you need to stop at just three starters. As long as you give your rival whatever Pokemon comes next in the loop and perhaps a weaker rival whatever came before, you'll always maintain the exact same balance as the base games. Why stick with the normal type triangle when you could throw a bug in there and make it a square? The Kos games went crazy and included four rivals, but completely missed the opportunity to use a type pentagon and make a starter for each of them. I mean, like, rip Greninja fans, but mathematically it is the most expendable one. And yes, that does mean that if someone was hypothetically looking to make a fan game with a unique gimmick, they could include nine starter Pokémon and let players pick between.
And I'm just, you know, spitballing here and definitely didn't spend 30 to 40 minutes searching for a perfect fit for each one. A Serena, Seismode, Colossal, Agron, Grimstar, Machamp, Garnicle, Crobat, and Orbital. Again, just like off the dome here. However, saying that all these type polomials are just as fair as the classic type triangle might not be entirely true. Really, it depends on how you implement it. If, like in the normal Pokémon games, your rival just picks the one that's strong against you and maybe a secondary rival picks the one that's weak to you, then sure, these all work great. No matter what type you pick in the sequence, both rivals would have a valid balanced pick.
But if you take a look at, for example, this type square that I mentioned earlier, bug, grass, water, fire, you could argue that there's a clear choice here. Yes, every type is strong against the one after it. But fire is also strong against bug, the one across from it. [music] Now, again, if you only have at most two rivals, this doesn't really matter. Sure, fire would be strong against two of the other starters, but you'll never actually see one of them, so who really cares? But maybe you do want to include a rival for every starter in the game, or just don't want to give one a clear advantage in all the schoolyard brawls by making it [music] good against half the other potential starter picks. Of these 18 perfect type polomials, how many of them are actually fair? This is a bit trickier to figure out but not impossible. In order for a polomial to be fair, there needs to be some sort of balance in the strengths and weaknesses of each type. So no one is inherently stronger relative to the others in the same shape. And we can quantify this by calculating the degree of each node. The degree is basically just the total number of edges connected to a node. So in a simple graph like this one, this node would have a degree of one and this one here would have a degree of five. In a directed graph like our Pokemon type chart, we can even get more specific and measure both the in degree, [music] the amount of edges coming into a node, and the outderee, the number of edges going out of a node.
The way I see it, there are two different definitions we could use for a fair graph. We could require that each and every node on the graph has an inderee equal to its outderee. If every single node is weak to the same number of types in the graph that it's strong against, then they're all perfectly balanced, as all things should be. A slightly more complex definition would be saying that the difference between the strengths and weaknesses of each node must be the same, but the exact values don't need to be equivalent to each other. For example, say one type is strong against six other starter types and weak to four, while another is only strong against three, but also only weak to one. You could argue that type A is stronger because it's better against more types in the graph. But there's also more types that are good against it. Type B isn't great against that many, but also less likely to be blown back by a super effective hit. One is more offensive, another more defensive.
They're not equivalent to each other, but because the differences between their outderee and in degree are both two, then they're balanced against one another. So, which one should we pick?
Well, interestingly, it actually doesn't matter because both of these definitions wind up being exactly the same. And that situation that I just described actually isn't possible. It's a little weird, but think about it like this. Every single edge in a directed graph has to start somewhere and end somewhere else. You're not allowed to have an edge coming from nowhere or pointing to nothing. In more technical terms, [music] the total in degree and outderee across the whole graph must be equivalent. If we wanted to create a balanced graph that I described earlier where each type has say one more outderee than in degree that would mean that the total outderee would be greater than the total in degree which again is not possible. In order for an edge to come out of one node it has to go into another. In other words, the only way to make a fair perfect type polomial is to make it totally balanced. Every node's in degree must be equal to its outderee. This will always be true as long as we're only looking at reversible type interactions. When we first constructed these polomials, we were only looking at instances where a type [music] being strong and gets another means it also resists that type coming back. And that was important for making these polomial loops, but technically not needed when determining the fairness across the diagonals. You could have a case where a weakness comes from one type, but a resistance comes from a different direction to balance it out. And you also have to make sure that not only is every type strong against the same number of types that are strong against it, but also that it resists the same number of types that resist it since they're no longer inherently linked together. And then you have to consider immunities, which are basically like a stronger version of a resistance that throws the balance all out of whack. And once again, in the end, it doesn't actually matter because I wrote another program that checked all 18 perfect polomials for all of this and found that there are only four possible [snorts] fair type poloms in Pokemon and it's the four triangles. Anything larger and there's going to be some sort of imbalance. The reason the triangles are always fair is because, well, it's actually mathematically impossible to make an unfair perfect type triangle. By their very definition, we know that every type needs to be strong against one and weak to another. And look at that. That's all the possible edges filled in already. No room for anything else to throw off the balance. However, that's not to say that it's mathematically impossible to have a fair perfect type polomial of a size larger than three. It's actually pretty easy.
For example, this type pentagon that only uses reversible type interactions is perfectly fair. Every node has two edges coming in and two edges coming out. It's just that the current Pokemon type chart doesn't allow for any of these graphs to form. So there you have it. It is technically possible to create 18 perfect type polomials to base your starter selection around. But as of now only four of them are perfectly fair.
And this has been another installment of questions you didn't know you had until you got halfway through a video that you thought had answered all your questions about an already niche topic until I brought something else up that made you say, "Huh, yeah. Yeah, I guess that is also a good question now. You mentioned it. Until next time."
And a massive thank you to all my supporters on Patreon, including Alakazam, Aspa102, Big Dog, Ty for to win, Cydian, Sherry and Mark, the boss killer 94, Moyubu, Stylish, Alex, Richard Devote III, Comfy Cat, and Dne Bramage.
Related Videos

Definition:Bounded variation and if f is monotonic on [a,b] then f is Bounded variation on [a,b]
wingsofmathematicsbytanush2507
4K views•2019-09-05

Prof Chris Holmes | Bayesian fitting and evaluation of complex models arising in...
uclfacultyofpopulationheal9290
564 views•2019-07-03

Patrick Landreman: A Crash Course in Applied Linear Algebra | PyData New York 2019
PyDataTV
9K views•2019-11-30

Approximating the Standard Deviation from Data of a Histogram
donnasmith8529
15K views•2019-09-26

HSC Maths Standard 2 | "At Least One" Probability Rule
ATARNotesHSC
697 views•2019-05-20

Spectral Sequences Live! 17: The Grothendieck spectral sequence
k-theory8604
395 views•2025-11-10

Structural Equation Modeling for Beginners
QuantFish
1K views•2025-09-30

Exploring Practical Applications of Linear and NonLinear Models In Business Research Dr.Jeelan Basha
MallikarjunaDKaggal
258 views•2025-05-26
Trending

Independent Autopsy Proved Nolan Wells Was Hanged!!
taylorhousepublishing7785
27K views•2026-07-24

Flash Drought in Europe...
WeathermanEurope
36K views•2026-07-24

Nobody Respected The Penguin | The Batman (2004)
SerumLake
12K views•2026-07-24

And Now He Is Coming For More
TheFinePrintYT
12K views•2026-07-24