In SG-1, we see/hear planet designations like P3X-421.
Do these designations follow any sort of system, or is it all "writer discretion"?
If there is a system to these designations, what is it (either in-universe or out-of-universe)?
There doesn't seem to be any system aside from naming (almost) all planets in Milky Way galaxy wit "P" prefix (however, 1 planet started with "K", for no rhyme or reason, one "Bug" planet started with "B", and one moon with "M" - making "P" presumably stand for "Planet"; but also a planet in Pegasus galaxy starts with an "M" as well, because consistency!).
While it doesn't say so directly, the planet #s are likely taken from the index of the planet in the search program that Major Carter wrote to find other StarGates.
Second digit (which in ~20% cases is a letter like Y) doesn't seem to have any relation to the show season, as I was hoping.
There are various fan theories (e.g. designating planet's orbit #, designating planetary type/conditions, designating show season/episode (which I confirmed to be wrong); none of which seemed to have been shown to be true nor confirmed by creators.
UPDATE: As per "The Broca Divide" (S1E05) episode, my theory above is confirmed. The numbers come from a program on Samantha Carter's laptop:
HAMMOND: In one hour, you will go through the Gate to the planet represented by these symbols. It has been designated P3X-797.
DANIEL: Couldn't we call this planet something that's a little easier to remember?
CARTER: Ah, it's based on a binary code the computer uses for extrapolation.
General consensus is that they basically simply convert binary to ASCII.
Nothing was described on screen or off as far as I know to describe the planet designations. From this list here of all the planets in SG-1 every normal planet traveled to by the teams tends to start with P, likely planet or planetoid. The three that don't adhere to the P prefix are:
KS7-535: A world where the stargate is on an intensely cold snow / ice plain (cold enough to freeze a human body to death with only seconds of exposure) -- Sam sent Anubis there when he escaped Earth.
M4C-862: Moon, not a planet, gas giant can be seen in the background.
BP6-3Q1: Planet plagued by the bugs that almost turned Teal'c into a cocoon.
From the notations, K could stand for killer or not for unprotected human searching, M is likely Moon, and B or BP could mean Banned Planet or Bug Planet. It's not known if BP6-3Q1 was the initial designation, or if it was reclassified after the initial visit resulted in the bug attacking the Scoobies.
It's likely there is a meaning to each, and there are many address combinations that are invalid, blocked by an iris, not habitable to normal humans, or other, but since they are not visited on screen, we don't know more.
This is a matter of some debate. Basically, the show references gate addresses by a code, e.g. P3X-421, rather than by the gate symbols which would be tricky (though we later find they do have names/sounds that can be strung together to make words of a sort). An address is actually 6 (non repeating) gate symbols from a set of 38.
[Someone commented as a linguist that the idea of the gate symbols having sounds that make up the names of planets was crazy as no way the location in space and the name would happen to line up. They missed an obvious point that the people naming the planet may have been the Alterans and they named the planet using the sounds from the planet's gate address. But that is beside the point]
Anyway, back to these gate numbers. The Milky Way gates are almost all P something. This suggests that maybe the letter is not part of the address (P=Planet), but even the odd exception (M=Moon) does not quite fit, and a B and K have also been used. With no doubt deliberate irony the Pegasus gates start M.
This leaves 5 alphanumeric characters to define a gate address. Even if you take all letters and numbers (36 combinations), 36^5 is only 60,466,176, but there are 1,987,690,320 possible 6 figure addresses (38*37*36*35*34*33). So it cannot be a simple mapping to the gate address.
Let's pretend we accept the original description for how a gate address works.
The way it is described is that the 38 symbols (apart from point of origin) are constellations as viewed from Earth (which they are, you can work out which they are even), and that they represent points in space. You need 6 so as to make three lines which intersect at the destination, and then to "plot a course" you need a 7th (point of origin).
OK, here are a for of the issues:-
A constellation is not a point in space, the "stars" that make it up are at different distances and some may even be very distant galaxies.
Even if these symbols represented a point in space, the chances of ever making three lines that intersect exactly out of 38 arbitrary points is, well, slim at best. The chance that such an intersection is actually where you want to go (hits a planet, or even a solar system) is even slimmer. It is just not a way to address points in space.
Obviously, even if using points in space as a reference, you can make a target using just one line and one point. Even so, the possible points are nowhere near enough to address a planet or solar system in the galaxy from 38 control points. The fact you used reference points means that actually the expansion of the galaxy is likely to ensure gate addresses do stay the same, yet apparently they stop working after a while.
You obviously do not need a point of origin - the origin is "here". If you did, then how come it does not also take 6 symbols to define it. Also, does that mean by dialling a different symbol as the 7th you create a wormhole from some distant gate to some other gate in the galaxy?
OK, let's forget all of that, it is a film, let's pretend it makes sense, and that is how gate addresses work.
Well, that may solve the gate numbering issue. Each line is a pair of symbols, but clearly it does not matter which way around they are as they make the same line. So that reduces the combinations by 8 (2 for each of the three lines). Also, the order of the 3 lines does not matter, so that reduces the combinations by 6.
So instead of 1,987,690,320 gate addresses, we have only 41,410,215. This is smaller that 36^5. In fact it can be covered by 34^5 which is nice, as I would leave out "I" and "O" to avoid confusion with "1" and "0".
So yes, in theory, the Pxxxxx could be a full gate address using just the 5 letters and numbers. And the "P" could indicate type of destination somehow.
Of course, what the actual mapping is, is a different matter. It is very likely they are just random.