answersLogoWhite

0


Best Answer

P(n,r)=(n!)/(r!(n-r)!)
This would give you the number of possible permutations.
n factorial over r factorial times n minus r factorial

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: An algorithm that generates all r-permutations of an n-element set?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Explain all the criteria that an algorithm must satisfy.?

algorithm is all about sex


Design an algorithm for finding all the factors of positive integerfor example in the case of the integer 12your algorithm should report 12346 and 12?

design an algorithm for finding all the factors of a positive integer


All even numbers from 2-100 using algorithm?

102


How can one validate the designed algorithm?

Providing validation of an algorithm, is a fairly complex process, and it may not be possible, to provide a complete theoretical validation in all cases. Alternately, algorithm segments, which have been proved else where, may be used, and the over all working algorithm, may be empirically validated, for several test cases.


What is sub-algorithm?

It is an algorithm used by another algorithm as part of the second algorithm's operation.As an example, an algorithm for finding the median value in a list of numbers might include sorting the numbers as a sub-algorithm: There are plenty of algorithms for sorting, and the specifics of the sorting does not matter to the "median value" algorithm, only that the numbers are sorted when the sub-algorithm is done.For what an algorithm is, see related link.


The average home in the US generates how many pounds of hazardous waste annually?

The average household generates no Hazardous waste at all . . .


What is compaction in data structure?

The process of moving all marked nodes to one end of memory and all available memory to other end is called compaction. Algorithm which performs compaction is called compacting algorithm.


What is krushkal algorithm?

Kruskal's algorithm is an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph. This means it finds a subset of the edges that forms a tree that includes every vertex, where the total weight of all the edges in the tree is minimized. If the graph is not connected, then it finds a minimum spanning forest (a minimum spanning tree for each connected component). Kruskal's algorithm is an example of a greedy algorithm.


What are that attributes of algorithms?

Qualities of a Good Algorithm. Efficiency: A good algorithm should perform its task quickly and use minimal resources. Correctness: It must produce the correct and accurate output for all valid inputs. Clarity: The algorithm should be easy to understand and comprehend, making it maintainable and modifiable.


Write an algorithm to print sum of all even numbers?

Start print "the sum of all even numbers is infinite" end


What source solar power generates from?

The source that solar power generates electricity is the sun. All solar power is generated by the sun. The sun's energy is consumed by solar powered objects.


What type of error in an algorithm will produce unexpected results depending on the number that the user inputs?

Algorithms do not accept user input; they are not computer programs. All input to an algorithm is specified at the start of the algorithm along with any required preconditions and postconditions. If a required precondition is not specified or is specified incorrectly, then this could result in unexpected results (or undefined behaviour in programming terminology). The type of error in the algorithm is simply that the precondition was not specified.