summaryrefslogtreecommitdiffstats
path: root/AufgabeFFP8.hs
diff options
context:
space:
mode:
Diffstat (limited to 'AufgabeFFP8.hs')
-rw-r--r--AufgabeFFP8.hs42
1 files changed, 42 insertions, 0 deletions
diff --git a/AufgabeFFP8.hs b/AufgabeFFP8.hs
new file mode 100644
index 0000000..c2e3583
--- /dev/null
+++ b/AufgabeFFP8.hs
@@ -0,0 +1,42 @@
1module AufgabeFFP8
2where
3
4import Data.Char
5import Data.List hiding ((\\), insert, delete)
6import Test.QuickCheck
7
8type Nat = [Int]
9
10(\\) :: Eq a => [a] -> [a] -> [a]
11xs \\ ys = filter (\x -> x `notElem` ys) xs
12
13minfree_bv :: [Int] -> Int
14minfree_bv xs = head ([0..] \\ xs)
15
16-- checklist
17--minfree_chl :: [Int] -> Int
18
19-- countlist
20--minfree_col :: [Int] -> Int
21
22-- basic divice-and-conquer
23--minfree_b :: [Int] -> Int
24
25-- refined divice-and-conquer
26--minfree_r :: [Int] -> Int
27
28-- optimised divice-and-conquer
29--minfree_o :: [Int] -> Int
30--
31-- basic divice-and-conquer mittels higher order function
32--minfree_bhof :: [Int] -> Int
33
34-- refined divice-and-conquer mittels higher order function
35--minfree_rhof :: [Int] -> Int
36
37-- optimised divice-and-conquer mittels higher order function
38--minfree_ohof :: [Int] -> Int
39
40
41
42-- QuickCheck part