Skip to main content

combinatorics

Permutations and combinations




Binomial coefficients

An ordered Set a1a2,…, ar of r distinct objects selected from a set of n objects is called a permutation of n things taken r at a time. The number of permutations is given by nPn = n(n − 1)(n − 2)⋯ (n − r + 1). When r = n, the number nPr = n(n − 1)(n − 2)⋯ is simply the number of ways of arranging n distinct things in a row. This expression is called the factorial  n and is denoted by n!. It follows that nPr = n!/(n − r)!. By convention 0! = 1.

Combinatorics and Pascal’s Triangle

Let’s calculate some values of nCr. We start with 0C0. Then we find 1C0 and 1C1. Next, 2C0, 2C1 and 2C2. Then 3C0, 3C1, 3C2 and 3C3. We can write down all these results in a table:
0C0 = 1
1C0 = 11C1 = 1
2C0 = 12C1 = 22C2 = 1
3C0 = 13C1 = 33C2 = 33C3 = 1
4C0 = 14C1 = 44C2 = 64C3 = 44C4 = 1
5C0 = 15C1 = 55C2 = 105C3 = 105C4 = 55C5 = 1

Comments

Popular posts from this blog

Software Engineering UNIT-1

SOFTWARE ENGINEERING UNIT – I( collected from Pressman Text Book and Google) Introduction to software Engineering: The Evolving role of Software Software Changing nature of software Legacy software Software myths Software process: Layered technology Process frame work CMMI  Process patterns Assessment Personal and team process models Process technology Product and Process Introduction to software engineering: Software Engineering provides a standard procedure to design and develop software.   What is Software Engineering?   The term  software Engineering  is the product of two words,  Software and Engineering . The  software   is a collection of integrated programs. Computer programs and related documentation such as requirements, design models and user manuals   Software = Program + Documentation + Operating Procedures   Engineering  is the application of  scientific  and  practical  knowledge to  invent, ...

Software Engineering UNIT-5

  UNIT-V: Testing Strategies A strategic to software testing, Strategic issues Test strategies for conventional software, Object oriented software Validation testing, System testing The art of debugging Testing tactics Software testing fundamentals White-box testing, Basis path testing Control structure testing, Black-box testing OO-testing methods A strategic to software testing, Strategic issues Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and code generation.  Software testing fundamentals define the overriding objectives for software testing. Testing Objectives Glen Myers states a number of rules that can serve well as testing objectives: Testing is a process of executing a program with the intent of finding an error. A good test case is one that has a high probability of finding an as-yet-undiscovered error . A successful test is one that uncovers an as-yet-undiscovered error. If testing...