How do we know that the algorithm of Bitcoin does not embed bugs since inception? I'm new to Bitcoin. My understanding as a trained economist (and not a programmer or IT expert) is that the key selling point of Bitcoin is the assignment of monetary policy prerogatives to an algorithm distributed across a P2P network. What this means is that people do not have to rely on a human politician (and his promises) to protect the value of the currency (which, philosophically, represents their past work) by not printing new money discretionally. Instead, they would give this task to an algorithm distributed over a P2P network, which, by definition, will KEEP its promises and will not be under the control of any one single person.

Now, my questions are:


How do we know that the algorithm cannot be modified to gain control over the expansion of the monetary base? After all, I don't think that there exists a man-made software that cannot be hacked.
Many discussions on this forum flag that suck a type of attack would be extremely expensive if not impossible. However, how do we know that such type of bug isn't already in the algorithm? See question 3
How do we know that Satoshi hasn't left a bug in his software (or purposely left out some important protective codelines) that will allow him to artificially steal or claim bitcoins at his/her discretion? After all, Satoshi, the inventor of the software has not revealed himself (or herself).
Even if Satoshi did not actually steal the money for himself, but simply left an option for himself to increase/decrease the speed of expansion of the monetary base, that would still give him a 'soft', yet enormous power, making him a de facto central bank (and people would not necessarily be aware of this). How do we know that this could not happen?
I'm going to answer your questions directly although I know you've selected another answer. It's for all those who come across this question.


  How do we know that the algorithm cannot be modified to gain control over the expansion of the monetary base? 


These are part of the config settings of the Bitcoin protocol. It can be changed but all you would be doing is changing your own node. You would have to convince all the other nodes to change their settings too and additionally you would have to be able to mine coins faster than anyone else to guarantee that you were generating the coins. Without getting too technical, this is the power of a p2p distributed network, the crowd matters, not the individual.


  After all, I don't think that there exists a man-made software that cannot be hacked.


Nobody is saying that one day in the future we won't find a way to hack the security of bitcoin. But if we do then everything is broken, including the internet. The type of security that is used to send your bank details between servers, or when you log in to secure https websites relies on the same type of security. Even the NSA rely on this security. But if it does happen, we just move to the next level, and send our coins to a new address. (It's a little more complex but I summarise).


  Many discussions on this forum flag that suck[sic] a type of attack would be extremely expensive if not impossible. However, how do we know that such type of bug isn't already in the algorithm? See question 3


We know because anyone can look at the code. It's open source. If someone found a bug it would have been exploited already, it is the biggest financial prize in history, you don't think people are trying all the time? They have been trying for 5 years. It may happen if and when a new function is added which is why the core developers need a lot of support from the community.


  How do we know that Satoshi hasn't left a bug in his software (or purposely left out some important protective codelines) that will allow him to artificially steal or claim bitcoins at his/her discretion? After all, Satoshi, the inventor of the software has not revealed himself (or herself).
  Even if Satoshi did not actually steal the money for himself, but simply left an option for himself to increase/decrease the speed of expansion of the monetary base, that would still give him a 'soft', yet enormous power, making him a de facto central bank (and people would not necessarily be aware of this). How do we know that this could not happen?


Just because the developer chose to be anonymous doesn't mean he has anything to hide. Also see my answer above, the code is open source.

The only thing that Satoshi could do that may cause problems is dump his coins on the market. That might spook people and the price might drop considerably, but the whole mechanism is pretty robust and it does what it is supposed to do. So unless there is a real problem, people will just scoop up the cheap coins and we'd all carry on with the mission.

EDIT I just want to add that although Satoshi is revered, his coding style has been criticised for various reasons, and some would say he was not an out and out programming expert. Indeed bugs were discovered early on and corrected, by everyone involved at the time.