aboutsummaryrefslogtreecommitdiffstats
path: root/vorlesungen/slides/8/wilf.m
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2021-06-14 07:26:10 +0200
committerGitHub <noreply@github.com>2021-06-14 07:26:10 +0200
commit114633b43a0f1ebedbc5dfd85f75ede9841f26fd (patch)
tree18e61c7d69883a1c9b69098b7d36856abaed5c1e /vorlesungen/slides/8/wilf.m
parentDelete buch.pdf (diff)
parentFix references.bib (diff)
downloadSeminarMatrizen-114633b43a0f1ebedbc5dfd85f75ede9841f26fd.tar.gz
SeminarMatrizen-114633b43a0f1ebedbc5dfd85f75ede9841f26fd.zip
Merge branch 'master' into master
Diffstat (limited to 'vorlesungen/slides/8/wilf.m')
-rw-r--r--vorlesungen/slides/8/wilf.m22
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)