All the trains on the London Underground have a number on the front, which I've learnt is called the "set number". I've noticed that the trains on each line tend to have numbers which are close together. (For example the District line trains often have numbers in single or double digits, whilst Piccadilly line trains are usually around 2 or 3 hundred).
What are these numbers based on? Is it the line that the train is on, or is to do with the rolling stock used? I know most lines have use their own set of rolling stock, but in places where they don't (eg District line trains to Edgware Road), which set numbers do they use?
Also, if anyone could point me to a list of the exact ranges of set numbers used, that'd be much appreciated.