ideal codimension bounds
This commit is contained in:
parent
3d14cdda78
commit
8b7507744f
10
Makefile
10
Makefile
@ -6,11 +6,14 @@ SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline
|
||||
|
||||
OPTIONS=-m64 -march=native -mtune=native -std=gnu99 -D_GNU_SOURCE $(SPECIAL_OPTIONS)
|
||||
|
||||
all: enumerate
|
||||
all: enumerate idealbounds
|
||||
|
||||
enumerate: enumerate.o weyl.o thickenings.o
|
||||
gcc $(OPTIONS) -o enumerate enumerate.o thickenings.o weyl.o
|
||||
|
||||
idealbounds: idealbounds.o weyl.o
|
||||
gcc $(OPTIONS) -o idealbounds idealbouds.o weyl.o
|
||||
|
||||
enumerate.o: enumerate.c $(HEADERS)
|
||||
gcc $(OPTIONS) -c enumerate.c
|
||||
|
||||
@ -20,5 +23,8 @@ thickenings.o: thickenings.c $(HEADERS)
|
||||
weyl.o: weyl.c $(HEADERS)
|
||||
gcc $(OPTIONS) -c weyl.c
|
||||
|
||||
idealbounds.o: idealbounds.c $(HEADERS)
|
||||
gcc $(OPTIONS) -c idealbounds.c
|
||||
|
||||
clean:
|
||||
rm -f enumerate thickenings.o weyl.o enumerate.o
|
||||
rm -f enumerate idealbounds thickenings.o weyl.o enumerate.o idealbounds.o
|
||||
|
59
idealbounds.c
Normal file
59
idealbounds.c
Normal file
@ -0,0 +1,59 @@
|
||||
#include "weyl.h"
|
||||
#include "queue.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
semisimple_type_t type;
|
||||
simple_type_t simple;
|
||||
|
||||
simple.series = 'A';
|
||||
simple.rank = atoi(argv[1]);
|
||||
type.n = 1;
|
||||
type.factors = &simple;
|
||||
|
||||
int order = weyl_order(type);
|
||||
doublequotient_t *dq = weyl_generate_bruhat(type, 0, 0);
|
||||
|
||||
queue_t q;
|
||||
int cur;
|
||||
int *viewed = (int*)malloc(order*sizeof(int));
|
||||
int found;
|
||||
int minimum = INT_MAX;
|
||||
|
||||
for(int i = 0; i < order; i++) {
|
||||
found = 0;
|
||||
memset(viewed, 0, order*sizeof(int));
|
||||
queue_init(&q);
|
||||
queue_put(&q, dq->cosets[i].opposite->index);
|
||||
while((cur = queue_get(&q)) != -1) {
|
||||
if(cur == i) { // found what we were looking for
|
||||
// printf("foo: %d %d\n", i, dq->cosets[i].min->wordlength);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
for(doublecoset_list_t *current = dq->cosets[cur].bruhat_lower; current; current = current->next) {
|
||||
if(!viewed[current->to->index]) {
|
||||
viewed[current->to->index] = 1;
|
||||
queue_put(&q, current->to->index);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
printf("%d %d not found\n", i, dq->cosets[i].min->wordlength);
|
||||
if(dq->cosets[i].min->wordlength < minimum)
|
||||
minimum = dq->cosets[i].min->wordlength;
|
||||
} else {
|
||||
printf("%d %d found\n", i, dq->cosets[i].min->wordlength);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Minimum l(w) such that w0w can be in a balanced ideal: %d\n", minimum);
|
||||
|
||||
free(viewed);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user