Changeset c0631ae in git


Ignore:
Timestamp:
Apr 16, 2018, 1:37:27 PM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
fba1c3965fbbe8b7c8b52cb5e07338d93c09aab4
Parents:
3d9a641dcde94d8e4816289e70f2242501f5fd27
Message:
Weak Noetherian
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/fpaprops.lib

    r3d9a64 rc0631ae  
    3737@*      2 right Noetherian
    3838@*      3 Noetherian
    39 @*      4 weak Noetherian (TODO)
     39@*      4 weak Noetherian
    4040PURPOSE: Check whether the monomial algebra A/<LM(G)> is (left/right) noetherian
    4141ASSUME: - basering is a Letterplace ring
     
    9898  intvec visited;
    9999  visited[ncols(UG)] = 0;
    100   int inFlag, outFlag;
     100  int inFlag, outFlag, inOutFlag;
    101101  for (int v = 1; v <= ncols(UG) && (inFlag + outFlag) != 3; v++) {
    102     int inOutFlags = inOrOutCommingEdgeInCycle(UG, v, visited, 0);
     102    int inOutFlags = inOutCommingEdgesInCycles(UG, v, visited, 0);
    103103    if (inOutFlags == 1) {
    104104      inFlag = 1;
    105105    }
    106106    if (inOutFlags == 2) {
    107       outFlag = 2;
     107      outFlag = 1;
    108108    }
    109109    if (inOutFlags == 3) {
    110110      inFlag = 1;
    111       outFlag = 2;
     111      outFlag = 1;
     112    }
     113    if (inOutFlags == 4) {
     114      inOutFlag = 1;
     115    }
     116    if (inOutFlags == 5) {
     117      inFlag = 1;
     118      inOutFlag = 1;
     119    }
     120    if (inOutFlags == 6) {
     121      outFlag = 1;
     122      inOutFlag = 1;
     123    }
     124    if (inOutFlags == 7) {
     125      inFlag = 1;
     126      outFlag = 1;
     127      inOutFlag = 1;
    112128    }
    113129    kill inOutFlags;
    114130  } kill v;
    115   return (3 - inFlag - outFlag);
     131  int noetherian = 3 - 1*inFlag - 2*outFlag;
     132  if (noetherian == 0) {
     133    return (4 - 4*inOutFlag); // weak noetherian
     134  }
     135  return (noetherian);
    116136}
    117137example
     
    125145}
    126146
    127 static proc inOrOutCommingEdgeInCycle(intmat G, int v, intvec visited, intvec path) {
     147static proc inOutCommingEdgesInCycles(intmat G, int v, intvec visited, intvec path) {
    128148  // Mark the current vertex as visited
    129149  visited[v] = 1;
     
    136156  }
    137157
    138   int inFlag, outFlag;
     158  int inFlag, outFlag, inOutFlag;
    139159
    140160  for (int w = 1; w <= ncols(G) && (inFlag + outFlag) != 3; w++) {
    141161    if (G[v,w] == 1) {
    142       if (visited[w] == 1) {
    143         // new cycle
    144         if (v == w) {
     162      if (visited[w] == 1) { // new cycle
     163        int tmpInFlag;
     164        int tmpOutFlag;
     165        if (v == w) { // cycle is a loop
    145166          for (int u = 1; u <= ncols(G); u++) {
    146167            if (G[v,u] && u != v) {
    147               outFlag = 2;
     168              outFlag = 1;
     169              tmpOutFlag = 1;
    148170            }
    149171            if (G[u,v] && u != v) {
    150172              inFlag = 1;
     173              tmpInFlag = 1;
    151174            }
    152175          } kill u;
     
    158181                if (path[i] != v) {
    159182                  if (u != path[i+1]) { // and u is not the next element in the cycle
    160                     outFlag = 2;
     183                    outFlag = 1;
     184                    tmpOutFlag = 1;
    161185                  }
    162186                } else {
    163187                  if (u != w) {
    164                     outFlag = 2;
     188                    outFlag = 1;
     189                    tmpOutFlag = 1;
    165190                  }
    166191                }
     
    170195                  if (u != path[i-1]) { // and u is not the previous element in the cylce
    171196                    inFlag = 1;
     197                    tmpInFlag = 1;
    172198                  }
    173199                } else {
    174200                  if (u != v) {
    175201                    inFlag = 1;
     202                    tmpInFlag = 1;
    176203                  }
    177204                }
     
    183210          } kill i;
    184211        }
     212        if (tmpInFlag > 0 && tmpOutFlag > 0) {
     213          // there are both in and outcomming edges in this cycle
     214          inOutFlag = 1;
     215        }
     216        kill tmpInFlag;
     217        kill tmpOutFlag;
    185218      } else {
    186         int inOutFlags = inOrOutCommingEdgeInCycle(G, w, visited, path);
     219        int inOutFlags = inOutCommingEdgesInCycles(G, w, visited, path);
    187220        if (inOutFlags == 1) {
    188221          inFlag = 1;
    189222        }
    190223        if (inOutFlags == 2) {
    191           outFlag = 2;
     224          outFlag = 1;
    192225        }
    193226        if (inOutFlags == 3) {
    194227          inFlag = 1;
    195           outFlag = 2;
     228          outFlag = 1;
     229        }
     230        if (inOutFlags == 4) {
     231          inOutFlag = 1;
     232        }
     233        if (inOutFlags == 5) {
     234          inFlag = 1;
     235          inOutFlag = 1;
     236        }
     237        if (inOutFlags == 6) {
     238          outFlag = 1;
     239          inOutFlag = 1;
     240        }
     241        if (inOutFlags == 7) {
     242          inFlag = 1;
     243          outFlag = 1;
     244          inOutFlag = 1;
    196245        }
    197246        kill inOutFlags;
     
    200249  } kill w;
    201250
    202   return (inFlag + outFlag);
     251  return (1*inFlag + 2*outFlag + 4*inOutFlag);
    203252}
    204253
Note: See TracChangeset for help on using the changeset viewer.