Giter Club home page Giter Club logo

Comments (1)

postmeback avatar postmeback commented on July 18, 2024

Permutation and combination are both concepts in mathematics that deal with the arrangement and selection of objects. The main difference between them lies in whether the order of the objects matters or not.

Permutation:
In permutations, the order of arrangement matters. It refers to the different ways in which a set of objects can be arranged or ordered. The number of permutations of a set of objects is often denoted as "nPr" (n P r), where "n" represents the total number of objects, and "r" represents the number of objects being arranged or selected.

Let's consider a simple example: You have three books on a shelf: Book A, Book B, and Book C. Now, let's say you want to arrange these books in a specific order on the shelf. The possible permutations would be:

  1. Book A, Book B, Book C
  2. Book A, Book C, Book B
  3. Book B, Book A, Book C
  4. Book B, Book C, Book A
  5. Book C, Book A, Book B
  6. Book C, Book B, Book A

In this case, since the order matters, each arrangement is considered a different permutation.

Combination:
In combinations, the order of arrangement does not matter. It refers to the different ways in which a selection of objects can be made from a larger set, without regard to the order of the selected objects. The number of combinations of a set of objects is often denoted as "nCr" (n C r).

Let's continue with our previous example of three books: Book A, Book B, and Book C. Now, let's say you want to select two books from the three to take with you. The possible combinations would be:

  1. Book A, Book B
  2. Book A, Book C
  3. Book B, Book C

In this case, the order of the books does not matter, so each combination is considered the same even if the books are listed in a different order.

The key difference between permutations and combinations is whether the order matters. Permutations focus on the arrangement of objects where the order is essential, while combinations focus on the selection of objects where the order is not important.

from less-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.