what is permutation?Explain circular permutation with example?
410291
http://en.wikipedia.org/wiki/Permutation
747450
Sounds like Combinatorics.  Combinations, permutations, a bit of graph theory, discrete math, I usually describe it as "Advanced Counting".
593727
I can remember upto 4 to 5 ways of doing it and not more than that.  btw you are talking about halving a square (diagram)! Right ?
315280
nCr means from n objects, choose r of them...this is known as a combination in statistics, and is given by the formula\n\nnCr = n!/(r!(n-r)!)\n\nwhere the ! means factorial, given by the product of all the numbers from 1 to that number.\n\nThis is constrasted with the permutation operation nPr.  In the permutation operation, the order that the objects are arranged matters so the formula is different.  We aren't worried about order of occurance in this problem so we use nCr.\n\nSo for situation A we can have 2 of them or 1 of them occuring from a total of 3 possibilities.  This means we have (3C2+3C1) possibilities.\n\nFor situation B we have the 4 objects to choose from and we need to pick either one or two of them, so we have:\n(4C2+4C1) possibilities.\n\nSince A and B are independent events, the total number of ways to have any of our possibilities is the product of the A and B possibilities\n\nTotal number = (3C2+3C1)*(4C2+4C1)\n\nYou can do the math.
367272
Suppose the number of combinations of k objects out of n objects without respect to order chosen is C(n, k). If we wanted to count order, we would multiply each combination by the number of ways it could be permuted. Thus P(k)*C(n, k) is the number of ways one could choose k people out of n people with regard to order. \nBut we can easily count this number another way. The number of possible choices for the first person is n, for the second person n-1, and so on until we reach n - k + 1. Thus, we get the equation P(k)*C(n, k) = P(n, k) = n*(n - 1)*...*(n - k + 1) = n!/(n - k)!. Solving for C(n, k), we get C(n, k) = n!/[P(k)(n - k)!] = n!/[k!(n - k)!]. \nNow you should be able to derive it whenever you get confused.
282640
If you think about how they are used to find combinations and permutations, then it makes sense.  nCr = n!/r!(n-r!), or how many combinations are there of "n" things taken "r" at a time. Or nPr = n!/(n-r)! finds all the different combinations, plus the different ways each combination could be arranged.\n\nIf for instance, you had 6 items and you wanted to know how many combinations of 6 you could have, obviously the answer is only 1.  If you wanted to know how many ways you could arrange those six items you know that you'd have 6 choices for the first, 5 for the second, etc or 6*5*4*3*2*1=6!\n\nBut put it in the formula\n\nnCr would be 6C6 = 6!/6!(0!) you know that 6!/6! would be one, and you know that the answer is one, so for 6!/6!(0!) to stay one, 0! must equal one.\n\nFor permutations, the same rule applies 6P6 = 6!/(6-6!) = 6!/0! and I already showed that the answer was 6!, so again, 0! must =1.
237821
Fibonacci:\n\npublic class Example\n{\n    public static int Fibonacci(int n)\n    {\nint previous = -1;\nint result = 1;\nfor (int i = 0; i <= n; ++i)\n{\n    int sum = result + previous;\n    previous = result;\n    result = sum;\n}\nreturn result;\n    }\n}\n\nFor factorial use the same but instead of:\n\n{\n    int sum = result + previous;\n    previous = result;\n    result = sum;\n}\n\nuse\n\n{\n    int fac = result * previous;\n    previous = result;\n    result = fac;\n}
960573
the answers that the above people have given are wrong. the circular table does matter. let's say A, B, C, D and E are the people around the table. if they were in a line, ABCDE would not be the same arrangement as BCDEA. But in a circle, they are the same. It is unfortunate that I have forgotten what the formula is. search for it on google and you should get some answers. \n\nhope i helped.
2509
Here's a java solution that uses recursion.  The permute function takes two arguments: a done portion and a todo portion.   The basic idea is that each of the characters in the todo portion could be the next character.  So, at each step, n recursive calls are made, where n is the length of todo.  Each call chooses a different character as the next character to go into the done portion.  So, the first time the number of recursive calls will equal the number of characters in the initial string.  Each of these calls will make further recursive calls equal to the number of characters in the initial string minus one.  And so on.  Thus, the number of solutions will be n! = n*n-1*n-2*...*1, where n is the number of characters in the initial string.\n\nThe program below was tested with java's sun compiler 1.4.2.\npublic class perm\n{\n  public perm(String S)\n  {     \n    permute("", S);\n  }     \n  public void permute(String done, String todo) \n  {     \n    if ((todo.length()==0)||\n        (todo.equals("")))\n      System.out.println(done);\n    else        \n    {           \n      for (int i=0; i<todo.length(); i++)\n      {                 \n        String c = todo.substring(0,1);\n        todo = todo.substring(1);\n        permute(done+c, todo);  \n        todo = todo + c;        \n      }                 \n    }           \n  }     \n  public static void main(String args[])\n  {     \n    if ((args.length==0)||\n        (args[0].length()==0)||\n        (args[0].equals("")))\n      return;           \n    perm p = new perm(args[0]);\n  }     \n}
642365
The Fibonacci spiral is constructed using the arcs of demi-semi-circles of radius Fib(n) for all natural up to a given point (depending on the required size/complexity of the spiral)  This sounds confusing, doesn't it? Check out this website! It illustrates the idea pretty well!\n\nhttp://students.bath.ac.uk/ma1caab/spirals.html
299228
First.\n"the sequence of cities is relevant for a tour"\nmeans order is important. Thus, a permutation reflects each different tour.\n\nThere are 3 possibilities for the number of cities included for the tour, namely, 3,4, or 5 cities. We consider each case separately.\n\nCase 1. ( 3 cities )\n\nDelhi is included. The remaining 2 cities can be chosen from the remaining 4 cities in 4C2 ways = 6 ways.\n\nAfter the 3 cities are selected, they can be permutated in \n3P3 ways = 3! ways. Each representing a tour.\n\nHence, Total number of tours in case 1 = 6 x 3! ways.\n\n\nCase 2. ( 4 cities )\n\nDelhi is included. The remaining 3 cities can be chosen from the remaining 4 cities in 4C3 ways = 4 ways.\n\nAfter the 4 cities are selected, they can be permutated in \n4P4 ways = 4! ways. Each representing a tour.\n\nHence, Total number of tours in case 2 = 4 x 4! ways.\n\nCase 3. ( 5 cities )\n\nDelhi is included. The remaining 4 cities can be chosen from the remaining 4 cities in 4C4 ways = 1 way.\n\nAfter the 5 cities are selected, they can be permutated in \n5P5 ways = 5! ways. Each representing a tour.\n\nHence, Total number of tours in case 3 = 1 x 5! ways.\n\nThus,\n\nTotal number of \n"major city tour is" \n\n= "no.tour in case 1,2 and 3."\n\n= 6 x 3! + 4 x 4! + 5!\n\n= 5!+4*4!+6*3! ways.\n\nThe answer is (b)\n\nRegards
872621
well in my skool we take it as {<and rule>} and {<or rule>example:there is 5 white marble and 5 black marbles in a bag...u pick 2 randomly without replacing them in the bag.....wat is the probability that u get 2 white marbles==>this is a combination 2 the way it is solved is multiplying the the 2 combined probabilities\nanswer:pr:(white AND white)=(5/10)*(4/9)\n\nnow the set is this way....wat is the probability that u get 2 marbles of different colors in the first 2 picks===>set rule\n\nanswer:there is 2 combinations in which u can get 2 different colors there are {white then black} OR {black then white} u find the 2 combinations then ADD them\npr(WandB OR BandW)={(5/10)*(5/9)}+{(5/10)*(5/9)}
303516
Each element x of S_n can be written as a product of disjoint cycles, e.g. x=(132)(45). Since the order of a cycle is the number of elements it permutes, the order of x is the least common multiple of the orders of each of its cycles.\nNow, the order of x should be 3000 = 2^3*3*5^3. To make the number n of elements permuted by x minimal, we have to find the set of coprime numbers d_i, i=1..k with d_1*...*d_k = 3000 that makes n=d_1+d_2+d_3 minimal. All possible choices are listed below :\n1. (k=3) = 3, 2^3, 5^3   \n2. (k=2) : 3*2^3, 5^3    \n3. (k=2) : 3, 2^3*5^3    \n4. (k=2) : 2^3, 3*5^3    \n5. (k=1) : 3*2^3*5^3     \nObviously, the first choice where k is maximal (= the number of different prime factors of 3000) minimizes n to the value 3+2^3+5^3=136.\n\njust in case you want to know... :\nQuite generally, the minimal n for an element x with order d is given by n = p_1^e_1+...+p_k^e_k where the p_i's are different prime numbers with d = p_1^e_1*...*p_k^e_k.
1180538
Nope, that is the combination of {x,y,z} taking 2 objects at a time, because combination has no regard for specific order. The permutations for {x,y,z} taking two  at a time are: xy, xz, yx, yz, zx, zy.
1027338
(Remark: the fact that this is supposed to work with any field K is a hint that our matrices - elements of GLn(K) - can't be too complicated!  In fact we can get away with using only 0s and 1s.)\n\nThe key is to think about the elements of G, call them g1, g2, ..., gn, also as permutations of the set { g1, g2, ..., gn } itself:  any element gi permutes { g1, g2, ..., gn } to { g1 gi, g2 gi, ..., gn gi } (verify that that really is a permutation of the set!).\n\nThis is the key to showing that every finite group of order n is isomorphic to a subgroup of Sn, the symmetric group of order n!.  But Sn itself is isomorphic to a subgroup of GLn(K), namely the subgroup of "permutation matrices", which have exactly one 1 in every row and column and 0s everywhere else.
673673
Use the multinomial coefficient, which is an extension of the binomial coefficient.\n\n10!/(2!2!2!2!2!) = 113,400\n\nBasically it works like this: if your have people A, B, C, ..., J, then there are 10! ways to arrange them.  One arrangement of these 10 people with 2 people in five groups looks like this\n\nAB|CD|EF|GH|IJ\n\nwhere the bars are separating the groups.  Now another arrangement of these people looks like this\n\nBA|CD|EF|GH|IJ\n\nbut everyone is still in the same group.  So is this one\n\nBA|DC|EF|GH|IJ\n\nand this one\n\nBA|DC|FE|GH|IJ\n\nand so on.  It turns out there are 2!2!2!2!2! = 32 ways to rearrange this without changing the groups, since each pair has 2! ways of being arranged.\n\nSo since there will be fewer ways to make 5 groups of 2 than there are ways to arrange the 10 people, you come up with \n10!/2!2!2!2!2! ways to put 10 people into 5 groups of 2.\n\n10C2 and 10C5 would not be correct.  10C5 is the number of ways to select 2 groups of 5, not 5 groups with 2.  10C2 is the number of ways to select one group with 2 people and one group with 8 people.
346407
I think it is order(N squared), so not very good. It's a variant of bubble sort, which you can google. Plus you never know when you're done!