From f651ceb85c7cc67df4557f20751f978cb73a1f5d Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Tue, 15 Sep 2015 21:48:10 +0200 Subject: [PATCH] updatesssss --- ar/assignments/.gitignore | 1 + ar/assignments/as11.py | 31 +++++++++++++++++++++++++ {complexity_theory => ct}/syllabus.pdf | Bin 3 files changed, 32 insertions(+) create mode 100644 ar/assignments/.gitignore create mode 100644 ar/assignments/as11.py rename {complexity_theory => ct}/syllabus.pdf (100%) diff --git a/ar/assignments/.gitignore b/ar/assignments/.gitignore new file mode 100644 index 0000000..9aa6a64 --- /dev/null +++ b/ar/assignments/.gitignore @@ -0,0 +1 @@ +output.log diff --git a/ar/assignments/as11.py b/ar/assignments/as11.py new file mode 100644 index 0000000..4df0a0c --- /dev/null +++ b/ar/assignments/as11.py @@ -0,0 +1,31 @@ +niter = range(500) +nvar = range(7) + +for a in niter: + for b in nvar: + print '(define a_{}_{}::int)'.format(a, b) + +for a in nvar: + print '(assert (= a_0_{} {}))'.format(a, a+1) + +for a in niter[1:]: + for b in nvar[1:-1]: + print '(assert (= a_{0}_{1} (+ a_{2}_{3} a_{2}_{4})))'.format( + a, b, a-1, b-1, b+1) + +for a in niter[1:]: + print '(assert (= a_{}_0 a_{}_0))'.format(a-1, a) + print '(assert (= a_{}_6 a_{}_6))'.format(a-1, a) + + +print '(assert (or', +for a in niter: + for b1 in nvar: + for b2 in nvar: + if b1 != b2: + print '(and (>= a_{0}_{1} 50) (= a_{0}_{2} a_{0}_{1}))'.format( + a, b1, b2), +print '))' + +print '(check)' +print '(show-model)' diff --git a/complexity_theory/syllabus.pdf b/ct/syllabus.pdf similarity index 100% rename from complexity_theory/syllabus.pdf rename to ct/syllabus.pdf -- 2.20.1