Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This isn't an answer, but I think maybe a more precise or even more correct formulation of what you are looking for:</p> <p>There is a set, call it <code>C</code>, of <em>characters</em>, and there is a finite ordered sequence <code>S_1, ... S_n</code> of <em>scenes</em>, where a <em>scene</em> is a set consisting of some of the characters. Characters may (and typically do) appear in multiple scenes.</p> <p>I'd like to phrase your desired outcome in a slightly different way from how you phrased it, because I think it makes it clearer how one may search for a solution (or at least, it makes it totally clear how to brute-force a solution):</p> <p>The output of our algorithm is a sequence of arrangements of the characters. An <em>arrangement</em> of the characters is just a permutation of the ordered tuple <code>[c_1, ... c_m]</code>, where the <code>c_i</code> are the characters, and there are <code>m</code> of them in total, so <code>C = {c_1, ..., c_m}</code>. We want <code>n</code> arrangements in total, call them <code>A_1, ..., A_n</code>, one per scene.</p> <p>What arrangement <code>A_n</code> corresponds to is the top-to-bottom ordering of the characters in your storyboard, during scene <code>n</code>, in the following sense: draw a vertical line through your storyboard passing through scene <code>n</code>. This line should hit the characters' life-lines in the order specified by <code>A_n</code>.</p> <p>We require the following property of our arrangements: given scene <code>S_n</code>, the arrangement <code>A_n</code> needs to put the characters contained in <code>S_n</code> into a contiguous chunk, in the following sense: suppose that <code>S_n = {c_2, c_3, c_5}</code>. Then <code>A_n</code> may yield <code>[c_1, c_4, c_2, c_3, c_5]</code>, but may not yield <code>[c_2, c_1, c_3, c_4, c_5]</code>. This is because you don't want an errant character "cutting through" the scene in the storyboard.</p> <p>We hope to minimize the number of "crossings." Here, crossings are easy to define: the number of crossings between <code>A_i</code> and <code>A_(i+1)</code> is exactly equal to the number of <em>transpositions of adjacent characters</em> required to go from permutation <code>A_i</code> to permutation <code>A_(i+1)</code>.</p> <hr> <p>I haven't given you an answer, but I think that given the above setup, a brute-force approach isn't too hard to code up, and will give you an answer overnight without a problem, if the storyboard isn't too big.</p> <p>I think that if you posted this problem on MathOverflow, you could possibly get someone interested in it. Or maybe it has been solved, who knows?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload