diff options
| author | totycro <totycro@unknown-horizons.org> | 2012-05-29 19:17:17 +0200 |
|---|---|---|
| committer | totycro <totycro@unknown-horizons.org> | 2012-05-29 19:17:17 +0200 |
| commit | 2993b0e41d9647c4e13a414c6dbb766aea11d009 (patch) | |
| tree | 76eef421578e497d767e6105f95b7b5de7b601a8 | |
| parent | 45cfb83e7a74121f8847f73fdc522f5785470733 (diff) | |
| download | ffp-2993b0e41d9647c4e13a414c6dbb766aea11d009.tar.gz ffp-2993b0e41d9647c4e13a414c6dbb766aea11d009.tar.bz2 ffp-2993b0e41d9647c4e13a414c6dbb766aea11d009.zip | |
added aufgabe 8 template
| -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 | ||
