How does one prove the formula for entropy $S=-\sum p\ln p$?
Obviously systems on the microscopic level are fully determined by the microscopic equations of motion. So if you want to introduce a law on top of that, you have to prove consistency, i.e. entropy cannot be a postulate.
I can imagine that it is derived from probability theory for general system. Do you know such a line?

Once you have such a reasoning, what are the assumptions to it?
Can these assumptions be invalid for special systems? Would these system not obey thermodynamics, statistical mechanics and not have any sort of temperature no matter how general?

If therodynamics/statmech are completely general, how would you apply them the system where one point particle orbits another?


Question: perl how to print out a hash with multiple keys?
Answer: The values in %hash are references to other hashes. If you want to print the keys and values of those hashes, you'll have to instruct Perl to do so.

for my $loginId (keys(%hash)) {
   for my $month (keys(%{ $hash{$loginID} })) {
      print("$loginID $month $hash{$loginID}{$month}\n");
   }
}