diff options
| -rw-r--r-- | AufgabeFFP8.hs | 42 |
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 @@ | |||
| 1 | module AufgabeFFP8 | ||
| 2 | where | ||
| 3 | |||
| 4 | import Data.Char | ||
| 5 | import Data.List hiding ((\\), insert, delete) | ||
| 6 | import Test.QuickCheck | ||
| 7 | |||
| 8 | type Nat = [Int] | ||
| 9 | |||
| 10 | (\\) :: Eq a => [a] -> [a] -> [a] | ||
| 11 | xs \\ ys = filter (\x -> x `notElem` ys) xs | ||
| 12 | |||
| 13 | minfree_bv :: [Int] -> Int | ||
| 14 | minfree_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 | ||
