Derive a Matrix from Vectors

45 Views Asked by At

One of the things I’m curious about is how one would go about creating a seating chart for, as one example, a school bus, where the arrangement is determined by each student ( quantity ‘n’ ) filling out a quick and simple survey. Each student’s name is listed, and all they need to do is write a number next to the person’s name expressing how well they get along with this person ranging from -5 to +5. Each person’s survey would then be used as a vector, and the end result would be an ‘a x 2b’ matrix of a possible/optimal seating arrangement, where a * 2b ≥ n and ( a, b, n ) ∈ ℤ > 0. The variable ‘a’ is the number of rows of seats (not the number of seats) and ‘b’ is the number of riders who can probably sit in the same seat comfortably.

Luckily we can find out what the smallest value of ‘b’ can be based on the value of ‘n’: If we have 71 passengers and the maximum number of passengers per seat is 3, then the fewest number of seats is 71/3 or 24.

( I probably contradicted myself a little bit in the previous statement, but hopefully I was able to communicate enough to get the point across. I really don’t have a clue on just how to get started, math-wise, other than collecting the survey data. )

I guess I’m trying to figure out the concept of... a recursive vector matrix?

[ Edit: When I talked about determining the value of ‘b’ using ( n / a ) I actually meant the value of ‘2b’, making the value of ‘b’ in my example 12. ]

1

There are 1 best solutions below

2
On

There are very many different ways to do this, but here's a general strategy for the type of problem you're trying to solve.

  1. Let's say that you label your students with symbols $i_n$ (so the first student in alphabetical order would be $i_1$, etc.) and then, out of these, compose an array $\vec{i}$ that represents a given seating arrangement. (So $i_2$ occupying the first array "slot" means student $i_2$ would sit in the first seat or something, and so on).
  2. Then you construct a "score" functional. This effectively takes the array you have above and transforms it, using the survey you have, into a cumulative single score that represents the sum of each individual's student's comfort score (as provided by the survey) for the given seating arrangement $\vec{i}$.
  3. Then you optimize this score functional using whatever optimization trick you prefer to get the most favorable net comfort score, and use the seating array that corresponds to that optimal condition.

Hope this helps!