From 2993b0e41d9647c4e13a414c6dbb766aea11d009 Mon Sep 17 00:00:00 2001 From: totycro Date: Tue, 29 May 2012 19:17:17 +0200 Subject: added aufgabe 8 template --- AufgabeFFP8.hs | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 AufgabeFFP8.hs diff --git a/AufgabeFFP8.hs b/AufgabeFFP8.hs new file mode 100644 index 0000000..c2e3583 --- /dev/null +++ b/AufgabeFFP8.hs @@ -0,0 +1,42 @@ +module AufgabeFFP8 +where + +import Data.Char +import Data.List hiding ((\\), insert, delete) +import Test.QuickCheck + +type Nat = [Int] + +(\\) :: Eq a => [a] -> [a] -> [a] +xs \\ ys = filter (\x -> x `notElem` ys) xs + +minfree_bv :: [Int] -> Int +minfree_bv xs = head ([0..] \\ xs) + +-- checklist +--minfree_chl :: [Int] -> Int + +-- countlist +--minfree_col :: [Int] -> Int + +-- basic divice-and-conquer +--minfree_b :: [Int] -> Int + +-- refined divice-and-conquer +--minfree_r :: [Int] -> Int + +-- optimised divice-and-conquer +--minfree_o :: [Int] -> Int +-- +-- basic divice-and-conquer mittels higher order function +--minfree_bhof :: [Int] -> Int + +-- refined divice-and-conquer mittels higher order function +--minfree_rhof :: [Int] -> Int + +-- optimised divice-and-conquer mittels higher order function +--minfree_ohof :: [Int] -> Int + + + +-- QuickCheck part -- cgit v1.2.3