background preloader

Combinations and Permutations

Combinations and Permutations
What's the Difference? In English we use the word "combination" loosely, without thinking if the order of things is important. In other words: So, in Mathematics we use more precise language: In other words: A Permutation is an ordered Combination. Permutations There are basically two types of permutation: Repetition is Allowed: such as the lock above. 1. These are the easiest to calculate. When we have n things to choose from ... we have n choices each time! When choosing r of them, the permutations are: n × n × ... (In other words, there are n possibilities for the first choice, THEN there are n possibilites for the second choice, and so on, multplying each time.) Which is easier to write down using an exponent of r: n × n × ... Example: in the lock above, there are 10 numbers to choose from (0,1,...9) and we choose 3 of them: 10 × 10 × ... (3 times) = 103 = 1,000 permutations So, the formula is simply: 2. In this case, we have to reduce the number of available choices each time. Do you see? 1. 2.

Binomial Distribution To understand binomial distributions and binomial probability, it helps to understand binomial experiments and some associated notation; so we cover those topics first. Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties: The experiment consists of n repeated trials. Consider the following statistical experiment. The experiment consists of repeated trials. Notation The following notation is helpful, when we talk about binomial probability. x: The number of successes that result from the binomial experiment. n: The number of trials in the binomial experiment. Binomial Distribution A binomial random variable is the number of successes x in n repeated trials of a binomial experiment. Suppose we flip a coin two times and count the number of heads (successes). The binomial distribution has the following properties: The mean of the distribution (μx) is equal to n * P . Binomial Formula and Binomial Probability

