Require x of y possible passwords to decrypt Is there a way to set up encryption so that a certian number (x) out of a total (y) number of users/passwords are required to do the decryption? 

Background: This is mostly a thought experiment, and I don't have a realisitic real world application for it, although they may exist. I recall first getting the idea from an interview with Edward Snowden (Neil deGrasse Tysons podcast I beleive), but cannot find any follow information about the concept.

Hypothetical example 1: There are 3 "leaders" to a finctional technologically country. In order to start a war, 2 of them must agree and provide their crypto keys to decrypt the required commands/codes.

Hypotheical example 2: There are 435 congressmen in the USA. Sometime in the future, bills must be passed using cryptographic methods. 50% of them must provide their key/password in order to get the master key and pass a law.

Trivial Solution: For each combination users, encrypt the master decryption key in order (alphabetical by username). For the first example, there are only 3 combinations, and it is trivial to just encrypt the master key 3 different ways. Unfortunately this does not scale well. For the second example, 218 out of 435 gives us ~3*10^129. (For reference, there are 10^80 atoms in the universe.)

Is their a more programatic way to perform this type of encryption? The more I learn about crypto, the more I see amazing applications for reletively straightforward mathematical algorithms.
This is a well studied problem in cryptography; what you're looking for is known as a Secret Sharing Scheme.  This is a scheme where we take a master secret, and from that generate $N$ shares, and with any collection of $T$ shares, we can reconstruct the master secret (and we can't with $T-1$ of them).  We can make $N$ and $T$ as large as we like, and so it works in the "any 218 out of 435" case.

See this article for more details, as well as pointers to practical ways to implement it.