For this question I'll be assuming a 4 character party, so you can adjust the number of players necessary. When figuring out encounter difficulty, there are a few things that are mentioned but not expanded on in the DMG, which I will talk about here:
- Party composition vs monster abilities. This is by far the biggest factor in calculating encounter difficulty. The CR in the Monster Manual and the DMG are, in my opinion, only valid for some party compositions. I've had parties which had trouble with what should have been a medium encounter, and others that breezed through deadly encounters. A level 20 sorcerer/warlock multiclass, for example, can kill a Tarrasque (CR 30) almost comically easily if he starts far enough away, but will be defeated in about 5 rounds by a Solar (CR 21).
Here's what you need to consider:
- Damage dealing: Can the party RDPR surpass the boss's RDPR (Relative Damage per Round), meaning can they take a bigger chunk out of his health every round than the one he can take from them. For hard encounters, the party RDPR should be slightly higher, or even for deadly encounters.
- Damage Resistances: What kind of damage can my party do, and is he immune or resistant to this damage. If he is immune or resistant to half or more of the possible damage types, double his effective HP. If he is vulnerable to damage dealt by the party, lower his effective HP.
- Monster Range vs Party Range: Can the monster reach your PCs, or is he left in the dust? Is he mainly a melee character or a spell-caster. In Asmodeus' case, you have a basically half-melee half-caster monster, so this isn't a huge thing to worry about for you, but any melee characters are gonna have a tough time hitting him due to his speed, flight and wall spells.
- Tanks. In battle of titans such as this, chances are one side will win by attrition more than by a one-hit kill. If you have both a wizard and a moon druid for example, the wizard can cast sympathy/antipathy on the druid to force Asmodeus to attack him first. Given Asmodeus' low damage output, he would never be able to put down a level 20 druid, who could constantly use Combat Wild Shape, using his basic attacks, forcing him to use spells on the creature. If a healer is also in the party, or if the druid uses his spell slots to heal, the rest of the party will bring down Asmodeus without any problem.
- Control spells and CC. Although Asmodeus doesn't have any attacks that cause massive damage to one character, he has a fair share of crowd control attacks that can damage a sizable group.
- Frightful Presence. The party killer, who has brought more than one legendary group to its knees. Given Asmodeus' DC 26 save against being frightened, it's fair to say many will be affected. Barbarians, however, will pas with flying colors if in rage; druids, wizards (especially divination), and monks also have a fair chance of succeeding, especially with later immunities for the monk; and fighter and rogue have also a fairly good chance with their class features.
All in all, my conclusion is the following: given a party of four who is also accompanied by a CR 30 Tiamat, not only do you not need to add anyone to the party, you can probably give a small buff to Asmodeus. If the party has weaker gear, such as no legendary items or artifacts, you can add one party member.
You can also simply take Asmodeus as he is now, and add one or two level 20 NPCs on his side if the party is particularly strong (i.e. Moon Druid, Divination Wizard, Warlock 2/Sorcerer 18, and Rogue/Bard)