Hausdorff (Subscript[ℓ, 1]) and LS distance between two sets A,B

Input: sets A,B;
Output: Hausdorff distance between sets A,B;
Submodules: none needed

(* Hausdorff (Subscript[ℓ, 1]) distance *)
HD1[a_,b_]:=Module[{m,n,a1,b1},
If[Length[a]>Length[b],a1=b;b1=a,a1=a;b1=b];
m=Length[a1];n=Length[b1];
Max[Max[Table[Min[Table[Norm[a1[[i]]-b1[[j]],1],{j,n}]],{i,m}]],Max[Table[Min[Table[Norm[a1[[i]]-b1[[j]],1],{i,m}]],{j,n}]]]]
(* Hausdorff LS distance *)
HD2[a_,b_]:=Module[{m,n,a1,b1},
If[Length[a]>Length[b],a1=b;b1=a,a1=a;b1=b];
m=Length[a1];n=Length[b1];
Max[Max[Table[Min[Table[Norm[a1[[i]]-b1[[j]]]^2,{j,n}]],{i,m}]],Max[Table[Min[Table[Norm[a1[[i]]-b1[[j]]]^2,{i,m}]],{j,n}]]]]