Algorithm to solve a maximization problem

mathlete
Messages
148
Reaction score
0
I have two sets of vectors:

A: a1, a2, a3... an
B: b1, b2, b3... bm

n > m and n/m is an integer, p.

Each vector bi has ranked, in order of preference, a set of vectors from A. For example, b1 may "prefer" a1, a9, and a10. The only constraint on this set is that each vector ai from A appears only p total times across all these ranked sets.

The problem is to find the set of vectors, C, such that:

Ci = ai\sum b_k

where:

- The sum of bk is a sum of p vectors from B that listed ai as a preferred vector
- No vector Cj would increase in value by substituting in bk, where j is a value listed in b's preferences about i. Using the example of b1 above, if b1 was in C10, you could not switch it to C9 and increase its value (since 9 is ranked above 10).

The last condition is the one that's giving me a problem. This seems close to, but not exactly, a maximization problem.

Simple example (too simple because each b vector lists all c vectors as preferences which makes it somewhat trivial to solve, but gives an idea of what I'm trying to do):

a1 = { 1, 2, 1 }
a2 = { 2, 1, 2 }

b1 = { 5, 1, 2} Lists preferences as: a2, a1
b2 = { 1, 5, 2} Lists preferences as: a1, a2
b3 = { 8, 0, 6} Lists preferences as: a2, a1
b4 = { 0, 9, 0} Lists preferences as: a2, a1

Answer: c1: a1 paired with b1 and b3; c2: a2 paired with b2 and b4
 
Last edited:
Physics news on Phys.org
I don't understand your example since I don't see any a's listed in the example In the problem description you said each vector b listed a set of a' s that it preferred. But in the example, each b listed c's that it preferred.


Is it true that the lists of preferences for each the b_i contain the same number of elements?
 
Sorry, you're right -- I fixed the example. And yes, each b vector has the same number of preferences listed, but we don't necessarily know how many (though we can assume it's > p and < n).
 
The example doesn't explain the meaning of C_i = a_i \sum b_k
That formula seems to involve multiplying two vectors together. Is it supposed to be an inner product?
 
Bad notation on my part. It's shorthand for the inner product, yes: ai*bk_1+ai*bk_2 + ... + ai*bk_p where the bk are chosen as stated above.
 
What does it mean to say "no vector C_j would increase"? Are you talking about the length of C_j ? -- that would be the square root of the sum of the squares of its components.
 

Similar threads

Replies
5
Views
2K
Replies
38
Views
5K
Replies
9
Views
7K
Replies
12
Views
2K
Replies
7
Views
2K
Replies
32
Views
3K
Replies
14
Views
3K
Back
Top