简体   繁体   中英

Most suitable combinatorics algorithm

There are 6 seats and 4 persons, for which seats must be allocated according to some optimality criterion. For example:

Allocation 1:
_ _ _ _ _ _
1 2   3 4 

Allocation 2:
_ _ _ _ _ _
1 3   2   4 

...

Question 1: Which combinatorics problem is it?

Question 2: What is the name of most suitable algorithm for searching through all possible combinations?

1.) k-permutation of n without repetion: http://www.statlect.com/comdis1.htm

2.) It depends on which you are searching for. For example, I offer you genetic algorithms which can find the best candidate based on a special heuristic if you can order a "goodness degree" to the possible solutions.

To answer Question 1, note that for the sequence of 4 persons there are 4! possibilites. Additionally, the 6-4=2 non-occupied seats must be positioned between the people, for which there are 4+1=5 slots (before every person and behind the last person), resulting in 5+2-1 choose 2 possibilities, where choose denotes the binomial coeffiecient, by interpretation as stars and bars problem. In total, there are

4!(6 choose 2)

possibilities, or parameterized

m!(m+1+nm-1 choose nm) = m!(n choose nm)

where m is the number of people and n is the number of seats; using the identity

n choose k = n!/(k!(nk)!)

this can be simplified to

n!/(nm)!

which is indeed the n -permutation of m objects as defined here .

Concerning Question 2, this really depends on the optimality criterion and whether an exact, approximate or heuristic algorithm is desired.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM