This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
weave_method [2023/05/15 15:57] harshec |
weave_method [2023/05/15 16:33] (current) harshec |
||
---|---|---|---|
Line 8: | Line 8: | ||
depthS(string str, int n, int s, int lastinsert) update_fairness_calc(lastinsert) if(!fair()) return | depthS(string str, int n, int s, int lastinsert) update_fairness_calc(lastinsert) if(!fair()) return | ||
- | |||
if(s == MAX_S) | if(s == MAX_S) | ||
depthN(str, n) | depthN(str, n) | ||
- | |||
for(i = lastinsert; i <= MAX_S * (n-1); ++i) | for(i = lastinsert; i <= MAX_S * (n-1); ++i) | ||
depthS(str.insert(' | depthS(str.insert(' | ||
- | |||
depthN(string str, int n) if(n == MAX_N) print(" | depthN(string str, int n) if(n == MAX_N) print(" | ||
- | + | | |
- | | + | |
===Future Work=== | ===Future Work=== | ||
Line 23: | Line 19: | ||
Here's an outline of the basic idea of the simple version. 1. First build a list of all n=2 solutions. 1. When going from a n=2 set to a n=3 set, ALL n=2 subsets of the n=3 set must be part of the list generated in step 1. Keep a list of all n=2 subsets of the n=3 solutions. 1. Again, when going from a n=3 set to a n=4 set, all n=2 subsets of the n=4 set must be part of the list generated step 2. | Here's an outline of the basic idea of the simple version. 1. First build a list of all n=2 solutions. 1. When going from a n=2 set to a n=3 set, ALL n=2 subsets of the n=3 set must be part of the list generated in step 1. Keep a list of all n=2 subsets of the n=3 solutions. 1. Again, when going from a n=3 set to a n=4 set, all n=2 subsets of the n=4 set must be part of the list generated step 2. | ||
- | But we can do even better. There are 3 different n=2 subsets in all n=3 sets, ba, ca, and cb. We can keep separate lists for all n=2 subsets. When building n=4 sets, we use their n=3 subsets and again filter based on the more specific 3 different n=2 lists. For example, the db relationship in dcba is part of 2 n=3 subsets, dcb and dba. In those subsets, db is equivalent to ca and cb in cba. Full relationship chart listed below. http:// | + | But we can do even better. There are 3 different n=2 subsets in all n=3 sets, ba, ca, and cb. We can keep separate lists for all n=2 subsets. When building n=4 sets, we use their n=3 subsets and again filter based on the more specific 3 different n=2 lists. For example, the db relationship in dcba is part of 2 n=3 subsets, dcb and dba. In those subsets, db is equivalent to ca and cb in cba. Full relationship chart listed below. |
+ | |||
+ | {{http:// | ||
Lists of n=2 subset counts are available on the wiki page Results. | Lists of n=2 subset counts are available on the wiki page Results. |