Some questions about the abstract math behind mongodb

Hey eveyone, I have got some questions about how mongodb works if you can have a look at them

  • Mongodb uses B trees, but how does it determine the degree of the trees it is going to create for the indexes (nb of children/ keys)
  • Is there a specific static rule on when are compound indexes used ? Is there any math demonstration to prove it ?
  • How do wildcards index work ? is it some kind of lazy evaluation or is it just like creating an index for all the fields (bad performance) ?

Best regards