Adjust b by total linking parity information. Dump bound

computations.
This commit is contained in:
Cotton Seed 2013-01-19 14:03:02 -05:00
parent f3d7e22f51
commit 76bc2c9200
2 changed files with 76 additions and 19 deletions

View File

@ -2561,9 +2561,48 @@ compute_forgetful_tables ()
} }
} }
void
show_lk (const dt_code &dt)
{
knot_diagram kd (dt);
show (kd); newline ();
printf ("m = %d\n", kd.num_components ());
planar_diagram (kd).display_knottheory ();
}
int int
main () main ()
{ {
show_lk (mt_link (11, 1, 739));
show_lk (mt_link (12, 1, 2521));
show_lk (mt_link (12, 1, 2552));
show_lk (mt_link (12, 1, 2672));
show_lk (mt_link (12, 1, 2910));
show_lk (mt_link (12, 0, 2207));
show_lk (mt_link (12, 0, 2209));
show_lk (mt_link (12, 0, 2211));
show_lk (mt_link (12, 0, 2214));
show_lk (mt_link (12, 0, 2208));
show_lk (mt_link (12, 0, 2230));
show_lk (mt_link (12, 0, 2238));
show_lk (mt_link (12, 0, 2245));
show_lk (mt_link (12, 0, 2251));
show_lk (mt_link (12, 0, 2255));
show_lk (mt_link (12, 0, 2262));
show_lk (mt_link (12, 0, 2292));
return 0;
{
knot_diagram kd (mt_link (12, 0, 2262));
printf ("m = %d\n", kd.num_components ());
planar_diagram (kd).display_knottheory ();
}
return 0;
compute_splitting_bounds (); compute_splitting_bounds ();
return 0; return 0;

View File

@ -385,18 +385,22 @@ compute_b_lk_weak (knot_diagram &kd)
} }
void void
compute_splitting_bounds (knot_diagram &kd) compute_splitting_bounds (const knot_desc &desc)
{ {
int rank = self_rank ();
typedef fraction_field<polynomial<Z2> > Z2x; typedef fraction_field<polynomial<Z2> > Z2x;
int rank = self_rank ();
knot_diagram kd = desc.diagram ();
unsigned m = kd.num_components (); unsigned m = kd.num_components ();
assert (m > 1); assert (m > 1);
printf ("[% 2d] ", rank); show (kd); newline (); printf ("[% 2d] ", rank); show (kd); newline ();
printf ("[% 2d] m = %d\n", rank, m); printf ("[% 2d] m = %d\n", rank, m);
unsigned total_lk = kd.total_linking_number ();
printf ("[% 2d] total_lk = %d\n", rank, total_lk);
unionfind<1> u (kd.num_edges ()); unionfind<1> u (kd.num_edges ());
for (unsigned i = 1; i <= kd.n_crossings; i ++) for (unsigned i = 1; i <= kd.n_crossings; i ++)
@ -433,13 +437,15 @@ compute_splitting_bounds (knot_diagram &kd)
// lower bound // lower bound
unsigned b = std::max (bQ, bZ2x); unsigned b = std::max (bQ, bZ2x);
// adjust parity
if ((total_lk & 1) != (b & 1))
b ++;
printf ("[% 2d] bQ = %d\n", rank, bQ); printf ("[% 2d] bQ = %d\n", rank, bQ);
printf ("[% 2d] bZ2x = %d\n", rank, bZ2x); printf ("[% 2d] bZ2x = %d\n", rank, bZ2x);
printf ("[% 2d] b = %d\n", rank, b); printf ("[% 2d] b = %d\n", rank, b);
unsigned b_lk_weaker = total_lk == 0 ? 2 : total_lk; // kd is non-split
unsigned total_lk = kd.total_linking_number ();
unsigned b_lk_weaker = total_lk == 0 ? 2 : total_lk;
unsigned b_lk_weak = compute_b_lk_weak (kd); unsigned b_lk_weak = compute_b_lk_weak (kd);
assert (b_lk_weaker <= b_lk_weak); assert (b_lk_weaker <= b_lk_weak);
@ -451,7 +457,7 @@ compute_splitting_bounds (knot_diagram &kd)
printf ("[% 2d] > STRICTLY WEAKER\n", rank); printf ("[% 2d] > STRICTLY WEAKER\n", rank);
basedvector<basedvector<unsigned, 1>, 1> ps = permutations (m); basedvector<basedvector<unsigned, 1>, 1> ps = permutations (m);
unsigned r = kd.n_crossings; unsigned upper = kd.n_crossings;
for (unsigned i = 1; i <= ps.size (); i ++) for (unsigned i = 1; i <= ps.size (); i ++)
{ {
basedvector<unsigned, 1> p = ps[i]; basedvector<unsigned, 1> p = ps[i];
@ -470,21 +476,21 @@ compute_splitting_bounds (knot_diagram &kd)
ri ++; ri ++;
} }
if (ri < r) if (ri < upper)
r = ri; upper = ri;
} }
printf ("[% 2d] r = %d\n", rank, r); printf ("[% 2d] upper = %d\n", rank, upper);
assert (b_lk_weak <= r); assert (b_lk_weak <= upper);
assert (b <= r); assert (b <= upper);
// non-trivial link, sp at least 1. // non-trivial link, sp at least 1.
unsigned best = std::max (b, b_lk_weak); unsigned best = std::max (b, b_lk_weak);
if (best == r) if (best == upper)
printf ("[% 2d] > sp = %d", rank, r); printf ("[% 2d] > sp = %d", rank, upper);
else else
printf ("[% 2d] > %d <= sp <= %d", rank, best, r); printf ("[% 2d] > %d <= sp <= %d", rank, best, upper);
printf (" "); printf (" ");
@ -498,8 +504,21 @@ compute_splitting_bounds (knot_diagram &kd)
assert (b_lk_weak == best); assert (b_lk_weak == best);
printf ("(b_lk_weak)"); printf ("(b_lk_weak)");
} }
fflush (stdout); fflush (stdout);
char buf[1000];
assert (desc.t == knot_desc::MT);
sprintf (buf, "splitting/L%d_%d.dat.gz\n", desc.i, desc.j);
{
gzfile_reader r (buf);
write (r, desc);
write (r, bQ);
write (r, bZ2x);
write (r, b);
write (r, b_lk_weak);
write (r, upper);
}
} }
void void
@ -521,8 +540,7 @@ slave ()
printf ("[% 2d] CMD_DO %s\n", rank, desc.name ().c_str ()); printf ("[% 2d] CMD_DO %s\n", rank, desc.name ().c_str ());
knot_diagram kd = desc.diagram (); compute_splitting_bounds (desc);
compute_splitting_bounds (kd);
send_int (0, 0); send_int (0, 0);
} }