Free Online Version of Core Servlets and JavaServer Pages (Second Edition) in PDF The normalcdf( Command - TI-Basic Developer Command Summary Finds the probability for an interval of the normal curve. Command Syntax normalcdf(lower, upper [, μ, σ]) Menu Location Press: 2ND DISTR to access the distribution menu2 to select normalcdf(, or use arrows. Calculator Compatibility Token Size 2 bytes normalcdf( is the normal (Gaussian) cumulative density function. There are two ways to use normalcdf(. for the standard normal distribution :normalcdf(-1,1 for the normal distribution with mean 10 and std. dev. 2.5 :normalcdf(5,15,10,2.5 Often, you want to find a "tail probability" - a special case for which the interval has no lower or no upper bound. The normal distribution is often used to approximate the binomial distribution when there are a lot of trials. :binompdf(N,P,X can be :normalcdf(X-.5,X+.5,NP,√(NP(1-P :binomcdf(N,P,X,Y can be :normalcdf(X-.5,Y+.5,NP,√(NP(1-P As with other continuous distributions, any probability is an integral of the probability density function. or in terms of the error function:

Top 10 Cloud Computing Startups in Boston Depending on who you talk to, cloud computing is either one of the most significant technology transformation since the advent of the world wide web, or one of the most over-hyped fads since virtual reality. For today’s post, I thought I’d do a round up of the top cloud computing startups in the Boston area. But first, a confession: classifying a company as in or out of the cloud computing market is subjective. It reminds me of classifying Internet companies back in the mid-1990s (does having a web site make you an Internet company?), and is further complicated by the fact companies are scrambling to re-brand themselves with the cloud. If you haven’t noticed, Salesforce.com is now known as “the enterprise cloud computing company”, and Akamai is “the leading provider of cloud optimization services." So I have adopted a simple rule of thumb: if you think you’re a cloud company, then for the purposes of this top 10 list, I’m going to call you a cloud company. Conclusions

Liar paradox In philosophy and logic, the liar paradox or liar's paradox (pseudómenos lógos--ψευδόμενος λόγος—in Ancient Greek) is the statement "this sentence is false." Trying to assign to this statement a classical binary truth value leads to a contradiction (see paradox). If "This sentence is false." is true, then the sentence is false, but then if "This sentence is false." is false, then the sentence is true, and so on. History[edit] The Epimenides paradox (circa 600 BC) has been suggested as an example of the liar paradox, but they are not logically equivalent. One version of the liar paradox is attributed to the Greek philosopher Eubulides of Miletus who lived in the 4th century BC. The paradox was once discussed by St. "I said in my alarm, 'Every man is a liar!' In early Islamic tradition liar paradox was discussed for at least five centuries starting from late 9th century apparently without being influenced by any other tradition. Explanation of the paradox and variants[edit] E2 is false.

Dynamic Programming Practice Problems This site contains an old collection of practice dynamic programming problems and their animated solutions that I put together many years ago while serving as a TA for the undergraduate algorithms course at MIT. I am keeping it around since it seems to have attracted a reasonable following on the web. Eventually, this animated material will be updated and incorporated into an algorithms textbook I am writing. -- Brian Dean To view the solution to one of the problems below, click on its title. Problems: Maximum Value Contiguous Subsequence.

Boolean algebra Boolean algebra was introduced by George Boole in his first book The Mathematical Analysis of Logic (1847), and set forth more fully in his An Investigation of the Laws of Thought (1854).[1] According to Huntington the term "Boolean algebra" was first suggested by Sheffer in 1913.[2] Boolean algebra has been fundamental in the development of digital electronics, and is provided for in all modern programming languages. It is also used in set theory and statistics.[3] History[edit] In the 1930s, while studying switching circuits, Claude Shannon observed that one could also apply the rules of Boole's algebra in this setting, and he introduced switching algebra as a way to analyze and design circuits by algebraic means in terms of logic gates. Values[edit] As with elementary algebra, the purely equational part of the theory may be developed without considering explicit values for the variables.[12] Operations[edit] Basic operations[edit] The basic operations of Boolean algebra are as follows. J.

Dynamic Programming Archives - GeeksforGeeks A Derangement is a permutation of n elements, such that no element appears in its original position. For example, a derangement of {0, 1, 2, 3} is {2, 3, 1, 0}. Given a number n, find total number of Derangements of a set of n elements. Examples: Input: n = 2 Output: 1 For two… Read More » Given a “m x n” matrix, count number of paths to reach bottom right from top left with maximum k turns allowed. What is a turn? Given a matrix where every cell has some number of coins. Given an array of numbers and a constant k, minimize size of array with following rules for removing elements. Given a linear equation of n variables, find number of non-negative integer solutions of it. Given a n*n matrix where numbers all numbers are distinct and are distributed from range 1 to n2, find the maximum length path (starting from any cell) such that all cells along the path are increasing order with a difference of 1. Consider the below problems statement. Given a string consisting of only A’s and B’s.

'Truth or Lies' Brain Teaser Truth or Lies Logic puzzles require you to think. You will have to be logical in your reasoning. You are traveling down a path and come to a fork in the road. Answer You point to either path and say, "Are you from this village?" Back to Top Why You Should Never Use MongoDB « Sarah Mei Disclaimer: I do not build database engines. I build web applications. I run 4-6 different projects every year, so I build a lot of web applications. I’ve picked the wrong one a few times. The project Diaspora is a distributed social network with a long history. But they hit a nerve. Diaspora was the first Kickstarter project to vastly overrun its goal. As a result of their Kickstarter success, the guys left school and came out to San Francisco to start writing code. They ended up staying at Pivotal for more than two years. That’s a lot of buzzwords. “Distributed social network” If you’ve seen the Social Network, you know everything you need to know about Facebook. A screenshot of the Diaspora user interface There’s a feed in the middle showing all your friends’ posts, and some other random stuff along the sides that no one has ever looked at. The Diaspora infrastructure is not located behind a single web address. Pods of different sizes communicate with each other, without a central hub.

How This Web Site Uses MongoDB Warning: this post is intended for developers. It gets a bit technical! Sometimes I'm asked what platform we're running the Business Insider on. Well, we're using LAMP, of course: Linux, Apache, Mongo, PHP. After I get past defending our choice of PHP to the haters (you know who you are!) So what's Mongo? MongoDB is an open-source, non-relational database that combines three key qualities: scalable, schemaless, and queryable. Mongo's design trades off a few traditional features of databases (notably joins and transactions) in order to achieve much better performance. So Mongo occupies a sweet spot for powering web apps. Full disclosure: TBI and 10gen, the developers of MongoDB, share certain investors and board members. Here's why and how we use it: It's Scalable TBI gets fairly high traffic, and we're growing quickly. When we do eventually need to scale up further, Mongo has automatic sharding features to distribute data and load across multiple boxes. Document-oriented, not relational

13 Highly Useful Free Programs and Websites That Any LifeHacker Must Try There’s plenty of useful free computer programs and websites that a lot of people don’t know about. Hopefully, after reading this post, your time spent in front of the computer will become a bit more healthy, productive, and easily managed. 1. VidtoMP3 VidtoMP3 helps you convert YouTube videos into mp3s for you to play on your computer. Easy as pie. 2. f.lux You know how you’re not supposed to sit in front of LED screens and expose yourself to blue light at night if you want to sleep well? f.lux can help with that. I’ve been using f.lux for over a year and I really recommend it. 3. RescueTime sends you weekly reports on how you’ve spent your time by the computer. You can personally adjust what kind of activities you want RescueTime to consider productive or distractive. 4. Want to appear hard-to-get by waiting to reply to someone, but afraid you’ll forget to reply if you wait too long? Just click the Boomerang box and set the date and it’ll be scheduled automatically. 5. 6. 7. 8. 9. 10. 12.

The 20 Startups Marissa Mayer Has Acquired at Yahoo Yahoo acquired app maker Lexity on Wednesday, the company's 20th since Marissa Mayer became CEO of Yahoo a little more than a year ago. Twenty startups is no small number, especially when you consider that in just 13 months, the 18-year-old company has boosted its acquisition count by nearly a quarter. The majority of these acquisitions have been small — five were purchased for only $16 million together — and were more often for talent than specific products. Generally speaking, Mayer has sought out companies that have built promising, if unsuccessful, consumer-facing mobile apps. In a few cases, the acquisitions were for more than talent. Here's a look back at the 20 startups Mayer has acquired so far during her tenure at Yahoo: The List 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. What's Next Yahoo still has plenty of cash to spend on acquisitions — $4.8 billion as of the end of June. The company has built up a solid base of mobile engineering talent to date.

Related: