diff options
Diffstat (limited to 'vorlesungen/slides/8/wilf.m')
-rw-r--r-- | vorlesungen/slides/8/wilf.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vorlesungen/slides/8/wilf.m b/vorlesungen/slides/8/wilf.m new file mode 100644 index 0000000..49dc161 --- /dev/null +++ b/vorlesungen/slides/8/wilf.m @@ -0,0 +1,22 @@ +# +# wilf.m -- chromatische Zahl für einen Graphen +# +# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +# +N = 9; +A = zeros(N,N); + +for i = (1:N) + j = 1 + rem(i, N) + A(i,j) = 1; +endfor +for i = (1:3:N-3) + j = 1 + rem(i + 2, N) + A(i,j) = 1; +endfor + +A(1,3) = 1; + +A = A + A' + +eig(A) |