1 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25
3 Testfall: {-1,1-}writeLayer (Leaf 21) BottomUp == [[21]]; Testfall OK
4 Testfall: {-1,2-}writeLayer (Node 11 (Leaf 21) (Leaf 22)) BottomUp == [[21,22],[11]]; Testfall OK
5 Testfall: {-1,3-}writeLayer (Node 11(Leaf 21)(Node 22 (Leaf 31)(Leaf 32))) BottomUp ; Testfall FALSCH
6 Erwartet: {-1,3-}writeLayer (Node 11(Leaf 21)(Node 22 (Leaf 31)(Leaf 32))) BottomUp == [[31,32],[21,22],[11]]
7 Ausgabe: {-1,3-}writeLayer (Node 11(Leaf 21)(Node 22 (Leaf 31)(Leaf 32))) BottomUp ==[[21,31,32],[11]]
8 Testfall: {-1,4-}writeLayer (Node 11(Leaf 21)(Node 22 (Leaf 31)(Leaf 32))) TopDown ; Testfall FALSCH
9 Erwartet: {-1,4-}writeLayer (Node 11(Leaf 21)(Node 22 (Leaf 31)(Leaf 32))) TopDown == [[11],[21,22],[31,32]]
10 Ausgabe: {-1,4-}writeLayer (Node 11(Leaf 21)(Node 22 (Leaf 31)(Leaf 32))) TopDown ==[[11],[21,22]]
11 Testfall: {-1,5-}take 5 [(n::Integer,r,c)|n<-[1..6],c<-[[1..(2^(n+1)-1)]],r<-[let t 0 i=(Leaf i);t(m+1)i=Node i(t m(2*i))(t m(2*i+1));in concat(writeLayer(t n 1)TopDown)],r/=c]== []; Testfall OK
13 Testfaelle OK: 3; Testfaelle FALSCH: 2
16 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25
18 Testfall: {-2,1-}transform (Leaf 27) ; Testfall FALSCH
19 Erwartet: {-2,1-}transform (Leaf 27) == (SNode 27 Nil Nil)
20 Ausgabe: {-2,1-}transform (Leaf 27) ==SNode 27 Nil Nil
21 Testfall: {-2,1-}[1|(SNode 27 Nil Nil)<-[transform (Leaf 27)]] == [1]; Testfall OK
22 Testfall: {-2,1'-}Nil ; Testfall FALSCH
23 Erwartet: {-2,1'-}Nil == Nil
24 Ausgabe: {-2,1'-}Nil ==Nil
25 Testfall: {-2,2-}show (transform (Leaf 27)) == show (SNode 27 Nil Nil); Testfall OK
26 Testfall: {-2,3-}let r=[0..1];f p=[Leaf i|i<-r]++[(Node i l r)|i<-r,l<-p,r<-p];g Nil=[];g(SNode i l r)=g(l)++[i]++g(r)in take 5[u|t<-(f.f.f)[],u<-[(g.transform)t],u/=[0],u/=[1],u/=[0,1]] == []; Testfall OK
27 Testfall: {-2,4-}take 5[(n::Integer,r,c)|n<-[1..9],r<-[let t 0=(Leaf 0);t(m+1)=Node m(t m)(t m);fl(Nil)=[];fl(SNode x l r)=fl(l)++[x]++fl(r)in (fl.transform)((t n))],c<-[[0..(n-1)]],c/=r] == []; Testfall OK
28 Testfall: {-2,5-}take 5[(n::Integer,r,c)|n<-[1..7],r<-[let t 0 i=(Leaf i);t(m+1)i=Node i(t m(2*i))(t m(2*i+1));fl(Nil)=[];fl(SNode x l r)=fl(l)++[x]++fl(r)in (fl.transform)((t n 1))],c<-[[1..(2^(n+1))-1]],c/=r] == []; Testfall OK
30 Testfaelle OK: 5; Testfaelle FALSCH: 2
33 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25
35 Testfall: {-3,1-}(path(Graph[(1,[(2,1)])])9 2 1) == Invalid; Testfall OK
36 Testfall: {-3,1'-}[1|Invalid<-[path(Graph[(1,[(2,1)])])9 2 1]] == [1]; Testfall OK
37 Testfall: {-3,2-}[k|k<-[1..9],path(Graph[(1,[(2,1)])])1 2 k/=Yes] ; Testfall FALSCH
38 Erwartet: {-3,2-}[k|k<-[1..9],path(Graph[(1,[(2,1)])])1 2 k/=Yes] == []
39 Ausgabe: {-3,2-}[k|k<-[1..9],path(Graph[(1,[(2,1)])])1 2 k/=Yes] ==[1,2,3,4,5,6,7,8,9]
40 Testfall: {-3,2'-}let ny Yes=False;ny _=True in[k|k<-[1..9],ny(path(Graph[(1,[(2,1)])])1 2 k)] ; Testfall FALSCH
41 Erwartet: {-3,2'-}let ny Yes=False;ny _=True in[k|k<-[1..9],ny(path(Graph[(1,[(2,1)])])1 2 k)] == []
42 Ausgabe: {-3,2'-}let ny Yes=False;ny _=True in[k|k<-[1..9],ny(path(Graph[(1,[(2,1)])])1 2 k)] ==[1,2,3,4,5,6,7,8,9]
43 Testfall: {-3,3-}let nn No=False;nn _ =True;m=10;r=[1..m];g=Graph[(i,[(j,1)|j<-r,(j`mod`3)>(i`mod`3)])|i<-r]in[i|i<-r,nn(path g 1 i m)] ; Testfall FALSCH
44 Erwartet: {-3,3-}let nn No=False;nn _ =True;m=10;r=[1..m];g=Graph[(i,[(j,1)|j<-r,(j`mod`3)>(i`mod`3)])|i<-r]in[i|i<-r,nn(path g 1 i m)] == [2,5,8]
45 Ausgabe: {-3,3-}let nn No=False;nn _ =True;m=10;r=[1..m];g=Graph[(i,[(j,1)|j<-r,(j`mod`3)>(i`mod`3)])|i<-r]in[i|i<-r,nn(path g 1 i m)] ==[1,2,3,4,5,6,7,8,9,10]
46 Testfall: {-3,3'-}let nn No=False;nn _ =True;m=10;r=[1..m];g=Graph[(i,[(j,1)|j<-r,(j`mod`3)>(i`mod`3)])|i<-r]in[i|i<-r,nn(path g 1 i m)] ; Testfall FALSCH
47 Erwartet: {-3,3'-}let nn No=False;nn _ =True;m=10;r=[1..m];g=Graph[(i,[(j,1)|j<-r,(j`mod`3)>(i`mod`3)])|i<-r]in[i|i<-r,nn(path g 1 i m)] == [1,2,5,8]
48 Ausgabe: {-3,3'-}let nn No=False;nn _ =True;m=10;r=[1..m];g=Graph[(i,[(j,1)|j<-r,(j`mod`3)>(i`mod`3)])|i<-r]in[i|i<-r,nn(path g 1 i m)] ==[1,2,3,4,5,6,7,8,9,10]
49 Testfall: {-3,4-}let ny Yes=False;ny _=True in[n|n<-[1..15],ny(path(Graph[(i,[(i+1,1)])|i<-[1..n]])1 n(n-1))] ; Testfall FALSCH
50 Erwartet: {-3,4-}let ny Yes=False;ny _=True in[n|n<-[1..15],ny(path(Graph[(i,[(i+1,1)])|i<-[1..n]])1 n(n-1))] == []
51 Ausgabe: {-3,4-}let ny Yes=False;ny _=True in[n|n<-[1..15],ny(path(Graph[(i,[(i+1,1)])|i<-[1..n]])1 n(n-1))] ==[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
52 Testfall: {-3,5-}let ny Yes=False;ny _=True in[n|n<-[1..15],ny(path(Graph[(i,[(j,j-i)|j<-[i+1..n]])|i<-[1..n]])1 n (n-1))] ; Testfall FALSCH
53 Erwartet: {-3,5-}let ny Yes=False;ny _=True in[n|n<-[1..15],ny(path(Graph[(i,[(j,j-i)|j<-[i+1..n]])|i<-[1..n]])1 n (n-1))] == []
54 Ausgabe: {-3,5-}let ny Yes=False;ny _=True in[n|n<-[1..15],ny(path(Graph[(i,[(j,j-i)|j<-[i+1..n]])|i<-[1..n]])1 n (n-1))] ==[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
55 Testfall: {-3,5'-}let nn No=False;nn _ =True in[n|n<-[15],nn(path(Graph[(i,[(i+1,1)])|i<-[1..n]])1 n(n-2))] ; Testfall FALSCH
56 Erwartet: {-3,5'-}let nn No=False;nn _ =True in[n|n<-[15],nn(path(Graph[(i,[(i+1,1)])|i<-[1..n]])1 n(n-2))] == []
57 Ausgabe: {-3,5'-}let nn No=False;nn _ =True in[n|n<-[15],nn(path(Graph[(i,[(i+1,1)])|i<-[1..n]])1 n(n-2))] ==[15]
59 Testfaelle OK: 2; Testfaelle FALSCH: 7
62 Punkte pro Testfall: 5; Abzug pro fehlerhaften Testfall: 0; Maximum: 25
64 Testfall: {-4,1-}minpath (Graph[(1,[(2,1)])])1 2 ; Testfall FALSCH
65 Erwartet: {-4,1-}minpath (Graph[(1,[(2,1)])])1 2 == ([1,2],1)
66 Ausgabe: {-4,1-}minpath (Graph[(1,[(2,1)])])1 2 ==ERROR - Undefined variable "minpath"
67 Testfall: {-4,2-}let m=5;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)>=(i`mod`3)])|i<-r]in take 11[c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]] ; Testfall FALSCH
68 Erwartet: {-4,2-}let m=5;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)>=(i`mod`3)])|i<-r]in take 11[c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]] == [1,0,1,1,0,0,0,1,1,1,1]
69 Ausgabe: {-4,2-}let m=5;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)>=(i`mod`3)])|i<-r]in take 11[c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]] ==ERROR - Undefined variable "minpath"
70 Testfall: {-4,3-}let m=4;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 9 ([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) ; Testfall FALSCH
71 Erwartet: {-4,3-}let m=4;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 9 ([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) == [1,1,2,1,1,1,1,1,1]
72 Ausgabe: {-4,3-}let m=4;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 9 ([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) ==ERROR - Undefined variable "minpath"
73 Testfall: {-4,4-}let m=5;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 11([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) ; Testfall FALSCH
74 Erwartet: {-4,4-}let m=5;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 11([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) == [1,1,2,1,1,1,1,2,1,1,1]
75 Ausgabe: {-4,4-}let m=5;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 11([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) ==ERROR - Undefined variable "minpath"
76 Testfall: {-4,5'-}let m=6;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 11([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) ; Testfall FALSCH
77 Erwartet: {-4,5'-}let m=6;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 11([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) == [1,1,2,1,1,1,1,1,2,1,1]
78 Ausgabe: {-4,5'-}let m=6;r=[1..m];g=Graph[(i,[(j,1)|j<-r,i/=j,(j`mod`3)/=(i`mod`3)])|i<-r]in take 11([c|i<-r,j<-r,i/=j,(_,c)<-[minpath g i j]]) ==ERROR - Undefined variable "minpath"
80 Testfaelle OK: 0; Testfaelle FALSCH: 5