Invaderzim,
I think BB wanted a true tristate output.
Your circuit is perfectly adequate for normal use but may not provide the true tristate output that BB wanted. Tristate being interpreted as the output "floating or not connected" either to logic hi or low.
The drawing has the output from the collector of Q1 connected to +5V (Hi) via the 500k resistor. While the resistor value is high enough to possibly simulate a "tristate" condition, when the PIC output is lo, there still will be slight current flow and depending on the requirements/circuit conditions of the device connected to the collector the output may still be read as a weak logic hi.
There is slight current flow with any high Z circuit; "high Z" never means "infinite Z." That being said, 5V out of 500K ohm is 10 uA: any logic driver worth its salt can do that. Not good enough? Make it 1M ohm. Or 10M. You can get whatever your definition of "high Z" is.
The resistor cannot be optional as the collector will never be able to go hi which is a requirement of BB's circuit.
I read the requirement to be: output a pulse that is either 1) low or 2) high Z. An alternative requirement is to output a pulse that is either 1) high or 2) high Z. For the former, the NPN will do; for the latter, the PNP will work. The pullup is not required to achieve high impedance, since the transistor is already high Z.
When pulse in is hi, Q1 collector will be lo, when pulse in is lo, Q1 collector will be a weak hi. There is no tristate - not connected to hi or low possibilities here.
The fact that it is a "weak high" instead of a random (floating) voltage is irrelevant; I guarantee that anyone foolish enough to read a high Z data line will always get either a 1 or a 0...and it will be wrong half of the time. The rule is you never read an undriven data line!
The goal of a high Z data line is to allow other drivers to "take over" the wire and drive it at their will with minimal interference. With a decent transistor you'll do just that.
I personally will go for a tru tristate chip like Womai suggested though that will require a seperate Pic output to switch the chip into tristate mode.
If it's a chip that gives you, say, 8 outputs for the price of 2 or 3, then I'm all for it (assuming you need them). But if you just need the one wire, well, I'll stay stubborn here and say that my circuit is the bestest circuit in the whole wide world