<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: Help me optimize a list in Excel.</title>
      <link>http://ask.metafilter.com/47515/Help-me-optimize-a-list-in-Excel/</link>
      <description>Comments on Ask MetaFilter post Help me optimize a list in Excel.</description>
	  	  <pubDate>Thu, 28 Sep 2006 13:34:38 -0800</pubDate>
      <lastBuildDate>Thu, 28 Sep 2006 13:34:38 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: Help me optimize a list in Excel.</title>
  	<link>http://ask.metafilter.com/47515/Help-me-optimize-a-list-in-Excel</link>	
  	<description>Help me optimize a list in Excel. (Excel gurus welcome!) &lt;br /&gt;&lt;br /&gt; I have a group of 20 items. The first ten items go in List 1, the second ten go in List 2. Each item has 6 characteristics (expressed in numbers). I want List 1 and List 2 to be as similar as possible in terms of the characteristics of the items that make it up.&lt;br&gt;
&lt;br&gt;
The way I&apos;m doing this presently in Excel is by running a t-Test on each of the characteristics of the first ten numbers and the second ten numbers. The p-value the t-Test returns tells me how similar they are. The closer to 1 the value is, the more similar the Lists are. I&apos;m repeatedly ordering the items randomly to get different orderings of all the items. The value of the t-Test in Excel changes dynamically with every ordering. Ultimately, I&apos;m trying to find the optimum ordering (or at least a very good one) of the items so that the values returned by the t-Test are all very close to 1.&lt;br&gt;
&lt;br&gt;
Right now, I&apos;m just pressing sort on Column A (see attached image and Excel file) over and over until I get a good set of p-values from the t-Tests. There must be a programmatic way to do this though. Can anyone help me out?&lt;br&gt;
&lt;br&gt;
&lt;img src=&quot;http://static.flickr.com/85/255095238_40820b5a44_o.jpg&quot;&gt;&lt;br&gt;
&lt;br&gt;
The files in question &lt;a href=&quot;http://mixtrade.org/ExcelListOpti.jpg&quot;&gt;here&lt;/a&gt;. To make it work, just repeatedly sort Col A.&lt;br&gt;
&lt;br&gt;
This whole setup is hard to explain, so please leave me any questions you have and I&apos;ll answer them as best I can.&lt;br&gt;
&lt;br&gt;
Thanks!</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.47515</guid>
  	<pubDate>Thu, 28 Sep 2006 13:33:15 -0800</pubDate>
  	<dc:creator>pealco</dc:creator>
	
	<category>excel</category>
	
	<category>macros</category>
	
	<category>scripting</category>
	
	<category>programming</category>
	
	<category>optimization</category>
	
</item>
<item>
  	<title>By: pealco</title>
  	<link>http://ask.metafilter.com/47515/Help-me-optimize-a-list-in-Excel#723054</link>	
  	<description>Oops, the link the the Excel file is wrong. &lt;a href=&quot;http://mixtrade.org/ExcelListOpti.xls&quot;&gt;Here is the right one.&lt;/a&gt;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.47515-723054</guid>
  	<pubDate>Thu, 28 Sep 2006 13:34:38 -0800</pubDate>
  	<dc:creator>pealco</dc:creator>
</item>
<item>
  	<title>By: spark</title>
  	<link>http://ask.metafilter.com/47515/Help-me-optimize-a-list-in-Excel#723184</link>	
  	<description>I believe the hungarian algorithm can be applied to this. I can&apos;t explain how to do this automatically in Excel, but the hungarian algorithm goes as follows:&lt;br&gt;
&lt;br&gt;
1. Create an N*N table where N is the number of words you have. The words go along the top and down the side of the table.&lt;br&gt;
&lt;br&gt;
2. Apply the T-test in every cell of the table (comparing the 2 words).&lt;br&gt;
&lt;br&gt;
3. Do New Value = 1 - Old Value for every cell in the table.&lt;br&gt;
&lt;br&gt;
4. You should have a diagonal line of 0s now, where you are comparing a word with itself. Replace these with 2s.&lt;br&gt;
&lt;br&gt;
5. For every row, subtract the smallest number in that row from all of the numbers in that row (if the smallest number is 0, do nothing).&lt;br&gt;
&lt;br&gt;
6. For every column, subtract the smallest number in that column from all of the numbers in that column (if the smallest number is 0, do nothing).&lt;br&gt;
&lt;br&gt;
7. Draw on the smallest number of vertical or horizontal lines possible to cover all of the 0&apos;s in the table. &lt;br&gt;
~If the number of lines = n, go to step 9. &lt;br&gt;
~If the number of lines &lt; n, go to step 8.br&gt;
&lt;br&gt;
8. Select the smallest entirely uncovered number (not covered by the lines added in step 7).  Subtract it from all of the uncovered numbers. Also, add this number to every other number that is covered by both a horizontal and vertical line. Then go back to step 7.&lt;br&gt;
&lt;br&gt;
9. Now make pairings by picking pairs of words where their value in the table is 0.&lt;br&gt;
&lt;br&gt;
I know this is a long algorithm, but it will give you the best possible pairings. There may be better/easier to implement ones, but this is the only one I know that can do this.&lt;/&gt;</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.47515-723184</guid>
  	<pubDate>Thu, 28 Sep 2006 15:17:37 -0800</pubDate>
  	<dc:creator>spark</dc:creator>
</item>
<item>
  	<title>By: bingo</title>
  	<link>http://ask.metafilter.com/47515/Help-me-optimize-a-list-in-Excel#723566</link>	
  	<description>If you don&apos;t want to do it spark&apos;s way, ask the guys on the forum at &lt;a href=&quot;http://www.mrexcel.com&quot;&gt;Mr. Excel&lt;/a&gt;.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.47515-723566</guid>
  	<pubDate>Fri, 29 Sep 2006 05:04:05 -0800</pubDate>
  	<dc:creator>bingo</dc:creator>
</item>

    </channel>
</rss>
