3

I have been given a program to write difference combinations of set of number entered by user and when I researched for the same I get examples with terms permutations and derangements.

I am unable to find the clarity between the them. Also adding to that one more term is combinations. Any one please provide a simple one liner for clarity on the question.

Thanks in advance.

Alex Shesterov
  • 26,085
  • 12
  • 82
  • 103
  • 1
    This isn't really a programming question, it's a conceptual mathematics question. Not really the correct StackExchange site for this question. – adamdc78 Nov 21 '14 at 20:37
  • 1
    There is a logic of permutation and derangments in Java too. So I tagged it as java and I am working on java program as I have mentioned in the question –  Nov 21 '14 at 20:40
  • Your question isn't about the implementation, it's about the difference between the two terms (your assignment being to write combinations and your confusion stemming from the term derangements appearing in your research). – adamdc78 Nov 21 '14 at 20:47
  • Though it's a math question (and [math.stackexchange](http://math.stackexchange.com/) would be a more appropriate place for it), IMO, its usefulness is higher that that of tons of questions like [this one](http://stackoverflow.com/q/4802015/2170192) :) But I allowed myself to remove the `java` tag, as it has absolutely nothing to do with Java. – Alex Shesterov Nov 21 '14 at 20:53
  • 1
    @adamdc78 Its okay pal. This question is not really confusing for users to be categorized to other StackExchange site. – kittu Nov 21 '14 at 20:59
  • Explained here https://towardsdatascience.com/difference-between-permutation-and-combination-9e12b6763ee1 – Divyanshu Jimmy Jun 05 '20 at 04:56

1 Answers1

1

http://en.wikipedia.org/wiki/Permutation

The notion of permutation relates to the act of rearranging, or permuting, all the members of a set into some sequence or order (unlike combinations, which are selections of some members of the set where order is disregarded). For example, written as tuples, there are six permutations of the set {1,2,3}, namely: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), and (3,2,1). As another example, an anagram of a word, all of whose letters are different, is a permutation of its letters.

http://en.wikipedia.org/wiki/Derangement

In combinatorial mathematics, a derangement is a permutation of the elements of a set such that none of the elements appear in their original position.

The number of derangements of a set of size n, usually written Dn, dn, or !n, is called the "derangement number" or "de Montmort number". (These numbers are generalized to rencontres numbers.) The subfactorial function (not to be confused with the factorial n!) maps n to !n.1 No standard notation for subfactorials is agreed upon; n¡ is sometimes used instead of !n.2

kittu
  • 6,662
  • 21
  • 91
  • 185
  • 1
    You might want to put those in block quotes or something and make it clear that you're quoting verbatim from wikipedia. – beaker Nov 22 '14 at 00:03